@chili-publish/studio-sdk 1.43.0 → 1.44.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 (695) hide show
  1. package/_bundles/main.js +2 -2
  2. package/_bundles/main.js.map +1 -1
  3. package/connector-types/src/Connector.Shared.d.ts +1 -1
  4. package/connector-types/src/DataConnector.d.ts +8 -2
  5. package/lib/src/connector-types/src/Common.cjs.js +12 -0
  6. package/lib/src/connector-types/src/Common.cjs.js.map +1 -0
  7. package/lib/src/connector-types/src/Common.es.js +12 -0
  8. package/lib/src/connector-types/src/Common.es.js.map +1 -0
  9. package/lib/src/controllers/ActionController.cjs.js +78 -0
  10. package/lib/src/controllers/ActionController.cjs.js.map +1 -0
  11. package/lib/src/controllers/ActionController.es.js +78 -0
  12. package/lib/src/controllers/ActionController.es.js.map +1 -0
  13. package/lib/src/controllers/AnimationController.cjs.js +68 -0
  14. package/lib/src/controllers/AnimationController.cjs.js.map +1 -0
  15. package/lib/src/controllers/AnimationController.es.js +68 -0
  16. package/lib/src/controllers/AnimationController.es.js.map +1 -0
  17. package/lib/src/controllers/BarcodeController.cjs.js +159 -0
  18. package/lib/src/controllers/BarcodeController.cjs.js.map +1 -0
  19. package/lib/src/controllers/BarcodeController.es.js +159 -0
  20. package/lib/src/controllers/BarcodeController.es.js.map +1 -0
  21. package/lib/src/controllers/BrandKitController.cjs.js +142 -0
  22. package/lib/src/controllers/BrandKitController.cjs.js.map +1 -0
  23. package/lib/src/controllers/BrandKitController.es.js +142 -0
  24. package/lib/src/controllers/BrandKitController.es.js.map +1 -0
  25. package/lib/src/controllers/CanvasController.cjs.js +45 -0
  26. package/lib/src/controllers/CanvasController.cjs.js.map +1 -0
  27. package/lib/src/controllers/CanvasController.es.js +45 -0
  28. package/lib/src/controllers/CanvasController.es.js.map +1 -0
  29. package/lib/src/controllers/CharacterStyleController.cjs.js +58 -0
  30. package/lib/src/controllers/CharacterStyleController.cjs.js.map +1 -0
  31. package/lib/src/controllers/CharacterStyleController.es.js +58 -0
  32. package/lib/src/controllers/CharacterStyleController.es.js.map +1 -0
  33. package/lib/src/controllers/ClipboardController.cjs.js +54 -0
  34. package/lib/src/controllers/ClipboardController.cjs.js.map +1 -0
  35. package/lib/src/controllers/ClipboardController.es.js +54 -0
  36. package/lib/src/controllers/ClipboardController.es.js.map +1 -0
  37. package/lib/src/controllers/ColorConversionController.cjs.js +30 -0
  38. package/lib/src/controllers/ColorConversionController.cjs.js.map +1 -0
  39. package/lib/src/controllers/ColorConversionController.es.js +30 -0
  40. package/lib/src/controllers/ColorConversionController.es.js.map +1 -0
  41. package/lib/src/controllers/ColorStyleController.cjs.js +63 -0
  42. package/lib/src/controllers/ColorStyleController.cjs.js.map +1 -0
  43. package/lib/src/controllers/ColorStyleController.es.js +63 -0
  44. package/lib/src/controllers/ColorStyleController.es.js.map +1 -0
  45. package/lib/src/controllers/ComponentConnectorController.cjs.js +54 -0
  46. package/lib/src/controllers/ComponentConnectorController.cjs.js.map +1 -0
  47. package/lib/src/controllers/ComponentConnectorController.es.js +54 -0
  48. package/lib/src/controllers/ComponentConnectorController.es.js.map +1 -0
  49. package/lib/src/controllers/ComponentController.cjs.js +38 -0
  50. package/lib/src/controllers/ComponentController.cjs.js.map +1 -0
  51. package/lib/src/controllers/ComponentController.es.js +38 -0
  52. package/lib/src/controllers/ComponentController.es.js.map +1 -0
  53. package/lib/src/controllers/ComponentGridController.cjs.js +50 -0
  54. package/lib/src/controllers/ComponentGridController.cjs.js.map +1 -0
  55. package/lib/src/controllers/ComponentGridController.d.ts +59 -0
  56. package/lib/src/controllers/ComponentGridController.es.js +50 -0
  57. package/lib/src/controllers/ComponentGridController.es.js.map +1 -0
  58. package/lib/src/controllers/ConfigurationController.cjs.js +68 -0
  59. package/lib/src/controllers/ConfigurationController.cjs.js.map +1 -0
  60. package/lib/src/controllers/ConfigurationController.d.ts +6 -0
  61. package/lib/src/controllers/ConfigurationController.es.js +68 -0
  62. package/lib/src/controllers/ConfigurationController.es.js.map +1 -0
  63. package/lib/src/controllers/ConnectorController.cjs.js +190 -0
  64. package/lib/src/controllers/ConnectorController.cjs.js.map +1 -0
  65. package/lib/src/controllers/ConnectorController.es.js +190 -0
  66. package/lib/src/controllers/ConnectorController.es.js.map +1 -0
  67. package/lib/src/controllers/DataConnectorController.cjs.js +88 -0
  68. package/lib/src/controllers/DataConnectorController.cjs.js.map +1 -0
  69. package/lib/src/controllers/DataConnectorController.es.js +88 -0
  70. package/lib/src/controllers/DataConnectorController.es.js.map +1 -0
  71. package/lib/src/controllers/DataSourceController.cjs.js +46 -0
  72. package/lib/src/controllers/DataSourceController.cjs.js.map +1 -0
  73. package/lib/src/controllers/DataSourceController.es.js +46 -0
  74. package/lib/src/controllers/DataSourceController.es.js.map +1 -0
  75. package/lib/src/controllers/DebugController.cjs.js +42 -0
  76. package/lib/src/controllers/DebugController.cjs.js.map +1 -0
  77. package/lib/src/controllers/DebugController.es.js +42 -0
  78. package/lib/src/controllers/DebugController.es.js.map +1 -0
  79. package/lib/src/controllers/DocumentController.cjs.js +40 -0
  80. package/lib/src/controllers/DocumentController.cjs.js.map +1 -0
  81. package/lib/src/controllers/DocumentController.d.ts +6 -0
  82. package/lib/src/controllers/DocumentController.es.js +40 -0
  83. package/lib/src/controllers/DocumentController.es.js.map +1 -0
  84. package/lib/src/controllers/ExperimentController.cjs.js +60 -0
  85. package/lib/src/controllers/ExperimentController.cjs.js.map +1 -0
  86. package/lib/src/controllers/ExperimentController.es.js +60 -0
  87. package/lib/src/controllers/ExperimentController.es.js.map +1 -0
  88. package/lib/src/controllers/FontConnectorController.cjs.js +58 -0
  89. package/lib/src/controllers/FontConnectorController.cjs.js.map +1 -0
  90. package/lib/src/controllers/FontConnectorController.es.js +58 -0
  91. package/lib/src/controllers/FontConnectorController.es.js.map +1 -0
  92. package/lib/src/controllers/FontController.cjs.js +82 -0
  93. package/lib/src/controllers/FontController.cjs.js.map +1 -0
  94. package/lib/src/controllers/FontController.es.js +82 -0
  95. package/lib/src/controllers/FontController.es.js.map +1 -0
  96. package/lib/src/controllers/FrameController.cjs.js +585 -0
  97. package/lib/src/controllers/FrameController.cjs.js.map +1 -0
  98. package/lib/src/controllers/FrameController.d.ts +10 -1
  99. package/lib/src/controllers/FrameController.es.js +585 -0
  100. package/lib/src/controllers/FrameController.es.js.map +1 -0
  101. package/lib/src/controllers/GradientStyleController.cjs.js +59 -0
  102. package/lib/src/controllers/GradientStyleController.cjs.js.map +1 -0
  103. package/lib/src/controllers/GradientStyleController.es.js +59 -0
  104. package/lib/src/controllers/GradientStyleController.es.js.map +1 -0
  105. package/lib/src/controllers/InfoController.cjs.js +12 -0
  106. package/lib/src/controllers/InfoController.cjs.js.map +1 -0
  107. package/lib/src/controllers/InfoController.es.js +12 -0
  108. package/lib/src/controllers/InfoController.es.js.map +1 -0
  109. package/lib/src/controllers/LayoutController.cjs.js +179 -0
  110. package/lib/src/controllers/LayoutController.cjs.js.map +1 -0
  111. package/lib/src/controllers/LayoutController.es.js +179 -0
  112. package/lib/src/controllers/LayoutController.es.js.map +1 -0
  113. package/lib/src/controllers/MediaConnectorController.cjs.js +93 -0
  114. package/lib/src/controllers/MediaConnectorController.cjs.js.map +1 -0
  115. package/lib/src/controllers/MediaConnectorController.es.js +93 -0
  116. package/lib/src/controllers/MediaConnectorController.es.js.map +1 -0
  117. package/lib/src/controllers/PageController.cjs.js +95 -0
  118. package/lib/src/controllers/PageController.cjs.js.map +1 -0
  119. package/lib/src/controllers/PageController.es.js +95 -0
  120. package/lib/src/controllers/PageController.es.js.map +1 -0
  121. package/lib/src/controllers/ParagraphStyleController.cjs.js +58 -0
  122. package/lib/src/controllers/ParagraphStyleController.cjs.js.map +1 -0
  123. package/lib/src/controllers/ParagraphStyleController.es.js +58 -0
  124. package/lib/src/controllers/ParagraphStyleController.es.js.map +1 -0
  125. package/lib/src/controllers/ShapeController.cjs.js +78 -0
  126. package/lib/src/controllers/ShapeController.cjs.js.map +1 -0
  127. package/lib/src/controllers/ShapeController.es.js +78 -0
  128. package/lib/src/controllers/ShapeController.es.js.map +1 -0
  129. package/lib/src/controllers/SubscriberController.cjs.js +188 -0
  130. package/lib/src/controllers/SubscriberController.cjs.js.map +1 -0
  131. package/lib/src/controllers/SubscriberController.d.ts +6 -0
  132. package/lib/src/controllers/SubscriberController.es.js +188 -0
  133. package/lib/src/controllers/SubscriberController.es.js.map +1 -0
  134. package/lib/src/controllers/TextStyleController.cjs.js +38 -0
  135. package/lib/src/controllers/TextStyleController.cjs.js.map +1 -0
  136. package/lib/src/controllers/TextStyleController.es.js +38 -0
  137. package/lib/src/controllers/TextStyleController.es.js.map +1 -0
  138. package/lib/src/controllers/ToolController.cjs.js +65 -0
  139. package/lib/src/controllers/ToolController.cjs.js.map +1 -0
  140. package/lib/src/controllers/ToolController.d.ts +4 -0
  141. package/lib/src/controllers/ToolController.es.js +65 -0
  142. package/lib/src/controllers/ToolController.es.js.map +1 -0
  143. package/lib/src/controllers/UndoManagerController.cjs.js +134 -0
  144. package/lib/src/controllers/UndoManagerController.cjs.js.map +1 -0
  145. package/lib/src/controllers/UndoManagerController.es.js +134 -0
  146. package/lib/src/controllers/UndoManagerController.es.js.map +1 -0
  147. package/lib/src/controllers/UtilsController.cjs.js +97 -0
  148. package/lib/src/controllers/UtilsController.cjs.js.map +1 -0
  149. package/lib/src/controllers/UtilsController.es.js +97 -0
  150. package/lib/src/controllers/UtilsController.es.js.map +1 -0
  151. package/lib/src/controllers/VariableController.cjs.js +433 -0
  152. package/lib/src/controllers/VariableController.cjs.js.map +1 -0
  153. package/lib/src/controllers/VariableController.d.ts +16 -0
  154. package/lib/src/controllers/VariableController.es.js +433 -0
  155. package/lib/src/controllers/VariableController.es.js.map +1 -0
  156. package/lib/src/exceptions/AsyncExceptions.cjs.js +22 -0
  157. package/lib/src/exceptions/AsyncExceptions.cjs.js.map +1 -0
  158. package/lib/src/exceptions/AsyncExceptions.es.js +22 -0
  159. package/lib/src/exceptions/AsyncExceptions.es.js.map +1 -0
  160. package/lib/src/exceptions/Codes.cjs.js +7 -0
  161. package/lib/src/exceptions/Codes.cjs.js.map +1 -0
  162. package/lib/src/exceptions/Codes.es.js +7 -0
  163. package/lib/src/exceptions/Codes.es.js.map +1 -0
  164. package/lib/src/exceptions/Exceptions.cjs.js +17 -0
  165. package/lib/src/exceptions/Exceptions.cjs.js.map +1 -0
  166. package/lib/src/exceptions/Exceptions.es.js +17 -0
  167. package/lib/src/exceptions/Exceptions.es.js.map +1 -0
  168. package/lib/src/exceptions/Helpers.cjs.js +50 -0
  169. package/lib/src/exceptions/Helpers.cjs.js.map +1 -0
  170. package/lib/src/exceptions/Helpers.es.js +50 -0
  171. package/lib/src/exceptions/Helpers.es.js.map +1 -0
  172. package/lib/src/index.cjs.js +138 -0
  173. package/lib/src/index.cjs.js.map +1 -0
  174. package/lib/src/index.d.ts +8 -4
  175. package/lib/src/index.es.js +138 -0
  176. package/lib/src/index.es.js.map +1 -0
  177. package/lib/src/interactions/Connector.cjs.js +199 -0
  178. package/lib/src/interactions/Connector.cjs.js.map +1 -0
  179. package/lib/src/interactions/Connector.d.ts +1 -0
  180. package/lib/src/interactions/Connector.es.js +199 -0
  181. package/lib/src/interactions/Connector.es.js.map +1 -0
  182. package/lib/src/next/NextInitiator.cjs.js +28 -0
  183. package/lib/src/next/NextInitiator.cjs.js.map +1 -0
  184. package/lib/src/next/NextInitiator.es.js +28 -0
  185. package/lib/src/next/NextInitiator.es.js.map +1 -0
  186. package/lib/src/next/controllers/BrandKitController.cjs.js +34 -0
  187. package/lib/src/next/controllers/BrandKitController.cjs.js.map +1 -0
  188. package/lib/src/next/controllers/BrandKitController.es.js +34 -0
  189. package/lib/src/next/controllers/BrandKitController.es.js.map +1 -0
  190. package/lib/src/next/controllers/ConnectorController.cjs.js +38 -0
  191. package/lib/src/next/controllers/ConnectorController.cjs.js.map +1 -0
  192. package/lib/src/next/controllers/ConnectorController.es.js +38 -0
  193. package/lib/src/next/controllers/ConnectorController.es.js.map +1 -0
  194. package/lib/src/next/controllers/PageController.cjs.js +40 -0
  195. package/lib/src/next/controllers/PageController.cjs.js.map +1 -0
  196. package/lib/src/next/controllers/PageController.es.js +40 -0
  197. package/lib/src/next/controllers/PageController.es.js.map +1 -0
  198. package/lib/src/next/controllers/SubscriberController.cjs.js +24 -0
  199. package/lib/src/next/controllers/SubscriberController.cjs.js.map +1 -0
  200. package/lib/src/next/controllers/SubscriberController.es.js +24 -0
  201. package/lib/src/next/controllers/SubscriberController.es.js.map +1 -0
  202. package/lib/src/next/controllers/VariableController.cjs.js +87 -0
  203. package/lib/src/next/controllers/VariableController.cjs.js.map +1 -0
  204. package/lib/src/next/controllers/VariableController.es.js +87 -0
  205. package/lib/src/next/controllers/VariableController.es.js.map +1 -0
  206. package/lib/src/next/index.cjs.js +5 -0
  207. package/lib/src/next/index.cjs.js.map +1 -0
  208. package/lib/src/next/index.es.js +5 -0
  209. package/lib/src/next/index.es.js.map +1 -0
  210. package/lib/src/next/types/ConnectorTypes.cjs.js +10 -0
  211. package/lib/src/next/types/ConnectorTypes.cjs.js.map +1 -0
  212. package/lib/src/next/types/ConnectorTypes.es.js +10 -0
  213. package/lib/src/next/types/ConnectorTypes.es.js.map +1 -0
  214. package/lib/src/sdk/editor-engine.json.cjs.js +9 -0
  215. package/lib/src/sdk/editor-engine.json.cjs.js.map +1 -0
  216. package/lib/src/sdk/editor-engine.json.es.js +9 -0
  217. package/lib/src/sdk/editor-engine.json.es.js.map +1 -0
  218. package/lib/src/sdk/package.json.cjs.js +9 -0
  219. package/lib/src/sdk/package.json.cjs.js.map +1 -0
  220. package/lib/src/sdk/package.json.es.js +9 -0
  221. package/lib/src/sdk/package.json.es.js.map +1 -0
  222. package/lib/src/sdk.cjs.js +231 -0
  223. package/lib/src/sdk.cjs.js.map +1 -0
  224. package/lib/src/sdk.d.ts +2 -0
  225. package/lib/src/sdk.es.js +231 -0
  226. package/lib/src/sdk.es.js.map +1 -0
  227. package/lib/src/types/ActionTypes.cjs.js +12 -0
  228. package/lib/src/types/ActionTypes.cjs.js.map +1 -0
  229. package/lib/src/types/ActionTypes.es.js +12 -0
  230. package/lib/src/types/ActionTypes.es.js.map +1 -0
  231. package/lib/src/types/AnimationTypes.cjs.js +56 -0
  232. package/lib/src/types/AnimationTypes.cjs.js.map +1 -0
  233. package/lib/src/types/AnimationTypes.es.js +56 -0
  234. package/lib/src/types/AnimationTypes.es.js.map +1 -0
  235. package/lib/src/types/BarcodeTypes.cjs.js +45 -0
  236. package/lib/src/types/BarcodeTypes.cjs.js.map +1 -0
  237. package/lib/src/types/BarcodeTypes.es.js +45 -0
  238. package/lib/src/types/BarcodeTypes.es.js.map +1 -0
  239. package/lib/src/types/ColorStyleTypes.cjs.js +23 -0
  240. package/lib/src/types/ColorStyleTypes.cjs.js.map +1 -0
  241. package/lib/src/types/ColorStyleTypes.es.js +23 -0
  242. package/lib/src/types/ColorStyleTypes.es.js.map +1 -0
  243. package/lib/src/types/CommonTypes.cjs.js +30 -0
  244. package/lib/src/types/CommonTypes.cjs.js.map +1 -0
  245. package/lib/src/types/CommonTypes.d.ts +8 -0
  246. package/lib/src/types/CommonTypes.es.js +30 -0
  247. package/lib/src/types/CommonTypes.es.js.map +1 -0
  248. package/lib/src/types/ComponentConnectorTypes.cjs.js +10 -0
  249. package/lib/src/types/ComponentConnectorTypes.cjs.js.map +1 -0
  250. package/lib/src/types/ComponentConnectorTypes.es.js +10 -0
  251. package/lib/src/types/ComponentConnectorTypes.es.js.map +1 -0
  252. package/lib/src/types/ComponentGridTypes.cjs.js +8 -0
  253. package/lib/src/types/ComponentGridTypes.cjs.js.map +1 -0
  254. package/lib/src/types/ComponentGridTypes.d.ts +25 -0
  255. package/lib/src/types/ComponentGridTypes.es.js +8 -0
  256. package/lib/src/types/ComponentGridTypes.es.js.map +1 -0
  257. package/lib/src/types/ConfigurationTypes.cjs.js +39 -0
  258. package/lib/src/types/ConfigurationTypes.cjs.js.map +1 -0
  259. package/lib/src/types/ConfigurationTypes.d.ts +2 -0
  260. package/lib/src/types/ConfigurationTypes.es.js +39 -0
  261. package/lib/src/types/ConfigurationTypes.es.js.map +1 -0
  262. package/lib/src/types/ConnectorTypes.cjs.js +159 -0
  263. package/lib/src/types/ConnectorTypes.cjs.js.map +1 -0
  264. package/lib/src/types/ConnectorTypes.d.ts +10 -6
  265. package/lib/src/types/ConnectorTypes.es.js +159 -0
  266. package/lib/src/types/ConnectorTypes.es.js.map +1 -0
  267. package/lib/src/types/DataConnectorTypes.d.ts +1 -1
  268. package/lib/src/types/DocumentTypes.cjs.js +19 -0
  269. package/lib/src/types/DocumentTypes.cjs.js.map +1 -0
  270. package/lib/src/types/DocumentTypes.es.js +19 -0
  271. package/lib/src/types/DocumentTypes.es.js.map +1 -0
  272. package/lib/src/types/EngineEditModeTypes.cjs.js +13 -0
  273. package/lib/src/types/EngineEditModeTypes.cjs.js.map +1 -0
  274. package/lib/src/types/EngineEditModeTypes.es.js +13 -0
  275. package/lib/src/types/EngineEditModeTypes.es.js.map +1 -0
  276. package/lib/src/types/FontConnectorTypes.cjs.js +9 -0
  277. package/lib/src/types/FontConnectorTypes.cjs.js.map +1 -0
  278. package/lib/src/types/FontConnectorTypes.es.js +9 -0
  279. package/lib/src/types/FontConnectorTypes.es.js.map +1 -0
  280. package/lib/src/types/FrameTypes.cjs.js +174 -0
  281. package/lib/src/types/FrameTypes.cjs.js.map +1 -0
  282. package/lib/src/types/FrameTypes.d.ts +48 -4
  283. package/lib/src/types/FrameTypes.es.js +174 -0
  284. package/lib/src/types/FrameTypes.es.js.map +1 -0
  285. package/lib/src/types/GradientStyleTypes.cjs.js +14 -0
  286. package/lib/src/types/GradientStyleTypes.cjs.js.map +1 -0
  287. package/lib/src/types/GradientStyleTypes.es.js +14 -0
  288. package/lib/src/types/GradientStyleTypes.es.js.map +1 -0
  289. package/lib/src/types/LayoutTypes.cjs.js +31 -0
  290. package/lib/src/types/LayoutTypes.cjs.js.map +1 -0
  291. package/lib/src/types/LayoutTypes.es.js +31 -0
  292. package/lib/src/types/LayoutTypes.es.js.map +1 -0
  293. package/lib/src/types/MediaConnectorTypes.cjs.js +18 -0
  294. package/lib/src/types/MediaConnectorTypes.cjs.js.map +1 -0
  295. package/lib/src/types/MediaConnectorTypes.es.js +18 -0
  296. package/lib/src/types/MediaConnectorTypes.es.js.map +1 -0
  297. package/lib/src/types/ParagraphStyleTypes.cjs.js +21 -0
  298. package/lib/src/types/ParagraphStyleTypes.cjs.js.map +1 -0
  299. package/lib/src/types/ParagraphStyleTypes.es.js +21 -0
  300. package/lib/src/types/ParagraphStyleTypes.es.js.map +1 -0
  301. package/lib/src/types/RichTextRuleTypes.cjs.js +22 -0
  302. package/lib/src/types/RichTextRuleTypes.cjs.js.map +1 -0
  303. package/lib/src/types/RichTextRuleTypes.d.ts +119 -0
  304. package/lib/src/types/RichTextRuleTypes.es.js +22 -0
  305. package/lib/src/types/RichTextRuleTypes.es.js.map +1 -0
  306. package/lib/src/types/ShapeTypes.cjs.js +17 -0
  307. package/lib/src/types/ShapeTypes.cjs.js.map +1 -0
  308. package/lib/src/types/ShapeTypes.es.js +17 -0
  309. package/lib/src/types/ShapeTypes.es.js.map +1 -0
  310. package/lib/src/types/TextStyleTypes.cjs.js +86 -0
  311. package/lib/src/types/TextStyleTypes.cjs.js.map +1 -0
  312. package/lib/src/types/TextStyleTypes.es.js +86 -0
  313. package/lib/src/types/TextStyleTypes.es.js.map +1 -0
  314. package/lib/src/types/VariableTypes.cjs.js +81 -0
  315. package/lib/src/types/VariableTypes.cjs.js.map +1 -0
  316. package/lib/src/types/VariableTypes.d.ts +5 -0
  317. package/lib/src/types/VariableTypes.es.js +81 -0
  318. package/lib/src/types/VariableTypes.es.js.map +1 -0
  319. package/lib/src/types/ViewModeTypes.cjs.js +9 -0
  320. package/lib/src/types/ViewModeTypes.cjs.js.map +1 -0
  321. package/lib/src/types/ViewModeTypes.es.js +9 -0
  322. package/lib/src/types/ViewModeTypes.es.js.map +1 -0
  323. package/lib/src/utils/BrandKitAdapter.cjs.js +42 -0
  324. package/lib/src/utils/BrandKitAdapter.cjs.js.map +1 -0
  325. package/lib/src/utils/BrandKitAdapter.es.js +42 -0
  326. package/lib/src/utils/BrandKitAdapter.es.js.map +1 -0
  327. package/lib/src/utils/ConfigHelper.cjs.js +214 -0
  328. package/lib/src/utils/ConfigHelper.cjs.js.map +1 -0
  329. package/lib/src/utils/ConfigHelper.es.js +214 -0
  330. package/lib/src/utils/ConfigHelper.es.js.map +1 -0
  331. package/lib/src/utils/ConnectorCompatibilityTools.cjs.js +47 -0
  332. package/lib/src/utils/ConnectorCompatibilityTools.cjs.js.map +1 -0
  333. package/lib/src/utils/ConnectorCompatibilityTools.es.js +47 -0
  334. package/lib/src/utils/ConnectorCompatibilityTools.es.js.map +1 -0
  335. package/lib/src/utils/DataItemMappingTools.cjs.js +56 -0
  336. package/lib/src/utils/DataItemMappingTools.cjs.js.map +1 -0
  337. package/lib/src/utils/DataItemMappingTools.d.ts +3 -2
  338. package/lib/src/utils/DataItemMappingTools.es.js +56 -0
  339. package/lib/src/utils/DataItemMappingTools.es.js.map +1 -0
  340. package/lib/src/utils/EditorResponseData.cjs.js +35 -0
  341. package/lib/src/utils/EditorResponseData.cjs.js.map +1 -0
  342. package/lib/src/utils/EditorResponseData.es.js +35 -0
  343. package/lib/src/utils/EditorResponseData.es.js.map +1 -0
  344. package/lib/src/utils/EngineCallbackHandler.cjs.js +25 -0
  345. package/lib/src/utils/EngineCallbackHandler.cjs.js.map +1 -0
  346. package/lib/src/utils/EngineCallbackHandler.es.js +25 -0
  347. package/lib/src/utils/EngineCallbackHandler.es.js.map +1 -0
  348. package/lib/src/utils/EngineEvent.cjs.js +46 -0
  349. package/lib/src/utils/EngineEvent.cjs.js.map +1 -0
  350. package/lib/src/utils/EngineEvent.es.js +46 -0
  351. package/lib/src/utils/EngineEvent.es.js.map +1 -0
  352. package/lib/src/utils/EngineEventTrigger.cjs.js +32 -0
  353. package/lib/src/utils/EngineEventTrigger.cjs.js.map +1 -0
  354. package/lib/src/utils/EngineEventTrigger.es.js +32 -0
  355. package/lib/src/utils/EngineEventTrigger.es.js.map +1 -0
  356. package/lib/src/utils/Enums.cjs.js +52 -0
  357. package/lib/src/utils/Enums.cjs.js.map +1 -0
  358. package/lib/src/utils/Enums.d.ts +2 -1
  359. package/lib/src/utils/Enums.es.js +52 -0
  360. package/lib/src/utils/Enums.es.js.map +1 -0
  361. package/lib/src/utils/LocalConfigurationDecorator.cjs.js +59 -0
  362. package/lib/src/utils/LocalConfigurationDecorator.cjs.js.map +1 -0
  363. package/lib/src/utils/LocalConfigurationDecorator.es.js +59 -0
  364. package/lib/src/utils/LocalConfigurationDecorator.es.js.map +1 -0
  365. package/lib/src/utils/MathUtils.cjs.js +8 -0
  366. package/lib/src/utils/MathUtils.cjs.js.map +1 -0
  367. package/lib/src/utils/MathUtils.es.js +8 -0
  368. package/lib/src/utils/MathUtils.es.js.map +1 -0
  369. package/lib/src/utils/VariableHelper.cjs.js +15 -0
  370. package/lib/src/utils/VariableHelper.cjs.js.map +1 -0
  371. package/lib/src/utils/VariableHelper.es.js +15 -0
  372. package/lib/src/utils/VariableHelper.es.js.map +1 -0
  373. package/package.json +19 -6
  374. package/_bundles/main.es.js +0 -2688
  375. package/_bundles/main.es.js.map +0 -1
  376. package/connector-types/src/Common.js +0 -9
  377. package/connector-types/src/Common.js.map +0 -1
  378. package/connector-types/src/ComponentConnector.js +0 -3
  379. package/connector-types/src/ComponentConnector.js.map +0 -1
  380. package/connector-types/src/Connector.Shared.js +0 -2
  381. package/connector-types/src/Connector.Shared.js.map +0 -1
  382. package/connector-types/src/DataConnector.js +0 -2
  383. package/connector-types/src/DataConnector.js.map +0 -1
  384. package/connector-types/src/FontConnector.js +0 -2
  385. package/connector-types/src/FontConnector.js.map +0 -1
  386. package/connector-types/src/MediaConnector.js +0 -2
  387. package/connector-types/src/MediaConnector.js.map +0 -1
  388. package/connector-types/src/index.js +0 -7
  389. package/connector-types/src/index.js.map +0 -1
  390. package/lib/editor-engine.json +0 -3
  391. package/lib/package.json +0 -87
  392. package/lib/src/controllers/ActionController.js +0 -178
  393. package/lib/src/controllers/ActionController.js.map +0 -1
  394. package/lib/src/controllers/AnimationController.js +0 -135
  395. package/lib/src/controllers/AnimationController.js.map +0 -1
  396. package/lib/src/controllers/BarcodeController.js +0 -288
  397. package/lib/src/controllers/BarcodeController.js.map +0 -1
  398. package/lib/src/controllers/BrandKitController.js +0 -230
  399. package/lib/src/controllers/BrandKitController.js.map +0 -1
  400. package/lib/src/controllers/CanvasController.js +0 -84
  401. package/lib/src/controllers/CanvasController.js.map +0 -1
  402. package/lib/src/controllers/CharacterStyleController.js +0 -119
  403. package/lib/src/controllers/CharacterStyleController.js.map +0 -1
  404. package/lib/src/controllers/ClipboardController.js +0 -87
  405. package/lib/src/controllers/ClipboardController.js.map +0 -1
  406. package/lib/src/controllers/ColorConversionController.js +0 -49
  407. package/lib/src/controllers/ColorConversionController.js.map +0 -1
  408. package/lib/src/controllers/ColorStyleController.js +0 -118
  409. package/lib/src/controllers/ColorStyleController.js.map +0 -1
  410. package/lib/src/controllers/ComponentConnectorController.js +0 -124
  411. package/lib/src/controllers/ComponentConnectorController.js.map +0 -1
  412. package/lib/src/controllers/ComponentController.js +0 -74
  413. package/lib/src/controllers/ComponentController.js.map +0 -1
  414. package/lib/src/controllers/ConfigurationController.js +0 -84
  415. package/lib/src/controllers/ConfigurationController.js.map +0 -1
  416. package/lib/src/controllers/ConnectorController.js +0 -320
  417. package/lib/src/controllers/ConnectorController.js.map +0 -1
  418. package/lib/src/controllers/DataConnectorController.js +0 -129
  419. package/lib/src/controllers/DataConnectorController.js.map +0 -1
  420. package/lib/src/controllers/DataSourceController.js +0 -83
  421. package/lib/src/controllers/DataSourceController.js.map +0 -1
  422. package/lib/src/controllers/DebugController.js +0 -72
  423. package/lib/src/controllers/DebugController.js.map +0 -1
  424. package/lib/src/controllers/DocumentController.js +0 -77
  425. package/lib/src/controllers/DocumentController.js.map +0 -1
  426. package/lib/src/controllers/ExperimentController.js +0 -131
  427. package/lib/src/controllers/ExperimentController.js.map +0 -1
  428. package/lib/src/controllers/FontConnectorController.js +0 -146
  429. package/lib/src/controllers/FontConnectorController.js.map +0 -1
  430. package/lib/src/controllers/FontController.js +0 -178
  431. package/lib/src/controllers/FontController.js.map +0 -1
  432. package/lib/src/controllers/FrameController.js +0 -1308
  433. package/lib/src/controllers/FrameController.js.map +0 -1
  434. package/lib/src/controllers/GradientStyleController.js +0 -114
  435. package/lib/src/controllers/GradientStyleController.js.map +0 -1
  436. package/lib/src/controllers/InfoController.js +0 -20
  437. package/lib/src/controllers/InfoController.js.map +0 -1
  438. package/lib/src/controllers/LayoutController.js +0 -401
  439. package/lib/src/controllers/LayoutController.js.map +0 -1
  440. package/lib/src/controllers/MediaConnectorController.js +0 -177
  441. package/lib/src/controllers/MediaConnectorController.js.map +0 -1
  442. package/lib/src/controllers/PageController.js +0 -186
  443. package/lib/src/controllers/PageController.js.map +0 -1
  444. package/lib/src/controllers/ParagraphStyleController.js +0 -115
  445. package/lib/src/controllers/ParagraphStyleController.js.map +0 -1
  446. package/lib/src/controllers/ShapeController.js +0 -172
  447. package/lib/src/controllers/ShapeController.js.map +0 -1
  448. package/lib/src/controllers/SubscriberController.js +0 -379
  449. package/lib/src/controllers/SubscriberController.js.map +0 -1
  450. package/lib/src/controllers/TextStyleController.js +0 -69
  451. package/lib/src/controllers/TextStyleController.js.map +0 -1
  452. package/lib/src/controllers/ToolController.js +0 -112
  453. package/lib/src/controllers/ToolController.js.map +0 -1
  454. package/lib/src/controllers/UndoManagerController.js +0 -207
  455. package/lib/src/controllers/UndoManagerController.js.map +0 -1
  456. package/lib/src/controllers/UtilsController.js +0 -135
  457. package/lib/src/controllers/UtilsController.js.map +0 -1
  458. package/lib/src/controllers/VariableController.js +0 -891
  459. package/lib/src/controllers/VariableController.js.map +0 -1
  460. package/lib/src/exceptions/AsyncExceptions.js +0 -23
  461. package/lib/src/exceptions/AsyncExceptions.js.map +0 -1
  462. package/lib/src/exceptions/Codes.js +0 -4
  463. package/lib/src/exceptions/Codes.js.map +0 -1
  464. package/lib/src/exceptions/Exceptions.js +0 -13
  465. package/lib/src/exceptions/Exceptions.js.map +0 -1
  466. package/lib/src/exceptions/Helpers.js +0 -55
  467. package/lib/src/exceptions/Helpers.js.map +0 -1
  468. package/lib/src/exceptions/index.js +0 -4
  469. package/lib/src/exceptions/index.js.map +0 -1
  470. package/lib/src/index.js +0 -31
  471. package/lib/src/index.js.map +0 -1
  472. package/lib/src/interactions/Connector.js +0 -195
  473. package/lib/src/interactions/Connector.js.map +0 -1
  474. package/lib/src/next/NextInitiator.js +0 -34
  475. package/lib/src/next/NextInitiator.js.map +0 -1
  476. package/lib/src/next/controllers/BrandKitController.js +0 -57
  477. package/lib/src/next/controllers/BrandKitController.js.map +0 -1
  478. package/lib/src/next/controllers/CanvasController.js +0 -54
  479. package/lib/src/next/controllers/CanvasController.js.map +0 -1
  480. package/lib/src/next/controllers/ConnectorController.js +0 -79
  481. package/lib/src/next/controllers/ConnectorController.js.map +0 -1
  482. package/lib/src/next/controllers/PageController.js +0 -65
  483. package/lib/src/next/controllers/PageController.js.map +0 -1
  484. package/lib/src/next/controllers/SubscriberController.js +0 -42
  485. package/lib/src/next/controllers/SubscriberController.js.map +0 -1
  486. package/lib/src/next/controllers/VariableController.js +0 -158
  487. package/lib/src/next/controllers/VariableController.js.map +0 -1
  488. package/lib/src/next/index.js +0 -2
  489. package/lib/src/next/index.js.map +0 -1
  490. package/lib/src/next/tests/controllers/BrandKitController.test.js +0 -104
  491. package/lib/src/next/tests/controllers/BrandKitController.test.js.map +0 -1
  492. package/lib/src/next/tests/controllers/CanvasController.test.js +0 -37
  493. package/lib/src/next/tests/controllers/CanvasController.test.js.map +0 -1
  494. package/lib/src/next/tests/controllers/ConnectorController.test.js +0 -71
  495. package/lib/src/next/tests/controllers/ConnectorController.test.js.map +0 -1
  496. package/lib/src/next/tests/controllers/PageController.test.js +0 -37
  497. package/lib/src/next/tests/controllers/PageController.test.js.map +0 -1
  498. package/lib/src/next/tests/controllers/SubscriberContoller.test.js +0 -54
  499. package/lib/src/next/tests/controllers/SubscriberContoller.test.js.map +0 -1
  500. package/lib/src/next/tests/controllers/VariableController.test.js +0 -186
  501. package/lib/src/next/tests/controllers/VariableController.test.js.map +0 -1
  502. package/lib/src/next/types/BrandKitTypes.js +0 -2
  503. package/lib/src/next/types/BrandKitTypes.js.map +0 -1
  504. package/lib/src/next/types/ConnectorTypes.js +0 -27
  505. package/lib/src/next/types/ConnectorTypes.js.map +0 -1
  506. package/lib/src/next/types/NextSubscribers.js +0 -2
  507. package/lib/src/next/types/NextSubscribers.js.map +0 -1
  508. package/lib/src/next/types/PageTypes.js +0 -2
  509. package/lib/src/next/types/PageTypes.js.map +0 -1
  510. package/lib/src/next/types/VariableTypes.js +0 -12
  511. package/lib/src/next/types/VariableTypes.js.map +0 -1
  512. package/lib/src/sdk.js +0 -231
  513. package/lib/src/sdk.js.map +0 -1
  514. package/lib/src/setupTests.js +0 -2
  515. package/lib/src/setupTests.js.map +0 -1
  516. package/lib/src/tests/__mocks__/Animations.js +0 -10
  517. package/lib/src/tests/__mocks__/Animations.js.map +0 -1
  518. package/lib/src/tests/__mocks__/Brandkit.js +0 -532
  519. package/lib/src/tests/__mocks__/Brandkit.js.map +0 -1
  520. package/lib/src/tests/__mocks__/Config.js +0 -41
  521. package/lib/src/tests/__mocks__/Config.js.map +0 -1
  522. package/lib/src/tests/__mocks__/FrameProperties.js +0 -20
  523. package/lib/src/tests/__mocks__/FrameProperties.js.map +0 -1
  524. package/lib/src/tests/__mocks__/MockImageFrameSource.js +0 -15
  525. package/lib/src/tests/__mocks__/MockImageFrameSource.js.map +0 -1
  526. package/lib/src/tests/__mocks__/localConfig.js +0 -4
  527. package/lib/src/tests/__mocks__/localConfig.js.map +0 -1
  528. package/lib/src/tests/__mocks__/mockDocument.js +0 -2
  529. package/lib/src/tests/__mocks__/mockDocument.js.map +0 -1
  530. package/lib/src/tests/controllers/ActionController.test.js +0 -156
  531. package/lib/src/tests/controllers/ActionController.test.js.map +0 -1
  532. package/lib/src/tests/controllers/AnimationController.test.js +0 -91
  533. package/lib/src/tests/controllers/AnimationController.test.js.map +0 -1
  534. package/lib/src/tests/controllers/BarcodeController.test.js +0 -292
  535. package/lib/src/tests/controllers/BarcodeController.test.js.map +0 -1
  536. package/lib/src/tests/controllers/BrandKitController.test.js +0 -318
  537. package/lib/src/tests/controllers/BrandKitController.test.js.map +0 -1
  538. package/lib/src/tests/controllers/CanvasController.test.js +0 -58
  539. package/lib/src/tests/controllers/CanvasController.test.js.map +0 -1
  540. package/lib/src/tests/controllers/CharacterStyleController.test.js +0 -155
  541. package/lib/src/tests/controllers/CharacterStyleController.test.js.map +0 -1
  542. package/lib/src/tests/controllers/ClipboardController.test.js +0 -64
  543. package/lib/src/tests/controllers/ClipboardController.test.js.map +0 -1
  544. package/lib/src/tests/controllers/ColorConversionController.test.js +0 -32
  545. package/lib/src/tests/controllers/ColorConversionController.test.js.map +0 -1
  546. package/lib/src/tests/controllers/ColorStyleController.test.js +0 -94
  547. package/lib/src/tests/controllers/ColorStyleController.test.js.map +0 -1
  548. package/lib/src/tests/controllers/ComponentConnectorController.test.js +0 -73
  549. package/lib/src/tests/controllers/ComponentConnectorController.test.js.map +0 -1
  550. package/lib/src/tests/controllers/ComponentController.test.js +0 -52
  551. package/lib/src/tests/controllers/ComponentController.test.js.map +0 -1
  552. package/lib/src/tests/controllers/ConnectorController.test.js +0 -271
  553. package/lib/src/tests/controllers/ConnectorController.test.js.map +0 -1
  554. package/lib/src/tests/controllers/DataConnectorController.test.js +0 -145
  555. package/lib/src/tests/controllers/DataConnectorController.test.js.map +0 -1
  556. package/lib/src/tests/controllers/DataSourceController.test.js +0 -67
  557. package/lib/src/tests/controllers/DataSourceController.test.js.map +0 -1
  558. package/lib/src/tests/controllers/DebugController.test.js +0 -47
  559. package/lib/src/tests/controllers/DebugController.test.js.map +0 -1
  560. package/lib/src/tests/controllers/DocumentController.test.js +0 -63
  561. package/lib/src/tests/controllers/DocumentController.test.js.map +0 -1
  562. package/lib/src/tests/controllers/ExperimentController.test.js +0 -98
  563. package/lib/src/tests/controllers/ExperimentController.test.js.map +0 -1
  564. package/lib/src/tests/controllers/FontConnectorController.test.js +0 -87
  565. package/lib/src/tests/controllers/FontConnectorController.test.js.map +0 -1
  566. package/lib/src/tests/controllers/FontController.test.js +0 -142
  567. package/lib/src/tests/controllers/FontController.test.js.map +0 -1
  568. package/lib/src/tests/controllers/FrameConstraintController.test.js +0 -335
  569. package/lib/src/tests/controllers/FrameConstraintController.test.js.map +0 -1
  570. package/lib/src/tests/controllers/FrameController.test.js +0 -669
  571. package/lib/src/tests/controllers/FrameController.test.js.map +0 -1
  572. package/lib/src/tests/controllers/GradientStyleController.test.js +0 -82
  573. package/lib/src/tests/controllers/GradientStyleController.test.js.map +0 -1
  574. package/lib/src/tests/controllers/InfoController.test.js +0 -26
  575. package/lib/src/tests/controllers/InfoController.test.js.map +0 -1
  576. package/lib/src/tests/controllers/LayoutController.test.js +0 -345
  577. package/lib/src/tests/controllers/LayoutController.test.js.map +0 -1
  578. package/lib/src/tests/controllers/MediaConnectorController.test.js +0 -116
  579. package/lib/src/tests/controllers/MediaConnectorController.test.js.map +0 -1
  580. package/lib/src/tests/controllers/PageController.test.js +0 -141
  581. package/lib/src/tests/controllers/PageController.test.js.map +0 -1
  582. package/lib/src/tests/controllers/ParagraphStyleController.test.js +0 -164
  583. package/lib/src/tests/controllers/ParagraphStyleController.test.js.map +0 -1
  584. package/lib/src/tests/controllers/ShapeController.test.js +0 -102
  585. package/lib/src/tests/controllers/ShapeController.test.js.map +0 -1
  586. package/lib/src/tests/controllers/SubscriberContoller.test.js +0 -467
  587. package/lib/src/tests/controllers/SubscriberContoller.test.js.map +0 -1
  588. package/lib/src/tests/controllers/TextStyleController.test.js +0 -43
  589. package/lib/src/tests/controllers/TextStyleController.test.js.map +0 -1
  590. package/lib/src/tests/controllers/ToolController.test.js +0 -80
  591. package/lib/src/tests/controllers/ToolController.test.js.map +0 -1
  592. package/lib/src/tests/controllers/UndoManagerController.test.js +0 -120
  593. package/lib/src/tests/controllers/UndoManagerController.test.js.map +0 -1
  594. package/lib/src/tests/controllers/UtilsController.test.js +0 -127
  595. package/lib/src/tests/controllers/UtilsController.test.js.map +0 -1
  596. package/lib/src/tests/controllers/VariableController.test.js +0 -579
  597. package/lib/src/tests/controllers/VariableController.test.js.map +0 -1
  598. package/lib/src/tests/index.test.js +0 -26
  599. package/lib/src/tests/index.test.js.map +0 -1
  600. package/lib/src/tests/interactions/Connector.test.js +0 -44
  601. package/lib/src/tests/interactions/Connector.test.js.map +0 -1
  602. package/lib/src/tests/utils/ConnectorCompatibilityTools.test.js +0 -74
  603. package/lib/src/tests/utils/ConnectorCompatibilityTools.test.js.map +0 -1
  604. package/lib/src/tests/utils/EditorResponseData.test.js +0 -125
  605. package/lib/src/tests/utils/EditorResponseData.test.js.map +0 -1
  606. package/lib/src/tests/utils/EventSubscription.test.js +0 -238
  607. package/lib/src/tests/utils/EventSubscription.test.js.map +0 -1
  608. package/lib/src/tests/utils/LocalConfigurationDecorator.test.js +0 -61
  609. package/lib/src/tests/utils/LocalConfigurationDecorator.test.js.map +0 -1
  610. package/lib/src/tests/utils/Logging.test.js +0 -99
  611. package/lib/src/tests/utils/Logging.test.js.map +0 -1
  612. package/lib/src/tests/utils/Round.test.js +0 -16
  613. package/lib/src/tests/utils/Round.test.js.map +0 -1
  614. package/lib/src/types/ActionTypes.js +0 -29
  615. package/lib/src/types/ActionTypes.js.map +0 -1
  616. package/lib/src/types/AnimationTypes.js +0 -49
  617. package/lib/src/types/AnimationTypes.js.map +0 -1
  618. package/lib/src/types/BarcodeTypes.js +0 -39
  619. package/lib/src/types/BarcodeTypes.js.map +0 -1
  620. package/lib/src/types/BrandKitTypes.js +0 -2
  621. package/lib/src/types/BrandKitTypes.js.map +0 -1
  622. package/lib/src/types/CharacterStyleTypes.js +0 -2
  623. package/lib/src/types/CharacterStyleTypes.js.map +0 -1
  624. package/lib/src/types/ClipboardTypes.js +0 -6
  625. package/lib/src/types/ClipboardTypes.js.map +0 -1
  626. package/lib/src/types/ColorStyleTypes.js +0 -42
  627. package/lib/src/types/ColorStyleTypes.js.map +0 -1
  628. package/lib/src/types/CommonTypes.js +0 -28
  629. package/lib/src/types/CommonTypes.js.map +0 -1
  630. package/lib/src/types/ComponentConnectorTypes.js +0 -10
  631. package/lib/src/types/ComponentConnectorTypes.js.map +0 -1
  632. package/lib/src/types/ConfigurationTypes.js +0 -43
  633. package/lib/src/types/ConfigurationTypes.js.map +0 -1
  634. package/lib/src/types/ConnectorTypes.js +0 -207
  635. package/lib/src/types/ConnectorTypes.js.map +0 -1
  636. package/lib/src/types/DataConnectorTypes.js +0 -2
  637. package/lib/src/types/DataConnectorTypes.js.map +0 -1
  638. package/lib/src/types/DebugTypes.js +0 -8
  639. package/lib/src/types/DebugTypes.js.map +0 -1
  640. package/lib/src/types/DocumentTypes.js +0 -35
  641. package/lib/src/types/DocumentTypes.js.map +0 -1
  642. package/lib/src/types/EngineEditModeTypes.js +0 -10
  643. package/lib/src/types/EngineEditModeTypes.js.map +0 -1
  644. package/lib/src/types/FontConnectorTypes.js +0 -6
  645. package/lib/src/types/FontConnectorTypes.js.map +0 -1
  646. package/lib/src/types/FontTypes.js +0 -2
  647. package/lib/src/types/FontTypes.js.map +0 -1
  648. package/lib/src/types/FrameTypes.js +0 -147
  649. package/lib/src/types/FrameTypes.js.map +0 -1
  650. package/lib/src/types/GradientStyleTypes.js +0 -16
  651. package/lib/src/types/GradientStyleTypes.js.map +0 -1
  652. package/lib/src/types/LayoutTypes.js +0 -26
  653. package/lib/src/types/LayoutTypes.js.map +0 -1
  654. package/lib/src/types/MediaConnectorTypes.js +0 -14
  655. package/lib/src/types/MediaConnectorTypes.js.map +0 -1
  656. package/lib/src/types/PageTypes.js +0 -2
  657. package/lib/src/types/PageTypes.js.map +0 -1
  658. package/lib/src/types/ParagraphStyleTypes.js +0 -17
  659. package/lib/src/types/ParagraphStyleTypes.js.map +0 -1
  660. package/lib/src/types/ShapeTypes.js +0 -13
  661. package/lib/src/types/ShapeTypes.js.map +0 -1
  662. package/lib/src/types/TextStyleTypes.js +0 -83
  663. package/lib/src/types/TextStyleTypes.js.map +0 -1
  664. package/lib/src/types/TextTypes.js +0 -6
  665. package/lib/src/types/TextTypes.js.map +0 -1
  666. package/lib/src/types/VariableTypes.js +0 -70
  667. package/lib/src/types/VariableTypes.js.map +0 -1
  668. package/lib/src/types/ViewModeTypes.js +0 -6
  669. package/lib/src/types/ViewModeTypes.js.map +0 -1
  670. package/lib/src/types/ViewportTypes.js +0 -2
  671. package/lib/src/types/ViewportTypes.js.map +0 -1
  672. package/lib/src/utils/BrandKitAdapter.js +0 -45
  673. package/lib/src/utils/BrandKitAdapter.js.map +0 -1
  674. package/lib/src/utils/ConfigHelper.js +0 -92
  675. package/lib/src/utils/ConfigHelper.js.map +0 -1
  676. package/lib/src/utils/ConnectorCompatibilityTools.js +0 -54
  677. package/lib/src/utils/ConnectorCompatibilityTools.js.map +0 -1
  678. package/lib/src/utils/DataItemMappingTools.js +0 -58
  679. package/lib/src/utils/DataItemMappingTools.js.map +0 -1
  680. package/lib/src/utils/EditorResponseData.js +0 -44
  681. package/lib/src/utils/EditorResponseData.js.map +0 -1
  682. package/lib/src/utils/EngineCallbackHandler.js +0 -23
  683. package/lib/src/utils/EngineCallbackHandler.js.map +0 -1
  684. package/lib/src/utils/EngineEvent.js +0 -44
  685. package/lib/src/utils/EngineEvent.js.map +0 -1
  686. package/lib/src/utils/EngineEventTrigger.js +0 -33
  687. package/lib/src/utils/EngineEventTrigger.js.map +0 -1
  688. package/lib/src/utils/Enums.js +0 -47
  689. package/lib/src/utils/Enums.js.map +0 -1
  690. package/lib/src/utils/LocalConfigurationDecorator.js +0 -76
  691. package/lib/src/utils/LocalConfigurationDecorator.js.map +0 -1
  692. package/lib/src/utils/MathUtils.js +0 -5
  693. package/lib/src/utils/MathUtils.js.map +0 -1
  694. package/lib/src/utils/VariableHelper.js +0 -12
  695. package/lib/src/utils/VariableHelper.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"main.es.js","sources":["../node_modules/penpal/lib/enums.js","../node_modules/penpal/lib/createDestructor.js","../node_modules/penpal/lib/createLogger.js","../node_modules/penpal/lib/parent/getOriginFromSrc.js","../node_modules/penpal/lib/errorSerialization.js","../node_modules/penpal/lib/connectCallReceiver.js","../node_modules/penpal/lib/generateId.js","../node_modules/penpal/lib/methodSerialization.js","../node_modules/penpal/lib/connectCallSender.js","../node_modules/penpal/lib/parent/handleAckMessageFactory.js","../node_modules/penpal/lib/parent/handleSynMessageFactory.js","../node_modules/penpal/lib/parent/monitorIframeRemoval.js","../node_modules/penpal/lib/startConnectionTimeout.js","../node_modules/penpal/lib/parent/validateIframeHasSrcOrSrcDoc.js","../node_modules/penpal/lib/parent/connectToChild.js","../src/interactions/Connector.ts","../src/types/ConfigurationTypes.ts","../src/types/DocumentTypes.ts","../src/exceptions/AsyncExceptions.ts","../src/exceptions/Exceptions.ts","../src/exceptions/Codes.ts","../src/exceptions/Helpers.ts","../src/utils/EditorResponseData.ts","../src/controllers/ActionController.ts","../src/controllers/AnimationController.ts","../src/types/BarcodeTypes.ts","../../connector-types/src/Common.ts","../src/types/LayoutTypes.ts","../src/controllers/BarcodeController.ts","../src/utils/BrandKitAdapter.ts","../src/controllers/BrandKitController.ts","../src/controllers/CanvasController.ts","../src/controllers/CharacterStyleController.ts","../src/controllers/ClipboardController.ts","../src/controllers/ColorConversionController.ts","../src/types/ColorStyleTypes.ts","../src/controllers/ColorStyleController.ts","../src/types/ConnectorTypes.ts","../src/utils/ConnectorCompatibilityTools.ts","../src/controllers/ConnectorController.ts","../src/controllers/DataConnectorController.ts","../src/controllers/DataSourceController.ts","../src/controllers/DebugController.ts","../src/controllers/DocumentController.ts","../src/types/FrameTypes.ts","../src/controllers/ExperimentController.ts","../src/controllers/FontConnectorController.ts","../src/controllers/FontController.ts","../src/controllers/ShapeController.ts","../src/controllers/FrameController.ts","../src/controllers/InfoController.ts","../src/controllers/LayoutController.ts","../src/types/MediaConnectorTypes.ts","../src/controllers/MediaConnectorController.ts","../src/controllers/PageController.ts","../src/controllers/ParagraphStyleController.ts","../src/types/VariableTypes.ts","../src/controllers/SubscriberController.ts","../src/controllers/TextStyleController.ts","../src/utils/Enums.ts","../src/controllers/ToolController.ts","../src/controllers/UndoManagerController.ts","../src/utils/MathUtils.ts","../src/controllers/UtilsController.ts","../src/utils/VariableHelper.ts","../src/controllers/VariableController.ts","../src/next/controllers/BrandKitController.ts","../src/next/controllers/SubscriberController.ts","../src/next/controllers/VariableController.ts","../src/next/controllers/ConnectorController.ts","../src/next/controllers/PageController.ts","../src/next/NextInitiator.ts","../src/types/CommonTypes.ts","../src/utils/EngineEventTrigger.ts","../src/utils/EngineCallbackHandler.ts","../src/utils/EngineEvent.ts","../src/utils/ConfigHelper.ts","../src/utils/DataItemMappingTools.ts","../src/controllers/ConfigurationController.ts","../src/utils/LocalConfigurationDecorator.ts","../src/controllers/GradientStyleController.ts","../src/controllers/ComponentConnectorController.ts","../src/controllers/ComponentController.ts","../src/sdk.ts","../src/types/AnimationTypes.ts","../src/types/ViewModeTypes.ts","../src/types/GradientStyleTypes.ts","../src/types/FontConnectorTypes.ts","../src/types/ComponentConnectorTypes.ts","../src/types/TextStyleTypes.ts","../src/types/ParagraphStyleTypes.ts","../src/types/ActionTypes.ts","../src/types/ShapeTypes.ts","../src/types/EngineEditModeTypes.ts","../src/next/types/ConnectorTypes.ts"],"sourcesContent":["export var MessageType;\n(function (MessageType) {\n MessageType[\"Call\"] = \"call\";\n MessageType[\"Reply\"] = \"reply\";\n MessageType[\"Syn\"] = \"syn\";\n MessageType[\"SynAck\"] = \"synAck\";\n MessageType[\"Ack\"] = \"ack\";\n})(MessageType || (MessageType = {}));\nexport var Resolution;\n(function (Resolution) {\n Resolution[\"Fulfilled\"] = \"fulfilled\";\n Resolution[\"Rejected\"] = \"rejected\";\n})(Resolution || (Resolution = {}));\nexport var ErrorCode;\n(function (ErrorCode) {\n ErrorCode[\"ConnectionDestroyed\"] = \"ConnectionDestroyed\";\n ErrorCode[\"ConnectionTimeout\"] = \"ConnectionTimeout\";\n ErrorCode[\"NoIframeSrc\"] = \"NoIframeSrc\";\n})(ErrorCode || (ErrorCode = {}));\nexport var NativeErrorName;\n(function (NativeErrorName) {\n NativeErrorName[\"DataCloneError\"] = \"DataCloneError\";\n})(NativeErrorName || (NativeErrorName = {}));\nexport var NativeEventType;\n(function (NativeEventType) {\n NativeEventType[\"Message\"] = \"message\";\n})(NativeEventType || (NativeEventType = {}));\n","export default (localName, log) => {\n const callbacks = [];\n let destroyed = false;\n return {\n destroy(error) {\n if (!destroyed) {\n destroyed = true;\n log(`${localName}: Destroying connection`);\n callbacks.forEach((callback) => {\n callback(error);\n });\n }\n },\n onDestroy(callback) {\n destroyed ? callback() : callbacks.push(callback);\n },\n };\n};\n","export default (debug) => {\n /**\n * Logs a message if debug is enabled.\n */\n return (...args) => {\n if (debug) {\n console.log('[Penpal]', ...args); // eslint-disable-line no-console\n }\n };\n};\n","const DEFAULT_PORT_BY_PROTOCOL = {\n 'http:': '80',\n 'https:': '443',\n};\nconst URL_REGEX = /^(https?:)?\\/\\/([^/:]+)?(:(\\d+))?/;\nconst opaqueOriginSchemes = ['file:', 'data:'];\n/**\n * Converts a src value into an origin.\n */\nexport default (src) => {\n if (src && opaqueOriginSchemes.find((scheme) => src.startsWith(scheme))) {\n // The origin of the child document is an opaque origin and its\n // serialization is \"null\"\n // https://html.spec.whatwg.org/multipage/origin.html#origin\n return 'null';\n }\n // Note that if src is undefined, then srcdoc is being used instead of src\n // and we can follow this same logic below to get the origin of the parent,\n // which is the origin that we will need to use.\n const location = document.location;\n const regexResult = URL_REGEX.exec(src);\n let protocol;\n let hostname;\n let port;\n if (regexResult) {\n // It's an absolute URL. Use the parsed info.\n // regexResult[1] will be undefined if the URL starts with //\n protocol = regexResult[1] ? regexResult[1] : location.protocol;\n hostname = regexResult[2];\n port = regexResult[4];\n }\n else {\n // It's a relative path. Use the current location's info.\n protocol = location.protocol;\n hostname = location.hostname;\n port = location.port;\n }\n // If the port is the default for the protocol, we don't want to add it to the origin string\n // or it won't match the message's event.origin.\n const portSuffix = port && port !== DEFAULT_PORT_BY_PROTOCOL[protocol] ? `:${port}` : '';\n return `${protocol}//${hostname}${portSuffix}`;\n};\n","/**\n * Converts an error object into a plain object.\n */\nexport const serializeError = ({ name, message, stack, }) => ({\n name,\n message,\n stack,\n});\n/**\n * Converts a plain object into an error object.\n */\nexport const deserializeError = (obj) => {\n const deserializedError = new Error();\n // @ts-ignore\n Object.keys(obj).forEach((key) => (deserializedError[key] = obj[key]));\n return deserializedError;\n};\n","import { serializeError } from './errorSerialization';\nimport { MessageType, NativeEventType, NativeErrorName, Resolution, } from './enums';\n/**\n * Listens for \"call\" messages coming from the remote, executes the corresponding method, and\n * responds with the return value.\n */\nexport default (info, serializedMethods, log) => {\n const { localName, local, remote, originForSending, originForReceiving, } = info;\n let destroyed = false;\n const handleMessageEvent = (event) => {\n if (event.source !== remote || event.data.penpal !== MessageType.Call) {\n return;\n }\n if (event.origin !== originForReceiving) {\n log(`${localName} received message from origin ${event.origin} which did not match expected origin ${originForReceiving}`);\n return;\n }\n const callMessage = event.data;\n const { methodName, args, id } = callMessage;\n log(`${localName}: Received ${methodName}() call`);\n const createPromiseHandler = (resolution) => {\n return (returnValue) => {\n log(`${localName}: Sending ${methodName}() reply`);\n if (destroyed) {\n // It's possible to throw an error here, but it would need to be thrown asynchronously\n // and would only be catchable using window.onerror. This is because the consumer\n // is merely returning a value from their method and not calling any function\n // that they could wrap in a try-catch. Even if the consumer were to catch the error,\n // the value of doing so is questionable. Instead, we'll just log a message.\n log(`${localName}: Unable to send ${methodName}() reply due to destroyed connection`);\n return;\n }\n const message = {\n penpal: MessageType.Reply,\n id,\n resolution,\n returnValue,\n };\n if (resolution === Resolution.Rejected &&\n returnValue instanceof Error) {\n message.returnValue = serializeError(returnValue);\n message.returnValueIsError = true;\n }\n try {\n remote.postMessage(message, originForSending);\n }\n catch (err) {\n // If a consumer attempts to send an object that's not cloneable (e.g., window),\n // we want to ensure the receiver's promise gets rejected.\n if (err.name === NativeErrorName.DataCloneError) {\n const errorReplyMessage = {\n penpal: MessageType.Reply,\n id,\n resolution: Resolution.Rejected,\n returnValue: serializeError(err),\n returnValueIsError: true,\n };\n remote.postMessage(errorReplyMessage, originForSending);\n }\n throw err;\n }\n };\n };\n new Promise((resolve) => resolve(serializedMethods[methodName].apply(serializedMethods, args))).then(createPromiseHandler(Resolution.Fulfilled), createPromiseHandler(Resolution.Rejected));\n };\n local.addEventListener(NativeEventType.Message, handleMessageEvent);\n return () => {\n destroyed = true;\n local.removeEventListener(NativeEventType.Message, handleMessageEvent);\n };\n};\n","let id = 0;\n/**\n * @return {number} A unique ID (not universally unique)\n */\nexport default () => ++id;\n","const KEY_PATH_DELIMITER = '.';\nconst keyPathToSegments = (keyPath) => keyPath ? keyPath.split(KEY_PATH_DELIMITER) : [];\nconst segmentsToKeyPath = (segments) => segments.join(KEY_PATH_DELIMITER);\nconst createKeyPath = (key, prefix) => {\n const segments = keyPathToSegments(prefix || '');\n segments.push(key);\n return segmentsToKeyPath(segments);\n};\n/**\n * Given a `keyPath`, set it to be `value` on `subject`, creating any intermediate\n * objects along the way.\n *\n * @param {Object} subject The object on which to set value.\n * @param {string} keyPath The key path at which to set value.\n * @param {Object} value The value to store at the given key path.\n * @returns {Object} Updated subject.\n */\nexport const setAtKeyPath = (subject, keyPath, value) => {\n const segments = keyPathToSegments(keyPath);\n segments.reduce((prevSubject, key, idx) => {\n if (typeof prevSubject[key] === 'undefined') {\n prevSubject[key] = {};\n }\n if (idx === segments.length - 1) {\n prevSubject[key] = value;\n }\n return prevSubject[key];\n }, subject);\n return subject;\n};\n/**\n * Given a dictionary of (nested) keys to function, flatten them to a map\n * from key path to function.\n *\n * @param {Object} methods The (potentially nested) object to serialize.\n * @param {string} prefix A string with which to prefix entries. Typically not intended to be used by consumers.\n * @returns {Object} An map from key path in `methods` to functions.\n */\nexport const serializeMethods = (methods, prefix) => {\n const flattenedMethods = {};\n Object.keys(methods).forEach((key) => {\n const value = methods[key];\n const keyPath = createKeyPath(key, prefix);\n if (typeof value === 'object') {\n // Recurse into any nested children.\n Object.assign(flattenedMethods, serializeMethods(value, keyPath));\n }\n if (typeof value === 'function') {\n // If we've found a method, expose it.\n flattenedMethods[keyPath] = value;\n }\n });\n return flattenedMethods;\n};\n/**\n * Given a map of key paths to functions, unpack the key paths to an object.\n *\n * @param {Object} flattenedMethods A map of key paths to functions to unpack.\n * @returns {Object} A (potentially nested) map of functions.\n */\nexport const deserializeMethods = (flattenedMethods) => {\n const methods = {};\n for (const keyPath in flattenedMethods) {\n setAtKeyPath(methods, keyPath, flattenedMethods[keyPath]);\n }\n return methods;\n};\n","import generateId from './generateId';\nimport { deserializeError } from './errorSerialization';\nimport { deserializeMethods } from './methodSerialization';\nimport { ErrorCode, MessageType, NativeEventType, Resolution } from './enums';\n/**\n * Augments an object with methods that match those defined by the remote. When these methods are\n * called, a \"call\" message will be sent to the remote, the remote's corresponding method will be\n * executed, and the method's return value will be returned via a message.\n * @param {Object} callSender Sender object that should be augmented with methods.\n * @param {Object} info Information about the local and remote windows.\n * @param {Array} methodKeyPaths Key paths of methods available to be called on the remote.\n * @param {Promise} destructionPromise A promise resolved when destroy() is called on the penpal\n * connection.\n * @returns {Object} The call sender object with methods that may be called.\n */\nexport default (callSender, info, methodKeyPaths, destroyConnection, log) => {\n const { localName, local, remote, originForSending, originForReceiving, } = info;\n let destroyed = false;\n log(`${localName}: Connecting call sender`);\n const createMethodProxy = (methodName) => {\n return (...args) => {\n log(`${localName}: Sending ${methodName}() call`);\n // This handles the case where the iframe has been removed from the DOM\n // (and therefore its window closed), the consumer has not yet\n // called destroy(), and the user calls a method exposed by\n // the remote. We detect the iframe has been removed and force\n // a destroy() immediately so that the consumer sees the error saying\n // the connection has been destroyed. We wrap this check in a try catch\n // because Edge throws an \"Object expected\" error when accessing\n // contentWindow.closed on a contentWindow from an iframe that's been\n // removed from the DOM.\n let iframeRemoved;\n try {\n if (remote.closed) {\n iframeRemoved = true;\n }\n }\n catch (e) {\n iframeRemoved = true;\n }\n if (iframeRemoved) {\n destroyConnection();\n }\n if (destroyed) {\n const error = new Error(`Unable to send ${methodName}() call due ` + `to destroyed connection`);\n error.code = ErrorCode.ConnectionDestroyed;\n throw error;\n }\n return new Promise((resolve, reject) => {\n const id = generateId();\n const handleMessageEvent = (event) => {\n if (event.source !== remote ||\n event.data.penpal !== MessageType.Reply ||\n event.data.id !== id) {\n return;\n }\n if (event.origin !== originForReceiving) {\n log(`${localName} received message from origin ${event.origin} which did not match expected origin ${originForReceiving}`);\n return;\n }\n const replyMessage = event.data;\n log(`${localName}: Received ${methodName}() reply`);\n local.removeEventListener(NativeEventType.Message, handleMessageEvent);\n let returnValue = replyMessage.returnValue;\n if (replyMessage.returnValueIsError) {\n returnValue = deserializeError(returnValue);\n }\n (replyMessage.resolution === Resolution.Fulfilled ? resolve : reject)(returnValue);\n };\n local.addEventListener(NativeEventType.Message, handleMessageEvent);\n const callMessage = {\n penpal: MessageType.Call,\n id,\n methodName,\n args,\n };\n remote.postMessage(callMessage, originForSending);\n });\n };\n };\n // Wrap each method in a proxy which sends it to the corresponding receiver.\n const flattenedMethods = methodKeyPaths.reduce((api, name) => {\n api[name] = createMethodProxy(name);\n return api;\n }, {});\n // Unpack the structure of the provided methods object onto the CallSender, exposing\n // the methods in the same shape they were provided.\n Object.assign(callSender, deserializeMethods(flattenedMethods));\n return () => {\n destroyed = true;\n };\n};\n","import connectCallReceiver from '../connectCallReceiver';\nimport connectCallSender from '../connectCallSender';\n/**\n * Handles an ACK handshake message.\n */\nexport default (serializedMethods, childOrigin, originForSending, destructor, log) => {\n const { destroy, onDestroy } = destructor;\n let destroyCallReceiver;\n let receiverMethodNames;\n // We resolve the promise with the call sender. If the child reconnects\n // (for example, after refreshing or navigating to another page that\n // uses Penpal, we'll update the call sender with methods that match the\n // latest provided by the child.\n const callSender = {};\n return (event) => {\n if (event.origin !== childOrigin) {\n log(`Parent: Handshake - Received ACK message from origin ${event.origin} which did not match expected origin ${childOrigin}`);\n return;\n }\n log('Parent: Handshake - Received ACK');\n const info = {\n localName: 'Parent',\n local: window,\n remote: event.source,\n originForSending: originForSending,\n originForReceiving: childOrigin,\n };\n // If the child reconnected, we need to destroy the prior call receiver\n // before setting up a new one.\n if (destroyCallReceiver) {\n destroyCallReceiver();\n }\n destroyCallReceiver = connectCallReceiver(info, serializedMethods, log);\n onDestroy(destroyCallReceiver);\n // If the child reconnected, we need to remove the methods from the\n // previous call receiver off the sender.\n if (receiverMethodNames) {\n receiverMethodNames.forEach((receiverMethodName) => {\n delete callSender[receiverMethodName];\n });\n }\n receiverMethodNames = event.data.methodNames;\n const destroyCallSender = connectCallSender(callSender, info, receiverMethodNames, destroy, log);\n onDestroy(destroyCallSender);\n return callSender;\n };\n};\n","import { MessageType } from '../enums';\n/**\n * Handles a SYN handshake message.\n */\nexport default (log, serializedMethods, childOrigin, originForSending) => {\n return (event) => {\n if (event.origin !== childOrigin) {\n log(`Parent: Handshake - Received SYN message from origin ${event.origin} which did not match expected origin ${childOrigin}`);\n return;\n }\n log('Parent: Handshake - Received SYN, responding with SYN-ACK');\n const synAckMessage = {\n penpal: MessageType.SynAck,\n methodNames: Object.keys(serializedMethods),\n };\n event.source.postMessage(synAckMessage, originForSending);\n };\n};\n","const CHECK_IFRAME_IN_DOC_INTERVAL = 60000;\n/**\n * Monitors for iframe removal and destroys connection if iframe\n * is found to have been removed from DOM. This is to prevent memory\n * leaks when the iframe is removed from the document and the consumer\n * hasn't called destroy(). Without this, event listeners attached to\n * the window would stick around and since the event handlers have a\n * reference to the iframe in their closures, the iframe would stick\n * around too.\n */\nexport default (iframe, destructor) => {\n const { destroy, onDestroy } = destructor;\n const checkIframeInDocIntervalId = setInterval(() => {\n if (!iframe.isConnected) {\n clearInterval(checkIframeInDocIntervalId);\n destroy();\n }\n }, CHECK_IFRAME_IN_DOC_INTERVAL);\n onDestroy(() => {\n clearInterval(checkIframeInDocIntervalId);\n });\n};\n","import { ErrorCode } from './enums';\n/**\n * Starts a timeout and calls the callback with an error\n * if the timeout completes before the stop function is called.\n */\nexport default (timeout, callback) => {\n let timeoutId;\n if (timeout !== undefined) {\n timeoutId = window.setTimeout(() => {\n const error = new Error(`Connection timed out after ${timeout}ms`);\n error.code = ErrorCode.ConnectionTimeout;\n callback(error);\n }, timeout);\n }\n return () => {\n clearTimeout(timeoutId);\n };\n};\n","import { ErrorCode } from '../enums';\nexport default (iframe) => {\n if (!iframe.src && !iframe.srcdoc) {\n const error = new Error('Iframe must have src or srcdoc property defined.');\n error.code = ErrorCode.NoIframeSrc;\n throw error;\n }\n};\n","import { MessageType, NativeEventType } from '../enums';\nimport createDestructor from '../createDestructor';\nimport createLogger from '../createLogger';\nimport getOriginFromSrc from './getOriginFromSrc';\nimport handleAckMessageFactory from './handleAckMessageFactory';\nimport handleSynMessageFactory from './handleSynMessageFactory';\nimport { serializeMethods } from '../methodSerialization';\nimport monitorIframeRemoval from './monitorIframeRemoval';\nimport startConnectionTimeout from '../startConnectionTimeout';\nimport validateIframeHasSrcOrSrcDoc from './validateIframeHasSrcOrSrcDoc';\n/**\n * Attempts to establish communication with an iframe.\n */\nexport default (options) => {\n let { iframe, methods = {}, childOrigin, timeout, debug = false } = options;\n const log = createLogger(debug);\n const destructor = createDestructor('Parent', log);\n const { onDestroy, destroy } = destructor;\n if (!childOrigin) {\n validateIframeHasSrcOrSrcDoc(iframe);\n childOrigin = getOriginFromSrc(iframe.src);\n }\n // If event.origin is \"null\", the remote protocol is file: or data: and we\n // must post messages with \"*\" as targetOrigin when sending messages.\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#Using_window.postMessage_in_extensions\n const originForSending = childOrigin === 'null' ? '*' : childOrigin;\n const serializedMethods = serializeMethods(methods);\n const handleSynMessage = handleSynMessageFactory(log, serializedMethods, childOrigin, originForSending);\n const handleAckMessage = handleAckMessageFactory(serializedMethods, childOrigin, originForSending, destructor, log);\n const promise = new Promise((resolve, reject) => {\n const stopConnectionTimeout = startConnectionTimeout(timeout, destroy);\n const handleMessage = (event) => {\n if (event.source !== iframe.contentWindow || !event.data) {\n return;\n }\n if (event.data.penpal === MessageType.Syn) {\n handleSynMessage(event);\n return;\n }\n if (event.data.penpal === MessageType.Ack) {\n const callSender = handleAckMessage(event);\n if (callSender) {\n stopConnectionTimeout();\n resolve(callSender);\n }\n return;\n }\n };\n window.addEventListener(NativeEventType.Message, handleMessage);\n log('Parent: Awaiting handshake');\n monitorIframeRemoval(iframe, destructor);\n onDestroy((error) => {\n window.removeEventListener(NativeEventType.Message, handleMessage);\n if (error) {\n reject(error);\n }\n });\n });\n return {\n promise,\n destroy() {\n // Don't allow consumer to pass an error into destroy.\n destroy();\n },\n };\n};\n","import { Connection, connectToChild } from 'penpal';\nimport { Id } from '../types/CommonTypes';\nimport { StudioStyling } from '../types/ConfigurationTypes';\n\nexport const validateEditorLink = (editorLink: string) => {\n const linkValidator = new RegExp(/^(?:http(s)?:\\/\\/)?[\\w.-]+(?:\\.[\\w.-]+)+[\\w]+\\/$/);\n let link = '';\n if (linkValidator.test(editorLink)) {\n link = editorLink;\n } else if (editorLink.indexOf('/index.html') > -1) {\n link = editorLink.replace('/index.html', '/');\n } else if (editorLink.charAt(-1) !== '/') {\n link = `${editorLink}/`;\n }\n return link;\n};\n\nexport const setupFrame = (iframe: HTMLIFrameElement, editorLink: string, styling?: StudioStyling) => {\n const link = validateEditorLink(editorLink);\n const stylingJson = JSON.stringify(styling || {});\n const html = `<html>\n <head>\n <base href=\"/\" />\n <meta charset=\"UTF-8\"/>\n <!-- use this property to pass the StudioStyling to the engine -->\n <meta name=\"studio-styling\" content='${stylingJson}'>\n </head>\n <body>\n <script>\n const handleIframeError = (event) => {\n if (window.parent && window.parent !== window) {\n window.parent.postMessage(\n {\n type: 'iframe-error',\n error: {\n message: event.message,\n filename: event.filename,\n lineno: event.lineno,\n colno: event.colno,\n error: event.error?.toString(),\n },\n },\n window.location.ancestorOrigins[0] || window.location.origin,\n );\n }\n };\n const handleUnhandledRejection = (event) => {\n if (window.parent && window.parent !== window) {\n window.parent.postMessage(\n {\n type: 'iframe-error',\n error: { message: event.reason?.toString() || 'Unhandled promise rejection' },\n },\n window.location.ancestorOrigins[0] || window.location.origin,\n );\n }\n };\n window.addEventListener('error', handleIframeError);\n window.addEventListener('unhandledrejection', handleUnhandledRejection);\n </script>\n <script src=\"${link}init.js\" async></script>\n <script src=\"${link}flutter_bootstrap.js\"></script>\n <script>\n try {\n if(!window?.initializeStudioEngine){\n throw new Error('Failed to initialize studio engine: initializeStudioEngine not found');\n }\n initializeStudioEngine({\n assetBase: '${link}',\n });\n } catch(error) {\n if (window.parent && window.parent !== window) {\n window.parent.postMessage({\n type: 'iframe-error',\n error: {\n message: error?.message || 'Error initializing studio engine',\n error: error?.toString()\n }\n }, window.location.ancestorOrigins[0] || window.location.origin);\n }\n throw error;\n } finally {\n window.removeEventListener('error', handleIframeError);\n window.removeEventListener('unhandledrejection', handleUnhandledRejection);\n }\n </script>\n </body>\n</html>`;\n\n // Set the iframe's content using DOM manipulation\n // eslint-disable-next-line no-param-reassign\n iframe.srcdoc = html;\n};\n\ninterface ConfigParameterTypes {\n onActionsChanged: (state: string) => void;\n onStateChanged: (state: string) => void;\n onAuthExpired: (authRefreshRequest: string) => Promise<string | null>;\n onViewportRequested: () => string | null;\n onDocumentLoaded: () => void;\n onSelectedFramesContentChanged: (state: string) => void;\n onSelectedFramesLayoutChanged: (state: string) => void;\n onFramesLayoutChanged: (state: string) => void;\n onSelectedLayoutPropertiesChanged: (state: string) => void;\n onSelectedLayoutUnitChanged: (state: string) => void;\n /**\n * @deprecated use `onSelectedPageIdChanged` instead\n */\n onPageSelectionChanged: (id: Id) => void;\n onScrubberPositionChanged: (state: string) => void;\n onFrameAnimationsChanged: (state: string) => void;\n onVariableListChanged: (state: string) => void;\n onSelectedToolChanged: (state: string) => void;\n onUndoStateChanged: (state: string) => void;\n onSelectedLayoutFramesChanged: (state: string) => void;\n onSelectedTextStyleChanged: (styles: string) => void;\n onColorsChanged: (colors: string) => void;\n onParagraphStylesChanged: (paragraphStyles: string) => void;\n onCharacterStylesChanged: (characterStyles: string) => void;\n onFontFamiliesChanged: (fonts: string) => void;\n onSelectedLayoutIdChanged: (id: string) => void;\n onLayoutsChanged: (layouts: string) => void;\n onConnectorEvent: (state: string) => void;\n onConnectorsChanged: (state: string) => void;\n onZoomChanged: (scaleFactor: string) => void;\n onSelectedPageIdChanged: (pageId: string) => void;\n onPagesChanged: (pages: string) => void;\n onPageSnapshotInvalidated: (pageId: Id) => void;\n onPageSizeChanged: (scaleFactor: string) => void;\n onShapeCornerRadiusChanged: (cornerRadius: string) => void;\n onCropActiveFrameIdChanged: (id?: Id) => void;\n onAsyncError: (asyncError: string) => void;\n onViewModeChanged: (viewMode: string) => void;\n onBarcodeValidationChanged: (validationResults: string) => void;\n onDataSourceIdChanged: (connectorId?: Id) => void;\n onDocumentIssueListChanged: (documentIssues: string) => void;\n onCustomUndoDataChanged: (customData: string) => void;\n onEngineEditModeChanged: (engineEditMode: string) => void;\n onBrandKitMediaChanged: (brandKitMedia: string) => void;\n}\n\nlet messageHandler: ((event: MessageEvent) => void) | null = null;\n\nconst Connect = (\n editorLink: string,\n params: ConfigParameterTypes,\n setConnection: (connection: Connection) => void,\n editorId = 'chili-editor',\n styling?: StudioStyling,\n onSetupFrameError?: (error: Error) => void,\n) => {\n if (messageHandler) {\n window.removeEventListener('message', messageHandler);\n }\n const editorSelectorId = `#${editorId}`;\n const iframe = document.createElement('iframe');\n iframe.setAttribute('srcdoc', ' ');\n iframe.setAttribute('title', 'Chili-Editor');\n iframe.setAttribute('style', 'width: 100%; height: 100%;');\n iframe.setAttribute('frameBorder', '0');\n iframe.setAttribute('referrerpolicy', 'origin');\n const setupNewFrame = () => {\n const iframeContainer = document.querySelector(editorSelectorId);\n if (iframeContainer) {\n iframeContainer?.appendChild(iframe);\n\n iframe.addEventListener(\n 'error',\n () => {\n const error = new Error('Failed to setup frame: iframe failed to load');\n onSetupFrameError?.(error);\n },\n { capture: true, once: true },\n );\n\n try {\n setupFrame(iframe, editorLink, styling);\n } catch (error: unknown) {\n if (error instanceof Error) {\n onSetupFrameError?.(error);\n } else {\n onSetupFrameError?.(new Error(`Failed to setup frame: ${error}`));\n }\n }\n }\n };\n\n if (document.readyState === 'complete' || document.readyState === 'interactive') {\n setupNewFrame();\n } else {\n document.addEventListener('DOMContentLoaded', () => {\n setupNewFrame();\n });\n }\n\n messageHandler = (event: MessageEvent) => {\n if (event.source !== iframe.contentWindow) {\n return;\n }\n if (event.data?.type === 'iframe-error') {\n const errorData = event.data.error;\n const error = new Error(errorData.message || 'Failed to setup frame: error in iframe');\n onSetupFrameError?.(error);\n }\n };\n\n window.addEventListener('message', messageHandler);\n\n setConnection(\n connectToChild({\n // The iframe to which a connection should be made\n iframe,\n // All the methods that we want to expose to the child should be inside the methods object\n // f.e. stateChange(documentJson)\n methods: {\n actionsChanged: params.onActionsChanged,\n stateChanged: params.onStateChanged,\n documentLoaded: params.onDocumentLoaded,\n authExpired: params.onAuthExpired,\n viewportRequested: params.onViewportRequested,\n selectedFramesContent: params.onSelectedFramesContentChanged,\n selectedFramesLayout: params.onSelectedFramesLayoutChanged,\n allFramesLayout: params.onFramesLayoutChanged,\n selectedLayoutProperties: params.onSelectedLayoutPropertiesChanged,\n openLayoutPropertiesPanel: params.onPageSelectionChanged,\n selectedLayoutUnit: params.onSelectedLayoutUnitChanged,\n scrubberPositionChanged: params.onScrubberPositionChanged,\n frameAnimationsChanged: params.onFrameAnimationsChanged,\n selectedToolChanged: params.onSelectedToolChanged,\n variableListChanged: params.onVariableListChanged,\n undoStackStateChanged: params.onUndoStateChanged,\n selectedLayoutFramesChanged: params.onSelectedLayoutFramesChanged,\n selectedTextStyleChanged: params.onSelectedTextStyleChanged,\n colorsChanged: params.onColorsChanged,\n paragraphStylesChanged: params.onParagraphStylesChanged,\n characterStylesChanged: params.onCharacterStylesChanged,\n fontFamiliesChanged: params.onFontFamiliesChanged,\n selectedLayoutId: params.onSelectedLayoutIdChanged,\n layoutListChanged: params.onLayoutsChanged,\n connectorEvent: params.onConnectorEvent,\n connectorsChanged: params.onConnectorsChanged,\n zoomChanged: params.onZoomChanged,\n pageSnapshotInvalidated: params.onPageSnapshotInvalidated,\n pagesChanged: params.onPagesChanged,\n pageSizeChanged: params.onPageSizeChanged,\n shapeCornerRadiusChanged: params.onShapeCornerRadiusChanged,\n cropActiveFrameIdChanged: params.onCropActiveFrameIdChanged,\n asyncError: params.onAsyncError,\n viewModeChanged: params.onViewModeChanged,\n barcodeValidationChanged: params.onBarcodeValidationChanged,\n selectedPageIdChanged: params.onSelectedPageIdChanged,\n dataSourceIdChanged: params.onDataSourceIdChanged,\n documentIssueListChanged: params.onDocumentIssueListChanged,\n customUndoDataChanged: params.onCustomUndoDataChanged,\n engineEditingModeChanged: params.onEngineEditModeChanged,\n brandKitMediaChanged: params.onBrandKitMediaChanged,\n },\n }),\n );\n};\nexport default Connect;\n","export enum WellKnownConfigurationKeys {\n GraFxStudioEnvironmentApiUrl = 'ENVIRONMENT_API',\n GraFxStudioSdkVersion = 'SDK_VERSION',\n GraFxStudioDocumentType = 'DOCUMENT_TYPE',\n GraFxStudioTemplateId = 'TEMPLATE_ID',\n GraFxStudioAuthToken = 'GRAFX_AUTH_TOKEN',\n QueryCallCacheEnabled = 'ENABLE_QUERY_CALL_CACHE',\n}\n\nexport enum FrameEditingMode {\n /**\n * Default (Designer) mode\n * No constraints\n */\n full = 'full',\n\n /**\n * End user mode\n * Limits the existing tools to the given constraints\n */\n followConstraints = 'followConstraints',\n}\n\nexport type StudioStyling = {\n uiBackgroundColorHex?: string;\n};\n\n/**\n * Studio Options that can be updated.\n */\nexport type StudioOptionsDeltaUpdate = {\n /** Options for the different studio engine shortcuts */\n shortcutOptions?: ShortcutOptionsDeltaUpdate;\n /**\n * Determines which editing mode should be allowed\n * @defaultValue `FrameEditingMode.full`\n */\n frameEditingMode?: FrameEditingMode;\n};\n\n/**\n * Shortcut Options that can be updated.\n */\nexport type ShortcutOptionsDeltaUpdate = {\n /** The debug panel shortcut. */\n debugPanel?: ShortcutOption;\n\n /** The ellipse shape shortcut. */\n ellipse?: ShortcutOption;\n\n /** The hand shortcut. */\n hand?: ShortcutOption;\n\n /** The temporary hand shortcut. */\n temporaryHand?: ShortcutOption;\n\n /** The image frame shortcut. */\n image?: ShortcutOption;\n\n /** The polygon shape shortcut. */\n polygon?: ShortcutOption;\n\n /** The rectangle shape shortcut. */\n rectangle?: ShortcutOption;\n\n /** The select shortcut. */\n select?: ShortcutOption;\n\n /** The text frame shortcut. */\n text?: ShortcutOption;\n\n /** The zoom shortcut. */\n zoom?: ShortcutOption;\n\n /** The copy/cut/paste/duplicate shortcut. */\n copyPaste?: ShortcutOption;\n\n /** The view mode shortcut. */\n viewMode?: ShortcutOption;\n};\n\n/**\n * Specific shortcut options\n */\nexport type ShortcutOption = {\n /** Whether the shortcut is enabled. */\n enabled: boolean;\n};\n\n/**\n * Default studio options with all shortcuts disabled.\n */\nexport const defaultStudioOptions: StudioOptionsDeltaUpdate = {\n shortcutOptions: {\n debugPanel: { enabled: false },\n ellipse: { enabled: false },\n hand: { enabled: false },\n temporaryHand: { enabled: false },\n image: { enabled: false },\n polygon: { enabled: false },\n rectangle: { enabled: false },\n select: { enabled: false },\n text: { enabled: false },\n zoom: { enabled: false },\n copyPaste: { enabled: false },\n viewMode: { enabled: false },\n },\n frameEditingMode: FrameEditingMode.full,\n};\n","import { ActionEventErrorData } from '../exceptions';\nimport { DocumentAction } from './ActionTypes';\nimport { BasicAnimationsEmphasisType, BasicAnimationsIntroType, BasicAnimationsOutroType } from './AnimationTypes';\nimport { CharacterStyle } from './CharacterStyleTypes';\nimport { DocumentColor } from './ColorStyleTypes';\nimport { Id } from './CommonTypes';\nimport { BlendMode, FrameTypeEnum } from './FrameTypes';\nimport { LayoutIntent, LayoutType } from './LayoutTypes';\nimport { ParagraphStyle } from './ParagraphStyleTypes';\nimport { ShapeProperties } from './ShapeTypes';\nimport { Variable } from './VariableTypes';\n\nexport type DocumentError = { error: Record<string, unknown>; code: number };\n\nexport enum DocumentIssueTypeEnum {\n overflow = 'overflow',\n fontLoading = 'fontLoading',\n actionRegister = 'actionRegister',\n actionExecution = 'actionExecution',\n actionCircular = 'actionCircular',\n}\n\nexport type OverflowDocumentIssue = {\n frameId: Id;\n type: DocumentIssueTypeEnum.overflow;\n};\n\nexport type FontLoadingDocumentIssue = {\n fontId: string;\n name: string;\n type: DocumentIssueTypeEnum.fontLoading;\n};\n\nexport type ActionExecutionDocumentIssue = {\n actionId: string;\n type: DocumentIssueTypeEnum.actionExecution;\n};\n\nexport type ActionRegisterDocumentIssue = {\n actionId: string;\n type: DocumentIssueTypeEnum.actionRegister;\n};\n\nexport type ActionCircularDocumentIssue = {\n eventChain: ActionEventErrorData[];\n type: DocumentIssueTypeEnum.actionCircular;\n};\n\nexport type DocumentIssue =\n | OverflowDocumentIssue\n | FontLoadingDocumentIssue\n | ActionExecutionDocumentIssue\n | ActionRegisterDocumentIssue\n | ActionCircularDocumentIssue;\n\nexport type UndoState = {\n canUndo: boolean;\n canRedo: boolean;\n undoItemName: OperationName;\n redoItemName: OperationName;\n};\n\nexport type OperationName = { translationKey: number; name: string };\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n *\n * This type should give a clear indication of how the JSON document is structured. This could help you with building a test document yourself.\n */\nexport interface ChiliDocument {\n selectedLayoutId: string;\n properties?: TemplateDocumentProperties | ProjectDocumentProperties;\n pages: DocumentPage[];\n layouts: (ChildLayout | TopLayout)[];\n stylekit: DocumentStylekit;\n variables: Variable[];\n actions: DocumentAction[];\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface DocumentPage {\n id: string;\n number: number;\n frames: (ImageFrame | TextFrame | ShapeFrame)[];\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface DocumentFrame {\n id: string;\n name: string;\n type: FrameTypeEnum;\n blendMode: BlendMode;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface ImageFrame extends DocumentFrame {\n src: ImageFrameUrlSource | ImageFrameConnectorSource | ImageFrameVariableSource;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface ShapeFrame extends DocumentFrame {\n shapeProperties: ShapeProperties;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface TextFrame extends DocumentFrame {\n textContent: string;\n paddingLeft: number;\n paddingTop: number;\n paddingRight: number;\n paddingBottom: number;\n numberOfColumns: number;\n columnGap: number;\n textDirection: string;\n flowDirection: string;\n verticalAlign: string;\n textStroke: boolean;\n textStrokeWeight: number;\n textStrokeColor: number;\n hasClippingPath: boolean;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport enum ImageFrameSourceType {\n url = 'url',\n assetProvider = 'assetProvider',\n variable = 'variable',\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface ImageFrameSource {\n type: ImageFrameSourceType;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface ImageFrameUrlSource extends ImageFrameSource {\n url: string;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface ImageFrameConnectorSource extends ImageFrameSource {\n id: string;\n assetId: string;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */ export interface ImageFrameVariableSource extends ImageFrameSource {\n id: string;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface Layout {\n id: string;\n name: string;\n frameProperties: (ChildFrameProperty | TopFrameProperty)[];\n width?: number;\n height?: number;\n childLayouts: string[];\n type: LayoutType;\n frameAnimations?: FrameAnimation[];\n timelineLengthMs?: number;\n animated?: boolean;\n intent?: LayoutIntent;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface TopLayout extends Layout {\n frameAnimations: FrameAnimation[];\n timelineLengthMs: number;\n animated: boolean;\n intent: LayoutIntent;\n width: number;\n height: number;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface ChildLayout extends Layout {\n parentId: Id;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport enum FramePropertiesType {\n top = 'top',\n child = 'child',\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface FrameProperty {\n id: Id;\n x?: number;\n y?: number;\n width?: number;\n height?: number;\n rotationDegrees?: number;\n rotationOriginY?: number;\n scaleX?: number;\n scaleY?: number;\n isVisible?: boolean;\n type: FramePropertiesType;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport type ChildFrameProperty = FrameProperty;\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface TopFrameProperty extends FrameProperty {\n x: number;\n y: number;\n width: number;\n height: number;\n rotationDegrees: number;\n rotationOriginY: number;\n scaleX: number;\n scaleY: number;\n isVisible: boolean;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface FrameAnimation {\n id: Id;\n from: number;\n to: number;\n basicAnimations: BasicAnimations;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface BasicAnimations {\n intro?: BasicAnimationsIntroType;\n emphasis?: BasicAnimationsEmphasisType;\n outro?: BasicAnimationsOutroType;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface DocumentStylekit {\n colors: DocumentColor[];\n characterStyles: DocumentCharacterStyle[];\n paragraphStyles: DocumentParagraphStyle[];\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport type DocumentCharacterStyle = CharacterStyle;\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport type DocumentParagraphStyle = ParagraphStyle;\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface DocumentVariable extends Variable {\n parentId: Id;\n name: string;\n label: string;\n isReadonly: boolean;\n isRequired: boolean;\n value: string;\n defaultValue: string;\n}\n\nexport enum DocumentType {\n project = 'project',\n template = 'template',\n /**\n * @experimental This document type is experimental and may change or be removed in future releases.\n */\n component = 'component',\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface DocumentProperties {\n type: DocumentType;\n}\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport type TemplateDocumentProperties = DocumentProperties;\n\n/**\n * @deprecated This is no longer kept up to date and will be removed in the future.\n */\nexport interface ProjectDocumentProperties extends DocumentProperties {\n templateId: string;\n}\n\nexport type DocumentLoadOptions = {\n keepConnectors: boolean;\n};\n","import { ActionEditorEvent } from '../types/ActionTypes';\nimport { Id } from '../types/CommonTypes';\n\nexport interface ActionEventErrorData {\n event: ActionEditorEvent;\n actionIds: Id[];\n}\n\ninterface AsyncErrorBase {\n type: AsyncErrorType;\n message: string;\n}\n\nenum AsyncErrorType {\n action = 'action',\n dataRow = 'dataRow',\n}\n\ninterface ExceptionContext {\n variableId?: Id;\n}\n\ninterface EditorExceptionDto {\n type: string;\n code: number;\n message: string;\n context?: ExceptionContext;\n}\n\nexport class ActionAsyncError implements AsyncErrorBase {\n type: AsyncErrorType;\n id?: string;\n event?: ActionEditorEvent;\n eventChain?: ActionEventErrorData[];\n message: string;\n\n constructor(message: string, id?: string, event?: ActionEditorEvent, eventChain?: ActionEventErrorData[]) {\n this.type = AsyncErrorType.action;\n this.message = message;\n this.id = id;\n this.event = event;\n this.eventChain = eventChain;\n }\n}\n\nexport class DataRowAsyncError implements AsyncErrorBase {\n type: AsyncErrorType;\n count: number;\n exceptions: EditorExceptionDto[];\n message: string;\n\n constructor(count: number, message: string, exceptions: EditorExceptionDto[]) {\n this.type = AsyncErrorType.dataRow;\n this.count = count;\n this.message = message;\n this.exceptions = exceptions;\n }\n}\n\nexport type AsyncError = ActionAsyncError | DataRowAsyncError;\n","import { Id } from '../types/CommonTypes';\n\nexport class ConnectorHttpError extends Error {\n statusCode: number;\n\n constructor(statusCode: number, message?: string, options?: ErrorOptions) {\n super(message, options);\n\n this.statusCode = statusCode;\n }\n}\n\ninterface VariableExceptionContext {\n id: Id;\n}\n\nexport class VariableValueConstrainsViolationError extends Error {\n context: VariableExceptionContext;\n\n constructor(context: VariableExceptionContext, message: string, options: ErrorOptions) {\n super(message, options);\n this.context = context;\n }\n}\n","// These error codes are from the engine exception table, do not change\nexport const connectorHttpErrorErrorCode = 404075;\nexport const variableInvalidValueErrorCode = 403032;\n","import { EditorResponse, Id } from '../types/CommonTypes';\nimport { connectorHttpErrorErrorCode, variableInvalidValueErrorCode } from './Codes';\nimport { ConnectorHttpError , VariableValueConstrainsViolationError } from './Exceptions';\n\nexport function throwEditorResponseError(response: EditorResponse<unknown>): never {\n const parsedError = response.error ?? 'Yikes, something went wrong';\n const parsedCause = {\n cause: {\n name: String(response.status),\n message: response.error ?? 'Yikes, something went wrong',\n },\n };\n\n if (response.status === connectorHttpErrorErrorCode) {\n const parsedErrorData = JSON.parse(response.data as string);\n const httpStatusCode = parsedErrorData['statusCode'] as number;\n\n throw new ConnectorHttpError(httpStatusCode, parsedError, parsedCause);\n } else {\n throw new Error(parsedError, parsedCause);\n }\n}\n\n\n\nfunction parseVariableConstraintError(errorMsg: string): { valid: boolean; variableId?: string } {\n // Only the listed formats are considered valid for constraint errors.\n // Extend with future use cases (i.e. character's limit error)\n const patterns = [\n /DateVariable '([^']+)' should not be part of excludedDays, \".*\" was given/,\n /DateVariable '([^']+)' expects \\$date to be > startDate:.*$/,\n /DateVariable '([^']+)' expects \\$date to be < endDate:.*$/,\n /NumberVariable '([^']+)' expects \\$extractedValue to be >= .+$/,\n /NumberVariable '([^']+)' expects \\$extractedValue to be <= .+$/,\n ];\n\n for (const pattern of patterns) {\n const match = errorMsg.match(pattern);\n if (match) {\n return { valid: true };\n }\n }\n return { valid: false };\n}\n\n/**\n * Variable-specific failure hook\n * Throws VariableValueConstrainsViolationError when the response matches a recognized constraint error;\n * otherwise returns so `getEditorResponseData` falls back to `throwEditorResponseError`.\n */\nexport function throwVariableException(response: EditorResponse<unknown>, context: { id: Id }): void {\n if (response.status === variableInvalidValueErrorCode && response.error) {\n const errorMsg = response.error;\n const parseResult = parseVariableConstraintError(errorMsg);\n\n if (parseResult.valid) {\n throw new VariableValueConstrainsViolationError(context, errorMsg, {\n cause: { name: String(response.status), message: errorMsg },\n });\n }\n }\n}\n","import type { EditorResponse } from '../types/CommonTypes';\nimport { throwEditorResponseError } from '../exceptions';\n\n/** May throw for a specific failure; if it returns, {@link throwEditorResponseError} runs next. */\nexport type EditorResponseOnFailure = (response: EditorResponse<unknown>) => void;\n\nfunction defaultOnFailure(response: EditorResponse<unknown>): void {\n throwEditorResponseError(response);\n}\n\nexport function getEditorResponseData<T>(response: EditorResponse<unknown>): EditorResponse<T>;\nexport function getEditorResponseData<T>(response: EditorResponse<unknown>, parse: boolean): EditorResponse<T>;\nexport function getEditorResponseData<T>(\n response: EditorResponse<unknown>,\n onFailure: EditorResponseOnFailure,\n): EditorResponse<T>;\nexport function getEditorResponseData<T>(\n response: EditorResponse<unknown>,\n parseOrOnFailure?: boolean | EditorResponseOnFailure,\n): EditorResponse<T> {\n let parse = true;\n let hasCustomOnFailure = false;\n let handleFailure: EditorResponseOnFailure = defaultOnFailure;\n\n if (typeof parseOrOnFailure === 'function') {\n hasCustomOnFailure = true;\n handleFailure = parseOrOnFailure;\n } else if (typeof parseOrOnFailure === 'boolean') {\n parse = parseOrOnFailure;\n }\n\n try {\n if (!response.success) {\n handleFailure(response);\n // When we have a custom onFailure and it didn't throw,\n // additionally we’re processing with default onFailure handler\n if (hasCustomOnFailure) {\n throwEditorResponseError(response);\n }\n }\n const dataShouldBeParsed = response.data && parse;\n return {\n ...response,\n parsedData: dataShouldBeParsed\n ? (JSON.parse(response.data as string) as T)\n : (response.data as unknown as T),\n };\n } catch (error) {\n console.error(error);\n throw error;\n }\n}\n\n// For testing purposes only\nexport function castToEditorResponse(toCast: unknown): EditorResponse<unknown> {\n return {\n status: 200,\n success: true,\n parsedData: null,\n data: JSON.stringify(toCast),\n };\n}\n","import { ActionDeltaUpdate, ActionTrigger, DocumentAction } from '../types/ActionTypes';\nimport { EditorAPI, Id } from '../types/CommonTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The ActionController is responsible for all Actions-related functionality.\n * Methods inside this controller can be called by `window.SDK.action.{method-name}`\n */\nexport class ActionController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method returns the list of all actions.\n * @returns list of all actions\n */\n getAll = async () => {\n const res = await this.#editorAPI;\n return res.getActions().then((result) => getEditorResponseData<DocumentAction[]>(result));\n };\n\n /**\n * This method returns an action by the id\n * @param id the id of a specific action\n * @returns action details\n */\n getById = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.getActionById(id).then((result) => getEditorResponseData<DocumentAction>(result));\n };\n\n /**\n * This method creates a new action.\n * @returns the id of the newly created action.\n */\n create = async () => {\n const res = await this.#editorAPI;\n return res.createAction().then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method duplicates an existing action by the id\n * @param id the id of a specific action\n * @returns the id of the duplicated action.\n */\n duplicate = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.duplicateAction(id).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method removes the action by the id\n * @param id the id of a specific action\n * @returns\n */\n remove = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.removeAction(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method updates an existing Action\n * @param id the id of a specific Action\n * @param update the delta update to apply to the Action\n * @returns\n */\n update = async (id: Id, update: ActionDeltaUpdate) => {\n const res = await this.#editorAPI;\n return res.updateAction(id, JSON.stringify(update)).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @deprecated use the update method instead\n *\n * This method renames an action by the id and provided name\n * @param id the id of a specific action\n * @param name the new unique name for the action\n * @returns\n */\n rename = async (id: Id, name: string) => {\n return this.update(id, { name: name });\n };\n\n /**\n * @deprecated use the update method instead\n *\n * This method updates the script the action uses by the id and provided script\n * @param id the id of a specific action\n * @param actionScript the JavaScript based action script\n * @returns\n */\n updateScript = async (id: Id, actionScript: string) => {\n return this.update(id, { script: actionScript });\n };\n\n /**\n * @deprecated use the update method instead\n *\n * This method updates the triggers on which the action will react.\n * @param id the id of a specific action\n * @param triggers the triggers this action should react on.\n * @returns\n */\n updateTriggers = async (id: Id, triggers: ActionTrigger[]) => {\n return this.update(id, { triggers: triggers });\n };\n\n /**\n * This method changes positions of actions\n * @param order the position of actions\n * @param ids the list of action IDs\n * @returns\n */\n move = async (order: number, ids: string[]) => {\n const res = await this.#editorAPI;\n return res.moveActions(order, ids).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @deprecated use the update method instead\n *\n * This method stores the state of action type errors to the document\n *\n * Those errors states can be read back from the usual getters or the\n * `onActionsChanged` stream\n * @param id the id of a specific action\n * @param hasTypeErrors whether there is an action type error\n * @returns\n */\n setTypeError = async (id: string, hasTypeErrors: boolean) => {\n return this.update(id, { hasTypeError: hasTypeErrors });\n };\n\n /**\n * This method disables the execution of Actions.\n * Note that any Action will be ignored and forgotten.\n * @returns\n */\n disable = async () => {\n const res = await this.#editorAPI;\n return res.disableActions().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method enables the execution of Actions.\n * Note this is enabled by default.\n * @returns\n */\n enable = async () => {\n const res = await this.#editorAPI;\n return res.enableActions().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method enables the execution of Component Actions.\n * Note this is enabled by default.\n * @param shouldEnable whether to enable or disable component actions\n * @returns\n */\n enableForComponents = async (shouldEnable: boolean) => {\n const res = await this.#editorAPI;\n return res.enableComponentActions(shouldEnable).then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { FrameAnimationPropertiesType } from '../types/AnimationTypes';\nimport { EditorAPI, Id } from '../types/CommonTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The AnimationController is responsible for all communication regarding Animations.\n * Methods inside this controller can be called by `window.SDK.animation.{method-name}`\n */\nexport class AnimationController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(children: EditorAPI) {\n this.#editorAPI = children;\n }\n\n /**\n * This method returns all animations on current layout\n * @returns list of all animation on current layout\n */\n getAllOnSelectedLayout = async () => {\n const res = await this.#editorAPI;\n return res\n .getAnimationsOnSelectedLayout()\n .then((result) => getEditorResponseData<FrameAnimationPropertiesType[]>(result));\n };\n\n /**\n * This method returns an animation for a given frame and layout IDs\n * @param id the id of a specific frame\n * @param layoutId the id of a specific layout\n * @returns animation properties for a given frame and layout\n */\n getByFrameId = async (id: Id, layoutId?: Id) => {\n const res = await this.#editorAPI;\n return res\n .getAnimationByFrameId<string>(id, layoutId)\n .then((result) => getEditorResponseData<FrameAnimationPropertiesType>(result));\n };\n\n /**\n * This method returns the animations for a given layout id\n * @param id the id of a specific layout\n * @returns animation properties for a given layout\n */\n getByLayoutId = async (id: Id) => {\n const res = await this.#editorAPI;\n return res\n .getAnimationsByLayoutId(id)\n .then((result) => getEditorResponseData<FrameAnimationPropertiesType>(result));\n };\n\n /**\n * This method sets the animation state for a certain Frame\n * @param animation animation properties\n * @returns updated animation properties\n */\n setFrameAnimation = async (animation: FrameAnimationPropertiesType) => {\n const res = await this.#editorAPI;\n return res\n .setFrameAnimation(JSON.stringify(animation))\n .then((result) =>\n getEditorResponseData<FrameAnimationPropertiesType>({ ...result, data: JSON.stringify(animation) }),\n );\n };\n\n /**\n * This method triggers the animation to play\n * @returns\n */\n play = async () => {\n const res = await this.#editorAPI;\n return res.playAnimation().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method triggers the animation to pause\n * @returns\n */\n pause = async () => {\n const res = await this.#editorAPI;\n return res.pauseAnimation().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the animation time to a certain time, expressed in milliseconds\n * @param timeInMS the time expressed in milliseconds\n * @returns\n */\n setScrubberPosition = async (timeInMS: number) => {\n const res = await this.#editorAPI;\n return res.setScrubberPosition(timeInMS).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the total and maximum duration of the animation, expressed in milliseconds\n * @param timeInMS the time expressed in milliseconds\n * @returns\n */\n setDuration = async (timeInMS: number) => {\n const res = await this.#editorAPI;\n return res.setAnimationDuration(timeInMS).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method resets the animation to its initial state\n * @param id the id of a certain frame\n * @returns\n */\n resetFrameAnimation = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetFrameAnimation(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method resets the layout's animations and animation duration to its initial state\n * @returns\n */\n reset = async () => {\n const res = await this.#editorAPI;\n return res.resetAnimation().then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { ColorUsage } from './ColorStyleTypes';\n\nexport enum BarcodeType {\n code39 = 'code39',\n code93 = 'code93',\n code128 = 'code128',\n dataMatrix = 'dataMatrix',\n ean13 = 'ean13',\n ean8 = 'ean8',\n qr = 'qr',\n upca = 'upca',\n upce = 'upce',\n gs1128 = 'gs1128',\n}\n\nexport interface BarcodeProperties {\n enableBackground?: boolean;\n backgroundColor?: ColorUsage;\n enableBars?: boolean;\n barColor?: ColorUsage;\n enableText?: boolean;\n barHeight?: string;\n magnification?: number;\n quietZone?: QuietZoneDeltaUpdate;\n errorCorrectionLevel?: BarcodeErrorCorrectionLevel;\n characterSet?: BarcodeCharacterSet;\n drawStartStopChars?: boolean;\n}\n\nexport enum BarcodeErrorCorrectionLevel {\n low = 'low',\n medium = 'medium',\n quartile = 'quartile',\n high = 'high',\n}\n\nexport enum BarcodeCharacterSet {\n utf8 = 'utf8',\n iso8859_1 = 'iso8859_1',\n code128a = 'code128a',\n code128b = 'code128b',\n code128c = 'code128c',\n}\n\nexport interface BarcodeConfigurationOptions {\n allowedErrorCorrectionLevels?: BarcodeErrorCorrectionLevel[];\n allowedCharacterSets?: BarcodeCharacterSet[];\n allowQuietZone: boolean;\n allowBarHeight: boolean;\n allowEnableMagnification: boolean;\n allowToggleText: boolean;\n quietZoneAlwaysCombined: boolean;\n allowToggleLightMarginIndicator: boolean;\n allowToggleDrawStartAndEndChar: boolean;\n}\n\nexport type QuietZone = {\n left: number;\n top: number;\n right: number;\n bottom: number;\n areQuietZoneValuesCombined: boolean;\n};\n\nexport type QuietZoneDeltaUpdate = {\n left?: string;\n top?: string;\n right?: string;\n bottom?: string;\n areQuietZoneValuesCombined?: boolean;\n};\n\nexport type BarcodeFrameValidationResult = {\n id: string;\n validationResult: BarcodeValidationResult;\n};\n\nexport enum BarcodeValidationResult {\n success = 'success',\n empty = 'empty',\n invalidLength = 'invalidLength',\n invalidCharacters = 'invalidCharacters',\n invalidChecksum = 'invalidChecksum',\n invalidUPCE = 'invalidUPCE',\n otherError = 'otherError',\n}\n","export enum MeasurementUnit {\n px = 'px',\n mm = 'mm',\n cm = 'cm',\n inch = 'inch',\n pt = 'pt',\n}","import { MeasurementUnit } from '@chili-studio/connector-types';\nimport { ColorUsage } from './ColorStyleTypes';\nimport { Id, PrivateData, PropertyState } from './CommonTypes';\n\nexport { MeasurementUnit } from '@chili-studio/connector-types';\nexport type LayoutPropertiesType = {\n id: Id;\n name: string;\n displayName: string | null;\n width: PropertyState<number>;\n height: PropertyState<number>;\n animated: PropertyState<boolean>;\n intent: PropertyState<LayoutIntent>;\n unit: PropertyState<MeasurementUnit>;\n fillColor: PropertyState<ColorUsage>;\n fillColorEnabled: PropertyState<boolean>;\n bleed: PropertyState<LayoutBleed | undefined>;\n availableForUser: boolean;\n selectedByUser: boolean;\n timelineLengthMs: PropertyState<number | undefined>;\n resizableByUser: ResizableLayoutProperties;\n} | null;\n\nexport type FrameProperties = {\n id: Id;\n type: string;\n height: number | null;\n isVisible: boolean | null;\n rotationDegrees: number | null;\n scaleX: number | null;\n scaleY: number | null;\n width: number | null;\n x: number | null;\n y: number | null;\n};\n\nexport type LayoutWithFrameProperties = {\n id: Id;\n name: string;\n parentId?: Id;\n frameProperties: FrameProperties[];\n width: number | null;\n height: number | null;\n childLayouts: Id[];\n type: LayoutType;\n timelineLengthMs?: number;\n children?: LayoutWithFrameProperties[];\n intent: LayoutIntent | null;\n};\n\n// used by new getter methods\nexport type Layout = {\n id: Id;\n name: string;\n displayName?: string | null;\n privateData: PrivateData;\n parentId?: Id;\n width: PropertyState<number>;\n height: PropertyState<number>;\n layoutWidth: PropertyState<number>;\n layoutHeight: PropertyState<number>;\n childLayouts: Id[];\n timelineLengthMs: PropertyState<number>;\n unit: PropertyState<MeasurementUnit>;\n intent: PropertyState<LayoutIntent>;\n bleed: PropertyState<LayoutBleed>;\n fillColor: PropertyState<ColorUsage>;\n fillColorEnabled: PropertyState<boolean>;\n availableForUser: boolean;\n selectedByUser: boolean;\n resizableByUser: ResizableLayoutProperties;\n};\n\n// used by onLayoutsChanged\nexport type LayoutListItemType = {\n id: string;\n name: string;\n displayName?: string | null;\n type: LayoutType;\n availableForUser: boolean;\n selectedByUser: boolean;\n parentId?: Id | null;\n childLayouts: Id[];\n};\n\nexport type LayoutBleed = {\n left: number;\n top: number;\n right: number;\n bottom: number;\n areBleedValuesCombined: boolean;\n};\n\nexport type BleedDeltaUpdate = {\n left?: string;\n top?: string;\n right?: string;\n bottom?: string;\n areBleedValuesCombined?: boolean;\n};\n\nexport type LayoutPreset = {\n name: string;\n intent: LayoutIntent;\n unit: MeasurementUnit;\n width: string;\n height: string;\n duration?: number;\n bleed?: BleedDeltaUpdate;\n};\n\nexport enum PositionEnum {\n top = 'top',\n right = 'right',\n bottom = 'bottom',\n left = 'left',\n}\n\nexport enum LayoutType {\n top = 'top',\n child = 'child',\n}\n\nexport enum LayoutIntent {\n print = 'print',\n digitalStatic = 'digitalStatic',\n digitalAnimated = 'digitalAnimated',\n}\n\nexport type ResizableLayoutProperties = {\n enabled: boolean;\n minWidth?: number | null;\n maxWidth?: number | null;\n minHeight?: number | null;\n maxHeight?: number | null;\n constraintMode?: ConstraintMode | null;\n aspectRange?: LayoutAspectRange | null;\n};\n\nexport type LayoutAspect = {\n horizontal: number;\n vertical: number;\n};\n\nexport type LayoutAspectRange = {\n min: LayoutAspect;\n max: LayoutAspect;\n};\n\nexport enum ConstraintMode {\n locked = 'locked',\n range = 'range',\n none = 'none',\n}\n\nexport type ResizableLayoutPropertiesUpdate = {\n enabled?: {\n value: boolean;\n } | null;\n minWidth?: {\n value: string | null;\n } | null;\n maxWidth?: {\n value: string | null;\n } | null;\n minHeight?: {\n value: string | null;\n } | null;\n maxHeight?: {\n value: string | null;\n } | null;\n constraintMode?: {\n value: ConstraintMode | null;\n } | null;\n aspectRange?: {\n value: LayoutAspectRange | null;\n } | null;\n};\n\nexport type SelectLayoutOptions = {\n pageSize?: LayoutOptionPageSize;\n};\n\nexport type LayoutOptionPageSize = {\n width: number;\n height: number;\n unit: MeasurementUnit;\n};\n","import { EditorAPI, Id } from '../types/CommonTypes';\nimport { ColorUsage } from '../types/ColorStyleTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport {\n BarcodeConfigurationOptions,\n BarcodeProperties,\n BarcodeType,\n QuietZoneDeltaUpdate,\n BarcodeCharacterSet,\n BarcodeErrorCorrectionLevel,\n} from '../types/BarcodeTypes';\nimport { BarcodeSource } from '../types/FrameTypes';\nimport { PositionEnum } from '../types/LayoutTypes';\n\n/**\n * The BarcodeController is responsible for all communication regarding Barcodes.\n * Methods inside this controller can be called by `window.SDK.barcode.{method-name}`\n */\nexport class BarcodeController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method updates properties of the barcode\n * @param id the id of the barcodeFrame that needs to be updated.\n * @param properties A property to update\n * @returns\n */\n private setBarcodeProperties = async (id: Id, properties: BarcodeProperties) => {\n const res = await this.#editorAPI;\n return res\n .setBarcodeProperties(id, JSON.stringify(properties))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the background of a barcode enabled or disabled\n * @param id the id of the barcodeFrame that needs to be updated.\n * @param enableBackground Whether the barcode's background is visible.\n * @returns\n */\n setEnableBackground = async (id: Id, enableBackground: boolean) => {\n const properties: BarcodeProperties = { enableBackground: enableBackground };\n return this.setBarcodeProperties(id, properties);\n };\n\n /**\n * This method will set the barcode background color of a specified barcode frame.\n * @param id the id of the barcodeFrame that needs to be updated.\n * @param backgroundColor the new barcode background color that you want to set to the barcodeFrame.\n * @returns\n */\n setBackgroundColor = async (id: Id, backgroundColor: ColorUsage) => {\n const properties: BarcodeProperties = { backgroundColor: backgroundColor };\n return this.setBarcodeProperties(id, properties);\n };\n\n /**\n * This method will set the visibility of the barcode's bars.\n * @param id the id of the barcodeFrame that needs to be updated.\n * @param enableBars Whether the barcode bars are visible.\n * @returns\n */\n setEnableBars = async (id: Id, enableBars: boolean) => {\n const properties: BarcodeProperties = { enableBars: enableBars };\n return this.setBarcodeProperties(id, properties);\n };\n\n /**\n * This method will set the bar color of a specified barcode frame.\n * @param id the id of the barcodeFrame that needs to be updated.\n * @param barColor the new bar color that you want to set to the barcodeFrame.\n * @returns\n */\n setBarColor = async (id: Id, barColor: ColorUsage) => {\n const properties: BarcodeProperties = { barColor: barColor };\n return this.setBarcodeProperties(id, properties);\n };\n\n /**\n * This method will set the source of the barcode to the given source.\n * @param id the id of the barcodeFrame that needs to be updated.\n * @param source the new source that you want to set to the barcodeFrame.\n * @returns\n */\n setBarcodeSource = async (id: Id, source: BarcodeSource) => {\n const res = await this.#editorAPI;\n return res.setBarcodeSource(id, JSON.stringify(source)).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will remove the source from the barcode frame provided.\n * @param id the id of the barcodeFrame that needs to have the source removed.\n * @returns\n */\n removeBarcodeSource = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.setBarcodeSource(id, null).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method enables/disables displaying the text of the barcode.\n * @param id the id of the barcodeFrame that needs to be updated.\n * @param enableText true if the text should be displayed, false otherwise.\n * @returns\n */\n setEnableText = async (id: Id, enableText: boolean) => {\n const properties: BarcodeProperties = { enableText: enableText };\n return this.setBarcodeProperties(id, properties);\n };\n\n /**\n * This method sets the bar height for 1-dimensional barcodes.\n * @param id the id of the barcodeFrame that needs to be updated.\n * @param barHeight the height of the bars in the barcode. The string value will be calculated (f.e. 1+1 will result in 2)\n * @returns\n */\n setBarHeight = async (id: Id, barHeight: string) => {\n const properties: BarcodeProperties = { barHeight: barHeight };\n return this.setBarcodeProperties(id, properties);\n };\n\n /**\n * This method sets the magnification for 1-dimensional barcodes.\n * @param id the id of the barcodeFrame that needs to be updated.\n * @param magnification the magnification of the barcode. This is a decimal value where 1 denotes 100%. (f.e. 1.5 will result in 150%)\n * @returns\n */\n setMagnification = async (id: Id, magnification: number) => {\n const properties: BarcodeProperties = { magnification: magnification };\n return this.setBarcodeProperties(id, properties);\n };\n\n /**\n * This method sets the quiet zone value of a specific barcode.\n * @param id The id of the specific barcode frame\n * @param value The quiet zone value\n * @param position When defined will update the quiet value of a single position,\n * otherwise will set all positions to the same value. Depending on this parameter\n * being defined, the `areQuietZoneValuesCombined` will also be updated.\n */\n setQuietZoneValue = async (id: Id, value: string, position?: PositionEnum) => {\n const update: QuietZoneDeltaUpdate = position\n ? {\n left: position === PositionEnum.left ? value : undefined,\n top: position === PositionEnum.top ? value : undefined,\n right: position === PositionEnum.right ? value : undefined,\n bottom: position === PositionEnum.bottom ? value : undefined,\n }\n : { left: value, top: value, right: value, bottom: value };\n\n const res = await this.#editorAPI;\n return res\n .setBarcodeProperties(id, JSON.stringify({ quietZone: update }))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the combined state of the quiet zone values.\n * @param id The id of the specific barcode frame\n * @param value Whether the quiet zone values are combined\n */\n setAreQuietZoneValuesCombined = async (id: Id, value: boolean) => {\n const update: QuietZoneDeltaUpdate = { areQuietZoneValuesCombined: value };\n\n const res = await this.#editorAPI;\n return res\n .setBarcodeProperties(id, JSON.stringify({ quietZone: update }))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the character set for the barcode.\n * @param id The id of the specific barcode frame.\n * @param errorCorrectionLevel The error correction level to set.\n * @returns\n */\n setErrorCorrectionLevel = async (id: Id, errorCorrectionLevel: BarcodeErrorCorrectionLevel) => {\n const res = await this.#editorAPI;\n return res\n .setBarcodeProperties(id, JSON.stringify({ errorCorrectionLevel: errorCorrectionLevel }))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the character set for the barcode.\n * @param id The id of the specific barcode frame.\n * @param characterSet The character set to set.\n * @returns\n */\n setCharacterSet = async (id: Id, characterSet: BarcodeCharacterSet) => {\n const res = await this.#editorAPI;\n return res\n .setBarcodeProperties(id, JSON.stringify({ characterSet: characterSet }))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the flag to render the end characters of the barcode. This is not\n * supported for all barcode types.\n * @param id The id of the specific barcode frame.\n * @param drawLightMarginIndicator The flag indicating if the end characters should be drawn or not\n * @returns\n */\n setDrawLightMarginIndicator = async (id: Id, drawLightMarginIndicator: boolean) => {\n const properties: BarcodeProperties = { drawStartStopChars: drawLightMarginIndicator };\n return this.setBarcodeProperties(id, properties);\n };\n\n /**\n * This method sets the flag to render the start and end characters of the barcode. This is not\n * supported for all barcode types.\n * @param id The id of the specific barcode frame.\n * @param drawStartStopChars The flag indicating if the start and stop characters should be drawn or not\n * @returns\n */\n setDrawStartStopChars = async (id: Id, drawStartStopChars: boolean) => {\n const properties: BarcodeProperties = { drawStartStopChars: drawStartStopChars };\n return this.setBarcodeProperties(id, properties);\n };\n\n /**\n * This method returns the possible configuration options which are valid for the given barcode type.\n * @param type the barcode type for which the configuration options are requested.\n * @returns a BarcodeConfigurationOptions object\n */\n getBarcodeConfigationOptions = (type: BarcodeType): BarcodeConfigurationOptions => {\n let allowToggleText = true;\n let allowBarHeight = true;\n let allowEnableMagnification = true;\n let allowedCharacterSets = undefined;\n let allowedErrorCorrectionLevels = undefined;\n let quietZoneAlwaysCombined = false;\n let allowToggleLightMarginIndicator = false;\n let allowToggleDrawStartAndEndChar = false;\n switch (type) {\n case BarcodeType.qr:\n allowedCharacterSets = [BarcodeCharacterSet.iso8859_1, BarcodeCharacterSet.utf8];\n allowedErrorCorrectionLevels = [\n BarcodeErrorCorrectionLevel.low,\n BarcodeErrorCorrectionLevel.medium,\n BarcodeErrorCorrectionLevel.quartile,\n BarcodeErrorCorrectionLevel.high,\n ];\n // Intentional fall-through\n case BarcodeType.dataMatrix:\n allowToggleText = false;\n allowBarHeight = false;\n allowEnableMagnification = false;\n quietZoneAlwaysCombined = true;\n break;\n case BarcodeType.ean13:\n allowToggleText = false;\n allowToggleLightMarginIndicator = true;\n break;\n case BarcodeType.ean8:\n allowToggleLightMarginIndicator = true;\n // Intentional fall-through\n case BarcodeType.upca:\n case BarcodeType.upce:\n allowToggleText = false;\n break;\n case BarcodeType.code128:\n case BarcodeType.gs1128:\n allowedCharacterSets = [\n BarcodeCharacterSet.code128a,\n BarcodeCharacterSet.code128b,\n BarcodeCharacterSet.code128c,\n ];\n break;\n case BarcodeType.code39:\n allowToggleDrawStartAndEndChar = true;\n break;\n }\n return {\n allowEnableMagnification: allowEnableMagnification,\n allowBarHeight: allowBarHeight,\n allowQuietZone: true,\n allowedCharacterSets: allowedCharacterSets,\n allowedErrorCorrectionLevels: allowedErrorCorrectionLevels,\n allowToggleText: allowToggleText,\n quietZoneAlwaysCombined: quietZoneAlwaysCombined,\n allowToggleLightMarginIndicator: allowToggleLightMarginIndicator,\n allowToggleDrawStartAndEndChar: allowToggleDrawStartAndEndChar,\n };\n };\n}\n","import {\n APIBrandKitMedia,\n BrandKitColor,\n BrandKitCharacterStyle,\n BrandKitFont,\n BrandKitParagraphStyle,\n EngineBrandKit,\n StudioBrandKit,\n BrandKitInternal,\n APIBrandKit,\n} from '../types/BrandKitTypes';\n/**\n * Converts the engine getBrandKit() / setBrandKit() response to the user-facing StudioBrandKit shape.\n */\nexport function engineBrandKitToStudioBrandKit(engine: EngineBrandKit): StudioBrandKit {\n const fontConnectorId =\n engine.fontFamilies.length > 0 ? String(engine.fontFamilies[0].connectorId) : '';\n const brandKit: APIBrandKit = {\n id: engine.id ?? '',\n name: engine.name ?? '',\n dateCreated: '', // This is not supported by the API yet\n lastModifiedDate: engine.version ?? '',\n // Ideally those types should be mapped, but this is a breaking change\n fonts: engine.fontFamilies as unknown as BrandKitFont[],\n colors: engine.colors as unknown as BrandKitColor[],\n characterStyles: engine.characterStyles as unknown as BrandKitCharacterStyle[],\n paragraphStyles: engine.paragraphStyles as unknown as BrandKitParagraphStyle[],\n media: engine.media as unknown as APIBrandKitMedia[],\n themes: engine.themes,\n };\n return {\n id: engine.id ?? '',\n name: engine.name ?? '',\n fontConnectorId,\n brandKit,\n };\n}\n\n/**\n * Converts the engine setBrandKit() response to the BrandKitInternal shape returned by set().\n */\nexport function engineBrandKitToBrandKitInternal(engine: EngineBrandKit): BrandKitInternal {\n return {\n id: engine.id ?? '',\n version: engine.version ?? '',\n name: engine.name ?? '',\n colors: engine.colors,\n gradients: engine.gradients,\n fonts: engine.fontFamilies,\n characterStyles: engine.characterStyles,\n paragraphStyles: engine.paragraphStyles,\n media: engine.media,\n themes: engine.themes,\n };\n}\n","import SDK from '..';\nimport {\n BrandKitMedia,\n EngineBrandKit,\n StudioBrandKit,\n} from '../types/BrandKitTypes';\nimport { EditorAPI, Id } from '../types/CommonTypes';\nimport { engineBrandKitToBrandKitInternal, engineBrandKitToStudioBrandKit } from '../utils/BrandKitAdapter';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { CharacterStyleController } from './CharacterStyleController';\nimport { ColorStyleController } from './ColorStyleController';\nimport { FontController } from './FontController';\nimport { GradientStyleController } from './GradientStyleController';\nimport { MediaConnectorController } from './MediaConnectorController';\nimport { ParagraphStyleController } from './ParagraphStyleController';\nimport { UndoManagerController } from './UndoManagerController';\n\n/**\n * The BrandKitController is responsible for all communication regarding Brand Kits.\n * Methods inside this controller can be called by `window.SDK.brandKit.{method-name}`\n */\n\nexport class BrandKitController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI, sdk: SDK) {\n this.#editorAPI = editorAPI;\n this.colorStyleController = sdk.colorStyle;\n this.gradientStyleController = sdk.gradientStyle;\n this.fontController = sdk.font;\n this.mediaController = sdk.mediaConnector;\n this.paragraphStyleController = sdk.paragraphStyle;\n this.characterStyleController = sdk.characterStyle;\n\n this.undoManagerController = sdk.undoManager;\n }\n\n private colorStyleController: ColorStyleController;\n\n private gradientStyleController: GradientStyleController;\n\n private fontController: FontController;\n\n private mediaController: MediaConnectorController;\n\n private paragraphStyleController: ParagraphStyleController;\n\n private characterStyleController: CharacterStyleController;\n\n private undoManagerController: UndoManagerController;\n\n /**\n * This method returns the current brand kit id.\n * @returns current brand kit id\n */\n getId = async () => {\n const res = await this.#editorAPI;\n return res.getBrandKitId().then((result) => getEditorResponseData<string>(result));\n };\n\n /**\n * This method returns the current brand kit version.\n * @returns current brand kit version\n */\n getVersion = async () => {\n const res = await this.#editorAPI;\n return res.getBrandKitVersion().then((result) => getEditorResponseData<string>(result));\n };\n\n /**\n * This method returns the current brand kit name.\n * @returns current brand kit name\n */\n getName = async () => {\n const res = await this.#editorAPI;\n return res.getBrandKitName().then((result) => getEditorResponseData<string>(result));\n };\n\n /**\n * This method renames the brand kit.\n * @param newName - The new name for the brand kit\n * @returns\n */\n rename = async (newName: string) => {\n const res = await this.#editorAPI;\n return res.renameBrandKit(newName).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method updates both the brand kit id and version.\n * @param id - The new brand kit id\n * @param version - The new brand kit version\n * @returns\n */\n updateIdAndVersion = async (id: string, version: string) => {\n const res = await this.#editorAPI;\n return res.updateBrandKitIdAndVersion(id, version).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @experimental This method returns the local brandkit\n * @returns brandkit with all assigned resources\n */\n get = async () => {\n const res = await this.#editorAPI;\n const result = await res.getBrandKit();\n const response = getEditorResponseData<EngineBrandKit>(result);\n const engineData = response.parsedData;\n if (engineData == null) {\n throw new Error('Brand kit response has no data');\n }\n return {\n ...response,\n parsedData: engineBrandKitToStudioBrandKit(engineData),\n };\n };\n\n /**\n * This method returns all media items in the brand kit\n * @returns list of media items in the brand kit\n */\n getAllMedia = async () => {\n const res = await this.#editorAPI;\n return res.getAllBrandKitMedia().then((result) => getEditorResponseData<BrandKitMedia[]>(result));\n };\n\n /**\n * This method adds a media item to the brand kit\n * @param name - The name of the media item\n * @param remoteConnectorId - The remote connector ID\n * @param assetId - The asset ID of the media item\n * @returns\n */\n addMedia = async (name: string, remoteConnectorId: Id, assetId: string) => {\n const res = await this.#editorAPI;\n return res\n .addBrandKitMedia(name, remoteConnectorId, assetId)\n .then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method updates an existing media item in the brand kit\n * @param name - The name of the media item to update\n * @param remoteConnectorId - The new remote connector ID\n * @param assetId - The new asset ID\n * @returns\n */\n updateMedia = async (name: string, remoteConnectorId: Id, assetId: string) => {\n const res = await this.#editorAPI;\n return res\n .updateBrandKitMedia(name, remoteConnectorId, assetId)\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method renames an existing media item in the brand kit\n * @param name - The name of the media item to rename\n * @param newName - The new name for the media item\n * @returns\n */\n renameMedia = async (name: string, newName: string) => {\n const res = await this.#editorAPI;\n return res.renameBrandKitMedia(name, newName).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method removes a media item from the brand kit\n * @param name - The name of the media item to remove\n * @returns\n */\n removeMedia = async (name: string) => {\n const res = await this.#editorAPI;\n return res.removeBrandKitMedia(name).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @experimental This method removes a brand kit and all related resources assigned to it\n * @returns\n */\n remove = async () => {\n const colors = await this.colorStyleController.getAll();\n const colorsList = colors.parsedData || [];\n\n const gradients = await this.gradientStyleController.getAll();\n const gradientsList = gradients.parsedData || [];\n\n const paragraphStyles = await this.paragraphStyleController.getAll();\n const paragraphStylesList = paragraphStyles.parsedData || [];\n\n const characterStyles = await this.characterStyleController.getAll();\n const characterStylesList = characterStyles.parsedData || [];\n\n const fonts = await this.fontController.getFontFamilies();\n const fontsList = fonts.parsedData || [];\n\n const media = await this.getAllMedia();\n const mediaList = media.parsedData || [];\n\n await this.undoManagerController.record('brandKit.remove', async (sdk) => {\n for (const color of colorsList) {\n await sdk.colorStyle.remove(color.id);\n }\n for (const gradient of gradientsList) {\n await sdk.gradientStyle.remove(gradient.id);\n }\n for (const style of paragraphStylesList) {\n await sdk.paragraphStyle.remove(style.id);\n }\n for (const style of characterStylesList) {\n await sdk.characterStyle.remove(style.id);\n }\n for (const font of fontsList) {\n await sdk.font.removeFontFamily(font.id);\n }\n for (const media of mediaList) {\n await this.removeMedia(media.name);\n }\n });\n };\n\n /**\n * @experimental This method updates a brand kit and all related resources assigned to it\n * @param studioBrandKit the content of the brand kit\n * @returns\n */\n set = async (studioBrandKit: StudioBrandKit) => {\n const res = await this.#editorAPI;\n const result = await res.setBrandKit(JSON.stringify(studioBrandKit.brandKit));\n const response = getEditorResponseData<EngineBrandKit>(result);\n const engineData = response.parsedData;\n if (engineData == null) {\n throw new Error('Brand kit set response has no data');\n }\n return {\n ...response,\n parsedData: engineBrandKitToBrandKitInternal(engineData),\n };\n };\n\n\n /**\n * This method returns the value indicating whether the brand kit auto-sync is enabled or not\n * It is up to the integrator to implement this auto-sync functionality, this method only is an indication if it should be done or not.\n \n * @returns boolean indicating sync status\n */\n isAutoSync = async () => {\n const res = await this.#editorAPI;\n return res.isBrandKitAutoSync().then((result) => getEditorResponseData<boolean>(result));\n };\n\n /**\n * This method enables or disables brand kit auto-sync\n * @param enableAutoSync boolean indicating auto-sync status\n * @returns boolean indicating the result of the operation\n */\n enableAutoSync = async (enableAutoSync: boolean) => {\n const res = await this.#editorAPI;\n return res.enableBrandKitAutoSync(enableAutoSync).then((result) => getEditorResponseData<boolean>(result));\n };\n}\n","import { EditorAPI, Id } from '../types/CommonTypes';\nimport { ViewMode } from '../types/ViewModeTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The CanvasController is responsible for all Canvas-related functionality.\n * Methods inside this controller can be called by `window.SDK.canvas.{method-name}`\n */\nexport class CanvasController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method fits the page to the given rectangle or the viewport available\n * Optional parameters `left`, `top`, `width` and `height` are needed to define the rectangle to fit the page to\n * If any or all of them aren't provided the page will fit the whole viewport available\n * @param _id the id of a specific page\n * @param left\n * @param top\n * @param width\n * @param height\n * @returns\n */\n zoomToPage = async (\n _id?: Id | null,\n left?: number | null,\n top?: number | null,\n width?: number | null,\n height?: number | null,\n ) => {\n if (_id !== undefined) {\n console.warn('id has no effect and will be deprecated in the future');\n }\n const res = await this.#editorAPI;\n return res.zoomToPage(left, top, width, height).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method gets the scale factor of the canvas\n * @returns scale factor in percents\n */\n getZoomPercentage = async () => {\n const res = await this.#editorAPI;\n return res.getZoomPercentage().then((result) => getEditorResponseData<number>(result));\n };\n\n /**\n * This method sets the scale factor to the canvas and re-centers the page\n * @param scaleFactor scale factor in percents\n * @returns\n */\n setZoomPercentage = async (scaleFactor: number) => {\n const res = await this.#editorAPI;\n return res.setZoomPercentage(scaleFactor).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets a new view mode\n * @param viewMode view mode of the editor\n * @returns\n */\n setViewMode = async (viewMode: ViewMode) => {\n const res = await this.#editorAPI;\n return res.setViewMode(viewMode).then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { EditorAPI, Id } from '../types/CommonTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { CharacterStyle, CharacterStyleUpdate } from '../types/CharacterStyleTypes';\n\n/**\n * The CharacterStyleController is responsible for all communication regarding character styles.\n * Methods inside this controller can be called by `window.SDK.characterStyle.{method-name}`\n */\nexport class CharacterStyleController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method returns the list of character styles\n * @returns list of all character styles\n */\n getAll = async () => {\n const res = await this.#editorAPI;\n return res.getCharacterStyles().then((result) => getEditorResponseData<CharacterStyle[]>(result));\n };\n\n /**\n * This method returns a character style by the id\n * @param characterStyleId the id of a specific character style\n * @returns character style for given id\n */\n getById = async (characterStyleId: Id) => {\n const res = await this.#editorAPI;\n return res\n .getCharacterStyleById(characterStyleId)\n .then((result) => getEditorResponseData<CharacterStyle>(result));\n };\n\n /**\n * This method creates a new character style\n * @returns the id of new character style\n */\n create = async () => {\n const res = await this.#editorAPI;\n return res.createCharacterStyle().then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method updates a character style by the id and provided properties\n * @param characterStyleId the id of a specific character style\n * @param characterStyle the new character style properties\n * @returns\n */\n update = async (characterStyleId: Id, characterStyle: CharacterStyleUpdate) => {\n const res = await this.#editorAPI;\n return res\n .updateCharacterStyle(characterStyleId, JSON.stringify(characterStyle))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method removes a character style by the id\n * @param characterStyleId the id of a specific character style\n * @returns\n */\n remove = async (characterStyleId: Id) => {\n const res = await this.#editorAPI;\n return res.removeCharacterStyle(characterStyleId).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method duplicates a character style by the id\n * @param characterStyleId the id of a specific character style\n * @returns id of the duplicated character style\n */\n duplicate = async (characterStyleId: Id) => {\n const res = await this.#editorAPI;\n return res.duplicateCharacterStyle(characterStyleId).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method renames a character style by the id\n * @param characterStyleId the id of a specific character style\n * @param characterStyleName the new name of the character style\n * @returns\n */\n rename = async (characterStyleId: Id, characterStyleName: string) => {\n const res = await this.#editorAPI;\n return res\n .renameCharacterStyle(characterStyleId, characterStyleName)\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method changes positions of character styles\n * @param order the position of the character styles\n * @param ids the list of character style ids\n * @returns\n */\n move = async (order: number, ids: Id[]) => {\n const res = await this.#editorAPI;\n return res.moveCharacterStyles(order, ids).then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { ClipboardContentType } from '../types/ClipboardTypes';\nimport { EditorAPI, Id } from '../types/CommonTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The ClipboardController is responsible for all communication regarding clipboard.\n * Methods inside this controller can be called by `window.SDK.clipboard.{method-name}`\n */\nexport class ClipboardController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method will copy the frames to the OS clipboard as a json frame\n * @param ids An array of all frame ids you want to copy\n * @returns\n */\n copyFrames = async (ids: Id[]) => {\n const res = await this.#editorAPI;\n const frameData = await res.copyFrames(ids);\n\n if (frameData.data) {\n await navigator.clipboard.writeText(frameData.data);\n }\n\n return getEditorResponseData<null>(frameData);\n };\n\n /**\n * This method will remove the frames and store them to the OS clipboard as\n * a json frame\n * @param ids An array of all frame ids you want to cut\n * @returns\n */\n cutFrames = async (ids: Id[]) => {\n const res = await this.#editorAPI;\n const frameData = await res.cutFrames(ids);\n\n if (frameData.data) {\n await navigator.clipboard.writeText(frameData.data);\n }\n\n return getEditorResponseData<null>(frameData);\n };\n\n /**\n * This method will paste the OS clipboard content to the editor as frames\n * @returns\n */\n pasteFrames = async () => {\n const res = await this.#editorAPI;\n\n const clipboardData = await navigator.clipboard.readText();\n const result = await res.pasteFrames(clipboardData);\n\n return getEditorResponseData<null>(result);\n };\n\n /**\n * This method will get the content type of the OS clipboard\n * @returns content type\n */\n getContentType = async () => {\n const res = await this.#editorAPI;\n\n const clipboardData = await navigator.clipboard.readText();\n const result = await res.getClipboardContentType(clipboardData);\n\n return getEditorResponseData<ClipboardContentType>(result);\n };\n}\n","import { EditorAPI } from '../types/CommonTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { Color, RGBColor } from '../types/ColorStyleTypes';\n\n/**\n * The ColorConversionController is responsible for all communication regarding color coversion.\n * Methods inside this controller can be called by `window.SDK.colorConversion.{method-name}`\n */\nexport class ColorConversionController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method converts the given color to its rgb representation\n * @param color the color to convert\n * @returns the rgb representation of the given color\n */\n convertToRgb = async (color: Color) => {\n const res = await this.#editorAPI;\n return res.colorToRgb(JSON.stringify(color)).then((result) => getEditorResponseData<RGBColor>(result));\n };\n}\n","import { Id } from './CommonTypes';\n\nexport enum APIColorType {\n rgb = 'rgb',\n hex = 'hex',\n cmyk = 'cmyk',\n spotCmyk = 'spotCmyk',\n spotRgb = 'spotRgb',\n spotHex = 'spotHex',\n}\nexport enum ColorType {\n rgb = 'rgb',\n hex = 'hex',\n cmyk = 'cmyk',\n gray = 'gray',\n hsl = 'hsl',\n /**\n * @deprecated Use spotCMYK or spotRGB instead\n */\n spot = 'spot',\n spotCMYK = 'spotCMYK',\n spotRGB = 'spotRGB',\n spotHEX = 'spotHEX',\n}\n\nexport type RGBColor = {\n r: number;\n g: number;\n b: number;\n type: ColorType;\n};\n\nexport type CMYKColor = {\n c: number;\n m: number;\n y: number;\n k: number;\n type: ColorType;\n};\n\nexport type HSLColor = {\n h: number;\n s: number;\n l: number;\n type: ColorType;\n};\n\nexport type GrayColor = {\n g: number;\n type: ColorType;\n};\n\n/**\n * @deprecated Use SpotColorCMYK or SpotColorRGB instead\n */\nexport type SpotColor = {\n spotName: string;\n c: number;\n m: number;\n y: number;\n k: number;\n type: ColorType;\n};\n\nexport type SpotColorCMYK = {\n spotName: string;\n c: number;\n m: number;\n y: number;\n k: number;\n type: ColorType;\n};\n\nexport type SpotColorRGB = {\n spotName: string;\n r: number;\n g: number;\n b: number;\n type: ColorType;\n};\n\nexport type SpotColorHEX = {\n spotName: string;\n value: string;\n type: ColorType;\n};\n\nexport type HexColor = {\n value: string;\n type: ColorType;\n};\n\nexport type Color =\n | RGBColor\n | CMYKColor\n | HSLColor\n | GrayColor\n | SpotColor\n | HexColor\n | SpotColorCMYK\n | SpotColorRGB\n | SpotColorHEX;\n\nexport type ColorUpdate = Color;\n\nexport type DocumentColor = {\n id: string;\n name: string;\n color: Color;\n};\n\nexport type ColorUsageUpdate = {\n /**\n * Reference to the brand kit color, can only be used if it is a brand kit color.\n */\n id?: Id;\n /**\n * The local color object, can only be used if it is a local color.\n */\n color?: ColorUpdate;\n type: ColorUsageType;\n /**\n * Opacity of the color (0-100) where 0 = fully transparent.\n */\n opacity?: number;\n /**\n * Indicates if the color will be applied or not.\n */\n isApplied?: boolean;\n};\n\nexport type ColorUsage = {\n /**\n * Reference to the brand kit color, can only be used if it is a brand kit color.\n */\n id?: Id;\n /**\n * The local color object, can only be used if it is a local color.\n */\n color?: Color;\n type: ColorUsageType;\n /**\n * Opacity of the color (0-100) where 0 = fully transparent.\n */\n opacity?: number;\n};\n\nexport enum ColorUsageType {\n /**\n * The color is defined locally on the object\n */\n local = 'local',\n /**\n * The color is referencing a document color\n */\n brandKit = 'brandKit',\n /**\n * @deprecated use brandKit instead\n *\n * The color is referencing a brand kit color\n */\n stylekit = 'brandKit',\n}\n","import { EditorAPI, Id } from '../types/CommonTypes';\nimport { ColorType, ColorUpdate, DocumentColor } from '../types/ColorStyleTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The ColorStyleController is responsible for all communication regarding color styles.\n * Methods inside this controller can be called by `window.SDK.colorStyle.{method-name}`\n */\nexport class ColorStyleController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method returns the list of colors\n * @returns list of all colors\n */\n getAll = async () => {\n const res = await this.#editorAPI;\n return res.getColors().then((result) => getEditorResponseData<DocumentColor[]>(result));\n };\n\n /**\n * This method returns a color by id\n * @param id the id of a specific color\n * @returns color properties for given id\n */\n getById = async (id: string) => {\n const res = await this.#editorAPI;\n return res.getColorById(id).then((result) => getEditorResponseData<DocumentColor>(result));\n };\n\n /**\n * This method creates a new color\n * @returns the new created color id\n */\n create = async () => {\n const res = await this.#editorAPI;\n return res.createColor().then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method duplicates a color by the id\n * @param id the id of a specific color\n * @returns id of the duplicated color\n */\n duplicate = async (id: string) => {\n const res = await this.#editorAPI;\n return res.duplicateColor(id).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method changes positions of colors\n * @param order the position of the colors\n * @param ids the list of color IDs\n * @returns\n */\n move = async (order: number, ids: string[]) => {\n const res = await this.#editorAPI;\n return res.moveColors(order, ids).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method renames a color\n * @param id the id of a specific color\n * @param newColorName the new name of the color\n * @returns\n */\n rename = async (id: string, newColorName: string) => {\n const res = await this.#editorAPI;\n return res.renameColor(id, newColorName).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method updates a color\n * @param id the id of a specific color\n * @param newColorProperties the new color properties\n * @returns\n */\n update = async (id: string, newColorProperties: ColorUpdate) => {\n const res = await this.#editorAPI;\n const properties = newColorProperties;\n if (properties.type === ColorType.spot) {\n properties.type = ColorType.spotCMYK;\n }\n return res.updateColor(id, JSON.stringify(properties)).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method removes a color\n * @param id the id of a specific color\n * @returns\n */\n remove = async (id: string) => {\n const res = await this.#editorAPI;\n return res.removeColor(id).then((result) => getEditorResponseData<null>(result));\n };\n}\n","import type {\n Dictionary as ContextDictionary,\n ConnectorConfigOptions as GenericConnectorConfigOptions,\n ConnectorConfigValue as GenericConnectorConfigValue,\n QueryPage as QueryResult,\n} from '@chili-studio/connector-types';\nimport { Id } from './CommonTypes';\n\nexport type { FilePointer, QueryOptions } from '@chili-studio/connector-types';\n\nexport enum DeprecatedMediaType {\n file = 0,\n collection = 1,\n}\n\nexport enum DeprecatedMediaConnectorDownloadType {\n LowResolutionWeb = 'lowresWeb',\n HighResolutionWeb = 'highresWeb',\n}\n\nexport enum MediaType {\n file = 'file',\n collection = 'collection',\n}\n\nexport enum ConnectorType {\n media = 'media',\n fonts = 'fonts',\n data = 'data',\n /**\n * @experimental This is still experimental and might change in future releases.\n */\n components = 'components',\n}\n\nexport enum SortBy {\n name = 'name',\n path = 'relativePath',\n id = 'id',\n}\n\nexport enum SortOrder {\n ascending = 'asc',\n descending = 'desc',\n}\n\nexport enum ConnectorConfigValueType {\n text = 'text',\n boolean = 'boolean',\n}\n\nexport enum ConnectorConfigContextType {\n query = 'query',\n upload = 'upload',\n}\n\nexport type ConnectorConfigValue = GenericConnectorConfigValue<ConnectorConfigValueType, ConnectorConfigContextType>;\nexport type ConnectorConfigOptions = GenericConnectorConfigOptions<\n ConnectorConfigValueType,\n ConnectorConfigContextType\n>;\n\ninterface ConnectorRegistrationBase {\n /**\n * Url to the connector.\n *\n * - If source is `url`, this must be a publicly accessible url.\n *\n * - If source is `grafx`, this must be the full url to the connector GET endpoint on GraFx Environment API.\n */\n url: string;\n\n /**\n * Connector source type.\n */\n source: ConnectorRegistrationSource;\n}\n\nexport interface ConnectorUrlRegistration extends ConnectorRegistrationBase {\n source: ConnectorRegistrationSource.url;\n}\n\nexport interface ConnectorGrafxRegistration extends ConnectorRegistrationBase {\n source: ConnectorRegistrationSource.grafx;\n}\n\nexport interface ConnectorLocalRegistration extends ConnectorRegistrationBase {\n source: ConnectorRegistrationSource.local;\n}\n\nexport type ConnectorRegistration = ConnectorUrlRegistration | ConnectorGrafxRegistration | ConnectorLocalRegistration;\n\nexport type ConnectorInstance = {\n id: Id;\n name: string;\n iconUrl: string;\n source: ConnectorRegistration;\n};\n\nexport enum ConnectorRegistrationSource {\n /**\n * Connector is hosted on a publicly accessible link.\n */\n url = 'url',\n\n /**\n * Connector is hosted on GraFx Environment API.\n */\n grafx = 'grafx',\n\n /**\n * Connector is embedded in the document.\n * Note: This is a temporary type; only to be used internally.\n */\n local = 'local',\n}\n\nexport interface EngineToConnectorMapping {\n name: string;\n value: ContextDictionary[keyof ContextDictionary];\n direction: ConnectorMappingDirection.engineToConnector;\n}\n\nexport interface ConnectorToEngineMapping {\n name: string;\n value: string;\n direction: ConnectorMappingDirection.connectorToEngine;\n}\n\nexport type ConnectorMappingType = EngineToConnectorMapping | ConnectorToEngineMapping;\n\nexport class ConnectorMapping implements EngineToConnectorMapping, ConnectorToEngineMapping {\n name: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n value: any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n direction: any = ConnectorMappingDirection.engineToConnector;\n\n constructor(\n contextProperty: string,\n mapFrom: ConnectorMappingSource.variable,\n sourceValue: string,\n direction: ConnectorMappingDirection.connectorToEngine,\n );\n constructor(\n contextProperty: string,\n mapFrom: ConnectorMappingSource,\n sourceValue: string | boolean,\n direction?: ConnectorMappingDirection.engineToConnector,\n );\n constructor(contextProperty: string, mapFrom: ConnectorMappingSource, sourceValue: string | boolean);\n constructor(\n contextProperty: string,\n mapFrom: ConnectorMappingSource,\n sourceValue: string | boolean,\n direction = ConnectorMappingDirection.engineToConnector,\n ) {\n this.name = contextProperty;\n this.direction = direction;\n\n if (mapFrom === ConnectorMappingSource.variable) {\n this.value = `${mapFrom}.${sourceValue}`;\n } else {\n this.value = sourceValue;\n }\n }\n}\n\nexport type ConnectorState = {\n id: Id;\n type: ConnectorStateType;\n};\n\nexport type ConnectorEvent = {\n id: Id;\n type: ConnectorEventType;\n};\n\nexport type QueryPage<T> = Omit<QueryResult<T>, 'links'> & {\n nextPageToken?: string;\n};\n\nexport enum ConnectorMappingSource {\n variable = 'var',\n value = 'value',\n}\n\n/**\n * Direction of the Connector Mapping.\n */\nexport enum ConnectorMappingDirection {\n /**\n * Indicates the mapping will propagate a value to the connector. This\n * mapping might cause the linked connector to refresh.\n */\n engineToConnector = 'engineToConnector',\n\n /**\n * Indicates the mapping will propagate a value from inside the connector\n * to the engine. AKA \"reverse mapping\".\n */\n connectorToEngine = 'connectorToEngine',\n}\n\nexport enum ConnectorStateType {\n /**\n * Connector loading process has started.\n * Any SDK methods that required the connector id, will start working now.\n */\n loading = 'loading',\n\n /**\n * Connector loading completed.\n */\n loaded = 'loaded',\n\n /**\n * Connector is running in QuickJS.\n */\n\n running = 'running',\n\n /**\n * Connector is fully configured and has the correct authentication information.\n * At this point the connector is ready to make requests.\n */\n ready = 'ready',\n\n /**\n * Something went wrong, the connector is in error state.\n * Check the error message for more information.\n */\n error = 'error',\n}\n\nexport enum ConnectorEventType {\n /**\n * This event will be triggered by the following state changes of the connector\n * - loading\n * - loaded\n * - running\n * - ready\n * - error\n */\n stateChanged = 'stateChanged',\n\n /**\n * Authentication information is changed\n */\n authChanged = 'authChanged',\n\n /**\n * Connector configuration changed that requires the connector to be reloaded in QuickJS.\n * This will trigger multiple 'stateChanged' events while it is reloading.\n * Wait until 'ready'-stateChanged event is received to start using the connector again.\n */\n reloadRequired = 'reloadRequired',\n\n /**\n * Connector is unregistered and no longer exists inside the editor engine.\n * Don't use the 'connectorId' after receiving this event.\n */\n unloaded = 'unloaded',\n}\n\n/**\n * Hardcoded grafx media connector until we get it from the environment.\n */\nexport const grafxMediaConnectorRegistration: ConnectorLocalRegistration = {\n url: 'grafx-media.json',\n source: ConnectorRegistrationSource.local,\n};\n\n/**\n * Grafx token to return to the engine when it expires.\n */\nexport class GrafxTokenAuthCredentials {\n token: string;\n type = AuthCredentialsTypeEnum.grafxToken;\n /**\n * Optional HTTP headers to send with connector requests (e.g. Authorization).\n */\n headers?: Record<string, string>;\n\n constructor(token: string, headers?: Record<string, string>) {\n this.token = token;\n this.headers = headers;\n }\n}\n\n/**\n * Notification to return to the engine whenever a 3rd party auth (user impersonation)\n * has been renewed by the integration.\n */\nexport class RefreshedAuthCredendentials {\n type = AuthCredentialsTypeEnum.refreshed;\n /**\n * Optional HTTP headers to send with connector requests (e.g. Authorization).\n */\n headers?: Record<string, string>;\n\n constructor(headers?: Record<string, string>) {\n this.headers = headers;\n }\n}\n\nexport enum AuthCredentialsTypeEnum {\n grafxToken = 'grafxToken',\n refreshed = 'refreshed',\n}\n\nexport type AuthCredentials = GrafxTokenAuthCredentials | RefreshedAuthCredendentials;\n\nexport enum AuthRefreshTypeEnum {\n grafxToken = 'grafxToken',\n any = 'any',\n}\n\n/**\n * @param connectorId connector id\n * @param remoteConnectorId remote connector id\n * @param type type of auth renewal needed\n * @param headerValue the value of the X-GRAFX-UNAUTHORIZED header. This\n * will notify that the dam authentication expired if it went through the\n * proxy.\n * Example: \"Static, 1234\", \"OAuthClientCredentials, 5678\"\n * If the http request did not go through the proxy, headerValue is null.\n */\nexport type AuthRefreshRequest = {\n connectorId: Id;\n remoteConnectorId: Id;\n type: AuthRefreshTypeEnum;\n headerValue: string | null;\n connectorDefinition: ConnectorDefinition;\n};\n\nexport type ConnectorOptions = ContextDictionary;\nexport type MetaData = ContextDictionary;\n\nexport type UploadValidationConfiguration = {\n minWidthPixels?: number | null;\n maxWidthPixels?: number | null;\n minHeightPixels?: number | null;\n maxHeightPixels?: number | null;\n mimeTypes?: string[];\n};\n\nexport enum UploadAssetValidationErrorType {\n minDimension = 'minDimension',\n}\n\nexport class UploadAssetValidationError extends Error {\n constructor(message: string, public type: UploadAssetValidationErrorType) {\n super(message);\n }\n}\n\nexport enum ConnectorSupportedAuth {\n StaticKey = 'staticKey',\n OAuth2ClientCredentials = 'oAuth2ClientCredentials',\n OAuth2AuthorizationCode = 'oAuth2AuthorizationCode',\n OAuth2ResourceOwnerPassword = 'oAuth2ResourceOwnerPassword',\n OAuth2JwtBearer = 'oAuth2JwtBearer',\n None = 'none',\n}\n\ninterface ConnectorDefinition {\n id: Id;\n name: string;\n type: ConnectorType;\n supportedAuthentication: { browser: ConnectorSupportedAuth[]; server: ConnectorSupportedAuth[] };\n externalSourceId?: string | null;\n}\n","import { ConnectorInstance, ConnectorRegistration, ConnectorRegistrationSource } from '../types/ConnectorTypes';\nimport * as Next from '../next/types/ConnectorTypes';\n\nexport class ConnectorCompatibilityTools {\n /**\n * Since `ConnectorGrafxRegistration` uses `RemoteConnectorId` instead of `url` on the engine side,\n * we extract that `id` from the source `url`\n * **/\n makeConnectorSourceForwardsCompatible = (\n registration: ConnectorRegistration | Next.ConnectorGrafxRegistration,\n ): ConnectorRegistration | Next.ConnectorGrafxRegistration => {\n if (registration.source != ConnectorRegistrationSource.grafx) {\n return registration;\n }\n\n if (this.isSourceMigrated(registration)) {\n return registration;\n }\n\n let url = registration.url;\n\n while (url.endsWith('/')) {\n url = url.substring(0, url.length - 1);\n }\n\n const pathChunks = url.split('/');\n // `RemoteConnectorId` is always the very last part of the URL\n const remoteConnectorId = pathChunks[pathChunks.length - 1];\n\n return { id: remoteConnectorId, source: ConnectorRegistrationSource.grafx };\n };\n\n makeMultipleConnectorsBackwardsCompatible = (\n connectors: Next.ConnectorInstance[],\n baseUrl: string | undefined,\n ): ConnectorInstance[] =>\n connectors.map((connector) => this.makeSingleConnectorBackwardsCompatible(connector, baseUrl));\n\n makeSingleConnectorBackwardsCompatible = (\n connector: Next.ConnectorInstance,\n baseUrl: string | undefined,\n ): ConnectorInstance => {\n if (connector.source.source != ConnectorRegistrationSource.grafx) {\n return connector as ConnectorInstance;\n }\n\n return {\n id: connector.id,\n name: connector.name,\n iconUrl: connector.iconUrl,\n source: this.makeConnectorSourceBackwardsCompatible(connector.source, baseUrl),\n };\n };\n\n /**\n * Since `ConnectorGrafxRegistration` uses `RemoteConnectorId` instead of `url` on the engine side,\n * we generate that `url` from the `baseUrl` and `id`\n * **/\n makeConnectorSourceBackwardsCompatible = (\n connector: Next.ConnectorGrafxRegistration,\n baseUrl: string | undefined,\n ): ConnectorRegistration => {\n let url = baseUrl;\n\n while (url?.endsWith('/')) {\n url = url.substring(0, url.length - 1);\n }\n\n return {\n url: `${url}/connectors/${connector.id}`,\n source: ConnectorRegistrationSource.grafx,\n };\n };\n\n // Helps to promote a correct type\n private isSourceMigrated = (\n registration: ConnectorRegistration | Next.ConnectorGrafxRegistration,\n ): registration is Next.ConnectorGrafxRegistration => 'id' in registration;\n}\n","import { EditorAPI, EditorResponse, Id } from '../types/CommonTypes';\r\nimport {\r\n ConnectorInstance,\r\n ConnectorMappingDirection,\r\n ConnectorMappingType,\r\n ConnectorOptions,\r\n ConnectorRegistration,\r\n ConnectorState,\r\n ConnectorStateType,\r\n ConnectorToEngineMapping,\r\n ConnectorType,\r\n EngineToConnectorMapping,\r\n} from '../types/ConnectorTypes';\r\nimport { getEditorResponseData } from '../utils/EditorResponseData';\r\n\r\nimport * as Next from '../next/types/ConnectorTypes';\r\nimport { WellKnownConfigurationKeys } from '../types/ConfigurationTypes';\r\nimport { ConnectorCompatibilityTools } from '../utils/ConnectorCompatibilityTools';\r\n\r\n/**\r\n * The ConnectorController manages lifetime of all available connectors, regardless of the type, in the\r\n * document. Use it to add/remove connectors to a template, or set specific configuration.\r\n *\r\n * The way CHILI Studio handles different sources of resources is called 'Connectors'. A Connectors is an\r\n * implementation of a set of capabilities we need to interact with a certain external resource management system.\r\n * In essence a connector is the combination of a Javascript snippet and some metadata. The Javascript snippet\r\n * is loaded in the studio engine using a sandboxed Javascript execution engine (QuickJs). This allows us to\r\n * execute the media connector both on web using webassembly and on the server side during e.g. animation output\r\n * generation.\r\n * This controller is an interface to the running connector instance inside the studio engine. The engine will\r\n * automatically register the 'grafx-media' and 'grafx-font' connectors. Custom connectors need to be registered\r\n * manually.\r\n */\r\nexport class ConnectorController {\r\n /**\r\n * @ignore\r\n */\r\n #editorAPI: EditorAPI;\r\n #localConfig: Map<string, string>;\r\n #connectorCompatibilityTools: ConnectorCompatibilityTools;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(editorAPI: EditorAPI, localConfig: Map<string, string>) {\r\n this.#editorAPI = editorAPI;\r\n this.#localConfig = localConfig;\r\n this.#connectorCompatibilityTools = new ConnectorCompatibilityTools();\r\n }\r\n\r\n /**\r\n * Gets a connector by its id\r\n * @param id the id of the connector\r\n * @returns connector\r\n */\r\n getById = async (id: Id) => {\r\n // add backwards compatibility code\r\n const res = await this.#editorAPI;\r\n return res\r\n .getConnectorById(id)\r\n .then((result) => getEditorResponseData<Next.ConnectorInstance>(result))\r\n .then((resp) => {\r\n const update: EditorResponse<ConnectorInstance> = { ...resp, parsedData: null };\r\n if (resp.parsedData) {\r\n update.parsedData = this.#connectorCompatibilityTools.makeSingleConnectorBackwardsCompatible(\r\n resp.parsedData,\r\n this.#localConfig.get(WellKnownConfigurationKeys.GraFxStudioEnvironmentApiUrl),\r\n );\r\n }\r\n return update;\r\n });\r\n };\r\n\r\n /**\r\n * Gets all available connectors of a 'ConnectorType'\r\n * @param type type of connector you want to get\r\n * @returns list of all available connectors of a 'ConnectorType'\r\n */\r\n getAllByType = async (type: ConnectorType) => {\r\n // add backwards compatibility code\r\n const res = await this.#editorAPI;\r\n return res\r\n .getConnectors(type)\r\n .then((result) => getEditorResponseData<Next.ConnectorInstance[]>(result))\r\n .then((resp) => {\r\n const update: EditorResponse<ConnectorInstance[]> = { ...resp, parsedData: null };\r\n if (resp.parsedData) {\r\n update.parsedData = this.#connectorCompatibilityTools.makeMultipleConnectorsBackwardsCompatible(\r\n resp.parsedData,\r\n this.#localConfig.get(WellKnownConfigurationKeys.GraFxStudioEnvironmentApiUrl),\r\n );\r\n }\r\n return update;\r\n });\r\n };\r\n\r\n /**\r\n * Registers a new connector in the SDK. After successful registration, depending\r\n * on the connector type, the connector can be configured and used in the template\r\n * Remember to add custom authentication information after registering the connector\r\n * @param registration registration object containing all details about the connector\r\n * @returns the Id of the newly created connector, this Id should be used going forward.\r\n */\r\n register = async (registration: ConnectorRegistration) => {\r\n const res = await this.#editorAPI;\r\n\r\n const connectorRegistration =\r\n this.#connectorCompatibilityTools.makeConnectorSourceForwardsCompatible(registration);\r\n\r\n return res\r\n .registerConnector(JSON.stringify(connectorRegistration))\r\n .then((result) => getEditorResponseData<Id>(result));\r\n };\r\n\r\n /**\r\n * Unregisters a connector from the document.\r\n * @param id the id of the connector to unregister\r\n * @returns\r\n */\r\n unregister = async (id: Id) => {\r\n const res = await this.#editorAPI;\r\n return res.unregisterConnector(id).then((result) => getEditorResponseData<null>(result));\r\n };\r\n\r\n /**\r\n * Configures a registered connector. A configurator helper is passed as an argument\r\n * of the callback for you to setup your connector.\r\n * @param id the id of your registered connector\r\n * @param configurationCallback callback to setup the connector\r\n * @returns\r\n */\r\n configure = async (id: Id, configurationCallback: (configurator: ConnectorConfigurator) => Promise<void>) => {\r\n const res = await this.#editorAPI;\r\n // wait for connector to be ready\r\n await this.waitToBeReady(id);\r\n // execute callback\r\n await configurationCallback(new ConnectorConfigurator(id, res));\r\n // invalidate connector in engine\r\n return res.updateConnectorConfiguration(id).then((result) => getEditorResponseData<null>(result));\r\n };\r\n\r\n /**\r\n * Gets the current state a connector is in, to wait until a connector is ready to be used, use the 'waitToBeReady'\r\n * method in this controller.\r\n * @param id the id of your registered connector you want to make sure it is loaded\r\n * @returns connector state\r\n */\r\n getState = async (id: Id) => {\r\n const res = await this.#editorAPI;\r\n return res.getConnectorState(id).then((result) => getEditorResponseData<ConnectorState>(result));\r\n };\r\n\r\n /**\r\n * Gets the mapped data from connector.\r\n * @param id the id of your registered connector\r\n * @param direction the mapping direction\r\n * @returns mappings\r\n */\r\n async getMappings(\r\n id: string,\r\n direction: ConnectorMappingDirection.engineToConnector,\r\n ): Promise<EditorResponse<EngineToConnectorMapping[]>>;\r\n async getMappings(\r\n id: string,\r\n direction: ConnectorMappingDirection.connectorToEngine,\r\n ): Promise<EditorResponse<ConnectorToEngineMapping[]>>;\r\n async getMappings(id: string, direction?: undefined): Promise<EditorResponse<ConnectorMappingType[]>>;\r\n async getMappings(id: string, direction?: ConnectorMappingDirection) {\r\n const res = await this.#editorAPI;\r\n return res\r\n .getConnectorMappings(id)\r\n .then((result) => getEditorResponseData<ConnectorMappingType[]>(result))\r\n .then((result) =>\r\n !direction\r\n ? result\r\n : {\r\n ...result,\r\n parsedData: result.parsedData?.filter((cm) => cm.direction === direction),\r\n },\r\n );\r\n }\r\n\r\n /**\r\n * Gets the options from the connector.\r\n * @param id the id of your registered connector\r\n * @returns options\r\n */\r\n getOptions = async (id: string) => {\r\n const res = await this.#editorAPI;\r\n return res.getConnectorOptions(id).then((result) => getEditorResponseData<ConnectorOptions>(result));\r\n };\r\n\r\n /**\r\n * Connectors are loaded asynchronously in the editor engine, this causes some challenges while configuring them. To make sure\r\n * an action on the connector will be available, it's advised to await this method. After the Promise resolves we are sure\r\n * the connector is up and running. This is used internally by the configure method to ensure correct execution. It's especially\r\n * useful during startup of the SDK / right after the loadDocument call.\r\n * @param id the id of your registered connector you want to make sure it is loaded\r\n * @returns\r\n */\r\n waitToBeReady = async (id: Id, timeoutMilliseconds = 2000): Promise<EditorResponse<null>> => {\r\n // minimum timeout is 500ms\r\n let timeout = Math.max(timeoutMilliseconds, 500);\r\n\r\n // maximum timeout is 5000ms\r\n timeout = Math.min(timeout, 5000);\r\n\r\n const waitTime = 100;\r\n let retries = 0;\r\n\r\n try {\r\n // using while loop will prevent stack overflow issues when using recursion\r\n // wait for maximum 2 seconds to fail\r\n while (retries * waitTime < timeout) {\r\n const result = await this.getState(id);\r\n\r\n if (\r\n result.success &&\r\n result.parsedData &&\r\n (result.parsedData.type === ConnectorStateType.running ||\r\n result.parsedData.type === ConnectorStateType.ready)\r\n ) {\r\n return getEditorResponseData<null>(\r\n { data: null, success: true, error: undefined, status: 0, parsedData: undefined },\r\n false,\r\n );\r\n }\r\n\r\n await new Promise((resolve) => setTimeout(resolve, waitTime));\r\n retries++;\r\n }\r\n } catch (err) {\r\n return getEditorResponseData<null>(\r\n {\r\n data: null,\r\n success: false,\r\n error: `Error while getting connector state ${err}`,\r\n status: 50000,\r\n parsedData: undefined,\r\n },\r\n false,\r\n );\r\n }\r\n\r\n return getEditorResponseData<null>(\r\n {\r\n data: null,\r\n success: false,\r\n error: `Timed out waiting for connector`,\r\n status: 50000,\r\n parsedData: undefined,\r\n },\r\n false,\r\n );\r\n };\r\n\r\n /**\r\n * Updates the mappings for a given connector.\r\n * @param id the id of your registered connector\r\n * @param mappings An array of mapping objects\r\n * @returns\r\n */\r\n updateMappings = async (id: Id, mappings: ConnectorMappingType[]) => {\r\n return await this.configure(id, async (config) => {\r\n // Retrieve all existing mappings\r\n const { parsedData: existingMappings } = await this.getMappings(id);\r\n\r\n // Filter out old mappings that are being replaced with new ones\r\n const filteredMappings =\r\n existingMappings?.filter(\r\n (mapping) =>\r\n !mappings.some(\r\n (newMapping) =>\r\n newMapping.name === mapping.name && newMapping.direction === mapping.direction,\r\n ),\r\n ) ?? [];\r\n\r\n // Filter out new mappings that have empty `name` or `value`\r\n const validMappings = mappings.filter((i) => i.name !== '' && i.value !== '');\r\n\r\n // Merge valid new mappings with the filtered existing mappings\r\n const combinedMappings = [...filteredMappings, ...validMappings];\r\n\r\n // Update the configuration with the resulted mappings\r\n await config.setMappings(combinedMappings);\r\n });\r\n };\r\n\r\n /**\r\n * Sets the mappings for a given connector, replacing the existing mappings with the new ones.\r\n * @param id the id of your registered connector\r\n * @param mappings An array of mapping objects to set\r\n * @returns\r\n */\r\n applyMappings = async (id: Id, mappings: ConnectorMappingType[]) => {\r\n return await this.configure(id, async (config) => {\r\n const validMappings = mappings.filter((i) => i.name !== '' && i.value !== '');\r\n await config.setMappings(validMappings);\r\n });\r\n };\r\n\r\n /**\r\n * Sets HTTP headers on every local connector instance of the given type that uses the given remote (Environment API) connector id.\r\n * It's applicable as for already registered connectors as well as for future one with same remote connector id.\r\n *\r\n * @param remoteConnectorId unique id of the remote connector from the Environment API (grafx source)\r\n * @param headers HTTP headers to set on the connector\r\n * @returns EditorResponse with null on success; error if the engine call fails\r\n */\r\n setHttpHeaders = async (\r\n remoteConnectorId: string,\r\n headers: Record<string, string>,\r\n ): Promise<EditorResponse<null>> => {\r\n const res = await this.#editorAPI;\r\n return res\r\n .remoteConnectorAuthenticationSetHttpHeaders(remoteConnectorId, JSON.stringify(headers))\r\n .then((result) => getEditorResponseData<null>(result));\r\n };\r\n}\r\n\r\n/**\r\n * Helper to setup your connector\r\n */\r\nclass ConnectorConfigurator {\r\n /**\r\n * @ignore\r\n */\r\n #connectorId: Id;\r\n #res: EditorAPI;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(id: Id, res: EditorAPI) {\r\n this.#connectorId = id;\r\n this.#res = res;\r\n }\r\n\r\n /**\r\n * Allows to customize the context data a connector can work with. The options data\r\n * will be available using the context parameter in the connector implementation code.\r\n * @param options object containing key value data to pass to connector context\r\n * @returns\r\n */\r\n setOptions = async (options: ConnectorOptions) => {\r\n return this.#res\r\n .setConnectorOptions(this.#connectorId, JSON.stringify(options))\r\n .then((result) => getEditorResponseData<null>(result));\r\n };\r\n\r\n /**\r\n * Allows to map variables or strings to connector context data.\r\n * By defining the mappings, we can trigger re-download of assets (dynamic asset provider)\r\n * or populate filters for the query endpoint. The mapped data will be available using\r\n * the context parameter in the connector implementation code.\r\n *\r\n * For the variables the mapping should follow the format \"var.[variable id]\". e.g. var.6B29FC40-CA47-1067-B31D-00DD010662DA\r\n *\r\n * @param mappings collection of mappings to set to this connector\r\n * @returns\r\n */\r\n setMappings = async (mappings: ConnectorMappingType[]) => {\r\n const result = await this.#res.setConnectorMappings(\r\n this.#connectorId,\r\n mappings.map(function (m) {\r\n return JSON.stringify(m);\r\n }),\r\n );\r\n return getEditorResponseData<null>(result);\r\n };\r\n\r\n /**\r\n * This method sets the HTTP headers for the 'staticKey' authentication type.\r\n * These additional headers will be added to all connector http calls.\r\n * Can only be used after a connector has been registered. (if you are using a grafx connector no registration is needed)\r\n * @param headerName name of the header\r\n * @param headerValue value of the header\r\n * @returns\r\n */\r\n setHttpHeader = async (headerName: string, headerValue: string) => {\r\n return this.#res\r\n .connectorAuthenticationSetHttpHeader(this.#connectorId, headerName, headerValue)\r\n .then((result) => getEditorResponseData<null>(result));\r\n };\r\n}\r\n","import { EditorAPI, EditorResponse } from '../types/CommonTypes';\nimport { ConnectorConfigOptions, MetaData } from '../types/ConnectorTypes';\nimport {\n BidirectionalDataPage,\n BidirectionalDataPageItem,\n BidirectionalNavigation,\n BidirectionalPageConfig,\n DataConnectorCapabilities,\n DataModel,\n DataPage,\n EditorDataPage,\n OneDirectionalNavigation,\n PageConfig,\n PageItemOptions,\n} from '../types/DataConnectorTypes';\nimport { DataItemMappingTools, EngineDataItem } from '../utils/DataItemMappingTools';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The DataConnectorController is responsible for all communication regarding Data connectors.\n * Methods inside this controller can be called by `window.SDK.dataConnector.{method-name}`\n *\n * The way GraFx Studio handles different sources of Data is called 'DataConnector'.\n * A DataConnector is an implementation of a set of capabilities we need\n * to interact with a certain Data Management system.\n * In essence, a connector is the combination of a JavaScript snippet and some metadata.\n * The JavaScript snippet is loaded in the studio engine using a sandboxed JavaScript execution engine (QuickJs).\n * This allows us to execute the Data connector\n * both on web using webassembly and on the server side during e.g., animation output generation.\n * This controller is an interface to the running connector instance inside the studio engine.\n */\nexport class DataConnectorController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n #dataItemMappingTools: DataItemMappingTools;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI, dataItemMappingTools: DataItemMappingTools) {\n this.#editorAPI = editorAPI;\n this.#dataItemMappingTools = dataItemMappingTools;\n }\n\n /**\n * Query a specific DataConnector for data using both specific PageConfig and the dynamic\n * context as parameters.\n * @param connectorId unique id of the Data connector\n * @param config bidirectional page configuration — provides `previousPageToken` / `continuationToken` navigation\n * @param context context that will be available in the connector script.\n * @returns a BidirectionalDataPage with an array of data objects and bidirectional navigation tokens\n */\n getPage(\n connectorId: string,\n config: BidirectionalPageConfig,\n context?: MetaData,\n ): Promise<EditorResponse<BidirectionalDataPage>>;\n\n /**\n * Query a specific DataConnector for data using both specific PageConfig and the dynamic\n * context as parameters.\n * @param connectorId unique id of the Data connector\n * @param config one-directional page configuration — provides a `continuationToken` for forward navigation\n * @param context context that will be available in the connector script.\n * @returns a DataPage with an array of data objects and a continuation token\n */\n getPage(connectorId: string, config: PageConfig, context?: MetaData): Promise<EditorResponse<DataPage>>;\n\n async getPage(\n connectorId: string,\n config: PageConfig | BidirectionalPageConfig,\n context: MetaData = {},\n ): Promise<EditorResponse<DataPage | BidirectionalDataPage>> {\n const { previousPageToken, continuationToken } = config as BidirectionalPageConfig;\n if (previousPageToken != null && continuationToken != null) {\n throw new Error(\n 'Invalid page config: \"previousPageToken\" and \"continuationToken\" are mutually exclusive. Provide only one to indicate navigation direction.',\n );\n }\n\n const res = await this.#editorAPI;\n const result = await res.dataConnectorGetPage(connectorId, JSON.stringify(config), JSON.stringify(context));\n const resp =\n getEditorResponseData<EditorDataPage<EngineDataItem, OneDirectionalNavigation | BidirectionalNavigation>>(\n result,\n );\n const update: EditorResponse<DataPage | BidirectionalDataPage> = { ...resp, parsedData: null };\n if (resp.parsedData) {\n update.parsedData = {\n ...resp.parsedData,\n data: resp.parsedData.data.map((e: EngineDataItem) =>\n this.#dataItemMappingTools.mapEngineToDataItem(e),\n ),\n } as DataPage | BidirectionalDataPage;\n }\n return update;\n }\n\n /**\n * @experimental This method is still experimental and might change in future releases.\n *\n * Retrieve a single data item by its identifier from a specific DataConnector.\n * Only available for connectors that set `DataConnectorCapabilities.dataSourceVariable = true`,\n * which implies support for both bidirectional page navigation and item-level lookup.\n * pageOptions (sorting, limit) are used by the connector to build navigation tokens.\n * @param connectorId unique id of the Data connector\n * @param id identifier of the item to retrieve\n * @param pageOptions sorting and limit used to build previousPageToken/continuationToken\n * @param context context that will be available in the connector script.\n * @returns a BidirectionalDataPageItem containing the data item and bidirectional navigation tokens\n */\n getPageItemById = async (\n connectorId: string,\n id: string,\n pageOptions: PageItemOptions,\n context: MetaData = {},\n ): Promise<EditorResponse<BidirectionalDataPageItem>> => {\n const res = await this.#editorAPI;\n const result = await res.dataConnectorGetPageItemById(\n connectorId,\n id,\n JSON.stringify(pageOptions),\n JSON.stringify(context),\n );\n const resp = getEditorResponseData<{ data: EngineDataItem } & BidirectionalNavigation>(result);\n const update: EditorResponse<BidirectionalDataPageItem> = { ...resp, parsedData: null };\n if (resp.parsedData) {\n update.parsedData = {\n ...resp.parsedData,\n data: this.#dataItemMappingTools.mapEngineToDataItem(resp.parsedData.data),\n };\n }\n return update;\n };\n\n /**\n * Query a specific DataConnector for a data model using the dynamic context as parameter.\n * @param connectorId unique id of the data connector\n * @param context context that will be available in the connector script.\n * @returns DataModel or DataSourceVariableDataModel\n */\n async getModel<R extends DataModel = DataModel>(\n connectorId: string,\n context: MetaData = {},\n ): Promise<EditorResponse<R>> {\n const res = await this.#editorAPI;\n return res\n .dataConnectorGetModel(connectorId, JSON.stringify(context))\n .then((result) => getEditorResponseData<R>(result));\n }\n\n /**\n * All connectors have a certain set of mappings they allow to be passed into the connector methods their context. This\n * method allows you to discover which mappings are available for a given connector. If you want to use any of these\n * mappings, they will be available in the `context` parameter of any connector method.\n * @param connectorId unique id of the data connector\n * @returns connector mappings\n */\n getConfigurationOptions = async (connectorId: string) => {\n const res = await this.#editorAPI;\n return res\n .dataConnectorGetConfigurationOptions(connectorId)\n .then((result) => getEditorResponseData<ConnectorConfigOptions>(result));\n };\n\n /**\n * This method returns what capabilities the selected connector has. It gives an indication what methods can\n * be used successfully for a certain connector.\n * @param connectorId unique id of the Data connector\n * @returns DataConnectorCapabilities\n */\n getCapabilities = async (connectorId: string) => {\n const res = await this.#editorAPI;\n return res\n .dataConnectorGetCapabilities(connectorId)\n .then((result) => getEditorResponseData<DataConnectorCapabilities>(result));\n };\n}\n","import { EditorAPI } from '../types/CommonTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { ConnectorInstance } from '../next';\nimport { DataItem } from '../types/DataConnectorTypes';\nimport { DataItemMappingTools } from '../utils/DataItemMappingTools';\n\n/**\n * The DataSourceController is responsible for all communication regarding data source.\n * Methods inside this controller can be called by `window.SDK.dataSource.{method-name}`\n *\n * A data source is a data connector selected to be used in the document.\n * Only one data source can be defined per template, this controller manages this\n * data source.\n *\n */\nexport class DataSourceController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n #dataItemMappingTools: DataItemMappingTools;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI, dataItemMappingTools: DataItemMappingTools) {\n this.#editorAPI = editorAPI;\n this.#dataItemMappingTools = dataItemMappingTools;\n }\n\n /**\n * Sets the data source by id.\n * @param connectorId the id of your data connector\n * @returns\n */\n setDataSource = async (connectorId: string) => {\n const res = await this.#editorAPI;\n return res.setDataSource(connectorId).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Gets the data source.\n * @returns the connector object\n */\n getDataSource = async () => {\n const res = await this.#editorAPI;\n return res.getDataSource().then((result) => getEditorResponseData<ConnectorInstance>(result));\n };\n\n /**\n * Removes the data source if defined.\n * @returns\n */\n removeDataSource = async () => {\n const res = await this.#editorAPI;\n return res.removeDataSource().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Maps the data row values to variables by names (data row keys).\n * Variables must exist.\n * @param dataRow DataItem to set\n * @returns\n */\n setDataRow = async (dataRow: DataItem) => {\n const res = await this.#editorAPI;\n const engineDataItem = this.#dataItemMappingTools.mapDataItemToEngine(dataRow);\n return res.setDataRow(JSON.stringify(engineDataItem)).then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { EditorAPI } from '../types/CommonTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { DebugData } from '../types/DebugTypes';\n\n/**\n * The DebugController is responsible for all communication regarding Debugging.\n * Methods inside this controller can be called by `window.SDK.debug.{method-name}`\n */\nexport class DebugController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method returns all debug logs\n * @returns list of all debug logs\n */\n getAllLogs = async () => {\n const res = await this.#editorAPI;\n return res.getLogs().then((result) => getEditorResponseData<DebugData[]>(result));\n };\n\n /**\n * This method toggles the showcase of debug panel\n * @returns\n */\n toggleDebugPanel = async () => {\n const res = await this.#editorAPI;\n return res.toggleDebugPanel().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method enables the debugging\n * @returns\n */\n enableDebug = async () => {\n const res = await this.#editorAPI;\n return res.enableDebug().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method disables the debugging\n * @returns\n */\n disableDebug = async () => {\n const res = await this.#editorAPI;\n return res.disableDebug().then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { EditorAPI } from '../types/CommonTypes';\nimport type { ChiliDocument, DocumentLoadOptions } from '../types/DocumentTypes';\nimport { LayoutPreset } from '../types/LayoutTypes';\n\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n/**\n * The DocumentController is responsible for all communication regarding the Document.\n * Methods inside this controller can be called by `window.SDK.document.{method-name}`\n */\n\nexport class DocumentController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method retrieves the current document state from the editor\n * @returns the JSON document in the form of a string\n */\n getCurrentState = async () => {\n const res = await this.#editorAPI;\n return res.getCurrentDocumentState().then((result) => getEditorResponseData<ChiliDocument>(result));\n };\n\n /**\n * This method will load a provided document in the ChiliDocument format and\n * clean old document states.\n * If you set `DocumentLoadOptions.keepConnectors` to true, `load` will keep\n * your old connectors states e.g. options, authentication..\n * By default `keepConnectors` is false and your connectors states are reset.\n * In this case, you would need to configure your connectors appropriately\n * beforehand.\n * @param doc the document to load in\n * @param options the options object for setting up the document load\n * @returns the document loaded inside of the canvas\n */\n load = async (doc: ChiliDocument | string, options: DocumentLoadOptions = { keepConnectors: false }) => {\n const res = await this.#editorAPI;\n\n const parsedDoc = typeof doc !== 'string' ? JSON.stringify(doc) : doc;\n\n return res\n .loadDocument(parsedDoc, JSON.stringify(options))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will create a new document, based on a document preset\n * @param preset the preset where we will create a document of.\n * @returns the new document created and loaded inside of the canvas\n */\n createAndLoad = async (preset: LayoutPreset) => {\n const res = await this.#editorAPI;\n\n const parsedDoc = JSON.stringify(preset);\n\n return res.createAndLoadDocument(parsedDoc).then((result) => getEditorResponseData<null>(result));\n };\n}\n","// FramePropertiesDto\nimport { BarcodeCharacterSet, BarcodeErrorCorrectionLevel, BarcodeType, QuietZone } from './BarcodeTypes';\nimport { ColorUsage } from './ColorStyleTypes';\nimport { HasOverrideState, Id, PropertyState } from './CommonTypes';\nimport { GradientUsage } from './GradientStyleTypes';\nimport {\n CornerRadiusAll,\n CornerRadiusNone,\n CornerRadiusOnly,\n ShapeFrameSource,\n ShapeType,\n ShapeContainerProperties,\n} from './ShapeTypes';\n\nexport type FrameLayoutType = {\n id: Id;\n layoutId: Id;\n horizontal: FrameAnchor;\n vertical: FrameAnchor;\n x: PropertyState<number>;\n y: PropertyState<number>;\n width: PropertyState<number>;\n height: PropertyState<number>;\n rotationDegrees: PropertyState<number>;\n scaleX: PropertyState<number>;\n scaleY: PropertyState<number>;\n isVisible: PropertyState<boolean>;\n fitMode: PropertyState<FitMode>;\n fitModePosition: PropertyState<FitModePosition>;\n hasImageCrop: PropertyState<boolean>;\n hasFrameSubjectArea: PropertyState<boolean>;\n minCopyfitting: PropertyState<number>;\n maxCopyfitting: PropertyState<number>;\n enableCopyfitting: PropertyState<boolean>;\n autoGrow: AutoGrowSettings;\n isShowingCustomCroppedAsset: boolean;\n customCroppedAssetCount: number;\n subjectId: Id | null;\n} | null;\n\n//Frame.image\nexport type FrameType = {\n id: Id;\n name: string;\n type: FrameTypeEnum;\n // `imageUrl` is not generic: should be removed from model\n imageUrl: string;\n blendMode: string;\n opacity: number;\n};\n\nexport type Frame = TextFrame | ImageFrame | ShapeFrame | BarcodeFrame | ComponentFrame;\n\nexport type ImageFrameVariableSource = {\n type: ImageSourceTypeEnum.variable;\n id: Id;\n};\n\nexport type ImageFrameUrlSource = {\n type: ImageSourceTypeEnum.url;\n url: string;\n};\n\nexport type ImageFrameConnectorSource = {\n type: ImageSourceTypeEnum.connector;\n assetId: Id;\n id: Id;\n};\n\nexport type ImageFrameBrandkitMediaSource = {\n type: ImageSourceTypeEnum.brandKitMedia;\n name: string;\n};\n\nexport type ImageFrameSource =\n | ImageFrameConnectorSource\n | ImageFrameVariableSource\n | ImageFrameUrlSource\n | ImageFrameBrandkitMediaSource;\n\n// used by new getter methods\nexport type ImageFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.image;\n src?: ImageFrameSource;\n blendMode: BlendMode;\n dropShadowSettings?: DropShadowSettings;\n container: {\n source: ShapeFrameSource;\n properties: ShapeContainerProperties;\n };\n};\n\nexport type ShapeFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.shape;\n blendMode: BlendMode;\n shapeProperties: {\n enableFill: boolean;\n fillColor: ColorUsage;\n enableStroke: boolean;\n strokeWeight: number;\n strokeColor: ColorUsage;\n allCornersSame: boolean;\n };\n src: {\n type: ShapeType;\n cornerRadius: CornerRadiusNone | CornerRadiusAll | CornerRadiusOnly;\n sides?: number;\n };\n dropShadowSettings?: DropShadowSettings;\n gradient?: GradientUsage;\n};\n\nexport type TextFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.text;\n textContent: string;\n paddingLeft: number;\n paddingTop: number;\n paddingRight: number;\n paddingBottom: number;\n numberOfColumns: number;\n columnGap: number;\n textDirection: TextDirection;\n flowDirection: FlowDirection;\n verticalAlign: VerticalAlign;\n textStroke: boolean;\n textStrokeWeight: number;\n textStrokeColor: number;\n hasClippingPath: boolean;\n blendMode: BlendMode;\n dropShadowSettings?: DropShadowSettings;\n hasVariable?: boolean;\n};\n\nexport type BarcodeFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.barcode;\n blendMode: BlendMode;\n barcodeProperties: {\n enableBackground: boolean;\n backgroundColor: ColorUsage;\n enableBarColor: boolean;\n barColor: ColorUsage;\n enableText: boolean;\n barHeight: number;\n magnification: number;\n quietZone: QuietZone;\n errorCorrectionLevel?: BarcodeErrorCorrectionLevel;\n characterSet?: BarcodeCharacterSet;\n drawStartStopChars: boolean;\n };\n src?: BarcodeSource;\n barcodeType: BarcodeType;\n dropShadowSettings?: DropShadowSettings;\n};\n\nexport type BarcodeSource = BarcodeVariableSource | BarcodeTextSource;\n\nexport type BarcodeVariableSource = {\n type: BarcodeSourceTypeEnum.variable;\n id: Id;\n};\n\nexport type BarcodeTextSource = {\n type: BarcodeSourceTypeEnum.text;\n text: string;\n};\n\nexport type ComponentFrame = {\n id: Id;\n name: string;\n opacity: number;\n type: FrameTypeEnum.component;\n blendMode: BlendMode;\n src: ComponentSource;\n variableMappings: VariableMapping[];\n\n /**\n * How the component fits within the frame.\n */\n fitMode: ComponentFitEnum;\n};\n\nexport type ComponentSource = ConnectorComponentSource;\n\nexport type ConnectorComponentSource = {\n type: ComponentSourceTypeEnum.connector;\n id: Id;\n assetId: Id;\n};\n\nexport type VariableMapping = {\n source: Id;\n target: Id;\n sourceField?: string;\n};\n\nexport enum ComponentFitEnum {\n /**\n * The component resizes to fit the frame size.\n */\n resize = 'resize',\n\n /**\n * The component scales to fit the frame size while maintaining its aspect ratio.\n */\n scale = 'scale',\n\n /**\n * The component first scales to fit the frame size while maintaining its aspect ratio,\n * then resizes to fill the remaining space.\n */\n scaleAndResize = 'scaleAndResize',\n}\n\nexport type CropSettings = {\n left: number;\n top: number;\n width: number;\n height: number;\n rotationDegrees: number;\n type: 'default';\n};\n\nexport type NoCropSettings = {\n type: 'noCrop';\n};\n\nexport type AutoGrowSettings = {\n enabled: PropertyState<boolean>;\n minWidth: PropertyState<number>;\n maxWidth: PropertyState<number>;\n minHeight: PropertyState<number>;\n maxHeight: PropertyState<number>;\n directions: PropertyState<Array<AutoGrowDirection>>;\n};\n\nexport interface AutoGrowDeltaUpdate {\n enabled?: {\n value: boolean;\n };\n minWidth?: {\n value: string | null;\n };\n maxWidth?: {\n value: string | null;\n };\n minHeight?: {\n value: string | null;\n };\n maxHeight?: {\n value: string | null;\n };\n directions?: {\n value: Array<AutoGrowDirection>;\n };\n}\n\nexport type DropShadowSettings = {\n enabled: boolean;\n distance: number;\n angleDegrees: number;\n blurRadius: number;\n color: ColorUsage;\n};\n\nexport interface ShadowSettingsDeltaUpdate {\n distance?: {\n value: string;\n };\n angleDegrees?: {\n value: number;\n };\n blurRadius?: {\n value: number;\n };\n enabled?: {\n value: boolean;\n };\n color?: {\n value: ColorUsage;\n };\n}\n\nexport enum AutoGrowDirection {\n top = 'top',\n bottom = 'bottom',\n left = 'left',\n right = 'right',\n}\n\nexport enum ImageSourceTypeEnum {\n url = 'url',\n variable = 'variable',\n connector = 'connector',\n brandKitMedia = 'brandKitMedia',\n}\n\nexport enum ComponentSourceTypeEnum {\n connector = 'connector',\n}\n\nexport enum FrameTypeEnum {\n text = 'text',\n image = 'image',\n shape = 'shape',\n barcode = 'barcode',\n component = 'component',\n}\n\nexport enum BarcodeSourceTypeEnum {\n variable = 'variable',\n text = 'text',\n}\n\nexport enum TextDirection {\n leftToRight = 'leftToRight',\n rightToLeft = 'rightToLeft',\n weak = 'weak',\n}\n\nexport enum FlowDirection {\n horizontal = 'horizontal',\n vertical = 'vertical',\n onPath = 'onPath',\n}\n\nexport enum VerticalAlign {\n top = 'top',\n bottom = 'bottom',\n middle = 'middle',\n justify = 'justify',\n}\n\nexport enum BlendMode {\n normal = 'normal',\n screen = 'screen',\n overlay = 'overlay',\n darken = 'darken',\n lighten = 'lighten',\n colorDodge = 'colorDodge',\n colorBurn = 'colorBurn',\n hardLight = 'hardLight',\n softLight = 'softLight',\n difference = 'difference',\n exclusion = 'exclusion',\n multiply = 'multiply',\n hue = 'hue',\n saturation = 'saturation',\n color = 'color',\n luminosity = 'luminosity',\n}\n\nexport enum FitMode {\n fill = 'fill',\n fit = 'fit',\n smartCrop = 'smartCrop',\n manualCrop = 'manualCrop',\n}\n\nexport enum FitModePosition {\n topLeft = 'topLeft',\n topCenter = 'topCenter',\n topRight = 'topRight',\n centerLeft = 'centerLeft',\n center = 'center',\n centerRight = 'centerRight',\n bottomLeft = 'bottomLeft',\n bottomCenter = 'bottomCenter',\n bottomRight = 'bottomRight',\n}\n\nexport enum UpdateZIndexMethod {\n bringToFront = 'bringToFront',\n sendToBack = 'sendToBack',\n bringForward = 'bringForward',\n sendBackward = 'sendBackward',\n}\n\nexport enum FrameAnchorType {\n relative = 'relative',\n start = 'start',\n end = 'end',\n startAndEnd = 'startAndEnd',\n center = 'center',\n}\n\nexport enum AnchorTargetType {\n page = 'page',\n frame = 'frame',\n}\n\nexport enum AnchorTargetEdgeType {\n start = 'start',\n end = 'end',\n center = 'center',\n}\n\nexport class PageAnchorTarget {\n type = AnchorTargetType.page;\n}\n\nexport class FrameAnchorTarget {\n frameId: Id;\n edge: AnchorTargetEdgeType;\n type = AnchorTargetType.frame;\n\n constructor(id: Id, edge: AnchorTargetEdgeType) {\n (this.frameId = id), (this.edge = edge);\n }\n}\n\nexport type AnchorTarget = PageAnchorTarget | FrameAnchorTarget;\n\nexport type RelativeFrameAnchor = {\n start: PropertyState<number>;\n end: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.relative;\n} & HasOverrideState;\n\nexport type StartFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.start;\n} & HasOverrideState;\n\nexport type EndFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.end;\n} & HasOverrideState;\n\nexport type StartAndEndFrameAnchor = {\n start: PropertyState<number>;\n startTarget: AnchorTarget;\n end: PropertyState<number>;\n endTarget: AnchorTarget;\n type: FrameAnchorType.startAndEnd;\n} & HasOverrideState;\n\nexport type CenterFrameAnchor = {\n offset: PropertyState<number>;\n target: AnchorTarget;\n type: FrameAnchorType.center;\n} & HasOverrideState;\n\nexport type FrameAnchor =\n | RelativeFrameAnchor\n | StartFrameAnchor\n | EndFrameAnchor\n | StartAndEndFrameAnchor\n | CenterFrameAnchor;\n\nexport type FrameAnchorProperties = {\n horizontal: boolean;\n type: FrameAnchorType;\n target: AnchorTarget;\n endTarget?: AnchorTarget | null;\n};\n\nexport type AnchorConfiguration = {\n allowedTypes: Set<FrameAnchorType>;\n allowedFrameIds: Set<Id>;\n};\n\nexport type FrameConfiguration = {\n horizontal: AnchorConfiguration;\n vertical: AnchorConfiguration;\n};\n\nexport enum CropType {\n frameCrop = 'frameCrop',\n assetCrop = 'assetCrop',\n}\n\n/**\n * Image-specific editing constraints.\n */\nexport type ImageFrameConstraints = {\n cropAllowed: PropertyState<boolean>;\n};\n\n/**\n * Text-specific editing constraints.\n */\nexport type TextFrameConstraints = {\n editingAllowed: PropertyState<boolean>;\n paragraphStyles: PropertyState<IdSetManagedConstraint>;\n characterStyles: PropertyState<IdSetManagedConstraint>;\n colors: PropertyState<IdSetManagedConstraint>;\n fontSizes: PropertyState<FontSizeRangeManagedConstraint>;\n};\n\nexport interface ManagedConstraint {\n allowed: boolean;\n}\n\n/**\n * A managed constraint represented by a set of allowed Id identifiers.\n *\n * Example: used to allow only a specific set of paragraph or character styles.\n * - `allowed`: If true, only the provided `ids` may be used.\n * - `ids`: The set of allowed Id values.\n */\nexport interface IdSetManagedConstraint extends ManagedConstraint {\n allowed: boolean;\n ids: Id[];\n}\n\n/**\n * A managed constraint that restricts allowed font sizes to a continuous range.\n *\n * - `allowed`: If true, restricts allowed font sizes to [min, max] (inclusive).\n * - `min`: The minimum allowed font size (nullable).\n * - `max`: The maximum allowed font size (nullable).\n */\nexport interface FontSizeRangeManagedConstraint extends ManagedConstraint {\n allowed: boolean;\n min: number | null;\n max: number | null;\n}\n\n/**\n * Frame editing constraints with optional frame-type-specific sub-properties.\n */\nexport type FrameConstraints = {\n selectionAllowed: PropertyState<boolean>;\n horizontalMovementAllowed: PropertyState<boolean>;\n verticalMovementAllowed: PropertyState<boolean>;\n rotationAllowed: PropertyState<boolean>;\n resizeAllowed: PropertyState<boolean>;\n proportionLocked: PropertyState<boolean>;\n /** Image-specific constraints. */\n image?: ImageFrameConstraints;\n /** Text-specific constraints. */\n text?: TextFrameConstraints;\n};\n\n/**\n * Image-specific constraints delta update.\n */\nexport interface ImageFrameConstraintsDeltaUpdate {\n cropAllowed?: {\n value: boolean;\n };\n}\n\n/**\n * Text-specific constraints delta update.\n */\nexport interface TextFrameConstraintsDeltaUpdate {\n editingAllowed?: {\n value: boolean;\n };\n paragraphStyles?: {\n value: IdSetManagedConstraint;\n };\n characterStyles?: {\n value: IdSetManagedConstraint;\n };\n colors?: {\n value: IdSetManagedConstraint;\n };\n fontSizes?: {\n value: FontSizeRangeManagedConstraint;\n };\n}\n\n/**\n * Frame constraints delta update with optional frame-type-specific sub-properties.\n */\nexport interface FrameConstraintsDeltaUpdate {\n selectionAllowed?: {\n value: boolean;\n };\n horizontalMovementAllowed?: {\n value: boolean;\n };\n verticalMovementAllowed?: {\n value: boolean;\n };\n rotationAllowed?: {\n value: boolean;\n };\n resizeAllowed?: {\n value: boolean;\n };\n proportionLocked?: {\n value: boolean;\n };\n /** Image-specific constraints update. */\n image?: ImageFrameConstraintsDeltaUpdate;\n /** Text-specific constraints update. */\n text?: TextFrameConstraintsDeltaUpdate;\n}\n","import { EditorAPI, Id } from '../types/CommonTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { ImageSourceTypeEnum, ImageFrameVariableSource } from '../types/FrameTypes';\nimport { TextType } from '../types/TextTypes';\n\n/**\n * The ExperimentController contains all SDK functions that are considered for addition,\n * or functions we want to keep open for changing definitions. This is a sneak peak\n * into future versions of the SDK. Never build production code relying on functions in\n * this controller.\n */\nexport class ExperimentController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method will assign an image from a variable to the correct ImageFrame\n * @param imageFrameId the id of the imageFrame where an image needs to be assigned to\n * @param variableId the id of the variable which contains the image\n * @returns\n */\n insertImageVariableToFrame = async (imageFrameId: Id, variableId: Id) => {\n const res = await this.#editorAPI;\n const src: ImageFrameVariableSource = { id: variableId, type: ImageSourceTypeEnum.variable };\n return res\n .setImageSource(imageFrameId, JSON.stringify(src))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will insert a text variable in the selected frame. Calling this method\n * requires that the selected frame is in text editing mode.\n * @param id the id of the variable to be inserted.\n * @returns\n */\n insertTextVariable = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.insertTextVariable(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will enter text editing mode on the provided frame.\n * @param id the id frame to enter text edit mode on.\n * @returns\n */\n enterTextEditMode = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.enterTextEditMode(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will exit text editing mode.\n * @returns\n */\n exitTextEditMode = async () => {\n const res = await this.#editorAPI;\n return res.exitTextEditMode().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method gets the text content of a text frame.\n * The variables contained in the text will return their values only if you\n * are in text editing mode.\n * @param frameId The ID of a text frame\n * @param textType The type of the text\n * @returns the text content\n */\n getText = async (frameId: string, textType: TextType) => {\n const res = await this.#editorAPI;\n return res.getTextByFrameId(frameId, textType).then((result) => getEditorResponseData<string>(result));\n };\n\n /**\n * This method sets the text content of a text frame\n * @param frameId The ID of a text frame\n * @param text The new text content\n * @returns\n */\n setText = async (frameId: string, text: string) => {\n const res = await this.#editorAPI;\n return res.setTextByFrameId(frameId, text).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method selects the text content of a text frame\n * @param frameId The ID of a text frame\n * @param startIndex The index where the selection starts\n * @param length The length of selection from startIndex\n * @returns\n */\n selectText = async (frameId: string, startIndex: number, length: number) => {\n const res = await this.#editorAPI;\n return res.selectTextById(frameId, startIndex, length).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method adds custom data that will be saved and restored when undoing and redoing.\n * Duplicate values are overwritten. The data is exposed via the onCustomUndoDataChanged event.\n *\n * @param key The key of the custom data\n * @param value The value of the custom data\n * @param skipEvent Whether to skip the event that is triggered when the custom data is changed, defaults to false\n * @returns\n */\n addCustomUndoData = async (key: string, value: string, skipEvent?: boolean) => {\n const res = await this.#editorAPI;\n return res\n .setCustomUndoData(key, value, skipEvent ?? false)\n .then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { CallSender } from 'penpal';\nimport { EditorAPI, EditorRawAPI, EditorResponse } from '../types/CommonTypes';\nimport {\n ConnectorConfigOptions,\n DeprecatedMediaType,\n MediaType,\n MetaData,\n QueryOptions,\n QueryPage,\n} from '../types/ConnectorTypes';\nimport { FontConnectorCapabilities, FontFamily, FontPreviewFormat, FontStyle } from '../types/FontConnectorTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The FontConnectorController is responsible for all communication regarding Font connectors.\n * Methods inside this controller can be called by `window.SDK.FontConnector.{method-name}`\n *\n * The way GraFx Studio handles different sources of Font is called 'FontConnector'.\n * A FontConnector is an implementation of a set of capabilities we need\n * to interact with a certain Digital Asset Management system.\n * In essence, a connector is the combination of a JavaScript snippet and some metadata.\n * The JavaScript snippet is loaded in the studio engine using a sandboxed JavaScript execution engine (QuickJs).\n * This allows us to execute the Font connector\n * both on web using webassembly and on the server side during e.g. animation output generation.\n * This controller is an interface to the running connector instance inside the studio engine.\n */\nexport class FontConnectorController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n #blobAPI: EditorRawAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n this.#blobAPI = editorAPI as CallSender as EditorRawAPI;\n }\n\n /**\n * Query a specific FontConnector for data using both standardized queryOptions and the dynamic\n * context as parameters.\n * @param connectorId unique id of the Font connector\n * @param queryOptions query options\n * @param context context that will be available in the connector script.\n * @returns array of font families\n */\n query = async (connectorId: string, queryOptions: QueryOptions, context: MetaData = {}) => {\n const res = await this.#editorAPI;\n return res\n .fontConnectorQuery(connectorId, JSON.stringify(queryOptions), JSON.stringify(context))\n .then((result) => getEditorResponseData<QueryPage<FontFamily>>(result));\n };\n\n /**\n * Returns all font styles for a family using a specific FontConnector. The connector needs to list `detail` as a supported capability.\n * @param connectorId unique id of the Font connector\n * @param fontFamilyId unique id of the Font family\n * @param context context that will be available in the connector script.\n * @returns array of font styles\n */\n detail = async (connectorId: string, fontFamilyId: string, context: MetaData = {}) => {\n const res = await this.#editorAPI;\n return res\n .fontConnectorDetail(connectorId, fontFamilyId, JSON.stringify(context))\n .then((result) => getEditorResponseData<FontStyle[]>(result));\n };\n\n /**\n * The combination of a `connectorId` and `fontId` is typically enough for a Font connector to\n * perform the download of this asset. The `download` endpoint is capable of relaying this information to the\n * Font connector instance running in the editor engine.\n * @param connectorId unique id of the Font connector\n * @param fontStyleId unique id of the Font style to download\n * @param context context that will be available in the connector script.\n * @returns\n */\n download = async (connectorId: string, fontStyleId: string, context: MetaData = {}): Promise<Uint8Array> => {\n const res = await this.#blobAPI;\n return res\n .fontConnectorDownload(connectorId, fontStyleId, JSON.stringify(context))\n .then((result) => (result as Uint8Array) ?? (result as EditorResponse<null>));\n };\n\n /**\n * The combination of a `connectorId` and `fontFamilyId` is typically enough for a Font connector to\n * perform the preview of this asset. The `preview` endpoint is capable of relaying this information to the\n * Font connector instance running in the editor engine.\n * @param connectorId unique id of the Font connector\n * @param fontFamilyId unique id of the Font family to download\n * @param previewFormat hint to the Font connector about desired format of the Font preview\n * @param context dynamic map of additional options potentially used by the connector\n * @returns\n */\n preview = async (\n connectorId: string,\n fontFamilyId: string,\n previewFormat: FontPreviewFormat,\n context: MetaData = {},\n ): Promise<Uint8Array> => {\n const res = await this.#blobAPI;\n return res\n .fontConnectorPreview(connectorId, fontFamilyId, previewFormat, JSON.stringify(context))\n .then((result) => (result as Uint8Array) ?? (result as EditorResponse<null>));\n };\n\n /**\n * All connectors have a certain set of mappings they allow to be passed into the connector methods their context. This\n * method allows you to discover which mappings are available for a given connector. If you want to use any of these\n * mappings, they will be available in the `context` parameter of any connector method.\n * @param connectorId unique id of the media connector\n * @returns connector mappings\n */\n getConfigurationOptions = async (connectorId: string) => {\n const res = await this.#editorAPI;\n return res\n .fontConnectorGetConfigurationOptions(connectorId)\n .then((result) => getEditorResponseData<ConnectorConfigOptions>(result));\n };\n\n /**\n * This method returns what capabilities the selected connector has. It gives an indication what methods can\n * be used successfully for a certain connector.\n * @param connectorId unique id of the Font connector\n * @returns FontConnectorCapabilities\n */\n getCapabilities = async (connectorId: string) => {\n const res = await this.#editorAPI;\n return res\n .fontConnectorGetCapabilities(connectorId)\n .then((result) => getEditorResponseData<FontConnectorCapabilities>(result));\n };\n\n /**\n * This method will parse the deprecatedFontType to the new Font type. This method will be removed once the deprecatedFontType is out of use\n * @param deprecatedType is 0 or 1\n * @returns MediaType value\n */\n parseDeprecatedFontType = (deprecatedType: DeprecatedMediaType) => {\n if (deprecatedType === DeprecatedMediaType.file) return MediaType.file;\n if (deprecatedType === DeprecatedMediaType.collection) return MediaType.collection;\n };\n}\n","import { EditorAPI, Id } from '../types/CommonTypes';\r\nimport {\r\n AddDocumentFontFamily,\r\n AddDocumentFontStyle,\r\n CharacterPreview,\r\n CharacterPreviewStyle,\r\n DocumentFontFamily,\r\n DocumentFontStyle,\r\n} from '../types/FontTypes';\r\nimport { getEditorResponseData } from '../utils/EditorResponseData';\r\n\r\n/**\r\n * The FontController is responsible for all communication regarding font styles.\r\n * Methods inside this controller can be called by `window.SDK.font.{method-name}`\r\n */\r\nexport class FontController {\r\n /**\r\n * @ignore\r\n */\r\n #editorAPI: EditorAPI;\r\n\r\n /**\r\n * @ignore\r\n */\r\n constructor(editorAPI: EditorAPI) {\r\n this.#editorAPI = editorAPI;\r\n }\r\n\r\n /**\r\n * This method adds a font family\r\n * @param connectorId unique id of the font connector\r\n * @param fontFamily the font family object\r\n * @returns id generated on the engine side `CONNECTOR_ID::FONT_FAMILY_ID`\r\n */\r\n addFontFamily = async (connectorId: Id, fontFamily: AddDocumentFontFamily) => {\r\n const res = await this.#editorAPI;\r\n return res\r\n .addFontFamily(connectorId, JSON.stringify(fontFamily))\r\n .then((result) => getEditorResponseData<null>(result));\r\n };\r\n\r\n /**\r\n * This method removes a font family\r\n * @param id the id of a specific font family\r\n * @returns\r\n */\r\n removeFontFamily = async (id: Id) => {\r\n const res = await this.#editorAPI;\r\n return res.removeFontFamily(id).then((result) => getEditorResponseData<null>(result));\r\n };\r\n\r\n /**\r\n * This method adds a font style\r\n * @param connectorId unique id of the font connector\r\n * @param fontStyle the font object\r\n * @returns id generated on the engine side `CONNECTOR_ID::FONT_FAMILY_ID::FONT_STYLE_ID`\r\n */\r\n addFontStyle = async (connectorId: Id, fontStyle: AddDocumentFontStyle) => {\r\n const res = await this.#editorAPI;\r\n return res\r\n .addFontStyle(connectorId, JSON.stringify(fontStyle))\r\n .then((result) => getEditorResponseData<null>(result));\r\n };\r\n\r\n /**\r\n * This method removes a font style\r\n * @param id the id of a specific font style\r\n * @returns\r\n */\r\n removeFontStyle = async (id: Id) => {\r\n const res = await this.#editorAPI;\r\n return res.removeFontStyle(id).then((result) => getEditorResponseData<null>(result));\r\n };\r\n\r\n /**\r\n * This method returns the list of font families\r\n * @returns DocumentFontFamily[]\r\n */\r\n getFontFamilies = async () => {\r\n const res = await this.#editorAPI;\r\n return res.getFontFamilies().then((result) => getEditorResponseData<DocumentFontFamily[]>(result));\r\n };\r\n\r\n /**\r\n * This method returns the list of font styles for a specific family\r\n * @param id the id of a specific font style\r\n * @returns DocumentFontStyle[]\r\n */\r\n getFontStyles = async (id: Id) => {\r\n const res = await this.#editorAPI;\r\n return res.getFontStyles(id).then((result) => getEditorResponseData<DocumentFontStyle[]>(result));\r\n };\r\n\r\n /**\r\n * This method returns a font family by id\r\n * @param id the id of a specific font family\r\n * @returns DocumentFontFamily properties\r\n */\r\n getFontFamilyById = async (id: Id) => {\r\n const res = await this.#editorAPI;\r\n return res.getFontFamilyById(id).then((result) => getEditorResponseData<DocumentFontFamily>(result));\r\n };\r\n\r\n /**\r\n * This method returns a font style by id\r\n * @param id the id of a specific font style\r\n * @returns DocumentFontStyle properties\r\n */\r\n getFontStyleById = async (id: Id) => {\r\n const res = await this.#editorAPI;\r\n return res.getFontStyleById(id).then((result) => getEditorResponseData<DocumentFontStyle>(result));\r\n };\r\n\r\n /**\r\n * This method returns the default font.\r\n * Be aware that the default font will not change during the entire lifetime of the SDK session.\r\n * It is not necessary to call this more than once in an integration, this value can be safely stored during the lifetime of this SDK session.\r\n * @returns a default DocumentFontStyle\r\n */\r\n\r\n getDefaultFontStyle = async () => {\r\n const res = await this.#editorAPI;\r\n return res.getDefaultFontStyle().then((result) => getEditorResponseData<DocumentFontStyle>(result));\r\n };\r\n\r\n /**\r\n * This method returns the default font family.\r\n * Be aware that the default font family will not change during the entire lifetime of the SDK session.\r\n * It is not necessary to call this more than once in an integration, this value can be safely stored during the lifetime of this SDK session.\r\n * @returns a default DocumentFontFamily\r\n */\r\n getDefaultFontFamily = async () => {\r\n const res = await this.#editorAPI;\r\n return res.getDefaultFontFamily().then((result) => getEditorResponseData<DocumentFontFamily>(result));\r\n };\r\n\r\n /**\r\n * Check if the font family is used anywhere in the document\r\n * @param id the id of the font family to check\r\n * @returns boolean\r\n */\r\n isFontFamilyUsed = async (id: Id) => {\r\n const res = await this.#editorAPI;\r\n return res.isFontFamilyUsed(id).then((result) => getEditorResponseData<boolean>(result));\r\n };\r\n\r\n /**\r\n * Check if the font style is used anywhere in the document\r\n * @param id the id of the font style to check\r\n * @returns boolean\r\n */\r\n isFontStyleUsed = async (id: Id) => {\r\n const res = await this.#editorAPI;\r\n return res.isFontStyleUsed(id).then((result) => getEditorResponseData<boolean>(result));\r\n };\r\n\r\n /**\r\n * This method changes positions of font families\r\n * @param order the position of the font family\r\n * @param ids the list of font family IDs\r\n * @returns\r\n */\r\n moveFontFamilies = async (order: number, ids: string[]) => {\r\n const res = await this.#editorAPI;\r\n return res.moveFontFamilies(order, ids).then((result) => getEditorResponseData<null>(result));\r\n };\r\n\r\n /**\r\n * @experimental This method is experimental and may be changed in the future.\r\n * This method returns SVG graphics for requested characters used as bullets\r\n * @param characters the list of characters to render as SVG\r\n * @param characterPreviewStyle style to generate characters preview\r\n * @returns An object with the characters as keys and the SVG graphics as values\r\n */\r\n getPreviewsOfCharacterStrings = async (characters: string[], characterPreviewStyle: CharacterPreviewStyle) => {\r\n const res = await this.#editorAPI;\r\n return res\r\n .getPreviewsOfCharacterStrings(characters, JSON.stringify(characterPreviewStyle))\r\n .then((result) => getEditorResponseData<CharacterPreview>(result));\r\n };\r\n}\r\n","import { EditorAPI, Id } from '../types/CommonTypes';\nimport { ColorUsage } from '../types/ColorStyleTypes';\nimport { CornerRadiusUpdateModel, ShapeProperties } from '../types/ShapeTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The ShapeController is responsible for all communication regarding Shapes.\n * Methods inside this controller can be called by `window.SDK.shape.{method-name}`\n */\nexport class ShapeController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method updates properties of the shape\n * @param id the id of the shapeFrame that needs to get updated.\n * @param properties A property to update\n * @returns\n */\n private setShapeProperties = async (id: Id, properties: ShapeProperties) => {\n const res = await this.#editorAPI;\n return res\n .setShapeProperties(id, JSON.stringify(properties))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the visibility of the shape fill.\n * @param id the id of the shapeFrame that needs to get updated.\n * @param enableFill Whether the shape fill is visible.\n * @returns\n */\n setEnableFill = async (id: Id, enableFill: boolean) => {\n const properties: ShapeProperties = { enableFill: enableFill };\n return this.setShapeProperties(id, properties);\n };\n\n /**\n * This method will set the shape fill color of a specified shape frame.\n * @param id the id of the shapeFrame that needs to get updated.\n * @param fillColor the new shape fill color that you want to set to the shapeFrame.\n * @returns\n */\n setFillColor = async (id: Id, fillColor: ColorUsage) => {\n const properties: ShapeProperties = { fillColor: fillColor };\n return this.setShapeProperties(id, properties);\n };\n\n /**\n * This method will set the visibility of the shape stroke.\n * @param id the id of the shapeFrame that needs to get updated.\n * @param enableStroke Whether the shape stroke is visible.\n * @returns\n */\n setEnableStroke = async (id: Id, enableStroke: boolean) => {\n const properties: ShapeProperties = { enableStroke: enableStroke };\n return this.setShapeProperties(id, properties);\n };\n\n /**\n * This method will set the shape stroke color of a specified shape frame.\n * @param id the id of the shapeFrame that needs to get updated.\n * @param strokeColor the new shape stroke color that you want to set to the shapeFrame.\n * @returns\n */\n setStrokeColor = async (id: Id, strokeColor: ColorUsage) => {\n const properties: ShapeProperties = { strokeColor: strokeColor };\n return this.setShapeProperties(id, properties);\n };\n\n /**\n * This method will set the shape stroke weight of a specified shape frame.\n * @param id the id of the shapeFrame that needs to get updated.\n * @param strokeWeight the new shape stroke weight that you want to set to the shapeFrame.\n * @returns\n */\n setStrokeWeight = async (id: Id, strokeWeight: number) => {\n const properties: ShapeProperties = { strokeWeight: strokeWeight };\n return this.setShapeProperties(id, properties);\n };\n\n /**\n * This method will set the flag to change the way the rectangle shape corners will be changed: all at once or separately.\n * @param id the id of the shapeFrame that needs to get updated.\n * @param allCornersSame the new flag that you want to set to the shapeFrame.\n * @returns\n */\n setFlagAllCornersSame = async (id: Id, allCornersSame: boolean) => {\n const properties: ShapeProperties = { allCornersSame: allCornersSame };\n return this.setShapeProperties(id, properties);\n };\n\n /**\n * This method updates radii of the rectangle and polygon shapes\n * @param id the id of the shapeFrame that needs to get updated.\n * @param radius A radius object to update a desired corner;\n * @returns\n */\n private setShapeCorners = async (id: Id, radius: CornerRadiusUpdateModel) => {\n const res = await this.#editorAPI;\n return res.setShapeCorners(id, JSON.stringify(radius)).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the radius for all corners of the rectangle and polygon shapes\n * @param id the id of the shapeFrame that needs to get updated.\n * @param radius A radius to update all corners at once;\n * @returns\n */\n setRadiusAll = async (id: Id, radius: number) => {\n const cornerRadius: CornerRadiusUpdateModel = { radiusAll: radius };\n return this.setShapeCorners(id, cornerRadius);\n };\n\n /**\n * This method will set the radius for the top left corner of the rectangle shape\n * @param id the id of the shapeFrame that needs to get updated.\n * @param radius A radius to update the top left corner;\n * @returns\n */\n setRadiusTopLeft = async (id: Id, radius: number) => {\n const cornerRadius: CornerRadiusUpdateModel = { topLeft: radius };\n return this.setShapeCorners(id, cornerRadius);\n };\n\n /**\n * This method will set the radius for the bottom left corner of the rectangle shape\n * @param id the id of the shapeFrame that needs to get updated.\n * @param radius A radius to update the bottom left corner;\n * @returns\n */\n setRadiusBottomLeft = async (id: Id, radius: number) => {\n const cornerRadius: CornerRadiusUpdateModel = { bottomLeft: radius };\n return this.setShapeCorners(id, cornerRadius);\n };\n\n /**\n * This method will set the radius for the top right corner of the rectangle shape\n * @param id the id of the shapeFrame that needs to get updated.\n * @param radius A radius to update the top right corner;\n * @returns\n */\n setRadiusTopRight = async (id: Id, radius: number) => {\n const cornerRadius: CornerRadiusUpdateModel = { topRight: radius };\n return this.setShapeCorners(id, cornerRadius);\n };\n\n /**\n * This method will set the radius for the bottom right corner of the rectangle shape\n * @param id the id of the shapeFrame that needs to get updated.\n * @param radius A radius to update the bottom right corner;\n * @returns\n */\n setRadiusBottomRight = async (id: Id, radius: number) => {\n const cornerRadius: CornerRadiusUpdateModel = { bottomRight: radius };\n return this.setShapeCorners(id, cornerRadius);\n };\n}\n","import { BarcodeType } from '../types/BarcodeTypes';\nimport { ColorUsage } from '../types/ColorStyleTypes';\nimport type { EditorAPI, EditorResponse, Id } from '../types/CommonTypes';\nimport {\n AnchorTarget,\n AutoGrowDeltaUpdate,\n AutoGrowDirection,\n BlendMode,\n ComponentSource,\n CropType,\n FitMode,\n FitModePosition,\n FontSizeRangeManagedConstraint,\n FrameAnchorProperties,\n FrameAnchorType,\n FrameConfiguration,\n FrameConstraints,\n FrameConstraintsDeltaUpdate,\n FrameLayoutType,\n FrameType,\n FrameTypeEnum,\n IdSetManagedConstraint,\n ImageFrameConnectorSource,\n ImageFrameSource,\n ImageFrameUrlSource,\n ImageSourceTypeEnum,\n ShadowSettingsDeltaUpdate,\n UpdateZIndexMethod,\n VerticalAlign,\n} from '../types/FrameTypes';\nimport { GradientDeltaUpdate, GradientUpdate } from '../types/GradientStyleTypes';\nimport { ShapeType, ShapeFrameSource } from '../types/ShapeTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { ShapeController } from './ShapeController';\n\n/**\n * The FrameController is responsible for all communication regarding Frames.\n * Methods inside this controller can be called by `window.SDK.frame.{method-name}`\n */\nexport class FrameController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n constraints: FrameConstraintController;\n /**\n * This variable helps to redirect shapes related methods to newly introduced ShapeController\n * to avoid any breaking changes\n */\n private shapeController: ShapeController;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n this.shapeController = new ShapeController(this.#editorAPI);\n this.constraints = new FrameConstraintController(this.#editorAPI);\n }\n\n /**\n * This method returns the list of frames\n * @returns list of all frames\n */\n getAll = async () => {\n const res = await this.#editorAPI;\n return res.getFrames().then((result) => getEditorResponseData<FrameType[]>(result));\n };\n\n /**\n * This method returns the list of selected frames\n * @returns list of all selected frames\n */\n getSelected = async () => {\n const res = await this.#editorAPI;\n return res.getSelectedFrames().then((result) => getEditorResponseData<FrameType[]>(result));\n };\n\n /**\n * This method returns the list of frames by id\n * @param id the id of a specific page\n * @returns list of all frames by id\n */\n getAllByPageId = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.getFramesByPageId(id).then((result) => getEditorResponseData<FrameType[]>(result));\n };\n\n /**\n * This method returns a frame by its name\n * @param name the name of a specific frame\n * @returns frame properties\n */\n getByName = async (name: string) => {\n const res = await this.#editorAPI;\n return res.getFrameByName(name).then((result) => getEditorResponseData<FrameType>(result));\n };\n\n /**\n * This method returns a frame by its id\n * @param id the id of a specific frame\n * @returns frame properties\n */\n getById = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.getFrameById(id).then((result) => getEditorResponseData<FrameType>(result));\n };\n\n /**\n * This method returns all frame properties on current layout\n * @returns all frame properties on current layout\n */\n getPropertiesOnSelectedLayout = async () => {\n const res = await this.#editorAPI;\n return res\n .getFramePropertiesOnSelectedLayout()\n .then((result) => getEditorResponseData<FrameLayoutType[]>(result));\n };\n\n /**\n * This method returns frame layout properties for a given frame and layout\n * @param id the id of a specific frame\n * @param layoutId the id of a specific layout\n * @returns frame layout properties\n */\n getLayoutProperties = async (id: Id, layoutId?: Id) => {\n const res = await this.#editorAPI;\n return res\n .getFramePropertiesByFrameId(id, layoutId)\n .then((result) => getEditorResponseData<FrameLayoutType>(result));\n };\n\n /**\n * This method returns a list of frame properties for a given layout\n * @param id the id of a specific layout\n * @returns list of frame layout properties\n */\n getAllLayoutProperties = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.getFramesProperties(id).then((result) => getEditorResponseData<FrameLayoutType[]>(result));\n };\n\n /**\n * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)\n * to the frame's to be inherited from the parent layout\n * @param id the id of a specific frame\n * @returns\n */\n resetTransformation = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetFrameTransformation(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)\n * to the frame's to be inherited from the parent layout\n * @param id the id of a specific frame\n * @returns\n * @deprecated Use 'resetTransformation' instead\n */\n resetSize = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetFrameTransformation(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will select a specific frame\n * @param id the id of a specific frame\n * @returns\n */\n select = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.selectFrames([id]).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will select multipleFrames\n * @param ids An array of all ids you want to select\n * @returns\n */\n selectMultiple = async (ids: Id[]) => {\n const res = await this.#editorAPI;\n return res.selectFrames(ids).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will deselect all frames\n * @returns\n */\n deselectAll = async () => {\n const res = await this.#editorAPI;\n return res.deselectFrames().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method changes the order of frames in the z-index list.\n * @param order the index in the list to move to\n * @param ids An array of all IDs you want to move to the given index\n * @returns\n */\n reorderFrames = async (order: number, ids: Id[]) => {\n const res = await this.#editorAPI;\n return res.reorderFrames(order, ids).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will update the z-index of a frame.\n * @param id the id of the frame you want to change the z-index of\n * @param method the z-index update method to perform\n * @returns\n */\n setZIndex = async (id: Id, method: UpdateZIndexMethod) => {\n const res = await this.#editorAPI;\n return res.setFrameZIndex(id, method).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the height of a specific frame\n * @param id the id of a specific frame\n * @param height the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels\n * @returns\n */\n setHeight = async (id: Id, height: string) => {\n const res = await this.#editorAPI;\n return res.setFrameHeight(id, height).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the rotation angle of a specific frame\n * @param id the id of a specific frame\n * @param rotation the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels\n * @returns\n */\n setRotation = async (id: Id, rotation: string) => {\n const res = await this.#editorAPI;\n return res.setFrameRotation(id, rotation).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the width of a specific frame\n * @param id the id of a specific frame\n * @param width the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels\n * @returns\n */\n setWidth = async (id: Id, width: string) => {\n const res = await this.#editorAPI;\n return res.setFrameWidth(id, width).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the x value of a specific frame\n * @param id the id of a specific frame\n * @param XValue the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels\n * @returns\n */\n setX = async (id: Id, XValue: string) => {\n const res = await this.#editorAPI;\n return res.setFrameX(id, XValue).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the y value of a specific frame\n * @param id the id of a specific frame\n * @param YValue the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels\n * @returns\n */\n setY = async (id: Id, YValue: string) => {\n const res = await this.#editorAPI;\n return res.setFrameY(id, YValue).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the frame opacity\n * @param id the id of a specific frame\n * @param opacity the opacity of the frame in range [0.0 - 1.0]\n * @returns\n */\n setOpacity = async (id: Id, opacity: number) => {\n const res = await this.#editorAPI;\n return res.setFrameOpacity(id, opacity).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will update the name of a specific frame\n * @param id the id of a specific frame\n * @param name the new name that the frame should receive\n * @returns\n */\n rename = async (id: Id, name: string) => {\n const res = await this.#editorAPI;\n return res.renameFrame(id, name).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset properties of a specific frame to their original values\n * @param id the id of the frame that needs to get reset\n * @returns\n */\n reset = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetFrame(id).then((result) => getEditorResponseData<null>(result));\n };\n /**\n * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)\n * to the frame's to be inherited from the parent layout\n * @param id the id of a specific frame\n * @returns\n * @deprecated Use 'resetTransformation' instead\n */\n resetX = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetFrameTransformation(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)\n * to the frame's to be inherited from the parent layout\n * @param id the id of a specific frame\n * @returns\n * @deprecated Use 'resetTransformation' instead\n */\n resetY = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetFrameTransformation(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)\n * to the frame's to be inherited from the parent layout\n * @param id the id of a specific frame\n * @returns\n * @deprecated Use 'resetTransformation' instead\n */\n resetRotation = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetFrameTransformation(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)\n * to the frame's to be inherited from the parent layout\n * @param id the id of a specific frame\n * @returns\n * @deprecated Use 'resetTransformation' instead\n */\n resetWidth = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetFrameTransformation(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)\n * to the frame's to be inherited from the parent layout\n * @param id the id of a specific frame\n * @returns\n * @deprecated Use 'resetTransformation' instead\n */\n resetHeight = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetFrameTransformation(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the fitMode, position and crop properties of a specific frame to its original value\n * @param id the id of the frame that needs to get reset\n * @returns\n */\n resetImageFrameFitMode = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetImageFrameFitMode(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @deprecated Use `setIsVisible` instead.\n *\n * This method will set the visibility property of a specified frame. If set to false the frame will be invisible and vice versa.\n * @param id the id of the frame that needs to get updated\n * @param value True means the frame gets visible, false means the frame gets invisible\n * @returns\n */\n setVisibility = async (id: Id, value: boolean) => {\n const res = await this.#editorAPI;\n return res.setFrameIsVisible(id, value).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the isVisible property of a specified frame. If set to false the frame will be invisible and vice versa.\n * @param id the id of the frame that needs to get updated\n * @param value True means the frame gets visible, false means the frame gets invisible\n * @returns\n */\n setIsVisible = async (id: Id, value: boolean) => {\n const res = await this.#editorAPI;\n return res.setFrameIsVisible(id, value).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will remove a specific frame using the Id.\n * @param id the id of the frame that needs to be deleted\n * @returns\n */\n remove = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.removeFrames([id]).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will remove frames with the given ids.\n * @param ids an array of ids of the frames to be removed.\n * @returns\n */\n removeFrames = async (ids: Id[]) => {\n const res = await this.#editorAPI;\n return res.removeFrames(ids).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will create a new frame of 'type' to the template positioned on the requested\n * coordinates.\n * @param type the type of frame to create\n * @param x X coordinate of the new frame within the template\n * @param y Y coordinate of the new frame within the template\n * @param width Width of the new frame within the template\n * @param height Height of the new frame within the template\n * @returns the newly created frame's id\n */\n create = async (type: FrameTypeEnum, x: number, y: number, width: number, height: number) => {\n const res = await this.#editorAPI;\n return res.addFrame(type, x, y, width, height).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method will create a new frame of 'type' type to the template positioned on the requested\n * coordinates.\n * @param type the type of frame to create\n * @param x X coordinate of the new frame within the template\n * @param y Y coordinate of the new frame within the template\n * @param width Width of the new frame within the template\n * @param height Height of the new frame within the template\n * @returns the newly created shape frame's id\n */\n createShapeFrame = async (type: ShapeType, x: number, y: number, width: number, height: number) => {\n const res = await this.#editorAPI;\n return res.addFrame(type, x, y, width, height).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method will create a new barcode frame of 'type' type to the layout positioned on the requested\n * coordinates. Any coordinate that is not specified will default to 'center'.\n * @param type the type of barcode to create\n * @param position optional position object where you can specify the x, y of the barcode frame\n * @returns the newly created barcode frame's id\n */\n createBarcodeFrame = async (type: BarcodeType, position?: { x?: number; y?: number }) => {\n const res = await this.#editorAPI;\n return res.addBarcodeFrame(type, position?.x, position?.y).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * @experimental This method will add a new component frame to the current layout positioned on the requested\n * coordinates with the given dimensions. The component is initialized with the provided source.\n * @param source The source of the component frame\n * @param x The X coordinate of the new component frame within the layout\n * @param y The Y coordinate of the new component frame within the layout\n * @param width The width of the new component frame within the layout\n * @param height The height of the new component frame within the layout\n * @returns the newly created component frame's id\n */\n createComponentFrame = async (source: ComponentSource, x: number, y: number, width: number, height: number) => {\n const res = await this.#editorAPI;\n return res\n .addComponentFrame(x, y, width, height, JSON.stringify(source))\n .then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method will duplicate a list of frames\n * @param ids An array of all ids you want to duplicate\n * @returns\n */\n duplicateFrames = async (ids: Id[]) => {\n const res = await this.#editorAPI;\n return res.duplicateFrames(ids).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method sets or removes the image source to the ImageFrame\n * @param imageFrameId the id of the imageFrame where an image needs to be assigned to\n * @param newImageSource A new image source\n * @returns\n */\n private updateImageSource = async (imageFrameId: Id, src: ImageFrameSource | null) => {\n const res = await this.#editorAPI;\n const srcJson = src !== null ? JSON.stringify(src) : null;\n return res.setImageSource(imageFrameId, srcJson).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method removes the image source from the ImageFrame\n * @param imageFrameId the id of the imageFrame where an image needs to be removed from\n */\n removeImageSource = async (imageFrameId: string) => {\n return this.updateImageSource(imageFrameId, null);\n };\n\n /**\n * This method will assign an image from a mediaConnector to the correct ImageFrame\n * @param id Unique Id of the media connector\n * @param imageFrameId the id of the imageFrame where an image needs to be assigned to\n * @param assetId Unique id of the asset that you want to assign to the imageFrame\n * @returns\n */\n setImageFromConnector = async (imageFrameId: Id, connectorId: Id, assetId: Id) => {\n const src: ImageFrameConnectorSource = {\n id: connectorId,\n assetId,\n type: ImageSourceTypeEnum.connector,\n };\n return this.updateImageSource(imageFrameId, src);\n };\n\n /**\n * This method will assign an image from url to the correct ImageFrame\n * Make sure the url can be accessed by the editor.\n * @param imageFrameId the id of the imageFrame where an image needs to be assigned to\n * @param url A valid image uri\n * @returns\n */\n setImageFromUrl = async (imageFrameId: Id, url: string) => {\n const source: ImageFrameUrlSource = { url: url, type: ImageSourceTypeEnum.url };\n return this.updateImageSource(imageFrameId, source);\n };\n\n /**\n * This method will set the fitMode property of a specified image frame.\n * @param imageFrameId the id of the imageFrame that needs to get updated.\n * @param fitMode the new fitMode that you want to set to the imageFrame.\n * @returns\n */\n setImageFrameFitMode = async (imageFrameId: Id, fitMode: FitMode) => {\n const res = await this.#editorAPI;\n return res.setImageFrameFitMode(imageFrameId, fitMode).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the fit mode position property of a specified image frame.\n * @param imageFrameId the id of the imageFrame that needs to get updated.\n * @param position the new position that you want to set to the imageFrame.\n * @returns\n */\n setImageFrameFitModePosition = async (imageFrameId: Id, position: FitModePosition) => {\n const res = await this.#editorAPI;\n return res\n .setImageFrameFitModePosition(imageFrameId, position)\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @deprecated the constrain proportions setter is not supported anymore.\n *\n * This method will set the constrainProportions property of a specified frame. If constrainProportionsReadOnly is\n * true, the frame's constrainProportions property cannot be changed and this method will return an error.\n *\n * @param _id the id of the frame that needs to get updated.\n * @param _constrainProportions The new constraint that you want to set to the frame.\n * @returns\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n setFrameConstrainProportions = async (_id: Id, _constrainProportions: boolean) => {\n console.error('setFrameConstrainProportions is not supported anymore');\n\n const res: EditorResponse<null> = {\n success: false,\n status: 0,\n error: 'setFrameConstrainProportions is not supported anymore',\n parsedData: null,\n };\n\n return getEditorResponseData<null>(res);\n };\n\n /**\n * This method will set the vertical alignment property of a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param verticalAlign the new vertical alignment to be set to the frame.\n * @returns\n */\n setVerticalAlign = async (id: Id, verticalAlign: VerticalAlign) => {\n const res = await this.#editorAPI;\n return res.setVerticalAlignment(id, verticalAlign).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the number of columns property of a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param numberOfColumns the number of columns to be set to the frame.\n * @returns\n */\n setNumberOfColumns = async (id: Id, numberOfColumns: number) => {\n const res = await this.#editorAPI;\n return res.setNumberOfColumns(id, numberOfColumns).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the column gap property of a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param columnGap the column gap value to be set to the frame.\n * @returns\n */\n setColumnGap = async (id: Id, columnGap: string) => {\n const res = await this.#editorAPI;\n return res.setColumnGap(id, columnGap).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the min copyFitting property of a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param value the new min copyFitting value to be set to the frame.\n * @returns\n */\n setMinCopyfitting = async (id: Id, value: string) => {\n const res = await this.#editorAPI;\n return res.setMinCopyfitting(id, value).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the max copyFitting property of a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param value the new max copyFitting value to be set to the frame.\n * @returns\n */\n setMaxCopyfitting = async (id: Id, value: string) => {\n const res = await this.#editorAPI;\n return res.setMaxCopyfitting(id, value).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will enable copyFitting on a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param value the new value to be set to the frame.\n * @returns\n */\n setEnableCopyfitting = async (id: Id, value: boolean) => {\n const res = await this.#editorAPI;\n return res.setEnableCopyfitting(id, value).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the frame minCopyfitting to the frame's original value\n * @param id the id of a specific frame\n * @returns\n */\n resetMinCopyfitting = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetMinCopyfitting(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the frame maxCopyfitting to the frame's original value\n * @param id the id of a specific frame\n * @returns\n */\n resetMaxCopyfitting = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetMaxCopyfitting(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the frame enableCopyfitting to the frame's original value\n * @param id the id of a specific frame\n * @returns\n */\n resetEnableCopyfitting = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetEnableCopyfitting(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the visibility of the shape fill.\n * @param shapeFrameId the id of the shapeFrame that needs to get updated.\n * @param enableFill Whether the shape fill is visible.\n * @returns\n */\n setShapeFrameEnableFill = async (shapeFrameId: Id, enableFill: boolean) => {\n return this.shapeController.setEnableFill(shapeFrameId, enableFill);\n };\n\n /**\n * This method will set the shape fill color of a specified shape frame.\n * @param shapeFrameId the id of the shapeFrame that needs to get updated.\n * @param fillColor the new shape fill color that you want to set to the shapeFrame.\n * @returns\n */\n setShapeFrameFillColor = async (shapeFrameId: Id, fillColor: ColorUsage) => {\n return this.shapeController.setFillColor(shapeFrameId, fillColor);\n };\n\n /**\n * This method will set the visibility of the shape stroke.\n * @param shapeFrameId the id of the shapeFrame that needs to get updated.\n * @param enableStroke Whether the shape stroke is visible.\n * @returns\n */\n setShapeFrameEnableStroke = async (shapeFrameId: Id, enableStroke: boolean) => {\n return this.shapeController.setEnableStroke(shapeFrameId, enableStroke);\n };\n\n /**\n * This method will set the shape stroke color of a specified shape frame.\n * @param shapeFrameId the id of the shapeFrame that needs to get updated.\n * @param strokeColor the new shape stroke color that you want to set to the shapeFrame.\n * @returns\n */\n setShapeFrameStrokeColor = async (shapeFrameId: Id, strokeColor: ColorUsage) => {\n return this.shapeController.setStrokeColor(shapeFrameId, strokeColor);\n };\n\n /**\n * This method will set the shape stroke weight of a specified shape frame.\n * @param shapeFrameId the id of the shapeFrame that needs to get updated.\n * @param strokeWeight the new shape stroke weight that you want to set to the shapeFrame.\n * @returns\n */\n setShapeFrameStrokeWeight = async (shapeFrameId: Id, strokeWeight: number) => {\n return this.shapeController.setStrokeWeight(shapeFrameId, strokeWeight);\n };\n\n /**\n * This method will set the blend mode of a specified frame\n * @param id the id of a specific frame\n * @param blendMode the blend mode\n * @returns\n */\n setBlendMode = async (id: Id, blendMode: BlendMode) => {\n const res = await this.#editorAPI;\n return res.setFrameBlendMode(id, blendMode).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the container shape of a specified frame\n * @param frameId the id of the frame that needs to get updated\n * @param value the shape frame source object\n * @returns\n */\n setFrameContainerShape = async (frameId: Id, value: ShapeFrameSource) => {\n const res = await this.#editorAPI;\n return res.setFrameContainerShape(frameId, JSON.stringify(value)).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will make the specified image frame go into cropping mode.\n * @param id the id of a specific image frame\n * @param type the type of cropping mode to enter. Defaults to frameCrop.\n * @returns\n */\n enterCropMode = async (id: Id, type: CropType = CropType.frameCrop) => {\n const res = await this.#editorAPI;\n return res.enterCropMode(id, type).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will exit cropping mode while saving the applied crop.\n * @returns\n */\n applyCropMode = async () => {\n const res = await this.#editorAPI;\n return res.applyCropMode().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will exit cropping mode without saving the applied crop.\n * @returns\n */\n exitCropMode = async () => {\n const res = await this.#editorAPI;\n return res.cancelCropMode().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will make the specified image frame go into subject mode.\n * @param id the id of a specific image frame\n * @returns\n */\n enterSubjectMode = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.enterSubjectMode(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will exit subject mode while saving the applied subject area.\n * @returns\n */\n applySubjectMode = async () => {\n const res = await this.#editorAPI;\n return res.applySubjectMode().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will exit subject mode without saving the applied subject area.\n * @returns\n */\n exitSubjectMode = async () => {\n const res = await this.#editorAPI;\n return res.cancelSubjectMode().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will make the specified shape frame go into gradient mode.\n * @param id the id of a specific shape frame\n * @returns\n */\n enterGradientMode = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.enterGradientMode(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will exit gradient mode while saving the applied gradient.\n * @returns\n */\n applyGradientMode = async () => {\n const res = await this.#editorAPI;\n return res.applyGradientMode().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will exit gradient mode without saving the applied gradient.\n * @returns\n */\n cancelGradientMode = async () => {\n const res = await this.#editorAPI;\n return res.cancelGradientMode().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @deprecated This method no longer has any effect. Use 'setImageFrameFitMode' or 'resetImageFrameFitMode' instead\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n resetCropMode = async (_id: Id) => {\n console.error('resetCropMode is not supported anymore');\n\n const res: EditorResponse<null> = {\n success: false,\n status: 0,\n error: 'resetCropMode is not supported anymore',\n parsedData: null,\n };\n\n return getEditorResponseData<null>(res);\n };\n\n /**\n * This method will enable auto grow on a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param value the new value to be set to the frame.\n * @returns\n */\n setEnableAutoGrow = async (id: Id, value: boolean) => {\n const update: AutoGrowDeltaUpdate = { enabled: { value: value } };\n const res = await this.#editorAPI;\n return res\n .updateAutoGrowSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the minWidth for auto-grow of a specified frame. Set to null to remove the value.\n * @param id the id of the frame that needs to get updated\n * @param value the new minWidth value to be set\n * @returns\n */\n setAutoGrowMinWidth = async (id: Id, value: string | null) => {\n const update: AutoGrowDeltaUpdate = { minWidth: { value } };\n const res = await this.#editorAPI;\n return res\n .updateAutoGrowSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the maxWidth for auto-grow of a specified frame. Set to null to remove the value.\n * @param id the id of the frame that needs to get updated\n * @param value the new maxWidth value to be set\n * @returns\n */\n setAutoGrowMaxWidth = async (id: Id, value: string | null) => {\n const update: AutoGrowDeltaUpdate = { maxWidth: { value } };\n const res = await this.#editorAPI;\n return res\n .updateAutoGrowSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the minHeight for auto-grow of a specified frame. Set to null to remove the value.\n * @param id the id of the frame that needs to get updated\n * @param value the new minHeight value to be set\n * @returns\n */\n setAutoGrowMinHeight = async (id: Id, value: string | null) => {\n const update: AutoGrowDeltaUpdate = { minHeight: { value } };\n const res = await this.#editorAPI;\n return res\n .updateAutoGrowSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the maxHeight for auto-grow of a specified frame. Set to null to remove the value.\n * @param id the id of the frame that needs to get updated\n * @param value the new maxHeight value to be set\n * @returns\n */\n setAutoGrowMaxHeight = async (id: Id, value: string | null) => {\n const update: AutoGrowDeltaUpdate = { maxHeight: { value } };\n const res = await this.#editorAPI;\n return res\n .updateAutoGrowSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the auto grow directions for auto-grow of a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param value the new directions value to be set\n * @returns\n */\n setAutoGrowDirections = async (id: Id, value: Array<AutoGrowDirection>) => {\n const update: AutoGrowDeltaUpdate = { directions: { value } };\n const res = await this.#editorAPI;\n return res\n .updateAutoGrowSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @deprecated This method no longer has any effect. Use `resetTransformation` instead\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n resetAutoGrowSettingsEnabled = async (_id: Id) => {\n console.error('resetAutoGrowSettingsEnabled is not supported anymore');\n\n const res: EditorResponse<null> = {\n success: false,\n status: 0,\n error: 'resetAutoGrowSettingsEnabled is not supported anymore',\n parsedData: null,\n };\n\n return getEditorResponseData<null>(res);\n };\n\n /**\n * @deprecated This method no longer has any effect. Use `resetTransformation` instead\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n resetAutoGrowMinWidth = async (_id: Id) => {\n console.error('resetAutoGrowMinWidth is not supported anymore');\n\n const res: EditorResponse<null> = {\n success: false,\n status: 0,\n error: 'resetAutoGrowMinWidth is not supported anymore',\n parsedData: null,\n };\n\n return getEditorResponseData<null>(res);\n };\n\n /**\n * @deprecated This method no longer has any effect. Use `resetTransformation` instead\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n resetAutoGrowMaxWidth = async (_id: Id) => {\n console.error('resetAutoGrowMaxWidth is not supported anymore');\n\n const res: EditorResponse<null> = {\n success: false,\n status: 0,\n error: 'resetAutoGrowMaxWidth is not supported anymore',\n parsedData: null,\n };\n\n return getEditorResponseData<null>(res);\n };\n\n /**\n * @deprecated This method no longer has any effect. Use `resetTransformation` instead\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n resetAutoGrowMinHeight = async (_id: Id) => {\n console.error('resetAutoGrowMinHeight is not supported anymore');\n\n const res: EditorResponse<null> = {\n success: false,\n status: 0,\n error: 'resetAutoGrowMinHeight is not supported anymore',\n parsedData: null,\n };\n\n return getEditorResponseData<null>(res);\n };\n\n /**\n * @deprecated This method no longer has any effect. Use `resetTransformation` instead\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n resetAutoGrowMaxHeight = async (_id: Id) => {\n console.error('resetAutoGrowMaxHeight is not supported anymore');\n\n const res: EditorResponse<null> = {\n success: false,\n status: 0,\n error: 'resetAutoGrowMaxHeight is not supported anymore',\n parsedData: null,\n };\n\n return getEditorResponseData<null>(res);\n };\n\n /**\n * @deprecated This method no longer has any effect. Use `resetTransformation` instead\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n resetAutoGrowDirections = async (_id: Id) => {\n console.error('resetAutoGrowDirections is not supported anymore');\n\n const res: EditorResponse<null> = {\n success: false,\n status: 0,\n error: 'resetAutoGrowDirections is not supported anymore',\n parsedData: null,\n };\n\n return getEditorResponseData<null>(res);\n };\n\n /**\n * @deprecated This method no longer has any effect. Use `resetTransformation` instead\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n resetAutoGrow = async (_id: Id) => {\n console.error('resetAutoGrow is not supported anymore');\n\n const res: EditorResponse<null> = {\n success: false,\n status: 0,\n error: 'resetAutoGrow is not supported anymore',\n parsedData: null,\n };\n\n return getEditorResponseData<null>(res);\n };\n\n /**\n * This method will enable shadow on a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param value the new value to be set to the frame.\n * @returns\n */\n setShadowEnabled = async (id: Id, value: boolean) => {\n const update: ShadowSettingsDeltaUpdate = { enabled: { value: value } };\n const res = await this.#editorAPI;\n return res\n .updateFrameShadowSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the distance for shadow of a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param value the new distance value to be set\n * @returns\n */\n setShadowDistance = async (id: Id, value: string) => {\n const update: ShadowSettingsDeltaUpdate = { distance: { value } };\n const res = await this.#editorAPI;\n return res\n .updateFrameShadowSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the angle in degrees for shadow of a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param value the new angle value to be set\n * @returns\n */\n setShadowAngleDegrees = async (id: Id, value: number) => {\n const update: ShadowSettingsDeltaUpdate = { angleDegrees: { value } };\n const res = await this.#editorAPI;\n return res\n .updateFrameShadowSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the blur radius for shadow of a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param value the new blur radius value to be set\n * @returns\n */\n setShadowBlurRadius = async (id: Id, value: number) => {\n const update: ShadowSettingsDeltaUpdate = { blurRadius: { value } };\n const res = await this.#editorAPI;\n return res\n .updateFrameShadowSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the color for shadow of a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param value the new color value to be set\n * @returns\n */\n setShadowColor = async (id: Id, value: ColorUsage) => {\n const update: ShadowSettingsDeltaUpdate = { color: { value } };\n const res = await this.#editorAPI;\n return res\n .updateFrameShadowSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n private setAnchor = async (\n id: Id,\n horizontal: boolean,\n anchorType: FrameAnchorType,\n anchorTarget: AnchorTarget,\n endAnchorTarget?: AnchorTarget | null,\n ) => {\n const properties: FrameAnchorProperties = {\n horizontal: horizontal,\n type: anchorType,\n target: anchorTarget,\n endTarget: endAnchorTarget,\n };\n\n const res = await this.#editorAPI;\n return res\n .setAnchorProperties(id, JSON.stringify(properties))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @experimental\n * This method will set the vertical anchor to target frame on a specified frame.\n * @param id the id of the frame that needs to get a frame anchor set\n * @param anchorType the type of positioning to be set to the frame\n * @param anchorTarget the target frame to which it is anchored\n * @param endAnchorTarget the target (end) frame to which it can be anchored\n * @returns\n */\n setVerticalAnchor = async (\n id: Id,\n anchorType: FrameAnchorType,\n anchorTarget: AnchorTarget,\n endAnchorTarget?: AnchorTarget | null,\n ) => {\n return this.setAnchor(id, false, anchorType, anchorTarget, endAnchorTarget);\n };\n\n /**\n * @experimental\n * This method will set the horizontal anchor to target frame on a specified frame.\n * @param id the id of the frame that needs to get a frame anchor set\n * @param anchorType the type of positioning to be set to the frame\n * @param anchorTarget the target frame to which it is anchored\n * @param endAnchorTarget the target (end) frame to which it can be anchored\n * @returns\n */\n setHorizontalAnchor = async (\n id: Id,\n anchorType: FrameAnchorType,\n anchorTarget: AnchorTarget,\n endAnchorTarget?: AnchorTarget | null,\n ) => {\n return this.setAnchor(id, true, anchorType, anchorTarget, endAnchorTarget);\n };\n\n /**\n * This method will reset the frame's transformation properties (x, y, width, height, rotation, anchors)\n * to the frame's to be inherited from the parent layout\n * @param id the id of a specific frame\n * @returns\n * @deprecated Use 'resetTransformation' instead\n */\n resetAnchoring = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetFrameTransformation(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the isVisible property of a specified frame.\n * @param id the id of the frame that needs to get updated\n * @returns\n */\n resetVisibility = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.setFrameIsVisible(id, null).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will get the frame configuration for a specified frame.\n *\n * A frame configuration is a set of rules that define what is allowed to\n * do with a given behavior of a frame.\n *\n * e.g. list of allowed frame targets for a specific anchor\n *\n * @param id the id of the frame to get the frame configuration for\n * @returns the frame's configuration\n */\n getConfiguration = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.getFrameConfiguration(id).then((result) => getEditorResponseData<FrameConfiguration>(result));\n };\n\n /**\n * This method will set the crop override for the current asset for the specified frame\n * @param id the id of the frame that holds the override to reset\n * @returns\n */\n resetAssetCropOverride = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetAssetCropOverride(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset all crop overrides for the specified frame\n * @param id the id of the frame\n * @returns\n */\n resetAllAssetCropOverrides = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetAllAssetCropOverrides(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will enable/disable gradient on a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param value the new value to be set to the frame.\n * @returns\n */\n setGradientApplied = async (id: Id, value: boolean) => {\n const update: GradientDeltaUpdate = { isApplied: value };\n const res = await this.#editorAPI;\n return res\n .updateFrameGradientSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will update (or set) the local gradient on a specified frame.\n * @param id the id of the frame that needs to get updated\n * @param value the new value to be set to the frame.\n * @returns\n */\n setLocalGradient = async (id: Id, value: GradientUpdate) => {\n const update: GradientDeltaUpdate = { gradient: value };\n const res = await this.#editorAPI;\n return res\n .updateFrameGradientSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will update (or set) the frame to use the provided brand kit gradient\n * @param id the id of the frame that needs to get updated\n * @param value the id of an existing brandkit gradient\n * @returns\n */\n setBrandKitGradient = async (id: Id, value: Id) => {\n const update: GradientDeltaUpdate = { id: value };\n const res = await this.#editorAPI;\n return res\n .updateFrameGradientSettings(id, JSON.stringify(update))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the smart crop subject id for a specified frame\n * @param id the id of the frame that needs to get updated\n * @param subjectId the subject id to set for smart crop\n * @returns\n */\n setSmartCropSubjectId = async (id: Id, subjectId?: Id) => {\n const res = await this.#editorAPI;\n return res\n .setSmartCropSubjectId(id, subjectId)\n .then((result) => getEditorResponseData<null>(result));\n };\n}\n\nexport class FrameConstraintController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method will retrieve all constraints for a specified frame\n * @param id the id of the frame that we want to know the constraints from\n * @returns the constraints configuration for the frame\n */\n get = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.getFrameConstraints(id).then((result) => getEditorResponseData<FrameConstraints>(result));\n };\n\n /**\n * This method will set the selectable constraint for a specified frame\n * @param id the id of the frame that needs to get updated\n * @param allowed whether the frame is selectable or not\n * @returns\n */\n setSelectable = async (id: Id, allowed: boolean) => {\n const deltaUpdate: FrameConstraintsDeltaUpdate = { selectionAllowed: { value: allowed } };\n const res = await this.#editorAPI;\n return res\n .updateFrameConstraints(id, JSON.stringify(deltaUpdate))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the horizontal movement constraint for a specified frame\n * @param id the id of the frame that needs to get updated\n * @param allowed whether horizontal movement is allowed or not\n * @returns\n */\n setHorizontalMovement = async (id: Id, allowed: boolean) => {\n const deltaUpdate: FrameConstraintsDeltaUpdate = { horizontalMovementAllowed: { value: allowed } };\n const res = await this.#editorAPI;\n return res\n .updateFrameConstraints(id, JSON.stringify(deltaUpdate))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the vertical movement constraint for a specified frame\n * @param id the id of the frame that needs to get updated\n * @param allowed whether vertical movement is allowed or not\n * @returns\n */\n setVerticalMovement = async (id: Id, allowed: boolean) => {\n const deltaUpdate: FrameConstraintsDeltaUpdate = { verticalMovementAllowed: { value: allowed } };\n const res = await this.#editorAPI;\n return res\n .updateFrameConstraints(id, JSON.stringify(deltaUpdate))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the rotation constraint for a specified frame\n * @param id the id of the frame that needs to get updated\n * @param allowed whether rotation is allowed or not\n * @returns\n */\n setRotation = async (id: Id, allowed: boolean) => {\n const deltaUpdate: FrameConstraintsDeltaUpdate = { rotationAllowed: { value: allowed } };\n const res = await this.#editorAPI;\n return res\n .updateFrameConstraints(id, JSON.stringify(deltaUpdate))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the resize constraint for a specified frame\n * @param id the id of the frame that needs to get updated\n * @param allowed whether resize is allowed or not\n * @param proportionLocked whether the frame's proportions are locked or not\n * @returns\n */\n setResize = async (id: Id, allowed: boolean, proportionLocked?: boolean) => {\n const deltaUpdate: FrameConstraintsDeltaUpdate = {\n resizeAllowed: { value: allowed },\n ...(proportionLocked !== undefined && { proportionLocked: { value: proportionLocked } }),\n };\n const res = await this.#editorAPI;\n return res\n .updateFrameConstraints(id, JSON.stringify(deltaUpdate))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the crop constraint for a specified image frame\n * @param id the id of the frame that needs to get updated\n * @param allowed whether crop is allowed or not\n * @returns\n */\n setCrop = async (id: Id, allowed: boolean) => {\n const deltaUpdate: FrameConstraintsDeltaUpdate = { image: { cropAllowed: { value: allowed } } };\n const res = await this.#editorAPI;\n return res\n .updateFrameConstraints(id, JSON.stringify(deltaUpdate))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the text editing constraint for a specified text frame\n * @param id the id of the frame that needs to get updated\n * @param allowed whether text editing is allowed or not\n * @returns\n */\n setTextEditingAllowed = async (id: Id, allowed: boolean) => {\n const deltaUpdate: FrameConstraintsDeltaUpdate = { text: { editingAllowed: { value: allowed } } };\n const res = await this.#editorAPI;\n return res\n .updateFrameConstraints(id, JSON.stringify(deltaUpdate))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the allowed paragraph styles constraint for a specified text frame\n * @param id the id of the frame that needs to get updated\n * @param constraint the managed constraint: when allowed is true, only the provided ids may be used; when false, the constraint is turned off (stored value is kept for reactivation)\n * @returns\n */\n setAllowedParagraphStyles = async (id: Id, constraint: IdSetManagedConstraint) => {\n const deltaUpdate: FrameConstraintsDeltaUpdate = { text: { paragraphStyles: { value: constraint } } };\n const res = await this.#editorAPI;\n return res\n .updateFrameConstraints(id, JSON.stringify(deltaUpdate))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the allowed character styles constraint for a specified text frame\n * @param id the id of the frame that needs to get updated\n * @param constraint the managed constraint: when allowed is true, only the provided ids may be used; when false, the constraint is turned off (stored value is kept for reactivation)\n * @returns\n */\n setAllowedCharacterStyles = async (id: Id, constraint: IdSetManagedConstraint) => {\n const deltaUpdate: FrameConstraintsDeltaUpdate = { text: { characterStyles: { value: constraint } } };\n const res = await this.#editorAPI;\n return res\n .updateFrameConstraints(id, JSON.stringify(deltaUpdate))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the allowed colors constraint for a specified text frame\n * @param id the id of the frame that needs to get updated\n * @param constraint the managed constraint: when allowed is true, only the provided ids may be used; when false, the constraint is turned off (stored value is kept for reactivation)\n * @returns\n */\n setAllowedColors = async (id: Id, constraint: IdSetManagedConstraint) => {\n const deltaUpdate: FrameConstraintsDeltaUpdate = { text: { colors: { value: constraint } } };\n const res = await this.#editorAPI;\n return res\n .updateFrameConstraints(id, JSON.stringify(deltaUpdate))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the allowed font sizes constraint for a specified text frame\n * @param id the id of the frame that needs to get updated\n * @param constraint the managed constraint: when allowed is true, restricts font sizes to min and max (inclusive); when false, the constraint is turned off (stored value is kept for reactivation)\n * @returns\n */\n setAllowedFontSizes = async (id: Id, constraint: FontSizeRangeManagedConstraint) => {\n const deltaUpdate: FrameConstraintsDeltaUpdate = { text: { fontSizes: { value: constraint } } };\n const res = await this.#editorAPI;\n return res\n .updateFrameConstraints(id, JSON.stringify(deltaUpdate))\n .then((result) => getEditorResponseData<null>(result));\n };\n}\n","import engineInfo from '../../editor-engine.json';\nimport sdkInfo from '../../package.json';\n\n/**\n * The InfoController is responsible for getting info on the engine, like version f.e. .\n * Methods and properties inside this controller can be accessed by `window.SDK.engine.{name}`\n */\nexport class InfoController {\n /**\n * This property returns the current engine version.\n * @returns current engine version\n */\n currentEngineVersion = engineInfo.current;\n\n /**\n * @returns The currently applicable SDK version\n */\n currentSDKVersion = sdkInfo.version;\n}\n","import { CallSender } from 'penpal';\nimport { ColorUsage } from '../types/ColorStyleTypes';\nimport type { EditorAPI, EditorRawAPI, EditorResponse, Id, PrivateData } from '../types/CommonTypes';\nimport {\n BleedDeltaUpdate,\n Layout,\n LayoutIntent,\n LayoutPreset,\n PositionEnum,\n ResizableLayoutPropertiesUpdate,\n SelectLayoutOptions,\n LayoutOptionPageSize,\n MeasurementUnit,\n} from '../types/LayoutTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n/**\n * The LayoutController is responsible for all communication regarding Layouts.\n * Methods inside this controller can be called by `window.SDK.layout.{method-name}`\n */\nexport class LayoutController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n #blobAPI: EditorRawAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n this.#blobAPI = editorAPI as CallSender as EditorRawAPI;\n }\n\n /**\n * This method returns the list of layouts\n * @returns list of all layouts\n */\n getAll = async () => {\n const res = await this.#editorAPI;\n return res.getLayouts().then((result) => getEditorResponseData<Layout[]>(result));\n };\n\n /**\n * This method returns a layout by its id\n * @param id the id of a specific layout\n * @returns layout properties\n */\n getById = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.getLayoutById(id).then((result) => getEditorResponseData<Layout>(result));\n };\n\n /**\n * This method returns a layout by its name\n * @param name the name of a specific layout\n * @returns layout properties\n */\n getByName = async (name: string) => {\n const res = await this.#editorAPI;\n return res.getLayoutByName(name).then((result) => getEditorResponseData<Layout>(result));\n };\n\n /**\n * This method returns the selected layout\n * @returns layout properties\n */\n getSelected = async () => {\n const res = await this.#editorAPI;\n return res.getSelectedLayout().then((result) => getEditorResponseData<Layout>(result));\n };\n\n /**\n * This method will remove a specific layout\n * @param id the id of a specific layout\n * @returns\n */\n remove = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.removeLayout(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will create a new child layout (a new layout is always child of a root / parent)\n * @param parentId the id of a specific layout, being the parent\n * @returns id of new layout\n */\n create = async (parentId: Id, presets?: LayoutPreset[]) => {\n const res = await this.#editorAPI;\n\n if (presets?.length) {\n return res\n .addLayouts(parentId, JSON.stringify(presets))\n .then((result) => getEditorResponseData<Id>(result));\n }\n\n return res.addLayout(parentId).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method will update the name of a specific layout\n * @param id the id of a specific layout\n * @param name the new name that the layout should receive\n * @returns\n */\n rename = async (id: Id, name: string) => {\n const res = await this.#editorAPI;\n return res.renameLayout(id, name).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will select a specific layout\n * @param id the id of a specific layout\n * @returns\n */\n select = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.selectLayoutWithOptions(id, null).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will select a specific layout and set the page size to the provided value. Note that\n * the same limitations that apply to PageController.setSize also apply here.\n * @param id the id of a specific layout\n * @param pageSize the new page size that will be applied when selecting the layout\n * @returns\n */\n selectWithPageSize = async (id: Id, pageSize: LayoutOptionPageSize) => {\n const res = await this.#editorAPI;\n const options: SelectLayoutOptions = {\n pageSize: pageSize,\n };\n return res\n .selectLayoutWithOptions(id, JSON.stringify(options))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will duplicate a specific layout\n * @param id the id of a specific layout\n * @returns id of specific layout\n */\n duplicate = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.duplicateLayout(id).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method will reset a specific layout to its original value\n * @param id the id of a specific layout\n * @returns\n */\n reset = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetLayout(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the height of the layout to a specific value\n * @param id the id of a specific layout\n * @param height the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels\n * @returns\n */\n setHeight = async (id: Id, height: string) => {\n const res = await this.#editorAPI;\n return res.setLayoutHeight(id, height).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the width of the layout to a specific value\n * @param id the id of a specific layout\n * @param width the string value that will be calculated (f.e. 1+1 will result in 2) The notation is in pixels\n * @returns\n */\n setWidth = async (id: Id, width: string) => {\n const res = await this.#editorAPI;\n return res.setLayoutWidth(id, width).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the unit of the layout to a specific value\n *\n * @param id The id of a specific layout\n * @param unit the unit that will be used for the layout. All values in this layout will now be reported in this unit\n * @returns\n */\n setUnit = async (id: Id, unit: MeasurementUnit) => {\n const res = await this.#editorAPI;\n return res.setLayoutUnit(id, unit).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the height of a specific layout to its original value\n * @param id the id of a specific layout\n * @returns\n */\n resetHeight = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetLayoutHeight(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the width of a specific layout to its original value\n * @param id the id of a specific layout\n * @returns\n */\n resetWidth = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetLayoutWidth(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the unit of a specific layout to its original (inherited) value\n * @param id the id of a specific layout\n * @returns\n */\n resetUnit = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetLayoutUnit(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @deprecated\n * This method returns a UInt8Array containing a PNG encoded image of the currently selected layout.\n * This method is deprecated, please use getSnapshot in the PageController\n * @returns UInt8Array snapshot of the current layout\n */\n getSelectedSnapshot = async () => {\n const res = await this.#blobAPI;\n return res.getPageSnapshot().then((result) => (result as Uint8Array) ?? (result as EditorResponse<null>));\n };\n\n /**\n * This method sets the intent of a specific layout. Note that setting the intent for a layout\n * can have side-effects such as updating the measurement unit\n * @param id the id of a specific layout\n * @param intent the intent that will be used for the layout\n */\n setIntent = async (id: Id, intent: LayoutIntent) => {\n const res = await this.#editorAPI;\n return res.setLayoutIntent(id, intent).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method resets the intent of a specific layout to its original (inherited) value.\n * Note: Calling this on the top layout is not valid\n *\n * @param id The id of the (child) layout to reset the intent for\n */\n resetIntent = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetLayoutIntent(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the fill color of a specific layout.\n * Note: Depending on the layout intent, some colors might not be valid (eg opacity for digitalAnimated, any color for print)\n *\n * @param id the id of a specific layout\n * @param color the color that will be used for the layout\n */\n setFillColor = async (id: Id, color: ColorUsage) => {\n const res = await this.#editorAPI;\n return res.setLayoutFillColor(id, JSON.stringify(color)).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This is a convenience method to enable or disable the fill color of a specific layout.\n * Note: Depending on the layout intent, disabling might not be valid (eg disabling for digitalAnimated)\n *\n * @param id the id of a specific layout\n * @param enabled whether the fill color should be enabled or disabled\n */\n setFillColorEnabled = async (id: Id, enabled: boolean) => {\n const res = await this.#editorAPI;\n return res.setLayoutFillColorEnabled(id, enabled).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method resets the fill color of a specific layout to its original (inherited) value.\n * Note: Calling this on the top layout is not valid\n *\n * @param id The id of the (child) layout to reset the fill color for\n */\n resetFillColor = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.resetLayoutFillColor(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the bleed value of a specific layout.\n * Note: this is only valid on a print layout\n *\n * @param id The id of the specific layout\n * @param value The bleed value\n * @param position When defined will update the bleed value of a single position,\n * otherwise will set all positions to the same value. Depending on this parameter\n * being defined, the `areBleedValuesCombined` will also be updated.\n */\n setBleedValue = async (id: Id, value: string, position?: PositionEnum) => {\n const update: BleedDeltaUpdate = position\n ? {\n left: position === PositionEnum.left ? value : undefined,\n top: position === PositionEnum.top ? value : undefined,\n right: position === PositionEnum.right ? value : undefined,\n bottom: position === PositionEnum.bottom ? value : undefined,\n }\n : { left: value, top: value, right: value, bottom: value };\n\n const res = await this.#editorAPI;\n return res.updateLayoutBleed(id, JSON.stringify(update)).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the combined state of the bleed values.\n * Note: this is only valid on a print layout\n *\n * @param id The id of the specific layout\n * @param value Whether the bleed values are combined\n */\n setAreBleedValuesCombined = async (id: Id, value: boolean) => {\n const update: BleedDeltaUpdate = { areBleedValuesCombined: value };\n\n const res = await this.#editorAPI;\n return res.updateLayoutBleed(id, JSON.stringify(update)).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will reset the bleed values on the specified layout to its original (inherited) value.\n * Note: Calling this on the top layout is not valid.\n *\n * @param id The id of the (child) layout to reset the bleed values for\n */\n resetBleedValues = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.updateLayoutBleed(id, null).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Sets the private data for any layout\n * @param id the id of the layout to update\n * @param privateData the private data\n * @returns\n */\n setPrivateData = async (id: string, privateData: PrivateData) => {\n const res = await this.#editorAPI;\n return res\n .setLayoutPrivateData(id, JSON.stringify(privateData))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Gets the private data for any layout\n * @param id the id of the layout\n * @returns the private data\n */\n getPrivateData = async (id: string) => {\n const res = await this.#editorAPI;\n return res.getLayoutPrivateData(id).then((result) => getEditorResponseData<PrivateData>(result));\n };\n\n /**\n * Sets the display name for any layout\n * @param id the id of the layout to update\n * @param displayName the display name\n * @returns\n */\n setDisplayName = async (id: string, displayName: string) => {\n const res = await this.#editorAPI;\n return res.setLayoutDisplayName(id, displayName).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Gets the display name for any layout\n * @param id the id of the layout\n * @returns the display name\n */\n getDisplayName = async (id: string) => {\n const res = await this.#editorAPI;\n return res.getLayoutDisplayName(id).then((result) => getEditorResponseData<string>(result));\n };\n\n /**\n * Resets the display name for any layout\n * @param id the id of the layout to update\n * @returns\n */\n resetDisplayName = async (id: string) => {\n const res = await this.#editorAPI;\n return res.setLayoutDisplayName(id, null).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the layout availability for end-users\n *\n * @param id The id of a specific layout\n * @param isAvailable whether this layout is available for end-users\n * @returns\n */\n setAvailableForUser = async (id: Id, isAvailable: boolean) => {\n const res = await this.#editorAPI;\n return res.setLayoutAvailableForUser(id, isAvailable).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the user selected layout\n *\n * @param id The id of a specific layout\n * @param isSelected whether this layout is selected by end-users\n * @returns\n */\n setSelectedByUser = async (id: Id, isSelected: boolean) => {\n const res = await this.#editorAPI;\n return res.setLayoutSelectedByUser(id, isSelected).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the layout size boundaries for end-users\n *\n * @param id The id of a specific layout\n * @param resizableLayoutProperties the new layout size boundaries\n * @returns\n */\n setResizableByUser = async (id: Id, resizableLayoutProperties: ResizableLayoutPropertiesUpdate) => {\n const res = await this.#editorAPI;\n return res\n .setLayoutResizableByUser(id, JSON.stringify(resizableLayoutProperties))\n .then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { Media as GenericMedia, MediaDetail as GenericMediaDetail } from '@chili-studio/connector-types';\nimport { MediaType } from './ConnectorTypes';\nexport type { MediaConnectorCapabilities } from '@chili-studio/connector-types';\n\nexport enum MediaDownloadType {\n thumbnail = 'thumbnail',\n mediumres = 'mediumres',\n highres = 'highres',\n original = 'original',\n}\n\nexport enum MediaDownloadIntent {\n web = 'web',\n print = 'print',\n animation = 'animation',\n}\n\nexport type Media = GenericMedia<MediaType>;\nexport type MediaDetail = GenericMediaDetail<MediaType>;\n","import { CallSender } from 'penpal';\nimport { EditorAPI, EditorRawAPI, EditorResponse, Id } from '../types/CommonTypes';\nimport {\n ConnectorConfigOptions,\n DeprecatedMediaConnectorDownloadType,\n DeprecatedMediaType,\n FilePointer,\n MediaType,\n MetaData,\n QueryOptions,\n QueryPage,\n} from '../types/ConnectorTypes';\nimport {\n Media,\n MediaConnectorCapabilities,\n MediaDetail,\n MediaDownloadIntent,\n MediaDownloadType,\n} from '../types/MediaConnectorTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { throwEditorResponseError } from '../exceptions';\n\n/**\n * The MediaConnectorController is responsible for all communication regarding media connectors.\n * Methods inside this controller can be called by `window.SDK.mediaConnector.{method-name}`\n *\n * The way GraFx Studio handles different sources of media is called 'MediaConnector'.\n * A MediaConnector is an implementation of a set of capabilities we need\n * to interact with a certain Digital Asset Management system.\n * In essence, a connector is the combination of a JavaScript snippet and some metadata.\n * The JavaScript snippet is loaded in the studio engine using a sandboxed JavaScript execution engine (QuickJs).\n * This allows us to execute the media connector\n * both on web using webassembly and on the server side during e.g. animation output generation.\n * This controller is an interface to the running connector instance inside the studio engine.\n */\nexport class MediaConnectorController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n #blobAPI: EditorRawAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n this.#blobAPI = editorAPI as CallSender as EditorRawAPI;\n }\n\n /**\n * Query a specific MediaConnector for data using both standardized queryOptions and the dynamic\n * context as parameters. This call returns an array of Media items.\n * @param id unique id of the media connector\n * @param queryOptions stringified instance of `QueryOptions`\n * @param context context that will be available in the connector script.\n * @returns array of Media items\n */\n query = async (id: Id, queryOptions: QueryOptions, context: MetaData = {}) => {\n const res = await this.#editorAPI;\n return res\n .mediaConnectorQuery(id, JSON.stringify(queryOptions), JSON.stringify(context))\n .then((result) => getEditorResponseData<QueryPage<Media>>(result));\n };\n\n /**\n * Returns a single media using a specific MediaConnector.\n *\n * The connector needs to list `detail` as a supported capability.\n * @param id unique id of the Media connector\n * @param mediaId unique id of the Media\n * @param context context that will be available in the connector script.\n * @returns Media item\n */\n detail = async (id: Id, mediaId: string, context: MetaData = {}) => {\n const res = await this.#editorAPI;\n return res\n .mediaConnectorDetail(id, mediaId, JSON.stringify(context))\n .then((result) => getEditorResponseData<MediaDetail>(result));\n };\n\n /**\n * The combination of a `connectorId` and `mediaId` is typically enough for a media connector to\n * perform the download of this asset. The `download` endpoint is capable of relaying this information to the\n * media connector instance running in the editor engine.\n * @param id unique id of the media connector\n * @param mediaId unique id of the media to download\n * @param downloadType hint to the media connector about desired quality of the downloaded media\n * @param context context that will be available in the connector script.\n * @returns\n */\n download = async (id: Id, mediaId: Id, downloadType: MediaDownloadType, context: MetaData = {}) => {\n const compatibleDownloadType = this.parseDeprecatedMediaDownloadType(\n downloadType as unknown as DeprecatedMediaConnectorDownloadType,\n ) as MediaDownloadType;\n const res = await this.#blobAPI;\n\n return res\n .mediaConnectorDownload(\n id,\n mediaId,\n compatibleDownloadType,\n MediaDownloadIntent.web,\n JSON.stringify(context),\n )\n .then((result) => {\n // Handle binary data (Uint8Array) directly\n if (result instanceof Uint8Array) {\n return result;\n }\n\n // Handle structured response (EditorResponse) for non-success cases\n if (typeof result === 'object' && result !== null && 'success' in result && !result.success) {\n throwEditorResponseError(result as EditorResponse<null>);\n }\n\n // Unexpected response type - throw error\n throw new Error(`Unexpected response type: ${typeof result}.`);\n });\n };\n\n /**\n * All connectors have a certain set of mappings they allow to be passed into the connector methods their context. This\n * method allows you to discover which mappings are available for a given connector. If you want to use any of these\n * mappings, they will be available in the `context` parameter of any connector method.\n * @param id unique id of the media connector\n * @returns connector mappings\n */\n getConfigurationOptions = async (id: Id) => {\n const res = await this.#editorAPI;\n return res\n .mediaConnectorGetConfigurationOptions(id)\n .then((result) => getEditorResponseData<ConnectorConfigOptions>(result));\n };\n\n /**\n * This method returns what capabilities the selected connector has. It gives an indication what methods can\n * be used successfully for a certain connector.\n * @param id unique id of the media connector\n * @returns MediaConnectorCapabilities\n */\n getCapabilities = async (id: Id) => {\n const res = await this.#editorAPI;\n return res\n .mediaConnectorGetCapabilities(id)\n .then((result) => getEditorResponseData<MediaConnectorCapabilities>(result));\n };\n\n /**\n * This method will parse the deprecatedMediaType to the new media type. This method will be removed once the deprecatedMediaType is out of use\n * @param deprecatedType is 0 or 1\n * @returns connector capabilities\n */\n parseDeprecatedMediaType = (deprecatedType: DeprecatedMediaType) => {\n if (deprecatedType === DeprecatedMediaType.file) return MediaType.file;\n if (deprecatedType === DeprecatedMediaType.collection) return MediaType.collection;\n };\n\n /**\n * This method will parse the deprecatedMediaDownloadType to the new media download type.\n * This method will be removed once the deprecatedMediaDownloadType is out of use\n * @param deprecatedMediaDownloadType legacy download type\n * @returns MediaDownloadType\n */\n parseDeprecatedMediaDownloadType(\n deprecatedMediaDownloadType: DeprecatedMediaConnectorDownloadType,\n ): MediaDownloadType {\n switch (deprecatedMediaDownloadType) {\n case DeprecatedMediaConnectorDownloadType.HighResolutionWeb:\n return MediaDownloadType.highres;\n case DeprecatedMediaConnectorDownloadType.LowResolutionWeb:\n return MediaDownloadType.thumbnail;\n default:\n return deprecatedMediaDownloadType as unknown as MediaDownloadType;\n }\n }\n\n /**\n * Invokes the upload on the connector, using the given staged pointer(s).\n * If you want help with staging files, use the `stageFiles` method from the UtilsController.\n * @param connectorId The MediaConnector instance to use (just like download API).\n * @param filePointers Array of FilePointer as staged by stageFile(s).\n * @param context Arbitrary metadata/context for the upload (auth, meta fields, etc).\n * @returns Promise<Media[]>\n */\n upload = async (connectorId: Id, filePointers: FilePointer[], context: MetaData = {}) => {\n const res = await this.#editorAPI;\n return res\n .mediaConnectorUpload(connectorId, JSON.stringify(filePointers), JSON.stringify(context))\n .then((result) => getEditorResponseData<Media[]>(result));\n };\n}\n","import { EditorAPI, EditorRawAPI, EditorResponse, Id } from '../types/CommonTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { throwEditorResponseError } from '../exceptions';\nimport { Page, SnapshotSettings } from '../types/PageTypes';\nimport { CallSender } from 'penpal';\n\n/**\n * The PageController is responsible for all communication regarding Pages.\n * Methods inside this controller can be called by `window.SDK.page.{method-name}`\n */\nexport class PageController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n #blobAPI: EditorRawAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n this.#blobAPI = editorAPI as CallSender as EditorRawAPI;\n }\n\n /**\n * @experimental\n * This method adds a new page.\n * @returns the id of the new page\n */\n add = async () => {\n const res = await this.#editorAPI;\n return res.addPage().then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * @experimental\n * This method removes a certain page.\n * @param pageId the id of the page\n * @returns the id of the current active page\n */\n remove = async (pageId: Id) => {\n const res = await this.#editorAPI;\n return res.removePage(pageId).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * @experimental\n * This method selects a certain page to be the active page.\n * @param pageId the id of the page\n * @returns\n */\n select = async (pageId: Id) => {\n const res = await this.#editorAPI;\n return res.selectPage(pageId).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @experimental\n * This method sets the page's visibility.\n * @param pageId the id of the page\n * @param isVisible the visibility of the page\n * @returns\n */\n setVisibility = async (pageId: Id, isVisible: boolean) => {\n const res = await this.#editorAPI;\n return res.setPageIsVisible(pageId, isVisible).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @experimental\n * This method duplicates a certain page.\n * @param pageId the id of the page\n * @returns\n */\n duplicate = async (pageId: Id) => {\n const res = await this.#editorAPI;\n return res.duplicatePage(pageId).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method returns the list of pages\n * @returns list of all pages\n */\n getAll = async () => {\n const res = await this.#editorAPI;\n return res.getPages().then((result) => getEditorResponseData<Page[]>(result));\n };\n\n /**\n * This method returns a page by its id\n * @param pageId the id of a specific page\n * @returns page properties\n */\n getById = async (pageId: Id) => {\n const res = await this.#editorAPI;\n return res.getPageById(pageId).then((result) => getEditorResponseData<Page>(result));\n };\n\n /**\n * This method returns a UInt8Array containing a PNG encoded image of the page.\n * @param pageId The id of a specific page.\n * If not specified, selected page snapshot will be provided\n * @param settings an object to specify desired snapshot properties, e.g., resolution.\n * If it's not provided, default settings will be applied, e.g., page resolution.\n * Limit for `largestAxisSize` is 1000 px\n * @returns UInt8Array snapshot of the given page\n */\n getSnapshot = async (pageId?: Id, settings?: SnapshotSettings | null) => {\n const res = await this.#blobAPI;\n return res\n .getPageSnapshotWithSettings(pageId, settings == null ? null : JSON.stringify(settings))\n .then((result) => {\n // Handle binary data (Uint8Array) directly\n if (result instanceof Uint8Array) {\n return result;\n }\n\n // Handle structured response (EditorResponse) for non-success cases\n if (typeof result === 'object' && result !== null && 'success' in result && !result.success) {\n throwEditorResponseError(result as EditorResponse<null>);\n }\n\n // Unexpected response type - throw error\n throw new Error(`Unexpected response type: ${typeof result}.`);\n });\n };\n\n /**\n * This method will set the width of the page to a specific value.\n * This only works if the document is a project.\n * @param _pageId the id of a specific page.\n * @param width the string value that will be calculated (f.e. 1+1 will result in 2) The default unit is in the current layout unit (e.g. px, mm, in)\n */\n setWidth = async (_pageId: Id | undefined, width: string) => {\n if (_pageId !== undefined) {\n console.warn('pageId has no effect since all pages are being updated simultaneously.');\n }\n\n const res = await this.#editorAPI;\n return res.setPageWidth(width).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the height of the page to a specific value.\n * This only works if the document is a project.\n * @param _pageId the id of a specific page.\n * @param height the string value that will be calculated (f.e. 1+1 will result in 2). The default unit is in the current layout unit (e.g. px, mm, in)\n * @returns\n */\n setHeight = async (_pageId: Id | undefined, height: string) => {\n if (_pageId !== undefined) {\n console.warn('pageId has no effect since all pages are being updated simultaneously.');\n }\n\n const res = await this.#editorAPI;\n return res.setPageHeight(height).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Sets the width and height of the page to a specific value simultaneously.\n * This only works if the document is a project.\n * @param width the string value that will be calculated (f.e. 1+1 will result in 2). The default unit is in the current layout unit (e.g. px, mm, in)\n * @param height the string value that will be calculated (f.e. 1+1 will result in 2). The default unit is in the current layout unit (e.g. px, mm, in)\n */\n setSize = async (width: string, height: string) => {\n const res = await this.#editorAPI;\n return res.setPageSize(width, height).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method changes the order of pages.\n * @param order the index in the list to move to\n * @param ids An array of all IDs you want to move to the given index\n * @returns\n */\n move = async (order: number, ids: Id[]) => {\n const res = await this.#editorAPI;\n return res.reorderPages(order, ids).then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { EditorAPI, Id } from '../types/CommonTypes';\nimport { ParagraphStyle, ParagraphStyleUpdate } from '../types/ParagraphStyleTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The ParagraphStyleController is responsible for all communication regarding paragraph styles.\n * Methods inside this controller can be called by `window.SDK.paragraphStyle.{method-name}`\n */\nexport class ParagraphStyleController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method returns the list of paragraph styles\n * @returns\n */\n getAll = async () => {\n const res = await this.#editorAPI;\n return res.getParagraphStyles().then((result) => getEditorResponseData<ParagraphStyle[]>(result));\n };\n\n /**\n * This method returns a paragraph style by id\n * @param id the id of a specific paragraph style\n * @returns\n */\n getById = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.getParagraphStyleById(id).then((result) => getEditorResponseData<ParagraphStyle>(result));\n };\n\n /**\n * This method creates a new paragraph style\n * @returns the id of new paragraph style\n */\n create = async () => {\n const res = await this.#editorAPI;\n return res.createParagraphStyle().then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method duplicates a paragraph style\n * @param id the id of a specific paragraph style\n * @returns the new paragraph style id\n */\n duplicate = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.duplicateParagraphStyle(id).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method updates a paragraph style\n * @param id the id of a specific paragraph style\n * @param properties The new paragraph style properties\n * @returns\n */\n update = async (id: Id, properties: ParagraphStyleUpdate) => {\n const res = await this.#editorAPI;\n return res\n .updateParagraphStyle(id, JSON.stringify(properties))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method renames a paragraph style\n * @param id the id of a specific paragraph style\n * @param name the new name of the paragraph style\n * @returns\n */\n rename = async (id: Id, name: string) => {\n const res = await this.#editorAPI;\n return res.renameParagraphStyle(id, name).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method removes a paragraph style\n * @param id the id of a specific paragraph style\n * @returns\n */\n remove = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.removeParagraphStyle(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method changes positions of paragraph styles\n * @param order the position of the paragraph styles\n * @param ids the list of paragraph style ids\n * @returns\n */\n move = async (order: number, ids: Id[]) => {\n const res = await this.#editorAPI;\n return res.moveParagraphStyles(order, ids).then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { DataModelProperty, Dictionary } from '@chili-studio/connector-types';\nimport { Id, PrivateData } from './CommonTypes';\n\nexport interface ConnectorImageVariableSource {\n connectorId: string;\n /**\n * The requested asset id or name\n */\n assetId: string;\n /**\n * If the connector was able to query, this will contain\n * the actual resolved media Id.\n */\n resolved?: ResolvedMedia;\n\n /**\n * The context of the variable that will be passed to the connector\n */\n context: Dictionary;\n}\n\n/**\n * Image variable query lookup result\n */\nexport interface ResolvedMedia {\n /**\n * The resolved media Id.\n * This id can be used to perform the download call.\n */\n mediaId: string;\n}\n\nexport enum VariableType {\n shortText = 'shortText',\n longText = 'longText',\n image = 'image',\n list = 'list',\n boolean = 'boolean',\n group = 'group',\n number = 'number',\n date = 'date',\n dataSource = 'dataSource',\n}\n\nexport interface Variable {\n id: string;\n type: VariableType;\n parentId?: string;\n name: string;\n label?: string | null;\n isVisible: boolean;\n visibility: VariableVisibility;\n isReadonly: boolean;\n isRequired: boolean;\n occurrences: number;\n placeholder?: string | null;\n helpText?: string | null;\n privateData: PrivateData;\n}\n\nexport interface ImageVariable extends Variable {\n value?: ConnectorImageVariableSource;\n allowQuery: boolean;\n allowUpload: boolean;\n uploadMinHeight?: number | null;\n uploadMinWidth?: number | null;\n}\n\nexport interface ListVariableItem {\n value: string;\n displayValue?: string;\n}\n\nexport interface ListVariable extends Variable {\n items: string[];\n selected?: string;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface BooleanVariable extends Variable {\n value: boolean;\n}\n\nexport interface ShortTextVariable extends Variable {\n value: string;\n removeParagraphIfEmpty: boolean;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n isDontBreak: boolean;\n maxCharacters?: number;\n}\n\nexport interface NumberVariable extends Variable {\n value: number;\n numberOfDecimals: number;\n decimalCharacterStyleId?: string;\n decimalSeparator: string;\n thousandsSeparator: string;\n minValue?: number;\n maxValue?: number;\n showStepper: boolean;\n stepSize: number;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport interface DateVariable extends Variable {\n value?: string;\n removeParagraphIfEmpty: boolean;\n displayFormat: string;\n startDate?: DateRestriction;\n endDate?: DateRestriction;\n excludedDays: Day[];\n locale: Locale;\n prefix?: ValueWithStyle;\n suffix?: ValueWithStyle;\n}\n\nexport type LongTextVariable = ShortTextVariable;\n\nexport type GroupVariable = Variable;\n\nexport interface DataSourceVariable extends Variable {\n value?: DataSourceVariableSource;\n displayOptions: DataSourceVariableDisplayOptions;\n entryId?: RowId;\n}\n\nexport type DateRestriction = RelativeDate | AbsoluteDate;\n\nexport interface ValueWithStyle {\n value?: string;\n style?: string;\n}\n\nexport interface RelativeDate {\n offset: number;\n type: 'relative';\n}\n\nexport interface AbsoluteDate {\n value: string;\n type: 'absolute';\n}\n\nexport enum Day {\n Monday = 'monday',\n Tuesday = 'tuesday',\n Wednesday = 'wednesday',\n Thursday = 'thursday',\n Friday = 'friday',\n Saturday = 'saturday',\n Sunday = 'sunday',\n}\n\nexport enum Locale {\n en_US = 'en_US',\n cs = 'cs',\n da = 'da',\n nl = 'nl',\n fi = 'fi',\n fr = 'fr',\n de = 'de',\n it = 'it',\n no = 'no',\n pl = 'pl',\n pt_PT = 'pt_PT',\n es_ES = 'es_ES',\n sv = 'sv',\n}\n\nexport interface DateVariablePropertiesDeltaUpdate {\n startDate?: {\n value: DateRestriction | null;\n };\n endDate?: {\n value: DateRestriction | null;\n };\n excludedDays?: {\n value: Day[] | null;\n };\n locale?: {\n value: Locale;\n };\n displayFormat?: {\n value: string;\n };\n}\n\nexport interface NumberVariablePropertiesDeltaUpdate {\n minValue?: {\n value: number | null;\n };\n maxValue?: {\n value: number | null;\n };\n showStepper?: {\n value: boolean;\n };\n stepSize?: {\n value: number;\n };\n numberOfDecimals?: {\n value: number;\n };\n decimalCharacterStyleId?: {\n value: string | null;\n };\n decimalSeparator?: {\n value: string;\n };\n thousandsSeparator?: {\n value: string;\n };\n}\n\nexport interface PrefixSuffixDeltaUpdate {\n prefix?: {\n value: string | null;\n };\n suffix?: {\n value: string | null;\n };\n prefixCharacterStyleId?: {\n value: string | null;\n };\n suffixCharacterStyleId?: {\n value: string | null;\n };\n}\n\nexport enum VariableVisibilityType {\n visible = 'visible',\n invisible = 'invisible',\n conditional = 'conditional',\n}\n\nexport enum VariableVisibilityTargetType {\n boolean = 'boolean',\n text = 'text',\n number = 'number',\n}\n\nexport enum VariableVisibilityOperator {\n equals = '=',\n notEquals = '!=',\n greaterThan = '>',\n greaterThanOrEquals = '>=',\n lessThan = '<',\n lessThanOrEquals = '<=',\n}\n\nexport interface VariableVisibilityBase {\n type: VariableVisibilityType;\n}\n\nexport interface VariableVisibilityVisible extends VariableVisibilityBase {\n type: VariableVisibilityType.visible;\n}\n\nexport interface VariableVisibilityInvisible extends VariableVisibilityBase {\n type: VariableVisibilityType.invisible;\n}\n\nexport interface VariableVisibilityConditional extends VariableVisibilityBase {\n type: VariableVisibilityType.conditional;\n layouts: VariableVisibilityLayout[];\n variables: VariableWithValue[];\n}\n\nexport type VariableVisibility =\n | VariableVisibilityVisible\n | VariableVisibilityInvisible\n | VariableVisibilityConditional;\n\nexport interface VariableVisibilityLayout {\n layoutId: string;\n includeChildren: boolean;\n}\n\nexport interface VariableWithValue {\n id: string;\n value: VariableVisibilityConditionValue;\n}\n\nexport interface VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType;\n}\n\nexport interface VariableVisibilityConditionValueBoolean extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.boolean;\n value: boolean;\n}\n\nexport interface VariableVisibilityConditionValueText extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.text;\n value: string;\n operator: VariableVisibilityOperator;\n}\n\nexport interface VariableVisibilityConditionValueNumber extends VariableVisibilityConditionValueBase {\n type: VariableVisibilityTargetType.number;\n value: number;\n operator: VariableVisibilityOperator;\n}\n\nexport type VariableVisibilityConditionValue =\n | VariableVisibilityConditionValueBoolean\n | VariableVisibilityConditionValueText\n | VariableVisibilityConditionValueNumber;\n\nexport type VariableUsagesReport = {\n pages: Id[];\n frames: Id[];\n actionTrigger: Id[];\n variables: Id[];\n outputDataSource: boolean;\n};\n\n// Data Source Variable Types\n\nexport type RowId = string;\n\nexport enum DataSourceVariableSourceType {\n injected = 'injected',\n connector = 'connector',\n}\n\nexport type InjectedDataSourceVariableSource = {\n type: DataSourceVariableSourceType.injected;\n model: DataModelProperty[];\n itemIdPropertyName: string;\n};\n\nexport type ConnectorDataSourceVariableSource = {\n type: DataSourceVariableSourceType.connector;\n connectorId: string;\n};\n\nexport type DataSourceVariableSource = InjectedDataSourceVariableSource | ConnectorDataSourceVariableSource;\n\nexport enum DataSourceVariableDisplayOptionsType {\n table = 'table',\n list = 'list',\n}\n\nexport interface DataSourceVariableDisplayOptionsTable {\n type: DataSourceVariableDisplayOptionsType.table;\n}\n\nexport interface DataSourceVariableDisplayOptionsList {\n type: DataSourceVariableDisplayOptionsType.list;\n displayColumn: string;\n}\n\nexport type DataSourceVariableDisplayOptions =\n | DataSourceVariableDisplayOptionsTable\n | DataSourceVariableDisplayOptionsList;\n","import { Id, RuntimeConfigType } from '../types/CommonTypes';\nimport { WellKnownConfigurationKeys } from '../types/ConfigurationTypes';\nimport { ListVariable, ListVariableItem, Variable, VariableType } from '../types/VariableTypes';\nimport { ViewMode } from '../types/ViewModeTypes';\nimport { ConnectorCompatibilityTools } from '../utils/ConnectorCompatibilityTools';\nimport { ToolType } from '../utils/Enums';\nimport { MeasurementUnit } from '../types/LayoutTypes';\nimport { ActionAsyncError, DataRowAsyncError } from '../exceptions';\n\n/**\n * The SubscriberController is responsible for all listeners which can influence the application-state from outside.\n * Callbacks inside this controller can be set by `window.SDK.subscriber.{method-name}`\n */\nexport class SubscriberController {\n /**\n * @ignore\n */\n private config: RuntimeConfigType;\n\n /**\n * @ignore\n */\n private localConfig: Map<string, string>;\n\n /**\n * @ignore\n */\n constructor(config: RuntimeConfigType, localConfig: Map<string, string>) {\n this.config = config;\n this.localConfig = localConfig;\n }\n\n /**\n * Listener on actions, if this changes, this listener will get triggered with the updates\n * @param actions Stringified array of DocumentAction type\n */\n onActionsChanged = (actions: string) => {\n this.config.events.onActionsChanged.trigger(JSON.parse(actions));\n };\n\n /**\n * Listener on when a certain animation gets changed\n * @param animation Stringified array of FrameAnimationType\n */\n onAnimationChanged = (animation: string) => {\n this.config.events.onFrameAnimationsChanged.trigger(JSON.parse(animation));\n };\n\n /**\n * Listener on the playback state of the animation, it contains the current time of the playback (in milliseconds) and a flag that describes if the animation is currently playing\n * @param animationPlaybackState Stringified array of AnimationPlaybackType\n */\n onAnimationPlaybackChanged = (animationPlaybackState: string) => {\n this.config.events.onScrubberPositionChanged.trigger(JSON.parse(animationPlaybackState));\n };\n\n /**\n * Listener on the state of the currently selected layout, if its properties are changed, this listener will get triggered with the new properties\n * @param layoutProperties Stringified object of LayoutPropertiesType\n */\n onSelectedLayoutPropertiesChanged = (layoutProperties: string) => {\n this.config.events.onSelectedLayoutPropertiesChanged.trigger(JSON.parse(layoutProperties));\n };\n\n /**\n * Listener on the unit of the currently active layout. If you switch between layouts with different units, this listener will get triggered with the new unit\n * If you switch the unit of a layout this listener will get triggered with the new unit\n *\n * @param unit Stringified object of MeasurementUnit\n */\n onSelectedLayoutUnitChanged = (unit: string) => {\n this.config.events.onSelectedLayoutUnitChanged.trigger(unit as MeasurementUnit);\n };\n\n /**\n * Listener on the state of all frames, if this changes, this listener will get triggered with the updates\n * @param framesLayout Stringified array of FrameLayoutType objects\n */\n onFramesLayoutChanged = (framesLayout: string) => {\n const frames = JSON.parse(framesLayout);\n this.config.events.onFramesLayoutChanged.trigger(frames);\n };\n\n /**\n * Listener on the state of the currently selected frames, if this changes, this listener will get triggered with the updates\n * @param framesLayout Stringified array of FrameLayoutType objects\n */\n onSelectedFramesLayoutChanged = (framesLayout: string) => {\n const frames = JSON.parse(framesLayout);\n this.config.events.onSelectedFramesLayoutChanged.trigger(frames);\n\n const singleFrameCallBack = this.config.onSelectedFrameLayoutChanged;\n singleFrameCallBack && singleFrameCallBack(frames.length > 1 ? undefined : frames[0]);\n };\n\n /**\n * Listener on the state of the currently selected frame, it contains some basic information on the type of frame it is\n * @param framesContent Stringified array of Frame objects\n */\n onSelectedFramesContentChanged = (framesContent: string) => {\n const frames = JSON.parse(framesContent);\n this.config.events.onSelectedFramesContentChanged.trigger(frames);\n\n const singleFrameCallBack = this.config.onSelectedFrameContentChanged;\n singleFrameCallBack && singleFrameCallBack(frames.length > 1 ? null : frames[0]);\n };\n\n /**\n * Listener on the general state of the document, gets triggered every time a change is done on the document.\n */\n onStateChanged = () => {\n this.config.events.onStateChanged.trigger();\n };\n\n /**\n * Listener on authentication expiration.\n * The callback should resolve to the refreshed authentication. If the\n * listener is not defined, the http requests from the connector will return\n * 401 with no refetch of assets.\n *\n * When this emits it means either:\n * - the grafxToken needs to be renewed\n * - any other authentication needs to be renewed (user impersonation, static..)\n *\n * @param authRefreshRequest Stringified object of AuthRefreshRequest\n */\n onAuthExpired = async (authRefreshRequest: string) => {\n const authCredentials = await this.config.handlers.onAuthExpired.trigger(JSON.parse(authRefreshRequest));\n return authCredentials != null ? JSON.stringify(authCredentials) : null;\n };\n\n /**\n * Listener on viewport request.\n * The callback should resolve to the visible viewport. If the\n * listener is not defined, the viewport will take full size.\n *\n * When this emits it means that the engine requested the viewport for a\n * zoom to page call.\n */\n onViewportRequested = () => {\n const viewport = this.config.handlers.onViewportRequested.trigger();\n return viewport != null ? JSON.stringify(viewport) : null;\n };\n\n /**\n * Listener on when the document is fully loaded.\n */\n onDocumentLoaded = () => {\n this.config.events.onDocumentLoaded.trigger();\n };\n\n /**\n * @deprecated use `onSelectedPageIdChanged` instead\n * To be implemented, gets triggered when clicking on the pageTitle on the canvas.\n */\n onPageSelectionChanged = (id: Id) => {\n this.config.events.onPageSelectionChanged.trigger(id);\n };\n\n /**\n * Listener on when variables change\n * @param variablesJson Stringified array of Variable\n */\n onVariableListChanged = (variablesJson: string) => {\n const parsed = JSON.parse(variablesJson) as Variable[];\n\n const updated = parsed.map((variable) =>\n variable.type === VariableType.list\n ? {\n ...variable,\n items: ((variable as ListVariable).items as unknown as ListVariableItem[]).map(\n (item) => item.value,\n ),\n selected: ((variable as ListVariable).selected as unknown as ListVariableItem | undefined)?.value,\n }\n : variable,\n );\n\n this.config.events.onVariableListChanged.trigger(updated);\n };\n\n /**\n * Listener on when the tool has changed by the canvas\n * @param tool the string representation of a certain tool\n */\n onSelectedToolChanged = (tool: string) => {\n this.config.events.onSelectedToolChanged.trigger(tool as ToolType);\n };\n\n /**\n * Listener on state changes\n * @param undoState Stringified object of UndoState\n */\n onUndoStateChanged = (undoState: string) => {\n this.config.events.onUndoStackStateChanged.trigger(JSON.parse(undoState));\n };\n\n /**\n * Listener on custom undo data changes\n *\n * @param customData Stringified object of custom undo data\n */\n onCustomUndoDataChanged = (customData: string) => {\n this.config.events.onCustomUndoDataChanged.trigger(JSON.parse(customData));\n };\n\n /**\n * Listener on the state of the currently selected layout's frames, if this changes, this listener will get triggered with the updates\n * @param layoutFrames Stringified object of Frames\n */\n onSelectedLayoutFramesChanged = (layoutFrames: string) => {\n this.config.events.onSelectedLayoutFramesChanged.trigger(JSON.parse(layoutFrames));\n };\n\n /**\n * Listener on the state of the currently selected text's styles, if this changes, this listener will get triggered with the updates\n * @param styles Stringified object of styles\n */\n onSelectedTextStyleChanged = (styles: string) => {\n this.config.events.onSelectedTextStyleChanged.trigger(JSON.parse(styles));\n };\n\n /**\n * Listener on the state of the currently selected color's styles, if this changes, this listener will get triggered with the updates\n * @param colors Stringified object of colors\n */\n onColorsChanged = (colors: string) => {\n this.config.events.onColorsChanged.trigger(JSON.parse(colors));\n };\n\n /**\n * Listener on paragraph styles, if this changes, this listener will get triggered with the updates\n * @param paragraphStyles Stringified object of paragraph styles\n */\n onParagraphStylesChanged = (paragraphStyles: string) => {\n this.config.events.onParagraphStylesChanged.trigger(JSON.parse(paragraphStyles));\n };\n\n /**\n * Listener on character styles, if this changes, this listener will get triggered with the updates\n * @param characterStyles Stringified object of character styles\n */\n onCharacterStylesChanged = (characterStyles: string) => {\n this.config.events.onCharacterStylesChanged.trigger(JSON.parse(characterStyles));\n };\n\n /**\n * Listener on fonts, if this changes, this listener will get triggered with the updates\n * @param fonts Stringified object of font families\n */\n onFontFamiliesChanged = (fonts: string) => {\n this.config.events.onFontFamiliesChanged.trigger(JSON.parse(fonts));\n };\n\n /**\n * Listener on selected layout id, this listener will get triggered when a different layout is selected.\n * @param id the currently selected layout id\n */\n onSelectedLayoutIdChanged = (id: Id) => {\n this.config.events.onSelectedLayoutIdChanged.trigger(id);\n };\n\n /**\n * Listener on layouts, this listener will get triggered when a (sub)layout is\n * - created\n * - removed\n * - renamed\n * - duplicated\n * @param layouts Stringified object of layouts\n */\n onLayoutsChanged = (layouts: string) => {\n this.config.events.onLayoutsChanged.trigger(JSON.parse(layouts));\n };\n\n /**\n * Listener on scale factor of the canvas, this listener will get triggered when a zoom is applied to the canvas\n * @param zoom Stringified scale factor\n */\n onZoomChanged = (zoom: string) => {\n this.config.events.onZoomChanged.trigger(JSON.parse(zoom));\n };\n\n /**\n * Listener on connector events, this listener will get triggered when a connector emits one of those events\n * - reloadRequired\n * - authChanged\n * - unloaded\n * - stateChanged\n *\n * stateChanged - this event will be triggered by connector states: loading, loaded, running, ready, error\n * @param connectorEvent Stringified object of ConnectorEvent\n */\n onConnectorEvent = (connectorEvent: string) => {\n this.config.events.onConnectorEvent.trigger(JSON.parse(connectorEvent));\n };\n\n /**\n * Listener on connectors, if this changes, this listener will get triggered with the updates\n * @param connectors Stringified array of ConnectorInstance type\n */\n onConnectorsChanged = (connectors: string) => {\n const connectorCompatibilityTools = new ConnectorCompatibilityTools();\n const compatibleConnectors = connectorCompatibilityTools.makeMultipleConnectorsBackwardsCompatible(\n JSON.parse(connectors),\n this.localConfig.get(WellKnownConfigurationKeys.GraFxStudioEnvironmentApiUrl),\n );\n this.config.events.onConnectorsChanged.trigger(compatibleConnectors);\n };\n\n /**\n * @experimental\n * Listener on when the selectedPageID is changed.\n * @param pageId Stringified pageId\n */\n onSelectedPageIdChanged = (pageId: string) => {\n this.config.events.onSelectedPageIdChanged.trigger(pageId);\n };\n\n /**\n * @experimental\n * Listener on pages list, this listener will get triggered when the pages are updated.\n * @param pages Stringified object of the pages\n */\n onPagesChanged = (pages: string) => {\n this.config.events.onPagesChanged.trigger(JSON.parse(pages));\n };\n\n /**\n * @experimental\n * Listener on pages snapshots, this will fire when a page snapshot is invalidated and should be updated.\n * @param pageId id of the page\n */\n onPageSnapshotInvalidated = (pageId: Id) => {\n this.config.events.onPageSnapshotInvalidated.trigger(pageId);\n };\n /**\n * Listener on page size, this listener will get triggered when the page size is changed, while the document is a `project`.\n * This will not emit anything if your document is a `template`.\n * @param pageSize Stringified object of the PageSize\n */\n onPageSizeChanged = (pageSize: string) => {\n this.config.events.onPageSizeChanged.trigger(JSON.parse(pageSize));\n };\n\n /**\n * Listener on corner radii of rectangle and polygon shapes, this listener will get triggered when any corner radius is changed\n * @param cornerRadius Stringified object of the CornerRadius\n */\n onShapeCornerRadiusChanged = (cornerRadius: string) => {\n this.config.events.onShapeCornerRadiusChanged.trigger(JSON.parse(cornerRadius));\n };\n\n /**\n * Listener of editor entering / exiting the crop mode\n * @param id frame id when entering / null when exiting\n */\n onCropActiveFrameIdChanged = (id?: Id) => {\n this.config.events.onCropActiveFrameIdChanged.trigger(id);\n };\n\n /**\n * Listener on async errors.\n * Async errors are thrown at times not directly tied to SDK calls.\n * e.g. Getting an action error triggered after a late event.\n *\n * If this is an `ActionAsyncError`:\n * - `id` refers to the action id\n * - `event` refers to the event that triggered the action\n * - `eventChain` refers the chain of events that lead to the action, first\n * item being the closest parent.\n * @param asyncError error triggered asynchronously\n */\n onAsyncError = (asyncError: string) => {\n const parsedError = JSON.parse(asyncError);\n\n if (parsedError?.type === 'dataRow') {\n const dataRowException = new DataRowAsyncError(\n parsedError.count,\n parsedError.message,\n parsedError.exceptions,\n );\n\n this.config.events.onAsyncError.trigger(dataRowException);\n } else if (parsedError?.type === 'action') {\n const actionException = new ActionAsyncError(\n parsedError.message,\n parsedError.id,\n parsedError.event,\n parsedError.eventChain,\n );\n\n this.config.events.onAsyncError.trigger(actionException);\n } else {\n this.config.events.onAsyncError.trigger(parsedError);\n }\n };\n\n /**\n * Listener on when the view mode has changed\n * @param viewMode the string representation of a view mode\n */\n onViewModeChanged = (viewMode: string) => {\n this.config.events.onViewModeChanged.trigger(viewMode as ViewMode);\n };\n\n /**\n * Listener on when barcode frames change their validation state\n *\n * @param validationResults the json string representation of the validation results\n */\n onBarcodeValidationChanged = (validationResults: string) => {\n this.config.events.onBarcodeValidationChanged.trigger(JSON.parse(validationResults));\n };\n\n /**\n * Listener on when the data source has changed\n *\n * @param connectorId the id of the data connector\n */\n onDataSourceIdChanged = (connectorId?: Id) => {\n this.config.events.onDataSourceIdChanged.trigger(connectorId);\n };\n\n /**\n * Listener on document issues, if this changes, this listener will get triggered with the updates\n * @param documentIssues Stringified object of document issues\n */\n onDocumentIssueListChanged = (documentIssues: string) => {\n this.config.events.onDocumentIssueListChanged.trigger(JSON.parse(documentIssues));\n };\n\n /**\n * Listener on engine editing mode, if this changes, this listener will get triggered with the updates\n * @param engineEditMode Stringified object of engine edit mode\n */\n onEngineEditModeChanged = (engineEditMode: string) => {\n this.config.events.onEngineEditModeChanged.trigger(JSON.parse(engineEditMode));\n };\n\n /**\n * Listener on brand kit media, if this changes, this listener will get triggered with the updates\n * @param brandKitMedia Stringified array of BrandKitMedia objects\n */\n onBrandKitMediaChanged = (brandKitMedia: string) => {\n this.config.events.onBrandKitMediaChanged.trigger(JSON.parse(brandKitMedia));\n };\n}\n","import { EditorAPI } from '../types/CommonTypes';\nimport { SelectedTextStyle, TextStyleUpdateType } from '../types/TextStyleTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The TextStyleController is responsible for all communication regarding text styles.\n * Methods inside this controller can be called by `window.SDK.textStyle.{method-name}`\n */\nexport class TextStyleController {\n /**\n * @ignore\n */\n readonly #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method updates a selected Text's style properties\n * @returns\n */\n set = async (style: TextStyleUpdateType) => {\n const res = await this.#editorAPI;\n return res\n .selectedTextStyleDeltaUpdate(JSON.stringify(style))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method removes a selected Text's style properties\n * If the text is selected, then the inline style properties will be removed\n * If the text is not selected and user tried to change any style property, the temporary style will be removed\n * if there is no text selection and there is no temporary style, the inline paragraph properties will be removed\n * @returns\n */\n removeSelected = async () => {\n const res = await this.#editorAPI;\n return res.selectedTextStyleClean().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method gets a selected Text's style properties\n * @returns\n */\n getSelected = async () => {\n const res = await this.#editorAPI;\n return res.getSelectedTextStyle().then((result) => getEditorResponseData<SelectedTextStyle>(result));\n };\n}\n","export enum FramePropertyNames {\n FRAME_X = 'frameX',\n FRAME_Y = 'frameY',\n WIDTH = 'width',\n HEIGHT = 'height',\n FRAME_ROTATION = 'frameRotation',\n}\nexport enum LayoutPropertyNames {\n LAYOUT_HEIGHT = 'layoutHeight',\n LAYOUT_WIDTH = 'layoutWidth',\n BLEED_TOP = 'bleedTop',\n BLEED_BOTTOM = 'bleedBottom',\n BLEED_LEFT = 'bleedLeft',\n BLEED_RIGHT = 'bleedRight',\n BLEED_VALUES_COMBINED = 'areBleedValuesCombined',\n}\n\nexport enum ToolType {\n SELECT = 'select',\n ZOOM = 'zoom',\n HAND = 'hand',\n IMAGE_FRAME = 'imageFrame',\n TEXT_FRAME = 'textFrame',\n SHAPE_RECT = 'rect',\n SHAPE_ELLIPSE = 'ellipse',\n SHAPE_POLYGON = 'polygon',\n}\nexport enum DownloadFormats {\n MP4 = 'mp4',\n GIF = 'gif',\n PNG = 'png',\n JPG = 'jpg',\n PDF = 'pdf',\n /**\n * @experimental This download format is experimental.\n */\n HTML = 'html',\n}\n\nexport enum EnvironmentType {\n SANDBOX = 'sandbox',\n PRODUCTION = 'online',\n}\n","import { EditorAPI } from '../types/CommonTypes';\nimport { ToolType } from '../utils/Enums';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The ToolController is responsible for all communication regarding the tools.\n * Methods inside this controller can be called by `window.SDK.tool.{method-name}`\n */\nexport class ToolController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method sets the currently used tool\n * @param tool\n */\n setTool = async (tool: ToolType) => {\n const res = await this.#editorAPI;\n return res.setTool(tool).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method returns selected tool\n */\n getSelected = async () => {\n const res = await this.#editorAPI;\n return res.getSelectedTool().then((result) => getEditorResponseData<ToolType>(result));\n };\n\n /**\n * @deprecated\n * This method sets the used tool to the select tool.\n * This method is deprecated in favour of the setSelect tool setter.\n */\n setPointer = async () => {\n return this.setTool(ToolType.SELECT);\n };\n\n /**\n * This method sets the used tool to the select tool.\n */\n setSelect = async () => {\n return this.setTool(ToolType.SELECT);\n };\n\n /**\n * This method sets the used tool to the Move tool\n */\n setHand = async () => {\n return this.setTool(ToolType.HAND);\n };\n\n /**\n * This method sets the used tool to the Zoom tool\n */\n setZoom = async () => {\n return this.setTool(ToolType.ZOOM);\n };\n\n /**\n * This method sets the used tool to the TextFrame tool\n */\n setTextFrame = async () => {\n return this.setTool(ToolType.TEXT_FRAME);\n };\n\n /**\n * This method sets the used tool to the ImageFrame tool\n */\n setImageFrame = async () => {\n return this.setTool(ToolType.IMAGE_FRAME);\n };\n\n /**\n * This method sets the used tool to the ShapeRectangle tool\n */\n setShapeRect = async () => {\n return this.setTool(ToolType.SHAPE_RECT);\n };\n\n /**\n * This method sets the used tool to the ShapeEllipse tool\n */\n setShapeEllipse = async () => {\n return this.setTool(ToolType.SHAPE_ELLIPSE);\n };\n\n /**\n * This method sets the used tool to the ShapePolygon tool\n */\n setShapePolygon = async () => {\n return this.setTool(ToolType.SHAPE_POLYGON);\n };\n}\n","import SDK from '..';\nimport { EditorAPI } from '../types/CommonTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The UndoManagerController is responsible for all communication regarding the Undo-Manager.\n * Methods inside this controller can be called by `window.SDK.undoManager.{method-name}`\n */\nexport class UndoManagerController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n #advanced: AdvancedUndoManagerController;\n #sdk: SDK;\n\n /**\n * @ignore\n */\n constructor(children: EditorAPI, sdk: SDK) {\n this.#editorAPI = children;\n this.#sdk = sdk;\n this.#advanced = new AdvancedUndoManagerController(children);\n }\n\n /**\n * This method undoes the last operation\n * @returns\n */\n undo = async () => {\n const res = await this.#editorAPI;\n return res.undo().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method redoes the last operation\n * @returns\n */\n redo = async () => {\n const res = await this.#editorAPI;\n return res.redo().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method adds custom data that will be saved and restored when undoing and redoing.\n * Duplicate values are overwritten. The data is exposed via the onCustomUndoDataChanged event.\n *\n * @param key The key of the custom data\n * @param value The value of the custom data\n * @returns\n */\n addCustomData = async (key: string, value: string) => {\n const res = await this.#editorAPI;\n return res.setCustomUndoData(key, value, false).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Record any operations in the current scope. This will automatically begin\n * the undo operation. Once you leave the record scope, it will end the undo operation.\n * Even if you throw an exception inside the record scope it will still end it properly.\n * @returns\n */\n record = async (operationName: string, undoOperationCallback: (sdk: SDK) => Promise<void>) => {\n try {\n await this.#advanced.beginIfNoneActive(operationName);\n\n await undoOperationCallback(this.#sdk);\n\n await this.#advanced.end();\n } catch (error) {\n await this.#advanced.abort();\n throw error;\n }\n };\n\n /**\n * This method pauses the undo manager\n * @returns\n */\n pause = async () => {\n const res = await this.#editorAPI;\n return res.pause().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method resumes the undo manager\n * @returns\n */\n resume = async () => {\n const res = await this.#editorAPI;\n return res.resume().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method clears the undo stack\n * @returns\n */\n clear = async () => {\n const res = await this.#editorAPI;\n return res.clear().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Advanced undo manager functionality for manually controlling undo operations.\n * This will start a new undo operation.\n * This will throw an exception when there is already an undo operation recording.\n * @experimental This method is experimental and may change in future versions.\n * @returns\n */\n advanced = {\n /**\n * This will start a new undo operation.\n * This will throw an exception when there is already an undo operation recording.\n * @experimental This method is experimental and may change in future versions.\n * @returns\n */\n begin: async (operationName: string) => {\n return this.#advanced.begin(operationName);\n },\n\n /**\n * This will start a new undo operation if there is no other undo operation recording.\n * This does not throw.\n * @experimental This method is experimental and may change in future versions.\n * @returns\n */\n beginIfNoneActive: async (operationName: string) => {\n return this.#advanced.beginIfNoneActive(operationName);\n },\n\n /**\n * Ends the currently active recording operation.\n * If there is no recording operation currently running this will throw an exception.\n * @experimental This method is experimental and may change in future versions.\n * @returns\n */\n end: async () => {\n return this.#advanced.end();\n },\n\n /**\n * Aborts the currently active recording operation.\n * If there is no recording operation currently running this will throw an exception.\n * @experimental This method is experimental and may change in future versions.\n * @returns\n */\n abort: async () => {\n return this.#advanced.abort();\n },\n };\n}\n\nexport class AdvancedUndoManagerController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(children: EditorAPI) {\n this.#editorAPI = children;\n }\n\n /**\n * This will start a new undo operation.\n * This will throw an exception when there is already an undo operation recording.\n * @returns\n */\n begin = async (operationName: string) => {\n const res = await this.#editorAPI;\n return res.begin(operationName).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This will start a new undo operation if there is no other undo operation recording.\n * This does not throw.\n * @returns\n */\n beginIfNoneActive = async (operationName: string) => {\n const res = await this.#editorAPI;\n return res.beginIfNoneActive(operationName).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Ends the currently active recording operation.\n * If there is no recording operation currently running this will throw an exception.\n * @returns\n */\n end = async () => {\n const res = await this.#editorAPI;\n return res.end().then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Aborts the currently active recording operation.\n * If there is no recording operation currently running this will throw an exception.\n * @returns\n */\n abort = async () => {\n const res = await this.#editorAPI;\n return res.abort().then((result) => getEditorResponseData<null>(result));\n };\n}\n","export const round = (val: number, precision = 2) => {\n const hundred = Math.pow(10, precision);\n return Math.round(val * hundred) / hundred;\n};\n","import type { EditorAPI, Id } from '../types/CommonTypes';\nimport { WellKnownConfigurationKeys } from '../types/ConfigurationTypes';\nimport {\n FilePointer,\n UploadAssetValidationError,\n UploadAssetValidationErrorType,\n UploadValidationConfiguration,\n} from '../types/ConnectorTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { EnvironmentType } from '../utils/Enums';\nimport { round } from '../utils/MathUtils';\nimport { MeasurementUnit } from '../types/LayoutTypes';\n\n/**\n * The UtilsController exposes a set of useful utilities that can be used to make some repeated tasks a bit easier\n * Methods inside this controller can be called by `window.SDK.utils.{method-name}`\n */\nexport class UtilsController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n #localConfig: Map<string, string>;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI, localConfig: Map<string, string>) {\n this.#editorAPI = editorAPI;\n this.#localConfig = localConfig;\n }\n\n /**\n * This method can round a value to a certain precision, default is 2\n * @param val the value that needs to be rounded\n * @param precision the precision of the rounding operation\n * @returns the rounded value as a number\n */\n round = (val: number, precision?: number) =>\n getEditorResponseData<number>({\n data: String(round(val, precision)),\n success: true,\n status: 200,\n parsedData: null,\n });\n\n createEnvironmentBaseURL = (parameters: { type?: EnvironmentType; environment?: string; version?: string }) => {\n const { type = EnvironmentType.SANDBOX, environment = 'ft-nostress', version = '1' } = parameters;\n const host = type == EnvironmentType.SANDBOX ? 'chili-publish-sandbox' : 'chili-publish';\n return `https://${environment}.${host}.online/grafx/api/v${version}/environment/${environment}`;\n };\n\n /**\n * This method can help you stage a file to the CHILI GraFx Environment API for upload.\n * @param files The Files or Blobs to stage.\n * @param remoteConnectorId The connector ID from Environment API to stage the files for.\n * @param validationConfiguration The validation configuration to use for the files.\n * @returns Promise<FilePointer[]> referencing the staged data.\n */\n stageFiles = async (\n files: File[] | Blob[],\n remoteConnectorId: Id,\n validationConfiguration?: UploadValidationConfiguration,\n ): Promise<FilePointer[]> => {\n const envApiUrl = this.#localConfig.get(WellKnownConfigurationKeys.GraFxStudioEnvironmentApiUrl);\n if (!envApiUrl) {\n throw new Error('GraFx Studio Environment API URL is not set');\n }\n\n const stageUrl = `${envApiUrl}connectors/${remoteConnectorId}/stage`;\n\n const accessToken = this.#localConfig.get(WellKnownConfigurationKeys.GraFxStudioAuthToken);\n if (!accessToken) {\n throw new Error('GraFx Studio Auth Token is not set');\n }\n\n const formData = new FormData();\n\n // Add each file/blob to form data\n files.forEach((file, idx) => {\n const filename = file instanceof File ? file.name : `blob-${idx}`;\n formData.append('files', file, filename);\n });\n\n if (validationConfiguration) {\n formData.append(\n 'validationJson',\n JSON.stringify({\n allowedMimeTypes: validationConfiguration.mimeTypes,\n minDimensions: {\n width: validationConfiguration.minWidthPixels,\n height: validationConfiguration.minHeightPixels,\n },\n }),\n );\n }\n\n const response = await fetch(stageUrl, {\n method: 'POST',\n body: formData,\n headers: {\n Authorization: `Bearer ${accessToken}`,\n },\n });\n\n if (response.status === 422) {\n const data = await response.json();\n throw new UploadAssetValidationError(data.message, UploadAssetValidationErrorType.minDimension);\n }\n\n if (!response.ok) {\n throw new Error('Failed to stage files');\n }\n\n const data = await response.json();\n return data as FilePointer[];\n };\n\n /**\n * Evaluates a unit expression and returns its value as a number in the\n * specified conversionUnit, or in the current layout measurement unit if\n * conversionUnit is not provided.\n *\n * Returns null if unitExpression is null, empty, or cannot be evaluated.\n *\n * Example:\n * ```\n * const value = await SDK.utils.unitEvaluate('10cm', MeasurementUnit.px);\n * // value is the numeric value in px\n * ```\n *\n * @param unitExpression The unit expression to evaluate (e.g., \"10px\", \"5mm + 2cm\", null)\n * @param conversionUnit Optional target unit for conversion. If not provided, uses the current layout measurement unit.\n * @returns The evaluated result as a number, or null if the expression cannot be evaluated\n */\n unitEvaluate = async (unitExpression: string | null, conversionUnit?: MeasurementUnit) => {\n const res = await this.#editorAPI;\n return res\n .unitEvaluate(unitExpression, conversionUnit)\n .then((result) => getEditorResponseData<number | null>(result));\n };\n}\n","import {\n DataSourceVariable,\n DataSourceVariableSourceType,\n InjectedDataSourceVariableSource,\n Variable,\n VariableType,\n} from '../types/VariableTypes';\n\nconst isDataSourceVariable = (variable: Variable): variable is DataSourceVariable => {\n return variable.type === VariableType.dataSource;\n};\nexport const isInjectedDataSourceVariable = (\n variable: Variable | null,\n): variable is DataSourceVariable & { value: InjectedDataSourceVariableSource } => {\n if (!variable) {\n return false;\n }\n return isDataSourceVariable(variable) && variable?.value?.type === DataSourceVariableSourceType.injected;\n};\n","import { EditorAPI, EditorResponse, Id, PrivateData } from '../types/CommonTypes';\nimport { ConnectorRegistration } from '../types/ConnectorTypes';\nimport {\n BidirectionalDataPage,\n BidirectionalDataPageItem,\n DataItem,\n DataSourceVariableDataModel,\n Dictionary,\n} from '@chili-studio/connector-types';\nimport {\n DataSourceVariableDisplayOptionsType,\n DateRestriction,\n DateVariablePropertiesDeltaUpdate,\n Day,\n ListVariable,\n ListVariableItem,\n Locale,\n NumberVariablePropertiesDeltaUpdate,\n PrefixSuffixDeltaUpdate,\n RowId,\n Variable,\n VariableType,\n VariableUsagesReport,\n VariableVisibility,\n VariableVisibilityType,\n DataSourceVariableSourceType,\n} from '../types/VariableTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { ConnectorCompatibilityTools } from '../utils/ConnectorCompatibilityTools';\nimport { EditorDataPage } from '../types/DataConnectorTypes';\nimport { DataItemMappingTools, EngineDataItem } from '../utils/DataItemMappingTools';\nimport { throwEditorResponseError, throwVariableException } from '../exceptions';\nimport { isInjectedDataSourceVariable } from '../utils/VariableHelper';\n\nclass NumberVariable {\n #editorAPI: EditorAPI;\n\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * @experimental Sets the minimum value for a number variable\n * @param id the id of the variable to update\n * @param minimum the minimum value or null to remove the minimum value\n * @returns\n */\n setMinimum = async (id: string, minimum: number | null) => {\n const update = { minValue: { value: minimum } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n /**\n * @experimental Sets the maximum value for a number variable\n * @param id the id of the variable to update\n * @param maximum the maximum value or null to remove the maximum value\n * @returns\n */\n setMaximum = async (id: string, maximum: number | null) => {\n const update = { maxValue: { value: maximum } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n /**\n * @experimental Sets the visibility of the stepper for a number variable\n * @param id the id of the variable to update\n * @param showStep true to show the stepper, false to hide it\n * @returns\n */\n setShowStepper = async (id: string, showStepper: boolean) => {\n const update = { showStepper: { value: showStepper } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n /**\n * @experimental Sets the step size for a number variable\n * @param id the id of the variable to update\n * @param stepSize the step size. Must be > 0\n * @returns\n */\n setStepSize = async (id: string, stepSize: number) => {\n const update = { stepSize: { value: stepSize } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n /**\n * @experimental Sets the thousands separator for a number variable\n * @param id the id of the variable to update\n * @param thousandsSeparator the thousands separator to use\n * @returns\n */\n setThousandsSeparator = async (id: string, thousandsSeparator: '' | '.' | ',' | ' ') => {\n const update = { thousandsSeparator: { value: thousandsSeparator } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n /**\n * @experimental Sets the decimal separator for a number variable\n * @param id the id of the variable to update\n * @param decimalSeparator the decimal separator to use\n * @returns\n */\n setDecimalSeparator = async (id: string, decimalSeparator: '' | '.' | ',' | ' ') => {\n const update = { decimalSeparator: { value: decimalSeparator } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n /**\n * @experimental Sets or clears the decimal character style for a number variable\n * @param id the id of the variable to update\n * @param characterStyleId the id of the character style to use/clear for the decimals\n * @returns\n */\n setDecimalCharacterStyle = async (id: string, characterStyleId: string | null) => {\n const update = { decimalCharacterStyleId: { value: characterStyleId } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n /**\n * @experimental Sets the number of decimals for a number variable\n * @param id the id of the variable to update\n * @param numberOfDecimals the number of decimals to use\n * @returns\n */\n setNumberOfDecimals = async (id: string, numberOfDecimals: 0 | 1 | 2 | 3 | 4) => {\n const update = { numberOfDecimals: { value: numberOfDecimals } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n private async applyPropertiesUpdate(id: string, update: NumberVariablePropertiesDeltaUpdate) {\n const res = await this.#editorAPI;\n const result = await res.updateNumberVariableProperties(id, JSON.stringify(update));\n return getEditorResponseData<null>(result);\n }\n}\n\nclass DateVariable {\n #editorAPI: EditorAPI;\n\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * @experimental This method sets the display format for a date variable.\n *\n * The `displayFormat` is using ICU formatting (Unicode).\n *\n * Supported date formats:\n * - Day -> `d`, `dd`\n * - Month -> `M`, `MM`, `MMM`, `MMMM`\n * - Year -> `yy`, `yyyy`\n * - Day of week -> `ccc`, `cccc`\n *\n * Examples for an input date of `10-12-1815`:\n * - Format `dd/MM/yyyy` will display `12/10/1815`\n * - Format `d.M.yy` will display `12.10.15`\n * - Format `d MMM yyyy` will display `12 Oct 1815` for the `en_US` language\n * - Format `MMMM d, yyyy` will display `October 12, 1815` for the `en_US` language\n * - Format `ccc, MMM d, yyyy` will display `Thu, Oct 12, 1815` for the `en_US` language\n * - Format `cccc, MMMM d, yyyy` will display `Thursday, October 12, 1815` for the `en_US` language\n * - Format `cccc, MMMM d, yyyy` will display `donderdag, oktober 12, 1815` for the `nl` language\n *\n * Patterns which output words such as `MMM`, `MMMM`, `ccc` and `cccc` will\n * differ depending on chosen language (default is `en_US`).\n *\n * @param id The id of the date variable to update\n * @param displayFormat The display format for the date variable\n */\n setDisplayFormat = async (id: string, displayFormat: string) => {\n const update = { displayFormat: { value: displayFormat } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n /**\n * @experimental This method sets the locale for a date variable.\n *\n * @param id The id of the date variable to update\n * @param locale The locale for the date variable (`'en_US'`, `'fi'`, `'fr'`...)\n */\n setLocale = async (id: string, locale: Locale) => {\n const update = { locale: { value: locale } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n /**\n * @experimental This method sets or clears the start date for a date variable.\n * @param id The id of the date variable to update\n * @param date The start date for the date variable\n */\n setStartDate = async (id: string, date: DateRestriction | null) => {\n const update = { startDate: { value: date } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n /**\n * @experimental This method sets or clears the end date for a date variable.\n * @param id The id of the date variable to update\n * @param date The end date for the date variable\n */\n setEndDate = async (id: string, date: DateRestriction | null) => {\n const update = { endDate: { value: date } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n /**\n * @experimental This method sets or clears the excluded days for a date variable.\n * @param id The id of the date variable to update\n * @param excludedDays The excluded days for the date variable\n */\n setExcludedDays = async (id: string, excludedDays: Day[] | null) => {\n const update = { excludedDays: { value: excludedDays } };\n return this.applyPropertiesUpdate(id, update);\n };\n\n private async applyPropertiesUpdate(id: string, update: DateVariablePropertiesDeltaUpdate) {\n const res = await this.#editorAPI;\n const result = await res.updateDateVariableProperties(id, JSON.stringify(update));\n return getEditorResponseData<null>(result);\n }\n}\n\nclass DataSourceVariable {\n #editorAPI: EditorAPI;\n #dataItemMappingTools: DataItemMappingTools;\n\n constructor(editorAPI: EditorAPI, dataItemMappingTools: DataItemMappingTools) {\n this.#editorAPI = editorAPI;\n this.#dataItemMappingTools = dataItemMappingTools;\n }\n\n /**\n * Sets the value for a data source variable.\n *\n * @param id the id of the data source variable to update\n * @param value the value to set for the data source variable. This can be a list of records, when we set the data for the data source variable in injected data mode\n * or a single record id, when we have to change the selected record value .\n * @returns\n */\n setValue = async (id: string, value: RowId | DataItem[]) => {\n const res = await this.#editorAPI;\n let engineValue: string | EngineDataItem[];\n if (Array.isArray(value)) {\n engineValue = value.map((item) => this.#dataItemMappingTools.mapDataItemToEngine(item));\n } else {\n engineValue = value;\n }\n return res.setVariableValue(id, engineValue).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Sets how the data source variable is displayed in the UI (table or list with optional display column).\n * @param variableId The id of the data source variable to update\n * @param displayOptionsType Whether to show the full table or a single column (list)\n * @param displayColumn Column name when displayOptionsType is list\n * @returns\n */\n setDisplayOptions(\n variableId: string,\n displayOptionsType: DataSourceVariableDisplayOptionsType.table,\n ): Promise<EditorResponse<null>>;\n setDisplayOptions(\n variableId: string,\n displayOptionsType: DataSourceVariableDisplayOptionsType.list,\n displayColumn: string,\n ): Promise<EditorResponse<null>>;\n async setDisplayOptions(\n variableId: string,\n displayOptionsType: DataSourceVariableDisplayOptionsType,\n displayColumn?: string,\n ) {\n const res = await this.#editorAPI;\n return res\n .setDataSourceVariableDisplayOptions(variableId, displayOptionsType, displayColumn ?? undefined)\n .then((result) => getEditorResponseData<null>(result));\n }\n\n /**\n * Get the injected data from a data source variable. This only works for data source variables\n * that are in injected data mode. If no data is set, an empty list will be returned.\n * @param variableId the id of the variable\n * @returns a DataPage with an array of data objects\n */\n getInjectedData = async (variableId: string): Promise<EditorResponse<BidirectionalDataPage>> => {\n const res = await this.#editorAPI;\n return res\n .getInjectedDataSourceVariableData(variableId)\n .then((result) => getEditorResponseData<EditorDataPage<EngineDataItem>>(result))\n .then((resp) => {\n const update: EditorResponse<BidirectionalDataPage> = { ...resp, parsedData: null };\n if (resp.parsedData) {\n update.parsedData = {\n ...resp.parsedData,\n data: resp.parsedData.data.map((e: EngineDataItem) =>\n this.#dataItemMappingTools.mapEngineToDataItem(e),\n ),\n };\n }\n return update;\n });\n };\n\n /**\n * Get a single item from injected data of a data source variable. This only works for data source variables\n * that are in injected data mode.\n * @param variableId the id of the variable\n * @param itemId the id of the item to get\n * @returns a BidirectionalDataPageItem with the item and empty navigation tokens\n */\n getInjectedItemById = async (\n variableId: string,\n itemId: string,\n ): Promise<EditorResponse<BidirectionalDataPageItem>> => {\n const res = await this.#editorAPI;\n\n const variable = await res\n .getVariableById(variableId)\n .then((result) => getEditorResponseData<Variable>(result));\n\n if (!isInjectedDataSourceVariable(variable.parsedData)) {\n throwEditorResponseError({\n success: false,\n status: 400,\n error: `Variable is not an injected data source variable`,\n parsedData: null,\n });\n }\n\n const itemIdPropertyName = variable.parsedData.value.itemIdPropertyName;\n\n const injectedData = await this.getInjectedData(variableId);\n\n const item = injectedData.parsedData?.data.find(\n (item) => item[itemIdPropertyName]?.toString() === itemId.toString(),\n );\n\n if (!item) {\n throwEditorResponseError({\n success: false,\n status: 404,\n error: `Item not found in injected data for variable ${variableId}`,\n parsedData: null,\n });\n }\n return {\n success: true,\n status: 200,\n parsedData: {\n data: item,\n continuationToken: null,\n previousPageToken: null,\n },\n };\n };\n\n /**\n * Sets the model for a data source variable. This only works for data source variables\n * that are in injected data mode.\n *\n * @param variableId the id of the data source variable to update\n * @param value the model to set for the data source variable\n * @returns\n */\n setInjectedModel = async (variableId: string, value: DataSourceVariableDataModel) => {\n const model = value.properties;\n const itemIdPropertyName = value.itemIdPropertyName;\n const res = await this.#editorAPI;\n return res\n .setInjectedDataSourceVariableModel(variableId, JSON.stringify(model), itemIdPropertyName)\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Sets the source type for a data source variable.\n *\n * @param variableId the id of the data source variable to update\n * @param sourceType the source type to set for the data source variable\n * @returns\n */\n setSourceType = async (variableId: string, sourceType: DataSourceVariableSourceType) => {\n const res = await this.#editorAPI;\n return res\n .setDataSourceVariableSourceType(variableId, sourceType)\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Sets the connector for a data source variable. This only works for data source variables\n * that are in connector source type.\n *\n * @param variableId the id of the data source variable to update\n * @param registration the connector registration to set for the data source variable\n * @returns The new id of the connector\n */\n setConnector = async (variableId: string, registration: ConnectorRegistration) => {\n const res = await this.#editorAPI;\n const connectorCompatibilityTools = new ConnectorCompatibilityTools();\n const connectorRegistration = connectorCompatibilityTools.makeConnectorSourceForwardsCompatible(registration);\n return res\n .setDataSourceVariableConnector(variableId, JSON.stringify(connectorRegistration))\n .then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * Removes the connector for a data source variable. This only works for data source variables\n * that are in connector source type.\n *\n * @param variableId the id of the data source variable to update\n * @returns\n */\n removeConnector = async (variableId: string) => {\n const res = await this.#editorAPI;\n return res\n .setDataSourceVariableConnector(variableId, null)\n .then((result) => getEditorResponseData<null>(result));\n };\n}\n\n/**\n * The VariableController is responsible for all communication regarding the variables.\n * Methods inside this controller can be called by `window.SDK.variable.{method-name}`\n */\nexport class VariableController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n number: NumberVariable;\n date: DateVariable;\n /**\n * @experimental\n * This controller is experimental and might change in future releases.\n * Use at your own risk.\n */\n dataSource: DataSourceVariable;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI, dataItemMappingTools: DataItemMappingTools) {\n this.#editorAPI = editorAPI;\n this.number = new NumberVariable(this.#editorAPI);\n this.date = new DateVariable(this.#editorAPI);\n this.dataSource = new DataSourceVariable(this.#editorAPI, dataItemMappingTools);\n }\n\n /**\n * This method returns the list of variables\n * @returns\n */\n getAll = async () => {\n const res = await this.#editorAPI;\n return res\n .getVariables()\n .then((result) => getEditorResponseData<Variable[]>(result))\n .then((resp) => {\n const update = resp;\n if (update.parsedData) {\n update.parsedData = this.makeVariablesBackwardsCompatible(update.parsedData);\n }\n return update;\n });\n };\n\n /**\n * This method returns a variable by id\n * @param id the id of a specific variable\n * @returns\n */\n getById = async (id: string) => {\n const res = await this.#editorAPI;\n return res\n .getVariableById(id)\n .then((result) => getEditorResponseData<Variable>(result))\n .then((resp) => {\n const update = resp;\n if (update.parsedData) {\n update.parsedData = this.makeVariableBackwardsCompatible(update.parsedData);\n }\n return update;\n });\n };\n\n /**\n * This method returns a variable by name\n * @param name the name of a specific variable\n * @returns\n */\n getByName = async (name: string) => {\n const res = await this.#editorAPI;\n return res\n .getVariableByName(name)\n .then((result) => getEditorResponseData<Variable>(result))\n .then((resp) => {\n const update = resp;\n if (update.parsedData) {\n update.parsedData = this.makeVariableBackwardsCompatible(update.parsedData);\n }\n return update;\n });\n };\n\n /**\n * This method creates a new variable\n * @param parentId parent id of the created variable\n * @param type type of the created variable\n * @returns the new created variable id\n */\n create = async (parentId: string, type: VariableType) => {\n const res = await this.#editorAPI;\n return res.addVariable(parentId, type).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method removes a list of variables.\n *\n * All connectors linked to the variables will be unregistered.\n * @param ids list of the variables to be removed\n * @returns\n */\n remove = async (ids: string[]) => {\n const res = await this.#editorAPI;\n return res.removeVariables(ids).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets a new name for a variable\n * @param id id of the variable\n * @param name name of the variable\n * @returns\n */\n rename = async (id: string, name: string) => {\n const res = await this.#editorAPI;\n return res.setVariableName(id, name).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets a new label for a variable\n * @param id id of the variable\n * @param label label of the variable\n * @returns\n */\n setLabel = async (id: string, label: string | null) => {\n const res = await this.#editorAPI;\n return res.setVariableLabel(id, label).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Internal private method to set/reset a placeholder for a variable\n */\n #setPlaceholder = async (id: string, placeholder: string | null) => {\n const res = await this.#editorAPI;\n return res.setVariablePlaceholder(id, placeholder).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets a new placeholder for a variable\n * @param id id of the variable\n * @param placeholder placeholder of the variable\n * @returns\n */\n setPlaceholder = async (id: string, placeholder: string) => {\n return this.#setPlaceholder(id, placeholder);\n };\n\n /**\n * This method resets a placeholder for a variable\n * @param id id of the variable\n * @returns\n */\n resetPlaceholder = async (id: string) => {\n return this.#setPlaceholder(id, null);\n };\n\n /**\n * Internal private method to set/reset a help text for a variable\n */\n #setHelpText = async (id: string, helpText: string | null) => {\n const res = await this.#editorAPI;\n return res.setVariableHelpText(id, helpText).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets a new help text for a variable\n * @param id id of the variable\n * @param helpText placeholder of the variable\n * @returns\n */\n setHelpText = async (id: string, helpText: string) => {\n return this.#setHelpText(id, helpText);\n };\n\n /**\n * This method resets a help text for a variable\n * @param id id of the variable\n * @returns\n */\n resetHelpText = async (id: string) => {\n return this.#setHelpText(id, null);\n };\n\n /**\n * This method sets a new type for a variable\n * @param id id of the variable\n * @param type type of the variable\n * @returns\n */\n setType = async (id: string, type: VariableType) => {\n const res = await this.#editorAPI;\n return res.setVariableType(id, type).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the items of the list variable\n *\n * The items need to be unique and are not case sensitive.\n *\n * @param id the id of the list variable\n * @param items the items of the list\n * @returns\n */\n setListVariable = async (id: Id, items: string[]) => {\n const res = await this.#editorAPI;\n return res\n .setListVariableItems(\n id,\n items.map((item) => JSON.stringify(<ListVariableItem>{ value: item })),\n )\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets a new value for a variable\n *\n * If the value is some text to be set on a ShortTextVariable, it must not\n * contain any type of line breaks.\n *\n * If the value is passing a context on an image variable value, it will be\n * available from the connector.\n *\n * @param id the id of the variable\n * @param value the new value of the variable\n * @returns\n */\n setValue = async (id: Id, value: string | boolean | number | null) => {\n const res = await this.#editorAPI;\n return res\n .setVariableValue(id, value)\n .then((result) => getEditorResponseData<null>(result, (r) => throwVariableException(r, { id })));\n };\n\n /**\n * This method creates a copy of a variable\n * @returns\n */\n duplicate = async (id: string) => {\n const res = await this.#editorAPI;\n return res.duplicateVariable(id).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method aggregates the provided variables into a new group\n * @param name name of the new group\n * @param ids list of variable ids to group together\n * @returns group id\n */\n groupVariables = async (name: string, ids: string[]) => {\n const res = await this.#editorAPI;\n return res.groupVariables(name, ids).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method dissolves the specified group\n * @param id id of the variable group\n * @returns\n */\n ungroupVariables = async (id: string) => {\n const res = await this.#editorAPI;\n return res.ungroupVariable(id).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method moves a variable's position\n * @param order new order of variable\n * @param id id of the variable\n * @param parentId parent id of the created variable\n * @returns\n */\n move = async (order: number, id: string, parentId: string) => {\n const res = await this.#editorAPI;\n return res.moveVariable(id, parentId, order).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method changes positions of variables\n * @param order new order of variable\n * @param ids Array of the variable IDs\n * @param parentId parent id of the variables\n * @returns\n */\n moveVariables = async (order: number, ids: string[], parentId: string) => {\n const res = await this.#editorAPI;\n return res.moveVariables(ids, parentId, order).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @deprecated Use `setVariableVisibility` instead.\n * This method redirects to `setVariableVisibility` and sets visibility config for a variable by id.\n * @param id variable id\n * @param isVisible visibility flag\n * @returns\n */\n setIsVisible = async (id: string, isVisible: boolean) => {\n const config = isVisible\n ? { type: VariableVisibilityType.visible }\n : { type: VariableVisibilityType.invisible };\n\n return this.setVariableVisibility(id, config as VariableVisibility);\n };\n\n /**\n * @deprecated Use `setVariableVisibility` instead.\n * This method redirects to `setVariableVisibility` and sets visibility config for a variable by id.\n * @param id variable id\n * @param isHidden visibility flag\n * @returns\n */\n setIsHidden = async (id: string, isHidden: boolean) => {\n const config = isHidden ? { type: VariableVisibilityType.invisible } : { type: VariableVisibilityType.visible };\n\n return this.setVariableVisibility(id, config as VariableVisibility);\n };\n\n /**\n * This method sets visibility config for a variable by id\n * @param id variable id\n * @param config visibility config\n * @returns\n */\n setVariableVisibility = async (id: string, config: VariableVisibility) => {\n const res = await this.#editorAPI;\n return res\n .setVariableVisibility(id, JSON.stringify(config))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets which layouts are considered for variable visibility\n * @param layoutIdList nullable layout id list.\n * Pass null to reset to follow selected layout.\n * @returns\n */\n setLayoutsForVariableVisibility = async (layoutIdList?: Id[] | null) => {\n const res = await this.#editorAPI;\n return res\n .setLayoutsForVariableVisibility(layoutIdList ? JSON.stringify(layoutIdList) : null)\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets isRequired flag for a variable\n * @returns\n */\n setIsRequired = async (id: string, isRequired: boolean) => {\n const res = await this.#editorAPI;\n return res.setVariableIsRequired(id, isRequired).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets removeParagraphIfEmpty flag for a variable\n * @param id The id of the variable to update\n * @param removeParagraphIfEmpty Set to true to remove the paragraph if it is empty, or false to keep it\n * @returns\n */\n setRemoveParagraphIfEmpty = async (id: string, removeParagraphIfEmpty: boolean) => {\n const res = await this.#editorAPI;\n return res\n .setVariableRemoveParagraphIfEmpty(id, removeParagraphIfEmpty)\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets maxCharacters limit on a text variable\n * @param id The id of the variable to update\n * @param maxCharacters Sets the max number of characters for that variable\n * maxCharacters > 0 && maxCharacters <= 100000000 or it can be set to null\n * @returns\n */\n setVariableCharacterLimit = async (id: string, maxCharacters: number | null) => {\n const res = await this.#editorAPI;\n return res.setVariableCharacterLimit(id, maxCharacters).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets isReadonly flag for a variable\n * @returns\n */\n setIsReadonly = async (id: string, isReadonly: boolean) => {\n const res = await this.#editorAPI;\n return res.setVariableIsReadonly(id, isReadonly).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method gets the image variable connector id.\n * @param id The id of the image variable\n * @returns The id of the connector\n */\n getImageVariableConnectorId = async (id: string) => {\n const res = await this.#editorAPI;\n return res.getImageVariableConnectorId(id).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method sets the image variable connector. Setting a connector will\n * automatically remove the assetId linked to the connector if present.\n * If a connector was the source of the variable, it will be unregistered.\n * @param id The id of the image variable to update\n * @param registration registration object containing all details about the connector\n * @returns The new id of the connector\n */\n setImageVariableConnector = async (id: string, registration: ConnectorRegistration) => {\n const res = await this.#editorAPI;\n const connectorCompatibilityTools = new ConnectorCompatibilityTools();\n const connectorRegistration = connectorCompatibilityTools.makeConnectorSourceForwardsCompatible(registration);\n\n return res\n .setImageVariableConnector(id, JSON.stringify(connectorRegistration))\n .then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method sets the value of an image variable along with its context in a single atomic operation\n * @param id the id of the image variable to update\n * @param value the new value of the image variable\n * @param context the context dictionary\n * @returns\n */\n setImageVariableValueWithContext = async (id: string, value: string | null, context: Dictionary) => {\n const res = await this.#editorAPI;\n return res\n .setImageVariableValueWithContext(id, value, JSON.stringify(context))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * @deprecated use `setValue` instead and pass `null` as the value argument.\n *\n * This method removes the variable source\n * @param id the id of the variable to update\n */\n removeSource = async (id: string) => {\n return this.setValue(id, null);\n };\n\n /**\n * @experimental Sets the prefix for a supported variable\n * @param id the id of the variable to update\n * @param prefix the prefix to set/clear\n * @returns\n */\n setPrefix = async (id: string, prefix: string | null) => {\n const update = { prefix: { value: prefix } };\n return this.applyPrefixSuffixDeltaUpdate(id, update);\n };\n\n /**\n * @experimental Sets the suffix for a supported variable\n * @param id the id of the variable to update\n * @param suffix the suffix to set/clear\n * @returns\n */\n setSuffix = async (id: string, suffix: string | null) => {\n const update = { suffix: { value: suffix } };\n return this.applyPrefixSuffixDeltaUpdate(id, update);\n };\n\n /**\n * @experimental Sets the prefix character style for a supported variable\n * @param id the id of the variable to update\n * @param characterStyleId the id of the character style to use/clear for the prefix\n * @returns\n */\n setPrefixCharacterStyle = async (id: string, characterStyleId: string | null) => {\n const update = { prefixCharacterStyleId: { value: characterStyleId } };\n return this.applyPrefixSuffixDeltaUpdate(id, update);\n };\n\n /**\n * @experimental Sets the suffix character style for a supported variable\n * @param id the id of the variable to update\n * @param characterStyleId the id of the character style to use/clear for the suffix\n * @returns\n */\n setSuffixCharacterStyle = async (id: string, characterStyleId: string | null) => {\n const update = { suffixCharacterStyleId: { value: characterStyleId } };\n return this.applyPrefixSuffixDeltaUpdate(id, update);\n };\n\n /**\n * Sets the private data for any variable\n * @param id the id of the variable to update\n * @param privateData the private data\n * @returns\n */\n setPrivateData = async (id: string, privateData: PrivateData) => {\n const res = await this.#editorAPI;\n return res\n .setVariablePrivateData(id, JSON.stringify(privateData))\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Gets the private data for any variable\n * @param id the id of the variable\n * @returns the private data\n */\n getPrivateData = async (id: string) => {\n const res = await this.#editorAPI;\n return res.getVariablePrivateData(id).then((result) => getEditorResponseData<PrivateData>(result));\n };\n\n /**\n * This method sets the allowQuery flag for an image variable\n * @param id the id of the variable\n * @param allowQuery the allowQuery flag\n * @returns\n */\n setAllowImageQuery = async (id: string, allowQuery: boolean) => {\n const res = await this.#editorAPI;\n return res.setImageVariableAllowQuery(id, allowQuery).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the allowUpload flag for an image variable\n * @param id the id of the variable\n * @param allowUpload the allowUpload flag\n * @returns\n */\n setAllowImageUpload = async (id: string, allowUpload: boolean) => {\n const res = await this.#editorAPI;\n return res.setImageVariableAllowUpload(id, allowUpload).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the minimum size (both width and height) for an image variable that will be uploaded\n * @param id the id of the variable\n * @param minWidth the minimum width\n * @param minHeight the minimum height\n * @returns\n */\n setMinImageUploadSize = async (id: string, minWidth: string | null, minHeight: string | null) => {\n const res = await this.#editorAPI;\n return res\n .setImageVariableUploadMinSize(id, minWidth, minHeight)\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * Sets the \"don't break\" flag for a short text variable. When set to true, the variable will not be split across lines.\n * @param id the id of the variable\n * @param isDontBreak the value of the \"don't break\" flag\n * @returns\n */\n setIsDontBreak = async (id: string, isDontBreak: boolean) => {\n const res = await this.#editorAPI;\n return res.setVariableIsDontBreak(id, isDontBreak).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method highlights the usages of a variable in\n * - pages\n * - frames\n * - actionTrigger\n * - variables\n * - outputDataSource\n * @param id the id of the variable\n * @returns the usages of the variable\n */\n highlightUsages = async (id: string): Promise<EditorResponse<VariableUsagesReport>> => {\n const res = await this.#editorAPI;\n return res.highlightVariableUsages(id).then((result) => getEditorResponseData<VariableUsagesReport>(result));\n };\n\n private makeVariablesBackwardsCompatible(variables: Variable[]) {\n return variables.map((variable) => {\n return this.makeVariableBackwardsCompatible(variable);\n });\n }\n\n private makeVariableBackwardsCompatible(variable: Variable) {\n if (variable.type !== VariableType.list) {\n return variable;\n }\n\n return this.makeListVariableBackwardsCompatible(variable as ListVariable);\n }\n\n private makeListVariableBackwardsCompatible(listVariable: ListVariable) {\n const updated = listVariable;\n\n const items = listVariable.items as unknown as ListVariableItem[];\n const selected = listVariable.selected as unknown as ListVariableItem | undefined;\n\n const newItems = items.map((item) => item.value);\n\n updated.items = newItems;\n updated.selected = selected?.value;\n\n return updated;\n }\n\n private async applyPrefixSuffixDeltaUpdate(id: string, update: PrefixSuffixDeltaUpdate) {\n const res = await this.#editorAPI;\n const result = await res.updateVariablePrefixSuffixProperties(id, JSON.stringify(update));\n return getEditorResponseData<null>(result);\n }\n}\n","import { EditorAPI } from '../../types/CommonTypes';\nimport { getEditorResponseData } from '../../utils/EditorResponseData';\nimport type { APIBrandKit, BrandKit } from '../types/BrandKitTypes';\n\n/**\n * Next BrandKitController: get/set use the same unified BrandKit type.\n * Methods in this controller are the future API and can be called when using the next initiator.\n */\nexport class BrandKitController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * Returns the current brand kit (unified BrandKit shape).\n * @returns The brand kit with all assigned resources\n */\n get = async () => {\n const res = await this.#editorAPI;\n return res.getBrandKit().then((result) => getEditorResponseData<BrandKit>(result));\n };\n\n /**\n * Updates the brand kit with the given API data. Returns the updated brand kit (BrandKit shape).\n * @param apiBrandKit - The brand kit data in API/environment format\n * @returns The updated brand kit\n */\n set = async (apiBrandKit: APIBrandKit) => {\n const res = await this.#editorAPI;\n return res.setBrandKit(JSON.stringify(apiBrandKit)).then((result) => getEditorResponseData<BrandKit>(result));\n };\n}\n","import { RuntimeConfigType } from '../../types/CommonTypes';\n\n/**\n * The SubscriberController is responsible for all listeners which can influence the application-state from outside.\n * Callbacks inside this controller can be set by `window.SDK.subscriber.{method-name}`\n */\nexport class SubscriberController {\n /**\n * @ignore\n */\n private config: RuntimeConfigType;\n\n /**\n * @ignore\n */\n constructor(config: RuntimeConfigType) {\n this.config = config;\n }\n\n /**\n * Listener on when variables change\n * @param variablesJson Stringified array of Variable\n */\n onVariableListChanged = (variablesJson: string) => {\n this.config.events.onVariableListChanged.trigger(JSON.parse(variablesJson));\n };\n\n /**\n * Listener on connectors, if this changes, this listener will get triggered with the updates\n * @param connectors Stringified array of ConnectorInstance type\n */\n onConnectorsChanged = (connectors: string) => {\n this.config.events.onConnectorsChanged.trigger(JSON.parse(connectors));\n };\n\n /**\n * Listener on page size, this listener will get triggered when the page size is changed, while the document is a `project`.\n * This will not emit anything if your document is a `template`.\n * @param pageSize Stringified object of the PageSize\n */\n onPageSizeChanged = (pageSize: string) => {\n this.config.events.onPageSizeChanged.trigger(JSON.parse(pageSize));\n };\n\n /**\n * Listener on engine edit mode, if this changes, this listener will get triggered with the updates\n * @param engineEditMode Stringified boolean of the EngineEditMode\n */\n onEngineEditModeChanged = (engineEditMode: string) => {\n this.config.events.onEngineEditModeChanged.trigger(JSON.parse(engineEditMode));\n };\n}\n","import { EditorAPI, Id } from '../../types/CommonTypes';\nimport { ListVariableItem, Variable } from '../../types/VariableTypes';\nimport { getEditorResponseData } from '../../utils/EditorResponseData';\nimport { Dictionary } from '@chili-studio/connector-types';\n\nimport {\n ConnectorGrafxRegistration,\n ConnectorLocalRegistration,\n ConnectorUrlRegistration,\n} from '../types/ConnectorTypes';\n\nexport class VariableController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n image: ImageVariableController;\n dataSource: DataSourceVariableController;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n this.image = new ImageVariableController(editorAPI);\n this.dataSource = new DataSourceVariableController(editorAPI);\n }\n\n /**\n * This method returns the list of variables\n * @returns\n */\n getAll = async () => {\n const res = await this.#editorAPI;\n return res.getVariables().then((result) => getEditorResponseData<Variable[]>(result));\n };\n\n /**\n * This method returns a variable by id\n * @param id the id of a specific variable\n * @returns\n */\n getById = async (id: string) => {\n const res = await this.#editorAPI;\n return res.getVariableById(id).then((result) => getEditorResponseData<Variable>(result));\n };\n\n /**\n * This method returns a variable by name\n * @param name the name of a specific variable\n * @returns\n */\n getByName = async (name: string) => {\n const res = await this.#editorAPI;\n return res.getVariableByName(name).then((result) => getEditorResponseData<Variable>(result));\n };\n\n /**\n * This method sets the items of the list variable\n *\n * The items need to be unique and are not case sensitive.\n *\n * @param id the id of the list variable\n * @param items the items of the list\n * @returns\n */\n setListVariable = async (id: Id, items: ListVariableItem[]) => {\n const res = await this.#editorAPI;\n return res\n .setListVariableItems(\n id,\n items.map((item) => JSON.stringify(item)),\n )\n .then((result) => getEditorResponseData<null>(result));\n };\n}\n\nexport class ImageVariableController {\n #editorAPI: EditorAPI;\n\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method sets the allow query for an image variable\n * @param id the id of the variable\n * @param allowQuery the allow query\n * @returns\n */\n setAllowQuery = async (id: string, allowQuery: boolean) => {\n const res = await this.#editorAPI;\n return res.setImageVariableAllowQuery(id, allowQuery).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the allow upload for an image variable\n * @param id the id of the variable\n * @param allowUpload the allow upload\n * @returns\n */\n setAllowUpload = async (id: string, allowUpload: boolean) => {\n const res = await this.#editorAPI;\n return res.setImageVariableAllowUpload(id, allowUpload).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the minimum size (both width and height) for an image variable that will be uploaded\n * @param id the id of the variable\n * @param minWidth the minimum width\n * @param minHeight the minimum height\n * @returns\n */\n setMinUploadSize = async (id: string, minWidth: string | null, minHeight: string | null) => {\n const res = await this.#editorAPI;\n return res\n .setImageVariableUploadMinSize(id, minWidth, minHeight)\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method sets the image variable connector. Setting a connector will\n * automatically remove the assetId linked to the connector if present.\n * If a connector was the source of the variable, it will be unregistered.\n * @param id The id of the image variable to update\n * @param registration registration object containing all details about the connector\n * @returns The new id of the connector\n */\n setConnector = async (\n id: string,\n registration: ConnectorLocalRegistration | ConnectorGrafxRegistration | ConnectorUrlRegistration,\n ) => {\n const res = await this.#editorAPI;\n\n return res\n .setImageVariableConnector(id, JSON.stringify(registration))\n .then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method sets the connector context for an image variable\n * @param id the id of the variable\n * @param context the context dictionary\n * @returns\n */\n setConnectorContext = async (id: string, context: Dictionary) => {\n const res = await this.#editorAPI;\n return res\n .setImageVariableConnectorContext(id, JSON.stringify(context))\n .then((result) => getEditorResponseData<null>(result));\n };\n}\n\nexport class DataSourceVariableController {\n #editorAPI: EditorAPI;\n\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n setConnector = async (\n id: string,\n registration: ConnectorLocalRegistration | ConnectorGrafxRegistration | ConnectorUrlRegistration,\n ) => {\n const res = await this.#editorAPI;\n return res\n .setDataSourceVariableConnector(id, JSON.stringify(registration))\n .then((result) => getEditorResponseData<Id>(result));\n };\n}\n","import {\n ConnectorGrafxRegistration,\n ConnectorInstance,\n ConnectorLocalRegistration,\n ConnectorType,\n ConnectorUrlRegistration,\n} from '../types/ConnectorTypes';\nimport { getEditorResponseData } from '../../utils/EditorResponseData';\nimport { EditorAPI, Id } from '../../types/CommonTypes';\n\n/**\n * The ConnectorController manages lifetime of all available connectors, regardless of the type, in the\n * document. Use it to add/remove connectors to a template, or set specific configuration.\n *\n * The way CHILI Studio handles different sources of resources is called 'Connectors'. A Connectors is an\n * implementation of a set of capabilities we need to interact with a certain external resource management system.\n * In essence a connector is the combination of a Javascript snippet and some metadata. The Javascript snippet\n * is loaded in the studio engine using a sandboxed Javascript execution engine (QuickJs). This allows us to\n * execute the media connector both on web using webassembly and on the server side during e.g. animation output\n * generation.\n * This controller is an interface to the running connector instance inside the studio engine. The engine will\n * automatically register the 'grafx-media' and 'grafx-font' connectors. Custom connectors need to be registered\n * manually.\n */\nexport class ConnectorController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * Registers a new connector in the SDK. After successful registration, depending\n * on the connector type, the connector can be configured and used in the template\n * Remember to add custom authentication information after registering the connector\n * @param registration registration object containing all details about the connector\n * @returns the Id of the newly created connector, this Id should be used going forward.\n */\n register = async (\n registration: ConnectorGrafxRegistration | ConnectorUrlRegistration | ConnectorLocalRegistration,\n ) => {\n const res = await this.#editorAPI;\n\n return res.registerConnector(JSON.stringify(registration)).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * Gets a connector by its id\n * @param id the id of the connector\n * @returns connector\n */\n getById = async (id: Id) => {\n const res = await this.#editorAPI;\n return res.getConnectorById(id).then((result) => getEditorResponseData<ConnectorInstance>(result));\n };\n\n /**\n * Gets all available connectors of a 'ConnectorType'\n * @param type type of connector you want to get\n * @returns list of all available connectors of a 'ConnectorType'\n */\n getAllByType = async (type: ConnectorType) => {\n const res = await this.#editorAPI;\n return res.getConnectors(type).then((result) => getEditorResponseData<ConnectorInstance[]>(result));\n };\n}\n","import { EditorAPI, EditorRawAPI } from '../../types/CommonTypes';\nimport { getEditorResponseData } from '../../utils/EditorResponseData';\nimport { CallSender } from 'penpal';\n\n/**\n * The PageController is responsible for all communication regarding Pages.\n * Methods inside this controller can be called by `window.SDK.page.{method-name}`\n */\nexport class PageController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n #blobAPI: EditorRawAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n this.#blobAPI = editorAPI as CallSender as EditorRawAPI;\n }\n\n /**\n * This method will set the width of all pages to a specific value.\n * This only works if the document is a project.\n * @param width the string value that will be calculated (f.e. 1+1 will result in 2) The default unit is in the current layout unit (e.g. px, mm, in)\n * @returns\n */\n setWidth = async (width: string) => {\n const res = await this.#editorAPI;\n return res.setPageWidth(width).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method will set the height of all pages to a specific value.\n * This only works if the document is a project.\n * @param height the string value that will be calculated (f.e. 1+1 will result in 2). The default unit is in the current layout unit (e.g. px, mm, in)\n * @returns\n */\n setHeight = async (height: string) => {\n const res = await this.#editorAPI;\n return res.setPageHeight(height).then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { Connection } from 'penpal';\nimport { EditorAPI, RuntimeConfigType } from '../types/CommonTypes';\nimport { BrandKitController } from './controllers/BrandKitController';\nimport { SubscriberController } from './controllers/SubscriberController';\nimport { VariableController } from './controllers/VariableController';\nimport { ConnectorController } from './controllers/ConnectorController';\nimport { PageController } from './controllers/PageController';\nimport { CanvasController } from '../controllers/CanvasController';\n\n/**\n * The next initiator is a split off on SDK level to tag next features.\n * The principle is that all breaking changes that we are anticipating, come into this section of the SDK.\n * This allows us to introduce breaking changes before bumping the SDK Major version, since we want to bundle some of them.\n * This way our major version can stay stable for longer, without sacrificing the flexibility we need to innovate.\n * Together with a major update, the functions and additions in this part of the SDK will be moved to the main part.\n * If you're using the next controller, you might need to import the typings also from the next types.\n * this can be referenced in your application as @chili-publish/studio-sdk/lib/src/next\n */\nexport class NextInitiator {\n private config: RuntimeConfigType;\n private connection: Connection;\n\n /**\n * @ignore\n */\n private editorAPI: EditorAPI;\n\n subscriber: SubscriberController;\n variable: VariableController;\n connector: ConnectorController;\n page: PageController;\n canvas: CanvasController;\n brandKit: BrandKitController;\n\n /**\n * The next initiator is a split off on SDK level to tag next features\n * The SDK should be configured clientside and it exposes all controllers to work with in other applications\n * @param config The configuration object where the SDK and editor can get configured\n */\n constructor(config: RuntimeConfigType, connection: Connection, editorAPI: EditorAPI) {\n this.config = config;\n this.connection = connection;\n this.editorAPI = editorAPI;\n\n this.subscriber = new SubscriberController(config);\n this.variable = new VariableController(this.editorAPI);\n this.connector = new ConnectorController(this.editorAPI);\n this.page = new PageController(this.editorAPI);\n this.canvas = new CanvasController(this.editorAPI);\n this.brandKit = new BrandKitController(this.editorAPI);\n }\n}\n","import { CallSender } from 'penpal';\nimport { ConnectorInstance, DocumentAction, DocumentFontFamily, ToolType, ViewMode } from '..';\nimport { EngineCallbackHandler } from '../utils/EngineCallbackHandler';\nimport { EngineEvent } from '../utils/EngineEvent';\nimport { AnimationPlaybackType, FrameAnimationType } from './AnimationTypes';\nimport { BarcodeFrameValidationResult } from './BarcodeTypes';\nimport { CharacterStyle } from './CharacterStyleTypes';\nimport { DocumentColor } from './ColorStyleTypes';\nimport { StudioOptionsDeltaUpdate, StudioStyling } from './ConfigurationTypes';\nimport { AuthCredentials, AuthRefreshRequest, ConnectorEvent } from './ConnectorTypes';\nimport { DocumentIssue, DocumentType, UndoState } from './DocumentTypes';\nimport { EngineEditMode } from './EngineEditModeTypes';\nimport type { FrameType } from './FrameTypes';\nimport { Frame, FrameLayoutType, FrameTypeEnum } from './FrameTypes';\nimport { LayoutListItemType, LayoutPropertiesType, LayoutWithFrameProperties, MeasurementUnit } from './LayoutTypes';\nimport { Page, PageSize } from './PageTypes';\nimport { ParagraphStyle } from './ParagraphStyleTypes';\nimport { CornerRadiusUpdateModel } from './ShapeTypes';\nimport { SelectedTextStyle } from './TextStyleTypes';\nimport { Variable } from './VariableTypes';\nimport { Viewport } from './ViewportTypes';\nimport { BrandKitMedia } from './BrandKitTypes';\nimport { AsyncError } from '../exceptions';\n\nexport type Id = string;\nexport type BaseConfigType = {\n editorLink?: string;\n editorId?: string;\n chiliEnvironmentUrl?: string;\n documentType?: DocumentType;\n studioStyling?: StudioStyling;\n studioOptions?: StudioOptionsDeltaUpdate;\n /**\n * Whether the engine should cache query calls.\n * When enabled it will cache the query calls regardless of the cache control headers.\n */\n enableQueryCallCache?: boolean;\n enableNextSubscribers?: {\n onVariableListChanged: boolean;\n };\n logging?: {\n logLevel?: LogLevel;\n logger?: LoggerFunction;\n };\n /**\n * Callback function that is called when an error occurs during iframe setup or connection.\n * @param error The error that occurred during setup or connection\n */\n onConnectionError?: (error: Error) => void;\n};\n\nexport type LoggerFunction = (logLevel: LogLevel, category: LogCategory, message: string) => void;\n\nexport enum LogLevel {\n info = 'info',\n warn = 'warn',\n error = 'error',\n}\n\nexport enum LogCategory {\n general = 'general',\n connector = 'connector',\n event = 'event',\n engine = 'engine',\n}\n\n/**\n * Defines the behavior when encountering an error in the event / handler callback.\n */\nexport enum CallbackErrorBehavior {\n /**\n * Throws an error when encountering an error in a callback.\n */\n throw = 'throw',\n\n /**\n * Logs the error when encountering an error in a callback.\n */\n log = 'log',\n}\n\nexport type MaybePromise<T> = T | Promise<T>;\n\nexport type ManagedCallbacksConfigType = {\n handlers: {\n onAuthExpired: EngineCallbackHandler<\n (authRefreshRequest: AuthRefreshRequest) => Promise<AuthCredentials | null>\n >;\n onViewportRequested: EngineCallbackHandler<() => Viewport | null>;\n };\n events: {\n onActionsChanged: EngineEvent<(state: DocumentAction[]) => MaybePromise<void>>;\n onStateChanged: EngineEvent<() => MaybePromise<void>>;\n onDocumentLoaded: EngineEvent<() => MaybePromise<void>>;\n onSelectedFramesLayoutChanged: EngineEvent<(states: FrameLayoutType[]) => MaybePromise<void>>;\n onFramesLayoutChanged: EngineEvent<(states: FrameLayoutType[]) => MaybePromise<void>>;\n onSelectedFramesContentChanged: EngineEvent<(state: Frame[]) => MaybePromise<void>>;\n onPageSelectionChanged: EngineEvent<(id: Id) => MaybePromise<void>>;\n onSelectedLayoutPropertiesChanged: EngineEvent<(state: LayoutPropertiesType) => MaybePromise<void>>;\n onSelectedLayoutUnitChanged: EngineEvent<(unit: MeasurementUnit) => MaybePromise<void>>;\n onScrubberPositionChanged: EngineEvent<(state: AnimationPlaybackType) => MaybePromise<void>>;\n onFrameAnimationsChanged: EngineEvent<(animationState: FrameAnimationType[]) => MaybePromise<void>>;\n onVariableListChanged: EngineEvent<(variableList: Variable[]) => MaybePromise<void>>;\n onSelectedToolChanged: EngineEvent<(tool: ToolType) => MaybePromise<void>>;\n onUndoStackStateChanged: EngineEvent<(undoStackState: UndoState) => MaybePromise<void>>;\n onSelectedLayoutFramesChanged: EngineEvent<(frames: SelectedLayoutFrame[]) => MaybePromise<void>>;\n onSelectedTextStyleChanged: EngineEvent<(styles: SelectedTextStyle) => MaybePromise<void>>;\n onColorsChanged: EngineEvent<(colors: DocumentColor[]) => MaybePromise<void>>;\n onParagraphStylesChanged: EngineEvent<(paragraphStyles: ParagraphStyle[]) => MaybePromise<void>>;\n onCharacterStylesChanged: EngineEvent<(characterStyles: CharacterStyle[]) => MaybePromise<void>>;\n onFontFamiliesChanged: EngineEvent<(fontFamilies: DocumentFontFamily[]) => MaybePromise<void>>;\n onSelectedLayoutIdChanged: EngineEvent<(layoutId: string) => MaybePromise<void>>;\n onLayoutsChanged: EngineEvent<(layouts: LayoutListItemType[]) => MaybePromise<void>>;\n onConnectorEvent: EngineEvent<(event: ConnectorEvent) => MaybePromise<void>>;\n onConnectorsChanged: EngineEvent<(connectors: ConnectorInstance[]) => MaybePromise<void>>;\n onZoomChanged: EngineEvent<(scaleFactor: number) => MaybePromise<void>>;\n onSelectedPageIdChanged: EngineEvent<(pageId: Id) => MaybePromise<void>>;\n onPagesChanged: EngineEvent<(pages: Page[]) => MaybePromise<void>>;\n onPageSnapshotInvalidated: EngineEvent<(pageId: Id) => MaybePromise<void>>;\n onPageSizeChanged: EngineEvent<(pageSize: PageSize) => MaybePromise<void>>;\n onShapeCornerRadiusChanged: EngineEvent<(cornerRadius: CornerRadiusUpdateModel) => MaybePromise<void>>;\n onCropActiveFrameIdChanged: EngineEvent<(id?: Id) => MaybePromise<void>>;\n onAsyncError: EngineEvent<(asyncError: AsyncError) => MaybePromise<void>>;\n onViewModeChanged: EngineEvent<(tool: ViewMode) => MaybePromise<void>>;\n onBarcodeValidationChanged: EngineEvent<\n (validationResults: BarcodeFrameValidationResult[]) => MaybePromise<void>\n >;\n onDataSourceIdChanged: EngineEvent<(connectorId?: Id) => MaybePromise<void>>;\n onDocumentIssueListChanged: EngineEvent<(documentIssues: DocumentIssue[]) => MaybePromise<void>>;\n onCustomUndoDataChanged: EngineEvent<(customData: Record<string, string>) => MaybePromise<void>>;\n onEngineEditModeChanged: EngineEvent<(engineEditMode: EngineEditMode) => MaybePromise<void>>;\n onBrandKitMediaChanged: EngineEvent<(brandKitMedia: BrandKitMedia[]) => MaybePromise<void>>;\n };\n};\n\nexport type InitialCallbacksConfigType = {\n /**\n * @deprecated use `events.onActionsChanged` instead\n */\n onActionsChanged?: (state: DocumentAction[]) => void;\n\n /**\n * @deprecated use `events.onStateChanged` instead\n */\n onStateChanged?: () => void;\n\n /**\n * @deprecated use `events.onAuthExpired` instead\n */\n onAuthExpired?: (authRefreshRequest: AuthRefreshRequest) => Promise<AuthCredentials | null>;\n\n /**\n * @deprecated use `events.onViewportRequested` instead\n */\n onViewportRequested?: () => Viewport | null;\n\n /**\n * @deprecated use `events.onDocumentLoaded` instead\n */\n onDocumentLoaded?: () => void;\n\n /**\n * @deprecated use `onSelectedFramesLayoutChanged` instead\n *\n */\n onSelectedFrameLayoutChanged?: (state: FrameLayoutType) => void;\n\n /**\n * @deprecated use `events.onSelectedFramesLayoutChanged` instead\n */\n onSelectedFramesLayoutChanged?: (states: FrameLayoutType[]) => void;\n\n /**\n * @deprecated use `events.onFramesLayoutChanged` instead\n */\n onFramesLayoutChanged?: (states: FrameLayoutType[]) => void;\n\n /**\n * @deprecated use `onSelectedFramesContentChanged` instead\n */\n onSelectedFrameContentChanged?: (state: Frame | null) => void;\n\n /**\n * @deprecated use `events.onSelectedFramesContentChanged` instead\n */\n onSelectedFramesContentChanged?: (state: Frame[]) => void;\n\n /**\n * @deprecated use `onSelectedPageIdChanged` instead\n */\n onPageSelectionChanged?: (id: Id) => void;\n\n /**\n * @deprecated use `events.onSelectedLayoutPropertiesChanged` instead\n */\n onSelectedLayoutPropertiesChanged?: (state: LayoutPropertiesType) => void;\n\n /**\n * @deprecated use `events.onSelectedLayoutUnitChanged` instead\n */\n onSelectedLayoutUnitChanged?: (unit: MeasurementUnit) => void;\n\n /**\n * @deprecated use `events.onScrubberPositionChanged` instead\n */\n onScrubberPositionChanged?: (state: AnimationPlaybackType) => void;\n\n /**\n * @deprecated use `events.onFrameAnimationsChanged` instead\n */\n onFrameAnimationsChanged?: (animationState: FrameAnimationType[]) => void;\n\n /**\n * @deprecated use `events.onVariableListChanged` instead\n */\n onVariableListChanged?: (variableList: Variable[]) => void;\n\n /**\n * @deprecated use `events.onSelectedToolChanged` instead\n */\n onSelectedToolChanged?: (tool: ToolType) => void;\n\n /**\n * @deprecated use `events.onUndoStackStateChanged` instead\n */\n onUndoStackStateChanged?: (undoStackState: UndoState) => void;\n\n /**\n * @deprecated use `events.onSelectedLayoutFramesChanged` instead\n */\n onSelectedLayoutFramesChanged?: (frames: SelectedLayoutFrame[]) => void;\n\n /**\n * @deprecated use `events.onSelectedTextStyleChanged` instead\n */\n onSelectedTextStyleChanged?: (styles: SelectedTextStyle) => void;\n\n /**\n * @deprecated use `events.onColorsChanged` instead\n */\n onColorsChanged?: (colors: DocumentColor[]) => void;\n\n /**\n * @deprecated use `events.onParagraphStylesChanged` instead\n */\n onParagraphStylesChanged?: (paragraphStyles: ParagraphStyle[]) => void;\n\n /**\n * @deprecated use `events.onCharacterStylesChanged` instead\n */\n onCharacterStylesChanged?: (characterStyles: CharacterStyle[]) => void;\n\n /**\n * @deprecated use `events.onFontFamiliesChanged` instead\n */\n onFontFamiliesChanged?: (fontFamilies: DocumentFontFamily[]) => void;\n\n /**\n * @deprecated use `events.onSelectedLayoutIdChanged` instead\n */\n onSelectedLayoutIdChanged?: (layoutId: string) => void;\n\n /**\n * @deprecated use `events.onLayoutsChanged` instead\n */\n onLayoutsChanged?: (layouts: LayoutListItemType[]) => void;\n\n /**\n * @deprecated use `events.onConnectorEvent` instead\n */\n onConnectorEvent?: (event: ConnectorEvent) => void;\n\n /**\n * @deprecated use `events.onConnectorsChanged` instead\n */\n onConnectorsChanged?: (connectors: ConnectorInstance[]) => void;\n\n /**\n * @deprecated use `events.onZoomChanged` instead\n */\n onZoomChanged?: (scaleFactor: number) => void;\n\n /**\n *\n * @deprecated use `events.onSelectedPageIdChanged` instead\n */\n onSelectedPageIdChanged?: (pageId: Id) => void;\n\n /**\n *\n * @deprecated use `events.onPagesChanged` instead\n */\n onPagesChanged?: (pages: Page[]) => void;\n\n /**\n *\n * @deprecated use `events.onPageSnapshotInvalidated` instead\n */\n onPageSnapshotInvalidated?: (pageId: Id) => void;\n\n /**\n * @deprecated use `events.onPageSizeChanged` instead\n */\n onPageSizeChanged?: (pageSize: PageSize) => void;\n\n /**\n * @deprecated use `events.onShapeCornerRadiusChanged` instead\n */\n onShapeCornerRadiusChanged?: (cornerRadius: CornerRadiusUpdateModel) => void;\n\n /**\n * @deprecated use `events.onCropActiveFrameIdChanged` instead\n */\n onCropActiveFrameIdChanged?: (id?: Id) => void;\n\n /**\n * @deprecated use `events.onAsyncError` instead\n */\n onAsyncError?: (asyncError: AsyncError) => void;\n\n /**\n * @deprecated use `events.onViewModeChanged` instead\n */\n onViewModeChanged?: (tool: ViewMode) => void;\n\n /**\n * @deprecated use `events.onBarcodeValidationChanged` instead\n */\n onBarcodeValidationChanged?: (validationResults: BarcodeFrameValidationResult[]) => void;\n\n /**\n * @deprecated use `events.onDataSourceIdChanged` instead\n */\n onDataSourceIdChanged?: (connectorId?: Id) => void;\n\n /**\n * @deprecated use `events.onDocumentIssueListChanged` instead\n */\n onDocumentIssueListChanged?: (documentIssues: DocumentIssue[]) => void;\n\n /**\n * @deprecated use `events.onCustomUndoDataChanged` instead\n */\n onCustomUndoDataChanged?: (customData: Record<string, string>) => void;\n\n /**\n * @deprecated use `events.onEngineEditModeChanged` instead\n */\n onEngineEditModeChanged?: (engineEditMode: EngineEditMode) => void;\n\n /**\n * @deprecated use `events.onBrandKitMediaChanged` instead\n */\n onBrandKitMediaChanged?: (brandKitMedia: BrandKitMedia[]) => void;\n};\n\nexport type ConfigType = InitialCallbacksConfigType & BaseConfigType;\nexport type RuntimeConfigType = ConfigType & ManagedCallbacksConfigType;\n\nexport type EditorResponseError = string;\n\nexport interface EditorResponse<T> {\n success: boolean;\n status: number;\n data?: string | null;\n error?: EditorResponseError | null;\n parsedData: T | null;\n}\n\nexport interface EditorRawAPI extends CallSender {\n [index: string]: <T>(...args: unknown[]) => Promise<T>;\n}\n\nexport interface EditorAPI extends CallSender {\n [index: string]: <T>(...args: unknown[]) => Promise<EditorResponse<T>>;\n}\n\nexport type PageType = {\n id: Id;\n number: number;\n width: number | null;\n height: number | null;\n frames: FrameType[];\n};\n\nexport type InitialStateType = {\n layouts: LayoutWithFrameProperties[];\n selectedLayoutId: Id;\n pages: PageType[];\n variables: Variable[];\n};\n\nexport interface PropertyState<T> {\n value: T;\n isOverride: boolean;\n isReadOnly: boolean;\n}\n\nexport interface HasOverrideState {\n isOverride: boolean;\n isReadOnly: boolean;\n}\n\nexport interface SelectedLayoutFrame {\n id: Id;\n name: string;\n type: FrameTypeEnum;\n isVisible: boolean;\n}\n\nexport type PrivateData = Record<string, string>;\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { CallbackErrorBehavior, LogCategory, LoggerFunction, LogLevel } from '../types/CommonTypes';\nexport abstract class EngineEventTrigger<T extends (...args: any[]) => any> {\n constructor(protected logger?: LoggerFunction) {}\n\n abstract trigger(...args: Parameters<T>): ReturnType<T>;\n\n protected createEventHandlerFn(callbackFn: T, errorBehavior: CallbackErrorBehavior): T {\n const wrapper: any = (...args: Parameters<T>) => {\n try {\n const result = callbackFn(...args);\n // If the callback returns a promise, we need to await it\n if (result instanceof Promise) {\n return result.catch((error) => this.handleError(error, errorBehavior, callbackFn.name));\n }\n return result;\n } catch (error) {\n this.handleError(error, errorBehavior, callbackFn.name);\n }\n };\n return wrapper;\n }\n\n private handleError(error: unknown, errorBehavior: CallbackErrorBehavior, fnName: string) {\n if (errorBehavior === CallbackErrorBehavior.log) {\n this.logger?.(LogLevel.error, LogCategory.event, `Error in callback ${fnName}: ${error}`);\n } else {\n throw error;\n }\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { CallbackErrorBehavior, LoggerFunction } from '../types/CommonTypes';\nimport { EngineEventTrigger } from './EngineEventTrigger';\n\nexport class EngineCallbackHandler<T extends (...args: any[]) => any> extends EngineEventTrigger<T> {\n constructor(private handler: () => T | undefined, logger?: LoggerFunction) {\n super(logger);\n }\n /**\n * Executes the defined handler with the provided arguments.\n *\n * @param args The arguments to pass to the callbacks.\n * @returns The result of executing the callbacks.\n */\n trigger(...args: Parameters<T>): ReturnType<T> {\n const handler = this.handler();\n if (handler) {\n return this.createEventHandlerFn(handler, CallbackErrorBehavior.throw)(...args);\n }\n return undefined as ReturnType<T>;\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { CallbackErrorBehavior, LoggerFunction } from '../types/CommonTypes';\nimport { EngineEventTrigger } from './EngineEventTrigger';\n\ninterface Unsubscriber {\n (): void;\n}\n\nexport class EngineEvent<T extends (...args: any[]) => void> extends EngineEventTrigger<T> {\n private subscriptions: Set<T> = new Set();\n\n constructor(private legacyHandler: () => T | undefined, logger?: LoggerFunction) {\n super(logger);\n }\n\n /**\n * Executes the registered callbacks with provided arguments\n *\n * @param args The arguments to pass to the callbacks.\n * @returns The result of executing the callbacks.\n */\n trigger(...args: Parameters<T>): ReturnType<T> {\n const handler = this.legacyHandler();\n if (handler) {\n this.createEventHandlerFn(handler, CallbackErrorBehavior.log)(...args);\n }\n for (const callback of this.subscriptions) {\n callback(...args);\n }\n return undefined as ReturnType<T>;\n }\n\n /**\n * Registers a callback function.\n *\n * @param callback - The callback function to register. This function will be invoked when the event occurs.\n * @param errorBehavior - An optional parameter to define how to handle errors that appear in the callback function.\n * Accepted values are:\n * - \"log\": Logs the error to the console (default behavior)\n * - \"throw\": Throws an error. Keep in mind that throwing of error in one of the callback will prevent calling of others\n * @returns A function to unsubscribe the callback, preventing it from being invoked in the future.\n */\n registerCallback(callback: T, errorBehavior: CallbackErrorBehavior = CallbackErrorBehavior.log): Unsubscriber {\n const callbackFn = this.createEventHandlerFn(callback, errorBehavior);\n this.subscriptions.add(callbackFn);\n\n return () => {\n this.subscriptions.delete(callbackFn);\n };\n }\n}\n","import { DocumentAction } from '../types/ActionTypes';\nimport { AnimationPlaybackType, FrameAnimationType } from '../types/AnimationTypes';\nimport { BarcodeFrameValidationResult } from '../types/BarcodeTypes';\nimport { CharacterStyle } from '../types/CharacterStyleTypes';\nimport { DocumentColor } from '../types/ColorStyleTypes';\nimport { ConfigType, Id, LogLevel, MaybePromise, RuntimeConfigType, SelectedLayoutFrame } from '../types/CommonTypes';\nimport { AuthCredentials, AuthRefreshRequest, ConnectorEvent, ConnectorInstance } from '../types/ConnectorTypes';\nimport { DocumentIssue, UndoState } from '../types/DocumentTypes';\nimport { EngineEditMode } from '../types/EngineEditModeTypes';\nimport { DocumentFontFamily } from '../types/FontTypes';\nimport { Frame, FrameLayoutType } from '../types/FrameTypes';\nimport { LayoutListItemType, LayoutPropertiesType, MeasurementUnit } from '../types/LayoutTypes';\nimport { Page, PageSize } from '../types/PageTypes';\nimport { ParagraphStyle } from '../types/ParagraphStyleTypes';\nimport { CornerRadiusUpdateModel } from '../types/ShapeTypes';\nimport { SelectedTextStyle } from '../types/TextStyleTypes';\nimport { Variable } from '../types/VariableTypes';\nimport { ViewMode } from '../types/ViewModeTypes';\nimport { Viewport } from '../types/ViewportTypes';\nimport { EngineCallbackHandler } from './EngineCallbackHandler';\nimport { EngineEvent } from './EngineEvent';\nimport { ToolType } from './Enums';\nimport { BrandKitMedia } from '../types/BrandKitTypes';\nimport { AsyncError } from '../exceptions';\n\nexport class ConfigHelper {\n /**\n * Creates a runtime configuration object from the provided configuration object.\n *\n * @param config The configuration object to create the runtime configuration object from.\n * @returns The runtime configuration object.\n */\n static createRuntimeConfig(config: ConfigType): RuntimeConfigType {\n // we need a reference to the clone object in the engineEvent, so we need to create the object in 2 steps\n const clone: RuntimeConfigType = { ...config } as RuntimeConfigType;\n clone.logging = {\n logLevel: config.logging?.logLevel || LogLevel.error,\n logger:\n config.logging?.logger ||\n ((level, cat, msg) => {\n if (!ConfigHelper.isLoggingEnabled(level, clone.logging?.logLevel ?? LogLevel.error)) {\n return;\n }\n\n switch (level) {\n case LogLevel.error:\n console.error(`[${cat}] [${level}] ${msg}`);\n break;\n case LogLevel.warn:\n console.warn(`[${cat}] [${level}] ${msg}`);\n break;\n default:\n console.log(`[${cat}] [${level}] ${msg}`);\n }\n }),\n };\n clone.handlers = {\n onAuthExpired: new EngineCallbackHandler<\n (authRefreshRequest: AuthRefreshRequest) => Promise<AuthCredentials | null>\n >(() => clone.onAuthExpired, clone.logging?.logger),\n onViewportRequested: new EngineCallbackHandler<() => Viewport | null>(\n () => clone.onViewportRequested,\n clone.logging?.logger,\n ),\n };\n clone.events = {\n onActionsChanged: new EngineEvent<(state: DocumentAction[]) => MaybePromise<void>>(\n () => clone.onActionsChanged,\n clone.logging?.logger,\n ),\n onStateChanged: new EngineEvent<() => MaybePromise<void>>(\n () => clone.onStateChanged,\n clone.logging?.logger,\n ),\n\n onDocumentLoaded: new EngineEvent<() => MaybePromise<void>>(\n () => clone.onDocumentLoaded,\n clone.logging?.logger,\n ),\n onSelectedFramesLayoutChanged: new EngineEvent<(states: FrameLayoutType[]) => MaybePromise<void>>(\n () => clone.onSelectedFramesLayoutChanged,\n clone.logging?.logger,\n ),\n onFramesLayoutChanged: new EngineEvent<(states: FrameLayoutType[]) => MaybePromise<void>>(\n () => clone.onFramesLayoutChanged,\n clone.logging?.logger,\n ),\n onSelectedFramesContentChanged: new EngineEvent<(state: Frame[]) => MaybePromise<void>>(\n () => clone.onSelectedFramesContentChanged,\n clone.logging?.logger,\n ),\n onPageSelectionChanged: new EngineEvent<(id: Id) => MaybePromise<void>>(\n () => clone.onPageSelectionChanged,\n clone.logging?.logger,\n ),\n onSelectedLayoutPropertiesChanged: new EngineEvent<(state: LayoutPropertiesType) => MaybePromise<void>>(\n () => clone.onSelectedLayoutPropertiesChanged,\n clone.logging?.logger,\n ),\n onSelectedLayoutUnitChanged: new EngineEvent<(unit: MeasurementUnit) => MaybePromise<void>>(\n () => clone.onSelectedLayoutUnitChanged,\n clone.logging?.logger,\n ),\n onScrubberPositionChanged: new EngineEvent<(state: AnimationPlaybackType) => MaybePromise<void>>(\n () => clone.onScrubberPositionChanged,\n clone.logging?.logger,\n ),\n onFrameAnimationsChanged: new EngineEvent<(animationState: FrameAnimationType[]) => MaybePromise<void>>(\n () => clone.onFrameAnimationsChanged,\n clone.logging?.logger,\n ),\n onVariableListChanged: new EngineEvent<(variableList: Variable[]) => MaybePromise<void>>(\n () => clone.onVariableListChanged,\n clone.logging?.logger,\n ),\n onSelectedToolChanged: new EngineEvent<(tool: ToolType) => MaybePromise<void>>(\n () => clone.onSelectedToolChanged,\n clone.logging?.logger,\n ),\n onUndoStackStateChanged: new EngineEvent<(undoStackState: UndoState) => MaybePromise<void>>(\n () => clone.onUndoStackStateChanged,\n clone.logging?.logger,\n ),\n onSelectedLayoutFramesChanged: new EngineEvent<(frames: SelectedLayoutFrame[]) => MaybePromise<void>>(\n () => clone.onSelectedLayoutFramesChanged,\n clone.logging?.logger,\n ),\n onSelectedTextStyleChanged: new EngineEvent<(styles: SelectedTextStyle) => MaybePromise<void>>(\n () => clone.onSelectedTextStyleChanged,\n clone.logging?.logger,\n ),\n onColorsChanged: new EngineEvent<(colors: DocumentColor[]) => MaybePromise<void>>(\n () => clone.onColorsChanged,\n clone.logging?.logger,\n ),\n onParagraphStylesChanged: new EngineEvent<(paragraphStyles: ParagraphStyle[]) => MaybePromise<void>>(\n () => clone.onParagraphStylesChanged,\n clone.logging?.logger,\n ),\n onCharacterStylesChanged: new EngineEvent<(characterStyles: CharacterStyle[]) => MaybePromise<void>>(\n () => clone.onCharacterStylesChanged,\n clone.logging?.logger,\n ),\n onFontFamiliesChanged: new EngineEvent<(fontFamilies: DocumentFontFamily[]) => MaybePromise<void>>(\n () => clone.onFontFamiliesChanged,\n clone.logging?.logger,\n ),\n onSelectedLayoutIdChanged: new EngineEvent<(layoutId: string) => MaybePromise<void>>(\n () => clone.onSelectedLayoutIdChanged,\n clone.logging?.logger,\n ),\n onLayoutsChanged: new EngineEvent<(layouts: LayoutListItemType[]) => MaybePromise<void>>(\n () => clone.onLayoutsChanged,\n clone.logging?.logger,\n ),\n onConnectorEvent: new EngineEvent<(event: ConnectorEvent) => MaybePromise<void>>(\n () => clone.onConnectorEvent,\n clone.logging?.logger,\n ),\n onConnectorsChanged: new EngineEvent<(connectors: ConnectorInstance[]) => MaybePromise<void>>(\n () => clone.onConnectorsChanged,\n clone.logging?.logger,\n ),\n onZoomChanged: new EngineEvent<(scaleFactor: number) => MaybePromise<void>>(\n () => clone.onZoomChanged,\n clone.logging?.logger,\n ),\n onSelectedPageIdChanged: new EngineEvent<(pageId: Id) => MaybePromise<void>>(\n () => clone.onSelectedPageIdChanged,\n clone.logging.logger,\n ),\n onPagesChanged: new EngineEvent<(pages: Page[]) => MaybePromise<void>>(\n () => clone.onPagesChanged,\n clone.logging.logger,\n ),\n onPageSnapshotInvalidated: new EngineEvent<(pageId: Id) => MaybePromise<void>>(\n () => clone.onPageSnapshotInvalidated,\n clone.logging.logger,\n ),\n onPageSizeChanged: new EngineEvent<(pageSize: PageSize) => MaybePromise<void>>(\n () => clone.onPageSizeChanged,\n clone.logging?.logger,\n ),\n onShapeCornerRadiusChanged: new EngineEvent<(cornerRadius: CornerRadiusUpdateModel) => MaybePromise<void>>(\n () => clone.onShapeCornerRadiusChanged,\n clone.logging?.logger,\n ),\n onCropActiveFrameIdChanged: new EngineEvent<(id?: Id) => MaybePromise<void>>(\n () => clone.onCropActiveFrameIdChanged,\n clone.logging?.logger,\n ),\n onAsyncError: new EngineEvent<(asyncError: AsyncError) => MaybePromise<void>>(\n () => clone.onAsyncError,\n clone.logging?.logger,\n ),\n onViewModeChanged: new EngineEvent<(tool: ViewMode) => MaybePromise<void>>(\n () => clone.onViewModeChanged,\n clone.logging?.logger,\n ),\n onBarcodeValidationChanged: new EngineEvent<\n (validationResults: BarcodeFrameValidationResult[]) => MaybePromise<void>\n >(() => clone.onBarcodeValidationChanged, clone.logging?.logger),\n onDataSourceIdChanged: new EngineEvent<(connectorId?: Id) => MaybePromise<void>>(\n () => clone.onDataSourceIdChanged,\n clone.logging.logger,\n ),\n onDocumentIssueListChanged: new EngineEvent<(documentIssues: DocumentIssue[]) => MaybePromise<void>>(\n () => clone.onDocumentIssueListChanged,\n clone.logging.logger,\n ),\n onCustomUndoDataChanged: new EngineEvent<(customData: Record<string, string>) => MaybePromise<void>>(\n () => clone.onCustomUndoDataChanged,\n clone.logging.logger,\n ),\n onEngineEditModeChanged: new EngineEvent<(engineEditMode: EngineEditMode) => MaybePromise<void>>(\n () => clone.onEngineEditModeChanged,\n clone.logging.logger,\n ),\n onBrandKitMediaChanged: new EngineEvent<(brandKitMedia: BrandKitMedia[]) => MaybePromise<void>>(\n () => clone.onBrandKitMediaChanged,\n clone.logging.logger,\n ),\n };\n return clone;\n }\n\n private static isLoggingEnabled(level: LogLevel, logLevel: LogLevel): boolean {\n if (logLevel == LogLevel.info) {\n return true;\n }\n if (logLevel == LogLevel.warn && (level == LogLevel.warn || level == LogLevel.error)) {\n return true;\n }\n return logLevel == LogLevel.error && level == LogLevel.error;\n }\n}\n","import { DataItem } from '../types/DataConnectorTypes';\n\n/**\n * Utility tools for mapping between `EngineDataItem` and `DataItem`.\n */\nexport class DataItemMappingTools {\n /**\n * Checks if the given value is a `DatePropertyWrapper`.\n *\n * @param value The value to check.\n * @returns `true` if the value is a `DatePropertyWrapper`, otherwise `false`.\n */\n private isDatePropertyWrapper(\n value: string | number | boolean | DatePropertyWrapper | null,\n ): value is DatePropertyWrapper {\n return typeof value === 'object' && value?.type === 'date';\n }\n\n /**\n * Checks if the given value is a `Date` object instance.\n *\n * @param value The value to check.\n * @returns `true` if the value is a `Date` object, otherwise `false`.\n */\n private isDateObject(value: string | number | boolean | Date | null): value is Date {\n return value instanceof Date;\n }\n\n /**\n * Transforms an `EngineDataItem` into a `DataItem`.\n *\n * Converts `DatePropertyWrapper` values to JavaScript `Date` objects\n * while keeping other values unchanged.\n *\n * @param dataItem the EngineDataItem to transform.\n * @returns the resulting `DataItem` with parsed date properties.\n */\n mapEngineToDataItem(dataItem: EngineDataItem): DataItem {\n const parsedItem: DataItem = {};\n\n Object.entries(dataItem).forEach(([key, value]) => {\n parsedItem[key] = this.isDatePropertyWrapper(value) ? new Date(value.value) : value;\n });\n\n return parsedItem;\n }\n\n /**\n * Transforms a `DataItem` into an `EngineDataItem`.\n *\n * Converts JavaScript `Date` objects to `DatePropertyWrapper` objects\n * while keeping other values unchanged.\n *\n * @param dataItem the `DataItem` to transform.\n * @returns the resulting `EngineDataItem` with parsed date properties.\n */\n mapDataItemToEngine(dataItem: DataItem): EngineDataItem {\n const parsedItem: EngineDataItem = {};\n\n Object.entries(dataItem).forEach(([key, value]) => {\n parsedItem[key] = this.isDateObject(value)\n ? ({ value: value.getTime(), type: 'date' } as DatePropertyWrapper)\n : value;\n });\n\n return parsedItem;\n }\n}\n\n/**\n * Internal type used to wrap date objects on the engine side.\n */\nexport type DatePropertyWrapper = {\n value: number;\n type: 'date';\n};\n\n/**\n * Engine data item type.\n */\nexport type EngineDataItem = {\n [key: string]: string | number | boolean | DatePropertyWrapper | null;\n};\n","import { EditorAPI } from '../types/CommonTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { StudioOptionsDeltaUpdate, WellKnownConfigurationKeys } from '../types/ConfigurationTypes';\n\n/**\n * The ConfigurationController allows setting editor session data. This data is not stored in the document and\n * can only be used at runtime. Amongst others, the configuration store is available to the editor connectors and\n * Javascript actions running in the editor.\n * Methods inside this controller can be called by `window.SDK.configuration.{method-name}`\n */\nexport abstract class ConfigurationController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n protected constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method returns the value for a given configuration key. If a value was not found in the configuration store\n * this method returns an error. The key cannot be null.\n * @returns value for a given configuration key\n */\n async getValue(key: WellKnownConfigurationKeys | string) {\n const res = await this.#editorAPI;\n return res.getConfigValue(key).then((result) => getEditorResponseData<string>(result));\n }\n\n /**\n * This method sets, or overrides the value for a given key. Null values are not allowed for both key and value,\n * using them will result in an error.\n * @returns\n */\n async setValue(key: WellKnownConfigurationKeys | string, value: string) {\n const res = await this.#editorAPI;\n return res.setConfigValue(key, value).then((result) => getEditorResponseData<null>(result));\n }\n\n /**\n * This method updates the studio options. Only defined options are updated, null values are ignored.\n * @returns\n */\n async updateStudioOptions(options: StudioOptionsDeltaUpdate) {\n const res = await this.#editorAPI;\n return res.updateStudioOptions(JSON.stringify(options)).then((result) => getEditorResponseData<null>(result));\n }\n\n /**\n * This method returns the engine session id. This id is unique for this engine session\n * @returns the engine session id\n */\n async getEngineSessionId() {\n const res = await this.#editorAPI;\n return res.getEngineSessionId().then((result) => getEditorResponseData<string>(result));\n }\n}\n","import { WellKnownConfigurationKeys } from '../types/ConfigurationTypes';\nimport { getEditorResponseData } from './EditorResponseData';\nimport { ConfigurationController } from '../controllers/ConfigurationController';\nimport { EditorAPI } from '../types/CommonTypes';\n\nexport class LocalConfigurationDecorator extends ConfigurationController {\n /**\n * @ignore\n */\n #localConfig: Map<string, string>;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI, localConfig: Map<string, string>) {\n super(editorAPI);\n this.#localConfig = localConfig;\n }\n\n /**\n * This method returns the value for a given configuration key. If a value was not found in the configuration store,\n * this method returns an error. The key cannot be null.\n * @returns value for a given configuration key\n */\n async getValue(key: WellKnownConfigurationKeys | string) {\n const value = this.#localConfig.get(key);\n if (value != null) {\n return getEditorResponseData<string>(\n {\n status: 200,\n success: true,\n parsedData: value,\n data: value,\n },\n false,\n );\n }\n\n return super.getValue(key);\n }\n\n /**\n * This method sets or overrides the value for a given key.\n * Null values are not allowed for both key and value,\n * using them will result in an error.\n * @returns\n */\n async setValue(key: WellKnownConfigurationKeys | string, value: string) {\n const res = super.setValue(key, value);\n this.#localConfig.set(key, value);\n return res;\n }\n}\n","import { EditorAPI, Id } from '../types/CommonTypes';\nimport { GradientUpdate, DocumentGradient } from '../types/GradientStyleTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * The GradientStyleController is responsible for all communication regarding gradient styles.\n * Methods inside this controller can be called by `window.SDK.gradientStyle.{method-name}`\n */\nexport class GradientStyleController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * This method returns the list of gradients\n * @returns list of all gradients\n */\n getAll = async () => {\n const res = await this.#editorAPI;\n return res.getGradients().then((result) => getEditorResponseData<DocumentGradient[]>(result));\n };\n\n /**\n * This method returns a gradient by id\n * @param id the id of a specific gradient\n * @returns gradient properties for given id\n */\n getById = async (id: string) => {\n const res = await this.#editorAPI;\n return res.getGradientById(id).then((result) => getEditorResponseData<DocumentGradient>(result));\n };\n\n /**\n * This method creates a new gradient\n * @returns the new created gradient id\n */\n create = async () => {\n const res = await this.#editorAPI;\n return res.createGradient().then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method duplicates a gradient by the id\n * @param id the id of a specific gradient\n * @returns id of the duplicated gradient\n */\n duplicate = async (id: string) => {\n const res = await this.#editorAPI;\n return res.duplicateGradient(id).then((result) => getEditorResponseData<Id>(result));\n };\n\n /**\n * This method changes positions of gradients\n * @param order the position of the gradients\n * @param ids the list of gradient IDs\n * @returns\n */\n move = async (order: number, ids: string[]) => {\n const res = await this.#editorAPI;\n return res.moveGradients(order, ids).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method renames a gradient\n * @param id the id of a specific gradient\n * @param newGradientName the new name of the gradient\n * @returns\n */\n rename = async (id: string, newGradientName: string) => {\n const res = await this.#editorAPI;\n return res.renameGradient(id, newGradientName).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method updates a gradient\n * @param id the id of a specific gradient\n * @param newGradientProperties the new gradient properties\n * @returns\n */\n update = async (id: string, newGradientProperties: GradientUpdate) => {\n const res = await this.#editorAPI;\n const properties = newGradientProperties;\n return res.updateGradient(id, JSON.stringify(properties)).then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method removes a gradient\n * @param id the id of a specific gradient\n * @returns\n */\n remove = async (id: string) => {\n const res = await this.#editorAPI;\n return res.removeGradient(id).then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { CallSender } from 'penpal';\nimport { EditorAPI, EditorRawAPI, EditorResponse } from '../types/CommonTypes';\nimport { Component, ComponentConnectorCapabilities, ComponentPreviewType } from '../types/ComponentConnectorTypes';\nimport { ConnectorConfigOptions, MetaData, QueryOptions, QueryPage } from '../types/ConnectorTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\nimport { throwEditorResponseError } from '../exceptions';\n\n/**\n * @experimental This controller is still experimental and might change in future releases.\n *\n * The ComponentConnectorController is responsible for all communication regarding Component connectors.\n * Methods inside this controller can be called by `window.SDK.componentConnector.{method-name}`\n *\n * The way GraFx Studio handles different sources of Component is called 'ComponentConnector'.\n * A ComponentConnector is an implementation of a set of capabilities we need\n * to interact with a certain Component Asset Management system.\n * In essence, a connector is the combination of a JavaScript snippet and some metadata.\n * The JavaScript snippet is loaded in the studio engine using a sandboxed JavaScript execution engine (QuickJs).\n * This allows us to execute the Component connector\n * both on web using webassembly and on the server side during output generation.\n * This controller is an interface to the running connector instance inside the studio engine.\n */\nexport class ComponentConnectorController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n #blobAPI: EditorRawAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n this.#blobAPI = editorAPI as CallSender as EditorRawAPI;\n }\n\n /**\n * @experimental This method is still experimental and might change in future releases.\n * Query a specific ComponentConnector for data using both standardized queryOptions and the dynamic\n * context as parameters.\n * @param connectorId unique id of the Component connector\n * @param queryOptions query options\n * @param context context that will be available in the connector script.\n * @returns array of component instances\n */\n query = async (connectorId: string, queryOptions: QueryOptions, context: MetaData = {}) => {\n const res = await this.#editorAPI;\n return res\n .componentConnectorQuery(connectorId, JSON.stringify(queryOptions), JSON.stringify(context))\n .then((result) => getEditorResponseData<QueryPage<Component>>(result));\n };\n\n /**\n * @experimental This method is still experimental and might change in future releases.\n * The combination of a `connectorId` and `componentId` is typically enough for a Component connector to\n * perform the preview of this asset. The `preview` endpoint is capable of relaying this information to the\n * Component connector instance running in the editor engine.\n * @param connectorId unique id of the Component connector\n * @param componentId unique id of the Component to download\n * @param previewType hint to the Component connector about desired format of the Component preview\n * @param context dynamic map of additional options potentially used by the connector\n * @returns\n */\n preview = async (\n connectorId: string,\n componentId: string,\n previewType: ComponentPreviewType,\n context: MetaData = {},\n ): Promise<Uint8Array> => {\n const res = await this.#blobAPI;\n return res\n .componentConnectorPreview(connectorId, componentId, previewType, JSON.stringify(context))\n .then((result) => {\n // Handle binary data (Uint8Array) directly\n if (result instanceof Uint8Array) {\n return result;\n }\n\n // Handle structured response (EditorResponse) for non-success cases\n if (typeof result === 'object' && result !== null && 'success' in result && !result.success) {\n throwEditorResponseError(result as EditorResponse<null>);\n }\n\n // Unexpected response type - throw error\n throw new Error(`Unexpected response type: ${typeof result}.`);\n });\n };\n\n /**\n * @experimental This method is still experimental and might change in future releases.\n * All connectors have a certain set of mappings they allow to be passed into the connector methods their context. This\n * method allows you to discover which mappings are available for a given connector. If you want to use any of these\n * mappings, they will be available in the `context` parameter of any connector method.\n * @param connectorId unique id of the component connector\n * @returns connector mappings\n */\n getConfigurationOptions = async (connectorId: string) => {\n const res = await this.#editorAPI;\n return res\n .componentConnectorGetConfigurationOptions(connectorId)\n .then((result) => getEditorResponseData<ConnectorConfigOptions>(result));\n };\n\n /**\n * @experimental This method is still experimental and might change in future releases.\n * This method returns what capabilities the selected connector has. It gives an indication what methods can\n * be used successfully for a certain connector.\n * @param connectorId unique id of the component connector\n * @returns ComponentConnectorCapabilities\n */\n getCapabilities = async (connectorId: string) => {\n const res = await this.#editorAPI;\n return res\n .componentConnectorGetCapabilities(connectorId)\n .then((result) => getEditorResponseData<ComponentConnectorCapabilities>(result));\n };\n}\n","import { EditorAPI, Id } from '../types/CommonTypes';\nimport { ComponentFitEnum } from '../types/FrameTypes';\nimport { Variable } from '../types/VariableTypes';\nimport { getEditorResponseData } from '../utils/EditorResponseData';\n\n/**\n * @experimental This controller is experimental and may change without warning.\n * The ComponentController is responsible for all communication regarding Component frames.\n * Methods inside this controller can be called by `window.SDK.component.{method-name}`\n */\nexport class ComponentController {\n /**\n * @ignore\n */\n #editorAPI: EditorAPI;\n\n /**\n * @ignore\n */\n constructor(editorAPI: EditorAPI) {\n this.#editorAPI = editorAPI;\n }\n\n /**\n * @experimental This method will link (or unlink) a variable from the template to the component frame\n * @param id the id of the componentFrame that needs to be updated.\n * @param target the id of the variable, inside the component, that will be linked (or unlinked) to the source variable.\n * @param source the id of the source variable from the template. If not provided, the variable will be unlinked.\n * @param sourceField the field of the data source variable.\n * @returns\n */\n linkVariable = async (frameId: Id, target: Id, source?: Id, sourceField?: string) => {\n const res = await this.#editorAPI;\n return res\n .linkComponentVariable(frameId, target, source, sourceField ?? null)\n .then((result) => getEditorResponseData<null>(result));\n };\n\n /**\n * This method returns the list of variables of a component frame.\n * @param id the id of the componentFrame.\n * @returns\n */\n getComponentVariables = async (frameId: Id) => {\n const res = await this.#editorAPI;\n return res.getComponentVariables(frameId).then((result) => getEditorResponseData<Variable[]>(result));\n };\n\n /**\n * This method sets the fit mode of a component frame.\n * @param frameId the id of the component frame.\n * @param fitMode the fit mode to set.\n * @returns\n */\n setFitMode = async (frameId: Id, fitMode: ComponentFitEnum) => {\n const res = await this.#editorAPI;\n return res.setComponentLayoutFit(frameId, fitMode).then((result) => getEditorResponseData<null>(result));\n };\n}\n","import { Connection } from 'penpal';\nimport engineInfo from '../editor-engine.json';\nimport packageInfo from '../package.json';\nimport Connect from './interactions/Connector';\nimport { defaultStudioOptions, WellKnownConfigurationKeys } from './types/ConfigurationTypes';\n\nimport type { ConfigType, EditorAPI, RuntimeConfigType } from './types/CommonTypes';\nimport { DocumentType } from './types/DocumentTypes';\n\nimport { ActionController } from './controllers/ActionController';\nimport { AnimationController } from './controllers/AnimationController';\nimport { BarcodeController } from './controllers/BarcodeController';\nimport { BrandKitController } from './controllers/BrandKitController';\nimport { CanvasController } from './controllers/CanvasController';\nimport { CharacterStyleController } from './controllers/CharacterStyleController';\nimport { ClipboardController } from './controllers/ClipboardController';\nimport { ColorConversionController } from './controllers/ColorConversionController';\nimport { ColorStyleController } from './controllers/ColorStyleController';\nimport { ConfigurationController } from './controllers/ConfigurationController';\nimport { ConnectorController } from './controllers/ConnectorController';\nimport { DataConnectorController } from './controllers/DataConnectorController';\nimport { DataSourceController } from './controllers/DataSourceController';\nimport { DebugController } from './controllers/DebugController';\nimport { DocumentController } from './controllers/DocumentController';\nimport { ExperimentController } from './controllers/ExperimentController';\nimport { FontConnectorController } from './controllers/FontConnectorController';\nimport { FontController } from './controllers/FontController';\nimport { FrameController } from './controllers/FrameController';\nimport { InfoController } from './controllers/InfoController';\nimport { LayoutController } from './controllers/LayoutController';\nimport { MediaConnectorController } from './controllers/MediaConnectorController';\nimport { PageController } from './controllers/PageController';\nimport { ParagraphStyleController } from './controllers/ParagraphStyleController';\nimport { ShapeController } from './controllers/ShapeController';\nimport { SubscriberController } from './controllers/SubscriberController';\nimport { TextStyleController } from './controllers/TextStyleController';\nimport { ToolController } from './controllers/ToolController';\nimport { UndoManagerController } from './controllers/UndoManagerController';\nimport { UtilsController } from './controllers/UtilsController';\nimport { VariableController } from './controllers/VariableController';\nimport { NextSubscribers } from './next';\nimport { NextInitiator } from './next/NextInitiator';\nimport { ConfigHelper } from './utils/ConfigHelper';\nimport { DataItemMappingTools } from './utils/DataItemMappingTools';\nimport { LocalConfigurationDecorator } from './utils/LocalConfigurationDecorator';\nimport { GradientStyleController } from './controllers/GradientStyleController';\nimport { ComponentConnectorController } from './controllers/ComponentConnectorController';\nimport { ComponentController } from './controllers/ComponentController';\n\ndeclare const __ENGINE_DOMAIN__: string;\nconst ENGINE_DOMAIN = typeof __ENGINE_DOMAIN__ !== 'undefined' ? __ENGINE_DOMAIN__ : 'studio-cdn.chiligrafx.com';\nconst FIXED_EDITOR_LINK = `https://${ENGINE_DOMAIN}/editor/${engineInfo.current}/web`;\n\nlet connection: Connection;\n\nexport class SDK {\n config: RuntimeConfigType;\n connection: Connection;\n\n /**\n * @ignore\n */\n editorAPI: EditorAPI;\n\n action: ActionController;\n layout: LayoutController;\n frame: FrameController;\n shape: ShapeController;\n barcode: BarcodeController;\n /** @experimental */\n component: ComponentController;\n connector: ConnectorController;\n mediaConnector: MediaConnectorController;\n fontConnector: FontConnectorController;\n /**\n * @experimental This controller is still experimental and might change in future releases.\n */\n componentConnector: ComponentConnectorController;\n dataConnector: DataConnectorController;\n dataSource: DataSourceController;\n animation: AnimationController;\n document: DocumentController;\n configuration: ConfigurationController;\n variable: VariableController;\n utils: UtilsController;\n tool: ToolController;\n page: PageController;\n debug: DebugController;\n undoManager: UndoManagerController;\n textSelection: TextStyleController;\n paragraphStyle: ParagraphStyleController;\n characterStyle: CharacterStyleController;\n colorStyle: ColorStyleController;\n gradientStyle: GradientStyleController;\n font: FontController;\n experiment: ExperimentController;\n canvas: CanvasController;\n colorConversion: ColorConversionController;\n info: InfoController;\n clipboard: ClipboardController;\n brandKit: BrandKitController;\n next: NextInitiator;\n\n private subscriber: SubscriberController;\n private enabledNextSubscribers: NextSubscribers | undefined;\n private localConfig = new Map<string, string>();\n private dataItemMappingTools = new DataItemMappingTools();\n\n /**\n * The SDK should be configured clientside and it exposes all controllers to work with in other applications\n * @param config The configuration object where the SDK and editor can get configured\n */\n constructor(config: ConfigType) {\n this.config = ConfigHelper.createRuntimeConfig(config);\n\n this.connection = connection;\n this.editorAPI = connection?.promise.then((child) => {\n return child;\n }) as unknown as EditorAPI;\n\n this.action = new ActionController(this.editorAPI);\n this.layout = new LayoutController(this.editorAPI);\n this.frame = new FrameController(this.editorAPI);\n this.shape = new ShapeController(this.editorAPI);\n this.barcode = new BarcodeController(this.editorAPI);\n this.component = new ComponentController(this.editorAPI);\n this.undoManager = new UndoManagerController(this.editorAPI, this);\n this.connector = new ConnectorController(this.editorAPI, this.localConfig);\n this.mediaConnector = new MediaConnectorController(this.editorAPI);\n this.fontConnector = new FontConnectorController(this.editorAPI);\n this.componentConnector = new ComponentConnectorController(this.editorAPI);\n this.dataConnector = new DataConnectorController(this.editorAPI, this.dataItemMappingTools);\n this.dataSource = new DataSourceController(this.editorAPI, this.dataItemMappingTools);\n this.animation = new AnimationController(this.editorAPI);\n this.document = new DocumentController(this.editorAPI);\n\n this.configuration = new LocalConfigurationDecorator(this.editorAPI, this.localConfig);\n this.variable = new VariableController(this.editorAPI, this.dataItemMappingTools);\n this.utils = new UtilsController(this.editorAPI, this.localConfig);\n this.subscriber = new SubscriberController(this.config, this.localConfig);\n this.tool = new ToolController(this.editorAPI);\n this.page = new PageController(this.editorAPI);\n this.debug = new DebugController(this.editorAPI);\n // To be renamed textSelection > textStyle\n this.textSelection = new TextStyleController(this.editorAPI);\n this.colorStyle = new ColorStyleController(this.editorAPI);\n this.gradientStyle = new GradientStyleController(this.editorAPI);\n this.paragraphStyle = new ParagraphStyleController(this.editorAPI);\n this.characterStyle = new CharacterStyleController(this.editorAPI);\n this.font = new FontController(this.editorAPI);\n this.experiment = new ExperimentController(this.editorAPI);\n this.canvas = new CanvasController(this.editorAPI);\n this.colorConversion = new ColorConversionController(this.editorAPI);\n this.info = new InfoController();\n this.clipboard = new ClipboardController(this.editorAPI);\n this.next = new NextInitiator(this.config, this.connection, this.editorAPI);\n this.enabledNextSubscribers = this.config.enableNextSubscribers;\n this.brandKit = new BrandKitController(this.editorAPI, this);\n }\n\n /**\n * This method will initiate the editor, running this will result in the editor restarting\n * It will generate an iframe in the document\n */\n loadEditor = () => {\n Connect(\n this.config.editorLink || FIXED_EDITOR_LINK,\n {\n onActionsChanged: this.subscriber.onActionsChanged,\n onStateChanged: this.subscriber.onStateChanged,\n onAuthExpired: this.subscriber.onAuthExpired,\n onViewportRequested: this.subscriber.onViewportRequested,\n onDocumentLoaded: this.subscriber.onDocumentLoaded,\n onSelectedFramesContentChanged: this.subscriber.onSelectedFramesContentChanged,\n onSelectedFramesLayoutChanged: this.subscriber.onSelectedFramesLayoutChanged,\n onFramesLayoutChanged: this.subscriber.onFramesLayoutChanged,\n onSelectedLayoutPropertiesChanged: this.subscriber.onSelectedLayoutPropertiesChanged,\n onSelectedLayoutUnitChanged: this.subscriber.onSelectedLayoutUnitChanged,\n onPageSelectionChanged: this.subscriber.onPageSelectionChanged,\n onScrubberPositionChanged: this.subscriber.onAnimationPlaybackChanged,\n onFrameAnimationsChanged: this.subscriber.onAnimationChanged,\n onVariableListChanged: (state) => {\n if (this.enabledNextSubscribers?.onVariableListChanged) {\n this.next.subscriber.onVariableListChanged(state);\n } else {\n this.subscriber.onVariableListChanged(state);\n }\n },\n onSelectedToolChanged: this.subscriber.onSelectedToolChanged,\n onUndoStateChanged: this.subscriber.onUndoStateChanged,\n onSelectedLayoutFramesChanged: this.subscriber.onSelectedLayoutFramesChanged,\n onSelectedTextStyleChanged: this.subscriber.onSelectedTextStyleChanged,\n onColorsChanged: this.subscriber.onColorsChanged,\n onParagraphStylesChanged: this.subscriber.onParagraphStylesChanged,\n onCharacterStylesChanged: this.subscriber.onCharacterStylesChanged,\n onFontFamiliesChanged: this.subscriber.onFontFamiliesChanged,\n onSelectedLayoutIdChanged: this.subscriber.onSelectedLayoutIdChanged,\n onLayoutsChanged: this.subscriber.onLayoutsChanged,\n onConnectorEvent: this.subscriber.onConnectorEvent,\n onConnectorsChanged: (state) => {\n if (this.enabledNextSubscribers?.onConnectorsChanged) {\n this.next.subscriber.onConnectorsChanged(state);\n } else {\n this.subscriber.onConnectorsChanged(state);\n }\n },\n onZoomChanged: this.subscriber.onZoomChanged,\n onSelectedPageIdChanged: this.subscriber.onSelectedPageIdChanged,\n onPagesChanged: this.subscriber.onPagesChanged,\n onPageSnapshotInvalidated: this.subscriber.onPageSnapshotInvalidated,\n onPageSizeChanged: (state) => {\n if (this.enabledNextSubscribers?.onPageSizeChanged) {\n this.next.subscriber.onPageSizeChanged(state);\n } else {\n this.subscriber.onPageSizeChanged(state);\n }\n },\n onShapeCornerRadiusChanged: this.subscriber.onShapeCornerRadiusChanged,\n onCropActiveFrameIdChanged: this.subscriber.onCropActiveFrameIdChanged,\n onAsyncError: this.subscriber.onAsyncError,\n onViewModeChanged: this.subscriber.onViewModeChanged,\n onBarcodeValidationChanged: this.subscriber.onBarcodeValidationChanged,\n onDataSourceIdChanged: this.subscriber.onDataSourceIdChanged,\n onDocumentIssueListChanged: this.subscriber.onDocumentIssueListChanged,\n onCustomUndoDataChanged: this.subscriber.onCustomUndoDataChanged,\n onEngineEditModeChanged: this.subscriber.onEngineEditModeChanged,\n onBrandKitMediaChanged: this.subscriber.onBrandKitMediaChanged,\n },\n this.setConnection,\n this.config.editorId,\n this.config.studioStyling,\n (error) => {\n this.config.onConnectionError?.(error);\n },\n );\n this.editorAPI = connection?.promise.then((editorAPI) => {\n return editorAPI;\n }) as unknown as EditorAPI;\n\n this.action = new ActionController(this.editorAPI);\n this.layout = new LayoutController(this.editorAPI);\n this.frame = new FrameController(this.editorAPI);\n this.barcode = new BarcodeController(this.editorAPI);\n this.component = new ComponentController(this.editorAPI);\n this.animation = new AnimationController(this.editorAPI);\n this.document = new DocumentController(this.editorAPI);\n this.configuration = new LocalConfigurationDecorator(this.editorAPI, this.localConfig);\n this.utils = new UtilsController(this.editorAPI, this.localConfig);\n this.tool = new ToolController(this.editorAPI);\n this.page = new PageController(this.editorAPI);\n this.debug = new DebugController(this.editorAPI);\n this.undoManager = new UndoManagerController(this.editorAPI, this);\n this.textSelection = new TextStyleController(this.editorAPI);\n this.colorStyle = new ColorStyleController(this.editorAPI);\n this.gradientStyle = new GradientStyleController(this.editorAPI);\n this.paragraphStyle = new ParagraphStyleController(this.editorAPI);\n this.characterStyle = new CharacterStyleController(this.editorAPI);\n this.mediaConnector = new MediaConnectorController(this.editorAPI);\n this.fontConnector = new FontConnectorController(this.editorAPI);\n this.componentConnector = new ComponentConnectorController(this.editorAPI);\n this.dataConnector = new DataConnectorController(this.editorAPI, this.dataItemMappingTools);\n this.dataSource = new DataSourceController(this.editorAPI, this.dataItemMappingTools);\n this.connector = new ConnectorController(this.editorAPI, this.localConfig);\n this.variable = new VariableController(this.editorAPI, this.dataItemMappingTools);\n this.font = new FontController(this.editorAPI);\n this.experiment = new ExperimentController(this.editorAPI);\n this.canvas = new CanvasController(this.editorAPI);\n this.shape = new ShapeController(this.editorAPI);\n this.colorConversion = new ColorConversionController(this.editorAPI);\n this.info = new InfoController();\n this.clipboard = new ClipboardController(this.editorAPI);\n this.brandKit = new BrandKitController(this.editorAPI, this);\n this.next = new NextInitiator(this.config, this.connection, this.editorAPI);\n\n // as soon as the editor loads, provide it with the SDK version\n // used to make it start. This enables engine compatibility checks\n // on the Flutter side\n this.configuration.setValue(WellKnownConfigurationKeys.GraFxStudioSdkVersion, packageInfo.version);\n\n // Makes the engine aware which document type it should render, if this call\n // isn't made, the engine will fall back to the type specified in the document.\n //\n // Loading a template JSON and setting the engine to `project` will cause\n // the document JSON structure to be converted to a project on save.\n // Using `getCurrentDocumentState` will also output the converted document.\n this.configuration.setValue(\n WellKnownConfigurationKeys.GraFxStudioDocumentType,\n this.config.documentType || DocumentType.template,\n );\n\n // Update the engine with the specified options from the config or fall back to the defaults.\n this.configuration.updateStudioOptions(this.config.studioOptions || defaultStudioOptions);\n\n // Whether the engine should cache query calls. This is disabled by default.\n this.configuration.setValue(\n WellKnownConfigurationKeys.QueryCallCacheEnabled,\n this.config.enableQueryCallCache?.toString() || 'false',\n );\n };\n\n setConnection = (newConnection: Connection) => {\n connection = newConnection;\n };\n}\n\nexport default SDK;\n","import { Id } from './CommonTypes';\n\nexport enum SlideDirections {\n top = 'top',\n left = 'left',\n right = 'right',\n bottom = 'bottom',\n topLeft = 'topLeft',\n topRight = 'topRight',\n bottomLeft = 'bottomLeft',\n bottomRight = 'bottomRight',\n}\n\nexport enum ShakeDirections {\n horizontal = 'horizontal',\n vertical = 'vertical',\n}\n\nexport enum EaseTypes {\n easeIn = 'easeIn',\n easeOut = 'easeOut',\n easeInOut = 'easeInOut',\n}\n\nexport enum TweenTypes {\n quadratic = 'Quadratic',\n cubic = 'Cubic',\n quartic = 'Quartic',\n quintic = 'Quintic',\n sine = 'Sine',\n exponential = 'Exponential',\n circular = 'Circular',\n elastic = 'Elastic',\n bounce = 'Bounce',\n back = 'Back',\n}\n\nexport enum BasicAnimationsEmphasisStyles {\n bounce = 'bounce',\n flash = 'flash',\n headshake = 'headShake',\n heartbeat = 'heartbeat',\n pulse = 'pulse',\n rubberBand = 'rubberBand',\n vertical = 'vertical',\n horizontal = 'horizontal',\n swing = 'swing',\n tada = 'tada',\n}\n\nexport type EaseTweenCombinationType = `${EaseTypes}${TweenTypes}` | 'noEase';\n\nexport type BasicAnimationsIntroOutroStylesType = {\n slide?: {\n direction: SlideDirections;\n offsetPercent: number;\n };\n rotation?: {\n angleDegrees: number;\n numberOfRotations?: number;\n };\n scale?: {\n scalePercent: number;\n };\n fade?: boolean;\n};\n\nexport type BasicAnimationsIntroType = {\n from: number;\n to: number;\n ease: EaseTweenCombinationType;\n styles: BasicAnimationsIntroOutroStylesType;\n};\n\nexport type BasicAnimationsEmphasisType = {\n from: number;\n to: number;\n ease: EaseTweenCombinationType;\n styles: {\n bounce?: boolean;\n flash?: boolean;\n pulse?: boolean;\n rubberBand?: boolean;\n shake?: {\n direction: ShakeDirections;\n };\n vertical?: boolean;\n horizontal?: boolean;\n headshake?: boolean;\n swing?: boolean;\n tada?: boolean;\n heartbeat?: boolean;\n };\n};\n\nexport type BasicAnimationsOutroType = {\n from: number;\n to: number;\n ease: EaseTweenCombinationType;\n styles: BasicAnimationsIntroOutroStylesType;\n};\n\nexport type BasicAnimationsType = {\n intro?: BasicAnimationsIntroType;\n emphasis?: BasicAnimationsEmphasisType;\n outro?: BasicAnimationsOutroType;\n};\n\nexport type FrameAnimationPropertiesType = {\n id: Id;\n from: number;\n to: number;\n basicAnimations: BasicAnimationsType;\n advancedAnimations?: unknown; // TBI\n};\nexport type FrameAnimationType = {\n animation: FrameAnimationPropertiesType;\n isOverride: boolean;\n};\n\nexport type AnimationPlaybackType = {\n currentAnimationTimeMs: number;\n animationIsPlaying: boolean;\n} | null;\n","export enum ViewMode {\n preview = 'preview',\n normal = 'normal',\n}\n","import { ColorUsage } from './ColorStyleTypes';\nimport { Id } from './CommonTypes';\n\nexport enum GradientType {\n linear = 'linear',\n}\n\nexport type GradientDefinition = LinearGradientDefinition;\n\nexport type LinearGradientDefinition = {\n colors: ColorUsage[];\n stops: number[];\n type: GradientType;\n};\n\nexport type GradientUpdate = GradientDefinition;\n\nexport type DocumentGradient = {\n id: string;\n name: string;\n gradient: GradientDefinition;\n};\n\nexport type GradientUsage = LinearGradientUsage;\n\nexport type LinearGradientUsage = {\n /**\n * Indicates if the gradient will be applied or not.\n */\n enabled: boolean;\n /**\n * Reference to the brand kit color, can only be used if it is a brand kit color.\n */\n id?: Id;\n /**\n * The local color object, can only be used if it is a local color.\n */\n gradient?: LinearGradientDefinition;\n /**\n * The start and stop positions of the gradient. Relative to the frame size\n */\n startStop: RelativeOffsets;\n type: GradientUsageType;\n};\n\nexport enum GradientUsageType {\n /**\n * The linear gradient is defined locally on the object\n */\n local = 'linearLocal',\n /**\n * The linear gradient is referencing a document gradient\n */\n linearBrandKit = 'linearBrandKit',\n}\n\nexport type GradientDeltaUpdate = {\n /**\n * Reference to the brand kit gradient, can only be used if it is a brand kit gradient.\n */\n id?: Id;\n /**\n * The local gradient object, can only be used if it is a local gradient.\n */\n gradient?: GradientUpdate;\n /**\n * Indicates if the gradient will be applied or not.\n */\n isApplied?: boolean;\n};\n\n/**\n * Represents relative start and end offsets\n */\nexport type RelativeOffsets = {\n startX: number;\n startY: number;\n endX: number;\n endY: number;\n};\n","export type { FontConnectorCapabilities, FontFamily, FontStyle } from '@chili-studio/connector-types';\n\nexport enum FontPreviewFormat {\n Square = 'square',\n Line = 'line',\n}\n","export type { Component, ComponentConnectorCapabilities } from '@chili-studio/connector-types';\n\n/**\n * @experimental This is still experimental and might change in future releases.\n */\nexport enum ComponentPreviewType {\n thumbnail = 'thumbnail',\n highest = 'highest',\n medium = 'medium',\n}\n","import { ColorUsage } from './ColorStyleTypes';\nimport { VerticalAlign } from './FrameTypes';\n\nexport enum FontWeights {\n BOLD = 'Bold',\n ITALIC = 'Italic',\n REGULAR = 'Regular',\n}\nexport enum Alignment {\n LEFT = 'left',\n CENTER = 'center',\n RIGHT = 'right',\n JUSTIFY = 'justify',\n}\n\nexport enum TextPosition {\n TOP = 'top',\n CENTER = 'center',\n BOTTOM = 'bottom',\n}\nexport enum Case {\n TO_LOWER_CASE = 'lowercase',\n TO_UPPER_CASE = 'uppercase',\n NORMAL = 'normal',\n}\nexport enum Scripting {\n SUPERSCRIPT = 'superscript',\n SUBSCRIPT = 'subscript',\n NORMAL = 'normal',\n}\n\nexport type DisplayColor = ColorUsage & {\n isApplied: boolean;\n};\nexport interface TextProperties {\n fontKey?: string;\n fontStyle?: FontWeights;\n fontSize?: number;\n textAlign?: Alignment;\n verticalAlign?: VerticalAlign;\n underline?: boolean;\n lineThrough?: boolean;\n letterSpacing?: string;\n trackingRight?: string;\n lineHeight?: number;\n SUB_SUPER_SCRIPT?: Scripting;\n typographicCase?: Case;\n color?: DisplayColor;\n [key: string]: number | string | Record<string, unknown> | null | boolean | undefined;\n}\n\nexport interface TextStyle {\n paragraph?: string;\n character?: string;\n [key: string]: number | string | Record<string, unknown> | null | boolean | undefined;\n}\nexport type TextStyleUpdateType = {\n [key in keyof typeof SelectedTextStyles]?: {\n value: number | string | boolean;\n };\n};\n\nexport interface AppearanceProperties {\n blendMode?: string;\n opacity?: string;\n useFill?: boolean;\n useStroke?: boolean;\n useBackground?: boolean;\n useDropShadow?: boolean;\n fillColor?: string;\n strokeColor?: string;\n backgroundColor?: string;\n dropShadowColor?: string;\n}\n\nexport interface SelectedTextStyle {\n paragraphStyleId?: string;\n characterStyleId?: string;\n fontKey?: string;\n fontSize?: number;\n typographicCase?: Case;\n kerningOn?: boolean;\n subSuperScript?: Scripting;\n trackingLeft?: number;\n trackingRight?: number;\n paragraphIndentStart?: string;\n paragraphIndentEnd?: string;\n paragraphSpaceBefore?: string;\n paragraphSpaceAfter?: string;\n textIndent?: string;\n alignToBaseLine?: boolean;\n baselineShiftValue?: string;\n lineHeight?: number;\n verticalAlign?: VerticalAlign;\n copyfittingScale?: number;\n textAlign?: HorizontalAlign;\n textAlignLast?: HorizontalAlign;\n textOverprint?: boolean;\n color?: DisplayColor;\n strokeColor?: DisplayColor;\n backgroundColor?: DisplayColor;\n fillColorApplied?: boolean;\n strokeColorApplied?: boolean;\n backgroundColorApplied?: boolean;\n strokeWidth?: number;\n underline?: boolean;\n lineThrough?: boolean;\n hasLocalFormatting: boolean;\n markedListType?: MarkedListType;\n markedListGroup?: string;\n markedListLevel?: number;\n}\n\nexport enum HorizontalAlign {\n left = 'left',\n center = 'center',\n right = 'right',\n justify = 'justify',\n}\n\nexport enum MarkedListType {\n none = 'none',\n bullet = 'bullet',\n number = 'number',\n}\n\nexport enum SelectedTextStyleSections {\n STYLE = 'textStyle',\n PROPERTIES = 'textProperties',\n APPEARANCE = 'appearance',\n}\n\nexport enum SelectedTextStyles {\n PARAGRAPH = 'paragraphStyleId',\n CHARACTER = 'characterStyleId',\n FONT_FAMILY = 'fontKey',\n FONT_STYLE = 'fontStyle',\n FONT_SIZE = 'fontSize',\n LETTER_SPACING = 'letterSpacing',\n LINE_HEIGHT = 'lineHeight',\n TEXT_ALIGN = 'textAlign',\n VERTICAL_ALIGN = 'verticalAlign',\n TYPOGRAPHIC_CASE = 'typographicCase',\n SUB_SUPER_SCRIPT = 'subSuperScript',\n UNDERLINE = 'underline',\n LINE_THROUGH = 'lineThrough',\n FILL_COLOR = 'fillColor',\n COLOR = 'color',\n FILL_COLOR_APPLIED = 'fillColorApplied',\n STROKE_COLOR = 'strokeColor',\n STROKE_COLOR_APPLIED = 'strokeColorApplied',\n BACKGROUND_COLOR = 'backgroundColor',\n BACKGROUND_COLOR_APPLIED = 'backgroundColorApplied',\n DROP_SHADOW_COLOR = 'dropShadowColor',\n BLEND_MODE = 'blendMode',\n OPACITY = 'opacity',\n TRACKING_RIGHT = 'trackingRight',\n BASELINE_SHIFT = 'baselineShiftValue',\n STROKE_WIDTH = 'strokeWidth',\n MARKED_LIST_TYPE = 'markedListType',\n MARKED_LIST_GROUP = 'markedListGroup',\n MARKED_LIST_LEVEL = 'markedListLevel',\n}\n\nexport interface UpdateStyleType {\n path: { value: number | string | Record<string, unknown> | null | boolean | undefined };\n}\n","import { ColorUsage, ColorUsageUpdate } from './ColorStyleTypes';\nimport { Id } from './CommonTypes';\nimport { Alignment, Case, Scripting } from './TextStyleTypes';\n\nexport type ParagraphStyle = {\n id: Id;\n name: string;\n fontKey: string;\n fontStyle: string;\n fontSize: number;\n typographicCase: Case;\n kerningOn: boolean;\n subSuperScript: Scripting;\n // the following properties are unit properties\n trackingLeft: number;\n trackingRight: number;\n startIndent: string;\n endIndent: string;\n spaceBefore: string;\n spaceAfter: string;\n textIndent: string;\n // end of unit properties\n alignToBaseLine: boolean;\n baselineShiftValue: string;\n lineHeight: number;\n textAlign: Alignment;\n textAlignLast: Alignment;\n textOverprint: boolean;\n color: ColorUsage;\n strokeColor: ColorUsage;\n backgroundColor: ColorUsage;\n fillColorApplied: boolean;\n strokeColorApplied: boolean;\n backgroundColorApplied?: boolean;\n strokeWidth: number;\n underline: boolean;\n lineThrough: boolean;\n /**\n * @experimental This property is experimental and may be changed in the future.\n */\n bulletListStyle: BulletListStyle;\n /**\n * @experimental This property is experimental and may be changed in the future.\n */\n numericListStyle: NumericListStyle;\n};\n\nexport type ParagraphStyleUpdate = {\n fontKey?: {\n value: string;\n };\n fontSize?: {\n value: number;\n };\n typographicCase?: {\n value: Case;\n };\n kerningOn?: {\n value: boolean;\n };\n subSuperScript?: {\n value: Scripting;\n };\n trackingLeft?: {\n value: number;\n };\n trackingRight?: {\n value: number;\n };\n textIndent?: {\n value: string;\n };\n alignToBaseLine?: {\n value: boolean;\n };\n baselineShiftValue?: {\n value: string;\n };\n lineHeight?: {\n value: number;\n };\n textAlign?: {\n value: Alignment;\n };\n textAlignLast?: {\n value: Alignment;\n };\n textOverprint?: {\n value: boolean;\n };\n color?: {\n value: ColorUsageUpdate;\n };\n fillColorApplied?: {\n value: boolean;\n };\n strokeColor?: {\n value: ColorUsageUpdate;\n };\n strokeColorApplied?: {\n value: boolean;\n };\n strokeWidth?: {\n value: string;\n };\n backgroundColor?: {\n value: ColorUsageUpdate;\n };\n backgroundColorApplied?: {\n value: boolean;\n };\n underline?: {\n value: boolean;\n };\n lineThrough?: {\n value: boolean;\n };\n /**\n * @experimental This property is experimental and may be changed in the future.\n */\n bulletListBulletMarks?: {\n value: string[];\n };\n /**\n * @experimental This property is experimental and may be changed in the future.\n */\n bulletListLeftIndent?: {\n value: string;\n };\n /**\n * @experimental This property is experimental and may be changed in the future.\n */\n bulletListTextIndent?: {\n value: string;\n };\n /**\n * @experimental This property is experimental and may be changed in the future.\n */\n bulletListCharacterStyleId?: {\n value?: string;\n };\n /**\n * @experimental This property is experimental and may be changed in the future.\n */\n numericListNumberingStyle?: {\n value: NumericListNumberingStyle[];\n };\n /**\n * @experimental This property is experimental and may be changed in the future.\n */\n numericListLeftIndent?: {\n value: string;\n };\n /**\n * @experimental This property is experimental and may be changed in the future.\n */\n numericListTextIndent?: {\n value: string;\n };\n /**\n * @experimental This property is experimental and may be changed in the future.\n */\n numericListCharacterStyleId?: {\n value?: string;\n };\n};\n\nexport type BulletListStyle = {\n /**\n * Array of bullet marks for each level\n * The position of the item in the array is the level of the bullet list\n * The value of the item is the bullet mark\n */\n bulletMarks: string[];\n leftIndent: number;\n textIndent: number;\n characterStyleId?: string;\n};\n\nexport type NumericListStyle = {\n leftIndent: number;\n textIndent: number;\n numberingStyle: NumericListNumberingStyle[];\n characterStyleId?: string;\n};\n\nexport type NumericListNumberingStyle = {\n format: NumberListFormat;\n symbol: NumberListSeparatorSymbol;\n};\n\nexport enum NumberListFormat {\n arabic = 'arabic',\n romanUpperCase = 'romanUpperCase',\n romanLowerCase = 'romanLowerCase',\n latinUpperCase = 'latinUpperCase',\n latinLowerCase = 'latinLowerCase',\n}\n\nexport enum NumberListSeparatorSymbol {\n none = 'none',\n dash = 'dash',\n dot = 'dot',\n colon = 'colon',\n roundBracket = 'roundBracket',\n}\n","import { Id } from './CommonTypes';\n\n/**\n * Editor Events that Actions can react to.\n */\nexport enum ActionEditorEvent {\n /**\n * Indicates the selected layout changed.\n */\n selectedLayoutChanged = 'selectedLayoutChanged',\n\n /**\n * Indicates a frame was moved, resized, rotated.\n * Note: this does not trigger when a different layout is selected.\n */\n frameMoved = 'frameMoved',\n\n /**\n * Indicates the size of a page has changed.\n */\n pageSizeChanged = 'pageSizeChanged',\n\n /**\n * Indicates the document is fully initialized, actions can safely be executed.\n * Note: the other events will only be triggered after a document is fully initialized.\n */\n documentLoaded = 'documentLoaded',\n\n /**\n * Indicates the value of a variable changed.\n */\n variableValueChanged = 'variableValueChanged',\n}\n\n/**\n * Action used by the document.\n */\nexport interface DocumentAction {\n /**\n * Unique Id of the action.\n */\n id: Id;\n\n /**\n * Unique action name\n */\n name: string;\n\n /**\n * All the triggers this action will react to.\n */\n triggers: ActionTrigger[];\n\n /**\n * The JavaScript based action script.\n */\n script: string;\n}\n\n/**\n * Trigger used to fire an action.\n */\nexport type ActionTrigger =\n | SelectedLayoutChangedTrigger\n | FrameMovedTrigger\n | PageSizeChangedTrigger\n | DocumentLoadedTrigger\n | VariableValueChangedTrigger;\n\nexport interface SelectedLayoutChangedTrigger {\n event: ActionEditorEvent.selectedLayoutChanged;\n}\n\n/**\n * Model to update an Action.\n */\nexport type ActionDeltaUpdate = {\n /**\n * The new Action JS script.\n */\n script?: string;\n\n /**\n * The new name of the Action.\n */\n name?: string;\n\n /**\n * Whether the Action has any typing errors.\n */\n hasTypeError?: boolean;\n\n /**\n * The new list of triggers.\n */\n triggers?: ActionTrigger[];\n};\n\nexport interface FrameMovedTrigger {\n event: ActionEditorEvent.frameMoved;\n /**\n * The frame id's this trigger should react to.\n * Leaving this `undefined`, will make this trigger react to any frame that moves in any direction (also rotation, resize and ).\n */\n triggers?: Id[];\n}\n\nexport interface PageSizeChangedTrigger {\n event: ActionEditorEvent.pageSizeChanged;\n}\n\nexport interface DocumentLoadedTrigger {\n event: ActionEditorEvent.documentLoaded;\n}\n\nexport interface VariableValueChangedTrigger {\n event: ActionEditorEvent.variableValueChanged;\n\n /**\n * The variable id's this trigger should react to.\n * Leaving this `undefined`, will make this trigger react to all variableValueChanges.\n */\n triggers?: Id[];\n}\n","import { ColorUsage } from './ColorStyleTypes';\n\nexport enum ShapeType {\n ellipse = 'ellipse',\n rectangle = 'rectangle',\n polygon = 'polygon',\n}\n\nexport interface ShapeProperties {\n enableFill?: boolean;\n fillColor?: ColorUsage;\n enableStroke?: boolean;\n strokeColor?: ColorUsage;\n strokeWeight?: number;\n allCornersSame?: boolean;\n}\n\nexport interface ShapeContainerProperties {\n enableStroke: boolean;\n strokeColor: ColorUsage;\n strokeWeight: number;\n allCornersSame: boolean;\n}\n\nexport interface CornerRadiusUpdateModel {\n radiusAll?: number;\n topLeft?: number;\n bottomLeft?: number;\n topRight?: number;\n bottomRight?: number;\n allCornersSame?: boolean;\n}\n\nexport interface CornerRadiusNone {\n type: string;\n}\n\nexport interface CornerRadiusAll {\n type: string;\n radius: number;\n}\n\nexport interface CornerRadiusOnly {\n type: string;\n topLeft: number;\n bottomLeft: number;\n topRight: number;\n bottomRight: number;\n}\n\nexport enum CornerRadiusType {\n all = 'all',\n only = 'only',\n none = 'none',\n}\n\nexport type CornerRadius = CornerRadiusNone | CornerRadiusAll | CornerRadiusOnly;\n\nexport type ShapeFrameRectSource = {\n type: ShapeType.rectangle;\n cornerRadius?: CornerRadius;\n};\n\nexport type ShapeFrameEllipseSource = {\n type: ShapeType.ellipse;\n};\n\nexport type ShapeFramePolygonSource = {\n type: ShapeType.polygon;\n sides?: number;\n cornerRadius?: CornerRadius;\n};\n\nexport type ShapeFrameSource = ShapeFrameRectSource | ShapeFrameEllipseSource | ShapeFramePolygonSource;\n","import { Id } from './CommonTypes';\n\nexport type EngineEditMode = {\n frameId: Id | null;\n mode: EngineEditModeType;\n};\n\nexport enum EngineEditModeType {\n normal = 'normal',\n textEdit = 'textEdit',\n customCrop = 'customCrop',\n frameSubjectArea = 'frameSubjectArea',\n perAssetCrop = 'perAssetCrop',\n gradient = 'gradient',\n}\n","import { Id } from '../../types/CommonTypes';\n\nexport interface ConnectorUrlRegistration {\n /**\n * Url to the connector. Must be a publicly accessible url.\n */\n url: string;\n source: ConnectorRegistrationSource.url;\n}\n\nexport interface ConnectorGrafxRegistration {\n /**\n * `RemoteConnectorId` of the connector with `grafx` source.\n */\n id: Id;\n source: ConnectorRegistrationSource.grafx;\n}\n\nexport interface ConnectorLocalRegistration {\n url: string;\n source: ConnectorRegistrationSource.local;\n}\n\nexport enum ConnectorRegistrationSource {\n /**\n * Connector is hosted on a publicly accessible link.\n */\n url = 'url',\n\n /**\n * Connector is hosted on GraFx Environment API.\n */\n grafx = 'grafx',\n\n /**\n * Connector is embedded in the document.\n * Note: This is a temporary type; only to be used internally.\n */\n local = 'local',\n}\n\nexport enum ConnectorType {\n media = 'media',\n fonts = 'fonts',\n data = 'data',\n /**\n * @experimental This is still experimental and might change in future releases.\n */\n components = 'components',\n}\n\nexport type ConnectorInstance = {\n id: Id;\n name: string;\n iconUrl: string;\n source: ConnectorGrafxRegistration | ConnectorUrlRegistration | ConnectorLocalRegistration;\n};\n"],"names":["MessageType","Resolution","ErrorCode","NativeErrorName","NativeEventType","createDestructor","localName","log","callbacks","destroyed","error","callback","createLogger","debug","args","DEFAULT_PORT_BY_PROTOCOL","URL_REGEX","opaqueOriginSchemes","getOriginFromSrc","src","scheme","location","regexResult","protocol","hostname","port","portSuffix","serializeError","name","message","stack","deserializeError","obj","deserializedError","key","connectCallReceiver","info","serializedMethods","local","remote","originForSending","originForReceiving","handleMessageEvent","event","callMessage","methodName","id","createPromiseHandler","resolution","returnValue","err","errorReplyMessage","resolve","generateId","KEY_PATH_DELIMITER","keyPathToSegments","keyPath","segmentsToKeyPath","segments","createKeyPath","prefix","setAtKeyPath","subject","value","prevSubject","idx","serializeMethods","methods","flattenedMethods","deserializeMethods","connectCallSender","callSender","methodKeyPaths","destroyConnection","createMethodProxy","iframeRemoved","reject","replyMessage","api","handleAckMessageFactory","childOrigin","destructor","destroy","onDestroy","destroyCallReceiver","receiverMethodNames","receiverMethodName","destroyCallSender","handleSynMessageFactory","synAckMessage","CHECK_IFRAME_IN_DOC_INTERVAL","monitorIframeRemoval","iframe","checkIframeInDocIntervalId","startConnectionTimeout","timeout","timeoutId","validateIframeHasSrcOrSrcDoc","connectToChild","options","handleSynMessage","handleAckMessage","stopConnectionTimeout","handleMessage","validateEditorLink","editorLink","linkValidator","link","setupFrame","styling","html","messageHandler","Connect","params","setConnection","editorId","onSetupFrameError","editorSelectorId","setupNewFrame","iframeContainer","_a","errorData","WellKnownConfigurationKeys","FrameEditingMode","defaultStudioOptions","DocumentIssueTypeEnum","DocumentType","ActionAsyncError","eventChain","DataRowAsyncError","count","exceptions","ConnectorHttpError","statusCode","VariableValueConstrainsViolationError","context","connectorHttpErrorErrorCode","variableInvalidValueErrorCode","throwEditorResponseError","response","parsedError","parsedCause","httpStatusCode","parseVariableConstraintError","errorMsg","patterns","pattern","throwVariableException","defaultOnFailure","getEditorResponseData","parseOrOnFailure","parse","hasCustomOnFailure","handleFailure","dataShouldBeParsed","ActionController","editorAPI","__privateAdd","_editorAPI","__privateGet","result","update","actionScript","triggers","order","ids","hasTypeErrors","shouldEnable","__privateSet","AnimationController","children","layoutId","animation","timeInMS","BarcodeType","BarcodeErrorCorrectionLevel","BarcodeCharacterSet","BarcodeValidationResult","MeasurementUnit","PositionEnum","LayoutType","LayoutIntent","ConstraintMode","BarcodeController","properties","enableBackground","backgroundColor","enableBars","barColor","source","enableText","barHeight","magnification","position","errorCorrectionLevel","characterSet","drawLightMarginIndicator","drawStartStopChars","type","allowToggleText","allowBarHeight","allowEnableMagnification","allowedCharacterSets","allowedErrorCorrectionLevels","quietZoneAlwaysCombined","allowToggleLightMarginIndicator","allowToggleDrawStartAndEndChar","engineBrandKitToStudioBrandKit","engine","fontConnectorId","brandKit","engineBrandKitToBrandKitInternal","BrandKitController$1","sdk","newName","version","engineData","remoteConnectorId","assetId","colorsList","gradientsList","paragraphStylesList","characterStylesList","fontsList","mediaList","color","gradient","style","font","media","studioBrandKit","enableAutoSync","CanvasController","_id","left","top","width","height","scaleFactor","viewMode","CharacterStyleController","characterStyleId","characterStyle","characterStyleName","ClipboardController","frameData","res","clipboardData","ColorConversionController","ColorType","ColorUsageType","ColorStyleController","newColorName","newColorProperties","DeprecatedMediaType","DeprecatedMediaConnectorDownloadType","MediaType","ConnectorType","SortBy","SortOrder","ConnectorConfigValueType","ConnectorConfigContextType","ConnectorRegistrationSource","ConnectorMapping","contextProperty","mapFrom","sourceValue","direction","ConnectorMappingSource","ConnectorMappingDirection","ConnectorStateType","ConnectorEventType","grafxMediaConnectorRegistration","GrafxTokenAuthCredentials","token","headers","RefreshedAuthCredendentials","AuthCredentialsTypeEnum","AuthRefreshTypeEnum","UploadAssetValidationErrorType","UploadAssetValidationError","ConnectorSupportedAuth","ConnectorCompatibilityTools","registration","url","pathChunks","connectors","baseUrl","connector","ConnectorController$1","localConfig","_localConfig","_connectorCompatibilityTools","resp","connectorRegistration","configurationCallback","ConnectorConfigurator","timeoutMilliseconds","waitTime","retries","mappings","config","existingMappings","filteredMappings","mapping","newMapping","validMappings","i","combinedMappings","cm","_connectorId","_res","m","headerName","headerValue","DataConnectorController","dataItemMappingTools","_dataItemMappingTools","connectorId","pageOptions","previousPageToken","continuationToken","e","DataSourceController","dataRow","engineDataItem","DebugController","DocumentController","doc","parsedDoc","preset","ComponentFitEnum","AutoGrowDirection","ImageSourceTypeEnum","ComponentSourceTypeEnum","FrameTypeEnum","BarcodeSourceTypeEnum","TextDirection","FlowDirection","VerticalAlign","BlendMode","FitMode","FitModePosition","UpdateZIndexMethod","FrameAnchorType","AnchorTargetType","AnchorTargetEdgeType","PageAnchorTarget","FrameAnchorTarget","edge","CropType","ExperimentController","imageFrameId","variableId","frameId","textType","text","startIndex","length","skipEvent","FontConnectorController","_blobAPI","queryOptions","fontFamilyId","fontStyleId","previewFormat","deprecatedType","FontController","fontFamily","fontStyle","characters","characterPreviewStyle","ShapeController","enableFill","fillColor","enableStroke","strokeColor","strokeWeight","allCornersSame","radius","cornerRadius","FrameController","method","rotation","XValue","YValue","opacity","x","y","srcJson","fitMode","_constrainProportions","verticalAlign","numberOfColumns","columnGap","shapeFrameId","blendMode","horizontal","anchorType","anchorTarget","endAnchorTarget","subjectId","FrameConstraintController","allowed","deltaUpdate","proportionLocked","constraint","InfoController","engineInfo","sdkInfo","LayoutController","parentId","presets","pageSize","unit","intent","enabled","privateData","displayName","isAvailable","isSelected","resizableLayoutProperties","MediaDownloadType","MediaDownloadIntent","MediaConnectorController","mediaId","downloadType","compatibleDownloadType","filePointers","deprecatedMediaDownloadType","PageController$1","pageId","isVisible","settings","_pageId","ParagraphStyleController","VariableType","Day","Locale","VariableVisibilityType","VariableVisibilityTargetType","VariableVisibilityOperator","DataSourceVariableSourceType","DataSourceVariableDisplayOptionsType","SubscriberController$1","actions","animationPlaybackState","layoutProperties","framesLayout","frames","singleFrameCallBack","framesContent","authRefreshRequest","authCredentials","viewport","variablesJson","updated","variable","item","tool","undoState","customData","layoutFrames","styles","colors","paragraphStyles","characterStyles","fonts","layouts","zoom","connectorEvent","compatibleConnectors","pages","asyncError","dataRowException","actionException","validationResults","documentIssues","engineEditMode","brandKitMedia","TextStyleController","FramePropertyNames","LayoutPropertyNames","ToolType","DownloadFormats","EnvironmentType","ToolController","UndoManagerController","_advanced","_sdk","operationName","undoOperationCallback","AdvancedUndoManagerController","round","val","precision","hundred","UtilsController","parameters","environment","host","files","validationConfiguration","envApiUrl","stageUrl","accessToken","formData","file","filename","data","unitExpression","conversionUnit","isDataSourceVariable","isInjectedDataSourceVariable","NumberVariable","minimum","maximum","showStepper","stepSize","thousandsSeparator","decimalSeparator","numberOfDecimals","DateVariable","displayFormat","locale","date","excludedDays","DataSourceVariable","engineValue","itemId","itemIdPropertyName","model","sourceType","displayOptionsType","displayColumn","VariableController$1","_setPlaceholder","_setHelpText","label","placeholder","helpText","items","r","isHidden","layoutIdList","isRequired","removeParagraphIfEmpty","maxCharacters","isReadonly","suffix","allowQuery","allowUpload","minWidth","minHeight","isDontBreak","variables","listVariable","selected","newItems","BrandKitController","apiBrandKit","SubscriberController","VariableController","ImageVariableController","DataSourceVariableController","ConnectorController","PageController","NextInitiator","connection","LogLevel","LogCategory","CallbackErrorBehavior","EngineEventTrigger","logger","callbackFn","errorBehavior","fnName","EngineCallbackHandler","handler","EngineEvent","legacyHandler","ConfigHelper","clone","_b","level","cat","msg","_c","_d","_e","_f","_g","_h","_i","_j","_k","_l","_m","_n","_o","_p","_q","_r","_s","_t","_u","_v","_w","_x","_y","_z","_A","_B","_C","_D","_E","_F","_G","_H","_I","logLevel","DataItemMappingTools","dataItem","parsedItem","ConfigurationController","LocalConfigurationDecorator","GradientStyleController","newGradientName","newGradientProperties","ComponentConnectorController","componentId","previewType","ComponentController","target","sourceField","ENGINE_DOMAIN","FIXED_EDITOR_LINK","SDK","state","packageInfo","newConnection","child","SlideDirections","ShakeDirections","EaseTypes","TweenTypes","BasicAnimationsEmphasisStyles","ViewMode","GradientType","GradientUsageType","FontPreviewFormat","ComponentPreviewType","FontWeights","Alignment","TextPosition","Case","Scripting","MarkedListType","SelectedTextStyleSections","SelectedTextStyles","NumberListFormat","NumberListSeparatorSymbol","ActionEditorEvent","ShapeType","CornerRadiusType","EngineEditModeType"],"mappings":";;;;;;;;;;AAAO,IAAIA;AAAA,CACV,SAAUA,GAAa;AACpB,EAAAA,EAAY,OAAU,QACtBA,EAAY,QAAW,SACvBA,EAAY,MAAS,OACrBA,EAAY,SAAY,UACxBA,EAAY,MAAS;AACzB,GAAGA,MAA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