@chili-publish/studio-sdk 0.122.0 → 0.133.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/README.md +1 -1
  2. package/_bundles/main.js +1 -1
  3. package/_bundles/main.js.map +1 -1
  4. package/_bundles/report.html +2 -2
  5. package/lib/editor-engine.json +1 -1
  6. package/lib/package.json +1 -1
  7. package/lib/src/controllers/ActionController.d.ts +33 -25
  8. package/lib/src/controllers/ActionController.js +42 -31
  9. package/lib/src/controllers/ActionController.js.map +1 -1
  10. package/lib/src/controllers/AnimationController.d.ts +24 -24
  11. package/lib/src/controllers/AnimationController.js +28 -28
  12. package/lib/src/controllers/AnimationController.js.map +1 -1
  13. package/lib/src/controllers/CanvasController.d.ts +3 -2
  14. package/lib/src/controllers/CanvasController.js +4 -3
  15. package/lib/src/controllers/CanvasController.js.map +1 -1
  16. package/lib/src/controllers/CharacterStyleController.d.ts +23 -23
  17. package/lib/src/controllers/CharacterStyleController.js +26 -26
  18. package/lib/src/controllers/CharacterStyleController.js.map +1 -1
  19. package/lib/src/controllers/ColorStyleController.d.ts +22 -22
  20. package/lib/src/controllers/ColorStyleController.js +27 -27
  21. package/lib/src/controllers/ColorStyleController.js.map +1 -1
  22. package/lib/src/controllers/ConfigurationController.d.ts +1 -1
  23. package/lib/src/controllers/ConfigurationController.js +1 -1
  24. package/lib/src/controllers/ConnectorController.d.ts +26 -12
  25. package/lib/src/controllers/ConnectorController.js +35 -18
  26. package/lib/src/controllers/ConnectorController.js.map +1 -1
  27. package/lib/src/controllers/DebugController.d.ts +2 -2
  28. package/lib/src/controllers/DebugController.js +2 -2
  29. package/lib/src/controllers/DebugController.js.map +1 -1
  30. package/lib/src/controllers/DocumentController.d.ts +6 -6
  31. package/lib/src/controllers/DocumentController.js +7 -7
  32. package/lib/src/controllers/DocumentController.js.map +1 -1
  33. package/lib/src/controllers/ExperimentController.d.ts +32 -7
  34. package/lib/src/controllers/ExperimentController.js +42 -9
  35. package/lib/src/controllers/ExperimentController.js.map +1 -1
  36. package/lib/src/controllers/FontConnectorController.d.ts +36 -28
  37. package/lib/src/controllers/FontConnectorController.js +45 -37
  38. package/lib/src/controllers/FontConnectorController.js.map +1 -1
  39. package/lib/src/controllers/FontController.d.ts +15 -15
  40. package/lib/src/controllers/FontController.js +18 -18
  41. package/lib/src/controllers/FontController.js.map +1 -1
  42. package/lib/src/controllers/FrameController.d.ts +127 -127
  43. package/lib/src/controllers/FrameController.js +173 -173
  44. package/lib/src/controllers/FrameController.js.map +1 -1
  45. package/lib/src/controllers/LayoutController.d.ts +37 -37
  46. package/lib/src/controllers/LayoutController.js +48 -48
  47. package/lib/src/controllers/LayoutController.js.map +1 -1
  48. package/lib/src/controllers/MediaConnectorController.d.ts +33 -23
  49. package/lib/src/controllers/MediaConnectorController.js +41 -31
  50. package/lib/src/controllers/MediaConnectorController.js.map +1 -1
  51. package/lib/src/controllers/PageController.d.ts +11 -11
  52. package/lib/src/controllers/PageController.js +16 -16
  53. package/lib/src/controllers/PageController.js.map +1 -1
  54. package/lib/src/controllers/ParagraphStyleController.d.ts +20 -20
  55. package/lib/src/controllers/ParagraphStyleController.js +23 -23
  56. package/lib/src/controllers/ParagraphStyleController.js.map +1 -1
  57. package/lib/src/controllers/ShapeController.d.ts +28 -28
  58. package/lib/src/controllers/ShapeController.js +43 -43
  59. package/lib/src/controllers/ShapeController.js.map +1 -1
  60. package/lib/src/controllers/SubscriberController.d.ts +18 -18
  61. package/lib/src/controllers/SubscriberController.js +24 -24
  62. package/lib/src/controllers/SubscriberController.js.map +1 -1
  63. package/lib/src/controllers/TextStyleController.d.ts +8 -8
  64. package/lib/src/controllers/TextStyleController.js +9 -11
  65. package/lib/src/controllers/TextStyleController.js.map +1 -1
  66. package/lib/src/controllers/ToolController.d.ts +10 -10
  67. package/lib/src/controllers/ToolController.js +9 -9
  68. package/lib/src/controllers/ToolController.js.map +1 -1
  69. package/lib/src/controllers/UtilsController.d.ts +10 -4
  70. package/lib/src/controllers/UtilsController.js +10 -4
  71. package/lib/src/controllers/UtilsController.js.map +1 -1
  72. package/lib/src/controllers/VariableController.d.ts +78 -34
  73. package/lib/src/controllers/VariableController.js +106 -53
  74. package/lib/src/controllers/VariableController.js.map +1 -1
  75. package/lib/src/index.d.ts +4 -3
  76. package/lib/src/index.js +5 -4
  77. package/lib/src/index.js.map +1 -1
  78. package/lib/src/interactions/connector.d.ts +4 -3
  79. package/lib/src/interactions/connector.js +7 -3
  80. package/lib/src/interactions/connector.js.map +1 -1
  81. package/lib/src/tests/__mocks__/FrameProperties.d.ts +2 -2
  82. package/lib/src/tests/__mocks__/FrameProperties.js +2 -2
  83. package/lib/src/tests/__mocks__/FrameProperties.js.map +1 -1
  84. package/lib/src/tests/__mocks__/MockImageFrameSource.js +5 -5
  85. package/lib/src/tests/__mocks__/MockImageFrameSource.js.map +1 -1
  86. package/lib/src/tests/__mocks__/animations.js +1 -1
  87. package/lib/src/tests/__mocks__/animations.js.map +1 -1
  88. package/lib/src/tests/__mocks__/mockDocument.d.ts +1 -1
  89. package/lib/src/tests/__mocks__/mockDocument.js +1 -1
  90. package/lib/src/tests/__mocks__/mockDocument.js.map +1 -1
  91. package/lib/src/tests/controllers/ActionController.test.js +18 -9
  92. package/lib/src/tests/controllers/ActionController.test.js.map +1 -1
  93. package/lib/src/tests/controllers/AnimationController.test.js +14 -14
  94. package/lib/src/tests/controllers/AnimationController.test.js.map +1 -1
  95. package/lib/src/tests/controllers/CharacterStyleController.test.js +11 -11
  96. package/lib/src/tests/controllers/CharacterStyleController.test.js.map +1 -1
  97. package/lib/src/tests/controllers/ColorStyleController.test.js +17 -17
  98. package/lib/src/tests/controllers/ColorStyleController.test.js.map +1 -1
  99. package/lib/src/tests/controllers/ConnectorController.test.js +16 -5
  100. package/lib/src/tests/controllers/ConnectorController.test.js.map +1 -1
  101. package/lib/src/tests/controllers/DebugController.test.js +1 -1
  102. package/lib/src/tests/controllers/DebugController.test.js.map +1 -1
  103. package/lib/src/tests/controllers/DocumentController.test.js +6 -6
  104. package/lib/src/tests/controllers/DocumentController.test.js.map +1 -1
  105. package/lib/src/tests/controllers/ExperimentController.test.js +29 -1
  106. package/lib/src/tests/controllers/ExperimentController.test.js.map +1 -1
  107. package/lib/src/tests/controllers/FontConnectorController.test.js +11 -11
  108. package/lib/src/tests/controllers/FontController.test.js +11 -11
  109. package/lib/src/tests/controllers/FontController.test.js.map +1 -1
  110. package/lib/src/tests/controllers/FrameController.test.js +113 -113
  111. package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
  112. package/lib/src/tests/controllers/LayoutController.test.js +25 -27
  113. package/lib/src/tests/controllers/LayoutController.test.js.map +1 -1
  114. package/lib/src/tests/controllers/MediaConnectorController.test.js +1 -1
  115. package/lib/src/tests/controllers/PageController.test.js +11 -11
  116. package/lib/src/tests/controllers/PageController.test.js.map +1 -1
  117. package/lib/src/tests/controllers/ParagraphStyleController.test.js +12 -12
  118. package/lib/src/tests/controllers/ParagraphStyleController.test.js.map +1 -1
  119. package/lib/src/tests/controllers/ShapeController.test.js +26 -26
  120. package/lib/src/tests/controllers/ShapeController.test.js.map +1 -1
  121. package/lib/src/tests/controllers/SubscriberContoller.test.js +7 -7
  122. package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -1
  123. package/lib/src/tests/controllers/TextStyleController.test.js +6 -6
  124. package/lib/src/tests/controllers/TextStyleController.test.js.map +1 -1
  125. package/lib/src/tests/controllers/ToolController.test.js +9 -9
  126. package/lib/src/tests/controllers/ToolController.test.js.map +1 -1
  127. package/lib/src/tests/controllers/UtilsController.test.js +20 -0
  128. package/lib/src/tests/controllers/UtilsController.test.js.map +1 -1
  129. package/lib/src/tests/controllers/VariableController.test.js +62 -31
  130. package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
  131. package/lib/src/tests/interactions/connector.test.js +14 -0
  132. package/lib/src/tests/interactions/connector.test.js.map +1 -1
  133. package/lib/src/tests/utils/getClaculatedValue.test.js +2 -2
  134. package/lib/src/tests/utils/getClaculatedValue.test.js.map +1 -1
  135. package/lib/src/types/ActionTypes.d.ts +21 -6
  136. package/lib/src/types/AnimationTypes.d.ts +3 -3
  137. package/lib/src/types/CharacterStyleTypes.d.ts +2 -1
  138. package/lib/src/types/ColorStyleTypes.d.ts +8 -7
  139. package/lib/src/types/ColorStyleTypes.js +1 -1
  140. package/lib/src/types/ColorStyleTypes.js.map +1 -1
  141. package/lib/src/types/CommonTypes.d.ts +9 -7
  142. package/lib/src/types/ConfigurationTypes.d.ts +3 -0
  143. package/lib/src/types/ConnectorTypes.d.ts +13 -3
  144. package/lib/src/types/ConnectorTypes.js +5 -0
  145. package/lib/src/types/ConnectorTypes.js.map +1 -1
  146. package/lib/src/types/DocumentTypes.d.ts +23 -25
  147. package/lib/src/types/DocumentTypes.js.map +1 -1
  148. package/lib/src/types/FontConnectorTypes.d.ts +2 -1
  149. package/lib/src/types/FontConnectorTypes.js.map +1 -1
  150. package/lib/src/types/FontTypes.d.ts +5 -4
  151. package/lib/src/types/FrameTypes.d.ts +23 -21
  152. package/lib/src/types/FrameTypes.js.map +1 -1
  153. package/lib/src/types/LayoutTypes.d.ts +14 -14
  154. package/lib/src/types/LayoutTypes.js.map +1 -1
  155. package/lib/src/types/MediaConnectorTypes.d.ts +2 -1
  156. package/lib/src/types/MediaConnectorTypes.js.map +1 -1
  157. package/lib/src/types/PageTypes.d.ts +3 -3
  158. package/lib/src/types/ParagraphStyleTypes.d.ts +6 -5
  159. package/lib/src/types/ShapeTypes.d.ts +15 -1
  160. package/lib/src/types/ShapeTypes.js.map +1 -1
  161. package/lib/src/types/TextStyleTypes.d.ts +5 -5
  162. package/lib/src/types/TextStyleTypes.js +1 -1
  163. package/lib/src/types/TextStyleTypes.js.map +1 -1
  164. package/lib/src/types/TextTypes.d.ts +4 -0
  165. package/lib/src/types/TextTypes.js +6 -0
  166. package/lib/src/types/TextTypes.js.map +1 -0
  167. package/lib/src/types/VariableTypes.d.ts +12 -11
  168. package/lib/src/types/VariableTypes.js +3 -2
  169. package/lib/src/types/VariableTypes.js.map +1 -1
  170. package/lib/src/utils/enums.d.ts +8 -3
  171. package/lib/src/utils/enums.js +19 -13
  172. package/lib/src/utils/enums.js.map +1 -1
  173. package/lib/src/utils/getCalculatedValue.js +2 -2
  174. package/package.json +1 -1
@@ -12,51 +12,51 @@ export declare class ColorStyleController {
12
12
  constructor(editorAPI: EditorAPI);
13
13
  /**
14
14
  * This method returns the list of colors
15
- * @returns
15
+ * @returns list of all colors
16
16
  */
17
- getColors: () => Promise<import("../types/CommonTypes").EditorResponse<DocumentColor[]>>;
17
+ getAll: () => Promise<import("../types/CommonTypes").EditorResponse<DocumentColor[]>>;
18
18
  /**
19
19
  * This method returns a color by id
20
- * @param colorId The ID of a specific color
21
- * @returns
20
+ * @param id the id of a specific color
21
+ * @returns color properties for given id
22
22
  */
23
- getColorById: (colorId: string) => Promise<import("../types/CommonTypes").EditorResponse<DocumentColor>>;
23
+ getById: (id: string) => Promise<import("../types/CommonTypes").EditorResponse<DocumentColor>>;
24
24
  /**
25
- * This method create a new color
25
+ * This method creates a new color
26
26
  * @returns the new created color id
27
27
  */
28
- createColor: () => Promise<import("../types/CommonTypes").EditorResponse<string>>;
28
+ create: () => Promise<import("../types/CommonTypes").EditorResponse<string>>;
29
29
  /**
30
- * This method duplicates a color
31
- * @param colorId The ID of a specific color
32
- * @returns the new color id
30
+ * This method duplicates a color by the id
31
+ * @param id the id of a specific color
32
+ * @returns id of the duplicated color
33
33
  */
34
- duplicateColor: (colorId: string) => Promise<import("../types/CommonTypes").EditorResponse<string>>;
34
+ duplicate: (id: string) => Promise<import("../types/CommonTypes").EditorResponse<string>>;
35
35
  /**
36
36
  * This method changes positions of colors
37
- * @param order The position of the colors
38
- * @param colorIds The list of color ids
37
+ * @param order the position of the colors
38
+ * @param ids the list of color IDs
39
39
  * @returns
40
40
  */
41
- moveColors: (order: number, colorIds: string[]) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
41
+ move: (order: number, ids: string[]) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
42
42
  /**
43
43
  * This method renames a color
44
- * @param id The ID of a specific color
45
- * @param name The new name of the color
44
+ * @param id the id of a specific color
45
+ * @param newColorName the new name of the color
46
46
  * @returns
47
47
  */
48
- renameColor: (id: string, name: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
48
+ rename: (id: string, newColorName: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
49
49
  /**
50
50
  * This method updates a color
51
- * @param id The ID of a specific color
52
- * @param color The new color properties
51
+ * @param id the id of a specific color
52
+ * @param newColorProperties the new color properties
53
53
  * @returns
54
54
  */
55
- updateColor: (id: string, color: ColorUpdate) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
55
+ update: (id: string, newColorProperties: ColorUpdate) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
56
56
  /**
57
57
  * This method removes a color
58
- * @param id The ID of a specific color
58
+ * @param id the id of a specific color
59
59
  * @returns
60
60
  */
61
- removeColor: (id: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
61
+ remove: (id: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
62
62
  }
@@ -35,74 +35,74 @@ export class ColorStyleController {
35
35
  _ColorStyleController_editorAPI.set(this, void 0);
36
36
  /**
37
37
  * This method returns the list of colors
38
- * @returns
38
+ * @returns list of all colors
39
39
  */
40
- this.getColors = () => __awaiter(this, void 0, void 0, function* () {
40
+ this.getAll = () => __awaiter(this, void 0, void 0, function* () {
41
41
  const res = yield __classPrivateFieldGet(this, _ColorStyleController_editorAPI, "f");
42
42
  return res.getColors().then((result) => getEditorResponseData(result));
43
43
  });
44
44
  /**
45
45
  * This method returns a color by id
46
- * @param colorId The ID of a specific color
47
- * @returns
46
+ * @param id the id of a specific color
47
+ * @returns color properties for given id
48
48
  */
49
- this.getColorById = (colorId) => __awaiter(this, void 0, void 0, function* () {
49
+ this.getById = (id) => __awaiter(this, void 0, void 0, function* () {
50
50
  const res = yield __classPrivateFieldGet(this, _ColorStyleController_editorAPI, "f");
51
- return res.getColorById(colorId).then((result) => getEditorResponseData(result));
51
+ return res.getColorById(id).then((result) => getEditorResponseData(result));
52
52
  });
53
53
  /**
54
- * This method create a new color
54
+ * This method creates a new color
55
55
  * @returns the new created color id
56
56
  */
57
- this.createColor = () => __awaiter(this, void 0, void 0, function* () {
57
+ this.create = () => __awaiter(this, void 0, void 0, function* () {
58
58
  const res = yield __classPrivateFieldGet(this, _ColorStyleController_editorAPI, "f");
59
59
  return res.createColor().then((result) => getEditorResponseData(result));
60
60
  });
61
61
  /**
62
- * This method duplicates a color
63
- * @param colorId The ID of a specific color
64
- * @returns the new color id
62
+ * This method duplicates a color by the id
63
+ * @param id the id of a specific color
64
+ * @returns id of the duplicated color
65
65
  */
66
- this.duplicateColor = (colorId) => __awaiter(this, void 0, void 0, function* () {
66
+ this.duplicate = (id) => __awaiter(this, void 0, void 0, function* () {
67
67
  const res = yield __classPrivateFieldGet(this, _ColorStyleController_editorAPI, "f");
68
- return res.duplicateColor(colorId).then((result) => getEditorResponseData(result));
68
+ return res.duplicateColor(id).then((result) => getEditorResponseData(result));
69
69
  });
70
70
  /**
71
71
  * This method changes positions of colors
72
- * @param order The position of the colors
73
- * @param colorIds The list of color ids
72
+ * @param order the position of the colors
73
+ * @param ids the list of color IDs
74
74
  * @returns
75
75
  */
76
- this.moveColors = (order, colorIds) => __awaiter(this, void 0, void 0, function* () {
76
+ this.move = (order, ids) => __awaiter(this, void 0, void 0, function* () {
77
77
  const res = yield __classPrivateFieldGet(this, _ColorStyleController_editorAPI, "f");
78
- return res.moveColors(order, colorIds).then((result) => getEditorResponseData(result));
78
+ return res.moveColors(order, ids).then((result) => getEditorResponseData(result));
79
79
  });
80
80
  /**
81
81
  * This method renames a color
82
- * @param id The ID of a specific color
83
- * @param name The new name of the color
82
+ * @param id the id of a specific color
83
+ * @param newColorName the new name of the color
84
84
  * @returns
85
85
  */
86
- this.renameColor = (id, name) => __awaiter(this, void 0, void 0, function* () {
86
+ this.rename = (id, newColorName) => __awaiter(this, void 0, void 0, function* () {
87
87
  const res = yield __classPrivateFieldGet(this, _ColorStyleController_editorAPI, "f");
88
- return res.renameColor(id, name).then((result) => getEditorResponseData(result));
88
+ return res.renameColor(id, newColorName).then((result) => getEditorResponseData(result));
89
89
  });
90
90
  /**
91
91
  * This method updates a color
92
- * @param id The ID of a specific color
93
- * @param color The new color properties
92
+ * @param id the id of a specific color
93
+ * @param newColorProperties the new color properties
94
94
  * @returns
95
95
  */
96
- this.updateColor = (id, color) => __awaiter(this, void 0, void 0, function* () {
96
+ this.update = (id, newColorProperties) => __awaiter(this, void 0, void 0, function* () {
97
97
  const res = yield __classPrivateFieldGet(this, _ColorStyleController_editorAPI, "f");
98
- return res.updateColor(id, JSON.stringify(color)).then((result) => getEditorResponseData(result));
98
+ return res.updateColor(id, JSON.stringify(newColorProperties)).then((result) => getEditorResponseData(result));
99
99
  });
100
100
  /**
101
101
  * This method removes a color
102
- * @param id The ID of a specific color
102
+ * @param id the id of a specific color
103
103
  * @returns
104
104
  */
105
- this.removeColor = (id) => __awaiter(this, void 0, void 0, function* () {
105
+ this.remove = (id) => __awaiter(this, void 0, void 0, function* () {
106
106
  const res = yield __classPrivateFieldGet(this, _ColorStyleController_editorAPI, "f");
107
107
  return res.removeColor(id).then((result) => getEditorResponseData(result));
108
108
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ColorStyleController.js","sourceRoot":"","sources":["../../../src/controllers/ColorStyleController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAM7B;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,kDAAsB;QAStB;;;WAGG;QACH,cAAS,GAAG,GAAS,EAAE;YACnB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,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AAC,KAAK,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC5F,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,WAAM,GAAG,CAAO,EAAU,EAAE,YAAoB,EAAE,EAAE;YAChD,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,WAAW,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACnG,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,WAAM,GAAG,CAAO,EAAU,EAAE,kBAA+B,EAAE,EAAE;YAC3D,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACzH,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACH,WAAM,GAAG,CAAO,EAAU,EAAE,EAAE;YAC1B,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACrF,CAAC,CAAA,CAAC;QAlFE,uBAAA,IAAI,mCAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CAkFJ"}
@@ -15,7 +15,7 @@ export declare class ConfigurationController {
15
15
  /**
16
16
  * This method returns the value for a given configuration key. If a value was not found in the configuration store
17
17
  * this method returns an error. The key cannot be null.
18
- * @returns
18
+ * @returns value for a given configuration key
19
19
  */
20
20
  getValue: (key: WellKnownConfigurationKeys | string) => Promise<import("../types/CommonTypes").EditorResponse<string>>;
21
21
  /**
@@ -38,7 +38,7 @@ export class ConfigurationController {
38
38
  /**
39
39
  * This method returns the value for a given configuration key. If a value was not found in the configuration store
40
40
  * this method returns an error. The key cannot be null.
41
- * @returns
41
+ * @returns value for a given configuration key
42
42
  */
43
43
  this.getValue = (key) => __awaiter(this, void 0, void 0, function* () {
44
44
  const res = yield __classPrivateFieldGet(this, _ConfigurationController_editorAPI, "f");
@@ -1,10 +1,10 @@
1
1
  import { ConnectorOptions, EditorAPI, EditorResponse } from '../types/CommonTypes';
2
- import { ConnectorState, ConnectorMapping, ConnectorRegistration } from '../types/ConnectorTypes';
2
+ import { ConnectorState, ConnectorMapping, ConnectorRegistration, ConnectorInstance, ConnectorType } from '../types/ConnectorTypes';
3
3
  /**
4
4
  * The ConnectorController manages lifetime of all available connectors, regardless of the type, in the
5
5
  * document. Use it to add/remove connectors to a template, or set specific configuration.
6
6
  *
7
- * The way CHILI Studio handles different sources of resouces is called 'Connectors'. A Connectors is an
7
+ * The way CHILI Studio handles different sources of resources is called 'Connectors'. A Connectors is an
8
8
  * implementation of a set of capabilities we need to interact with a certain external resource management system.
9
9
  * In essence a connector is the combination of a Javascript snippet and some metadata. The Javascript snippet
10
10
  * is loaded in the studio engine using a sandboxed Javascript execution engine (QuickJs). This allows us to
@@ -20,34 +20,44 @@ export declare class ConnectorController {
20
20
  * @ignore
21
21
  */
22
22
  constructor(editorAPI: EditorAPI);
23
+ /**
24
+ * Gets all available connectors of a 'ConnectorType'
25
+ * @param type type of connector you want to get
26
+ * @returns list of all available connectors of a 'ConnectorType'
27
+ */
28
+ getAllByType: (type: ConnectorType) => Promise<EditorResponse<ConnectorInstance[]>>;
23
29
  /**
24
30
  * Registers a new connector in the SDK. After successful registration, depending
25
31
  * on the connector type, the connector can be configured and used in the template
26
32
  * Remember to add custom authentication information after registering the connector
27
33
  * @param registration registration object containing all details about the connector
34
+ * @returns
28
35
  */
29
- registerConnector: (registration: ConnectorRegistration) => Promise<EditorResponse<null>>;
36
+ register: (registration: ConnectorRegistration) => Promise<EditorResponse<null>>;
30
37
  /**
31
38
  * Configures a registered connector. A configurator helper is passed as an argument
32
39
  * of the callback for you to setup your connector.
33
- * @param connectorId Id of your registered connector
40
+ * @param id the id of your registered connector
34
41
  * @param configurationCallback callback to setup the connector
42
+ * @returns
35
43
  */
36
- configure: (connectorId: string, configurationCallback: (configurator: ConnectorConfigurator) => Promise<void>) => Promise<EditorResponse<null>>;
44
+ configure: (id: string, configurationCallback: (configurator: ConnectorConfigurator) => Promise<void>) => Promise<EditorResponse<null>>;
37
45
  /**
38
46
  * Gets the current state a connector is in, to wait until a connector is ready to be used, use the 'waitForConnectorReady'
39
47
  * method in this controller.
40
- * @param connectorId Id of your registered connector you want to make sure it is loaded
48
+ * @param id the id of your registered connector you want to make sure it is loaded
49
+ * @returns connector state
41
50
  */
42
- getState: (connectorId: string) => Promise<EditorResponse<ConnectorState>>;
51
+ getById: (id: string) => Promise<EditorResponse<ConnectorState>>;
43
52
  /**
44
53
  * Connectors are loaded asynchronously in the editor engine, this causes some challenges while configuring them. To make sure
45
54
  * an action on the connector will be available, it's advised to await this method. After the Promise resolves we are sure
46
55
  * the connector is up and running. This is used internally by the configure method to ensure correct execution. It's especially
47
- * usefull during startup of the SDK / rigth after the loadDocument call.
48
- * @param connectorId Id of your registered connector you want to make sure it is loaded
56
+ * useful during startup of the SDK / right after the loadDocument call.
57
+ * @param id the id of your registered connector you want to make sure it is loaded
58
+ * @returns
49
59
  */
50
- waitForConnectorReady: (connectorId: string, timeoutMilliseconds?: number) => Promise<EditorResponse<null>>;
60
+ waitToBeReady: (id: string, timeoutMilliseconds?: number) => Promise<EditorResponse<null>>;
51
61
  }
52
62
  /**
53
63
  * Helper to setup your connector
@@ -57,25 +67,28 @@ declare class ConnectorConfigurator {
57
67
  /**
58
68
  * @ignore
59
69
  */
60
- constructor(connectorId: string, res: EditorAPI);
70
+ constructor(id: string, res: EditorAPI);
61
71
  /**
62
72
  * Allows to customize the context data a connector can work with. The options data
63
73
  * will be available using the context parameter in the connector implementation code.
64
74
  * @param options object containing key value data to pass to connector context
75
+ * @returns
65
76
  */
66
77
  setOptions: (options: ConnectorOptions) => Promise<EditorResponse<null>>;
67
78
  /**
68
79
  * Allows to map document data (variables, selectedFrame, etc) to connector context data.
69
- * By defining the mappings, we can trigger redownload of assets (dynamic asset provider)
80
+ * By defining the mappings, we can trigger re-download of assets (dynamic asset provider)
70
81
  * or populate filters for the query endpoint. The mapped data will be available using
71
82
  * the context parameter in the connector implementation code.
72
83
  * @param mappings collection of mappings to set to this connector
84
+ * @returns
73
85
  */
74
86
  setMappings: (mappings: ConnectorMapping[]) => Promise<EditorResponse<null>>;
75
87
  /**
76
88
  * This method sets the CHILI GraFx Access Token in the Authentication HTTP header for the 'chili' authentication type.
77
89
  * The CHILI Token will be used to authenticate every grafx connector http call.
78
90
  * @param token token for the CHILI authentication
91
+ * @returns
79
92
  */
80
93
  setChiliToken: (token: string) => Promise<EditorResponse<null>>;
81
94
  /**
@@ -84,6 +97,7 @@ declare class ConnectorConfigurator {
84
97
  * Can only be used after a connector has been registered. (if you are using a grafx connector no registration is needed)
85
98
  * @param headerName name of the header
86
99
  * @param headerValue value of the header
100
+ * @returns
87
101
  */
88
102
  setHttpHeader: (headerName: string, headerValue: string) => Promise<EditorResponse<null>>;
89
103
  }
@@ -25,7 +25,7 @@ import { getEditorResponseData } from '../utils/EditorResponseData';
25
25
  * The ConnectorController manages lifetime of all available connectors, regardless of the type, in the
26
26
  * document. Use it to add/remove connectors to a template, or set specific configuration.
27
27
  *
28
- * The way CHILI Studio handles different sources of resouces is called 'Connectors'. A Connectors is an
28
+ * The way CHILI Studio handles different sources of resources is called 'Connectors'. A Connectors is an
29
29
  * implementation of a set of capabilities we need to interact with a certain external resource management system.
30
30
  * In essence a connector is the combination of a Javascript snippet and some metadata. The Javascript snippet
31
31
  * is loaded in the studio engine using a sandboxed Javascript execution engine (QuickJs). This allows us to
@@ -44,13 +44,23 @@ export class ConnectorController {
44
44
  * @ignore
45
45
  */
46
46
  _ConnectorController_editorAPI.set(this, void 0);
47
+ /**
48
+ * Gets all available connectors of a 'ConnectorType'
49
+ * @param type type of connector you want to get
50
+ * @returns list of all available connectors of a 'ConnectorType'
51
+ */
52
+ this.getAllByType = (type) => __awaiter(this, void 0, void 0, function* () {
53
+ const res = yield __classPrivateFieldGet(this, _ConnectorController_editorAPI, "f");
54
+ return res.getConnectors(type).then((result) => getEditorResponseData(result));
55
+ });
47
56
  /**
48
57
  * Registers a new connector in the SDK. After successful registration, depending
49
58
  * on the connector type, the connector can be configured and used in the template
50
59
  * Remember to add custom authentication information after registering the connector
51
60
  * @param registration registration object containing all details about the connector
61
+ * @returns
52
62
  */
53
- this.registerConnector = (registration) => __awaiter(this, void 0, void 0, function* () {
63
+ this.register = (registration) => __awaiter(this, void 0, void 0, function* () {
54
64
  const res = yield __classPrivateFieldGet(this, _ConnectorController_editorAPI, "f");
55
65
  return res
56
66
  .registerConnector(JSON.stringify(registration))
@@ -59,35 +69,38 @@ export class ConnectorController {
59
69
  /**
60
70
  * Configures a registered connector. A configurator helper is passed as an argument
61
71
  * of the callback for you to setup your connector.
62
- * @param connectorId Id of your registered connector
72
+ * @param id the id of your registered connector
63
73
  * @param configurationCallback callback to setup the connector
74
+ * @returns
64
75
  */
65
- this.configure = (connectorId, configurationCallback) => __awaiter(this, void 0, void 0, function* () {
76
+ this.configure = (id, configurationCallback) => __awaiter(this, void 0, void 0, function* () {
66
77
  const res = yield __classPrivateFieldGet(this, _ConnectorController_editorAPI, "f");
67
78
  // wait for connector to be ready
68
- yield this.waitForConnectorReady(connectorId);
79
+ yield this.waitToBeReady(id);
69
80
  // execute callback
70
- yield configurationCallback(new ConnectorConfigurator(connectorId, res));
81
+ yield configurationCallback(new ConnectorConfigurator(id, res));
71
82
  // invalidate connector in engine
72
- return res.updateConnectorConfiguration(connectorId).then((result) => getEditorResponseData(result));
83
+ return res.updateConnectorConfiguration(id).then((result) => getEditorResponseData(result));
73
84
  });
74
85
  /**
75
86
  * Gets the current state a connector is in, to wait until a connector is ready to be used, use the 'waitForConnectorReady'
76
87
  * method in this controller.
77
- * @param connectorId Id of your registered connector you want to make sure it is loaded
88
+ * @param id the id of your registered connector you want to make sure it is loaded
89
+ * @returns connector state
78
90
  */
79
- this.getState = (connectorId) => __awaiter(this, void 0, void 0, function* () {
91
+ this.getById = (id) => __awaiter(this, void 0, void 0, function* () {
80
92
  const res = yield __classPrivateFieldGet(this, _ConnectorController_editorAPI, "f");
81
- return res.getConnectorState(connectorId).then((result) => getEditorResponseData(result));
93
+ return res.getConnectorState(id).then((result) => getEditorResponseData(result));
82
94
  });
83
95
  /**
84
96
  * Connectors are loaded asynchronously in the editor engine, this causes some challenges while configuring them. To make sure
85
97
  * an action on the connector will be available, it's advised to await this method. After the Promise resolves we are sure
86
98
  * the connector is up and running. This is used internally by the configure method to ensure correct execution. It's especially
87
- * usefull during startup of the SDK / rigth after the loadDocument call.
88
- * @param connectorId Id of your registered connector you want to make sure it is loaded
99
+ * useful during startup of the SDK / right after the loadDocument call.
100
+ * @param id the id of your registered connector you want to make sure it is loaded
101
+ * @returns
89
102
  */
90
- this.waitForConnectorReady = (connectorId, timeoutMilliseconds = 2000) => __awaiter(this, void 0, void 0, function* () {
103
+ this.waitToBeReady = (id, timeoutMilliseconds = 2000) => __awaiter(this, void 0, void 0, function* () {
91
104
  // minimum timeout is 500ms
92
105
  let timeout = Math.max(timeoutMilliseconds, 500);
93
106
  // maximum timeout is 5000ms
@@ -95,10 +108,10 @@ export class ConnectorController {
95
108
  const waitTime = 100;
96
109
  let retries = 0;
97
110
  try {
98
- // using while loop will prevent stackoverflow issues when using recursion
111
+ // using while loop will prevent stack overflow issues when using recursion
99
112
  // wait for maximum 2 seconds to fail
100
113
  while (retries * waitTime < timeout) {
101
- const result = yield this.getState(connectorId);
114
+ const result = yield this.getById(id);
102
115
  if (result.success &&
103
116
  result.parsedData &&
104
117
  (result.parsedData.type === ConnectorStateType.running ||
@@ -137,7 +150,7 @@ class ConnectorConfigurator {
137
150
  /**
138
151
  * @ignore
139
152
  */
140
- constructor(connectorId, res) {
153
+ constructor(id, res) {
141
154
  /**
142
155
  * @ignore
143
156
  */
@@ -147,6 +160,7 @@ class ConnectorConfigurator {
147
160
  * Allows to customize the context data a connector can work with. The options data
148
161
  * will be available using the context parameter in the connector implementation code.
149
162
  * @param options object containing key value data to pass to connector context
163
+ * @returns
150
164
  */
151
165
  this.setOptions = (options) => __awaiter(this, void 0, void 0, function* () {
152
166
  return __classPrivateFieldGet(this, _ConnectorConfigurator_res, "f")
@@ -155,10 +169,11 @@ class ConnectorConfigurator {
155
169
  });
156
170
  /**
157
171
  * Allows to map document data (variables, selectedFrame, etc) to connector context data.
158
- * By defining the mappings, we can trigger redownload of assets (dynamic asset provider)
172
+ * By defining the mappings, we can trigger re-download of assets (dynamic asset provider)
159
173
  * or populate filters for the query endpoint. The mapped data will be available using
160
174
  * the context parameter in the connector implementation code.
161
175
  * @param mappings collection of mappings to set to this connector
176
+ * @returns
162
177
  */
163
178
  this.setMappings = (mappings) => __awaiter(this, void 0, void 0, function* () {
164
179
  const result = yield __classPrivateFieldGet(this, _ConnectorConfigurator_res, "f").setConnectorMappings(__classPrivateFieldGet(this, _ConnectorConfigurator_connectorId, "f"), mappings.map(function (m) {
@@ -170,6 +185,7 @@ class ConnectorConfigurator {
170
185
  * This method sets the CHILI GraFx Access Token in the Authentication HTTP header for the 'chili' authentication type.
171
186
  * The CHILI Token will be used to authenticate every grafx connector http call.
172
187
  * @param token token for the CHILI authentication
188
+ * @returns
173
189
  */
174
190
  this.setChiliToken = (token) => __awaiter(this, void 0, void 0, function* () {
175
191
  return __classPrivateFieldGet(this, _ConnectorConfigurator_res, "f")
@@ -182,13 +198,14 @@ class ConnectorConfigurator {
182
198
  * Can only be used after a connector has been registered. (if you are using a grafx connector no registration is needed)
183
199
  * @param headerName name of the header
184
200
  * @param headerValue value of the header
201
+ * @returns
185
202
  */
186
203
  this.setHttpHeader = (headerName, headerValue) => __awaiter(this, void 0, void 0, function* () {
187
204
  return __classPrivateFieldGet(this, _ConnectorConfigurator_res, "f")
188
205
  .connectorAuthenticationSetHttpHeader(__classPrivateFieldGet(this, _ConnectorConfigurator_connectorId, "f"), headerName, headerValue)
189
206
  .then((result) => getEditorResponseData(result));
190
207
  });
191
- __classPrivateFieldSet(this, _ConnectorConfigurator_connectorId, connectorId, "f");
208
+ __classPrivateFieldSet(this, _ConnectorConfigurator_connectorId, id, "f");
192
209
  __classPrivateFieldSet(this, _ConnectorConfigurator_res, res, "f");
193
210
  }
194
211
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectorController.js","sourceRoot":"","sources":["../../../src/controllers/ConnectorController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAEH,kBAAkB,GAGrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,mBAAmB;IAM5B;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,iDAAsB;QAStB;;;;;WAKG;QACH,sBAAiB,GAAG,CAAO,YAAmC,EAAE,EAAE;YAC9D,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG;iBACL,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;iBAC/C,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,cAAS,GAAG,CACR,WAAmB,EACnB,qBAA6E,EAC/E,EAAE;YACA,MAAM,GAAG,GAAG,MAAM,uBAAA,IAA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,CAAC,GAAG,CAAC,UAAU,CAAC;gBACpB,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;YAC7B,CAAC,CAAC,CACL,CAAC;YACF,OAAO,qBAAqB,CAAO,MAAM,CAAC,CAAC;QAC/C,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,kBAAa,GAAG,CAAO,KAAa,EAAE,EAAE;YACpC,OAAO,uBAAA,IAAI,kCAAK;iBACX,oCAAoC,CAAC,uBAAA,IAAI,0CAAa,EAAE,KAAK,CAAC;iBAC9D,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAA,CAAC;QAEF;;;;;;;WAOG;QACH,kBAAa,GAAG,CAAO,UAAkB,EAAE,WAAmB,EAAE,EAAE;YAC9D,OAAO,uBAAA,IAAI,kCAAK;iBACX,oCAAoC,CAAC,uBAAA,IAAI,0CAAa,EAAE,UAAU,EAAE,WAAW,CAAC;iBAChF,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAA,CAAC;QA1DE,uBAAA,IAAI,sCAAgB,EAAE,MAAA,CAAC;QACvB,uBAAA,IAAI,8BAAQ,GAAG,MAAA,CAAC;IACpB,CAAC;CAyDJ"}
@@ -12,9 +12,9 @@ export declare class DebugController {
12
12
  constructor(editorAPI: EditorAPI);
13
13
  /**
14
14
  * This method returns all debug logs
15
- * @returns
15
+ * @returns list of all debug logs
16
16
  */
17
- getLogs: () => Promise<import("../types/CommonTypes").EditorResponse<DebugData[]>>;
17
+ getAllLogs: () => Promise<import("../types/CommonTypes").EditorResponse<DebugData[]>>;
18
18
  /**
19
19
  * This method toggles the showcase of debug panel
20
20
  * @returns
@@ -35,9 +35,9 @@ export class DebugController {
35
35
  _DebugController_editorAPI.set(this, void 0);
36
36
  /**
37
37
  * This method returns all debug logs
38
- * @returns
38
+ * @returns list of all debug logs
39
39
  */
40
- this.getLogs = () => __awaiter(this, void 0, void 0, function* () {
40
+ this.getAllLogs = () => __awaiter(this, void 0, void 0, function* () {
41
41
  const res = yield __classPrivateFieldGet(this, _DebugController_editorAPI, "f");
42
42
  return res.getLogs().then((result) => getEditorResponseData(result));
43
43
  });
@@ -1 +1 @@
1
- {"version":3,"file":"DebugController.js","sourceRoot":"","sources":["../../../src/controllers/DebugController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE;;;GAGG;AACH,MAAM,OAAO,eAAe;IAMxB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,6CAAsB;QAStB;;;WAGG;QACH,YAAO,GAAG,GAAS,EAAE;YACjB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,kCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAc,MAAM,CAAC,CAAC,CAAC;QACtF,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACH,qBAAgB,GAAG,GAAS,EAAE;YAC1B,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,kCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,gBAAgB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACxF,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACH,gBAAW,GAAG,GAAS,EAAE;YACrB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,kCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACnF,CAAC,CAAA,CAAC;QAEF;;;WAGG;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C,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACnF,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACH,iBAAY,GAAG,GAAS,EAAE;YACtB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,kCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,YAAY,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACpF,CAAC,CAAA,CAAC;QArCE,uBAAA,IAAI,8BAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CAqCJ"}
@@ -13,20 +13,20 @@ export declare class DocumentController {
13
13
  constructor(editorAPI: EditorAPI);
14
14
  /**
15
15
  * This method retrieves the current document state from the editor
16
- * @returns The JSON document in the form of a string
16
+ * @returns the JSON document in the form of a string
17
17
  */
18
- getCurrentDocumentState: () => Promise<import("../types/CommonTypes").EditorResponse<ChiliDocument>>;
18
+ getCurrentState: () => Promise<import("../types/CommonTypes").EditorResponse<ChiliDocument>>;
19
19
  /**
20
20
  * This method will load a provided document in the ChiliDocument format
21
- * @param doc The document to load in
22
- * @returns The document loaded inside of the canvas
21
+ * @param doc the document to load in
22
+ * @returns the document loaded inside of the canvas
23
23
  */
24
- loadDocument: (doc: ChiliDocument | string) => Promise<import("../types/CommonTypes").EditorResponse<unknown>>;
24
+ load: (doc: ChiliDocument | string) => Promise<import("../types/CommonTypes").EditorResponse<unknown>>;
25
25
  /**
26
26
  * This method will call an external api to create a download url
27
27
  * The video will be generated in the dimensions (and resolution) of the layout.
28
28
  * This means that any upscaling (e.g. playing the video full screen on a 4k monitor) will result in interpolation (= quality loss).
29
- * @param format The format of a downloadable url
29
+ * @param format the format of a downloadable url
30
30
  * @param layoutId id of layout to be downloaded
31
31
  * @returns the download link
32
32
  */
@@ -37,18 +37,18 @@ export class DocumentController {
37
37
  _DocumentController_editorAPI.set(this, void 0);
38
38
  /**
39
39
  * This method retrieves the current document state from the editor
40
- * @returns The JSON document in the form of a string
40
+ * @returns the JSON document in the form of a string
41
41
  */
42
- this.getCurrentDocumentState = () => __awaiter(this, void 0, void 0, function* () {
42
+ this.getCurrentState = () => __awaiter(this, void 0, void 0, function* () {
43
43
  const res = yield __classPrivateFieldGet(this, _DocumentController_editorAPI, "f");
44
44
  return res.getCurrentDocumentState().then((result) => getEditorResponseData(result));
45
45
  });
46
46
  /**
47
47
  * This method will load a provided document in the ChiliDocument format
48
- * @param doc The document to load in
49
- * @returns The document loaded inside of the canvas
48
+ * @param doc the document to load in
49
+ * @returns the document loaded inside of the canvas
50
50
  */
51
- this.loadDocument = (doc) => __awaiter(this, void 0, void 0, function* () {
51
+ this.load = (doc) => __awaiter(this, void 0, void 0, function* () {
52
52
  const res = yield __classPrivateFieldGet(this, _DocumentController_editorAPI, "f");
53
53
  if (typeof doc === 'string')
54
54
  return res.loadDocument(doc);
@@ -58,7 +58,7 @@ export class DocumentController {
58
58
  * This method will call an external api to create a download url
59
59
  * The video will be generated in the dimensions (and resolution) of the layout.
60
60
  * This means that any upscaling (e.g. playing the video full screen on a 4k monitor) will result in interpolation (= quality loss).
61
- * @param format The format of a downloadable url
61
+ * @param format the format of a downloadable url
62
62
  * @param layoutId id of layout to be downloaded
63
63
  * @returns the download link
64
64
  */
@@ -67,7 +67,7 @@ export class DocumentController {
67
67
  let error = null;
68
68
  let PREPARE_DOWNLOAD_URL = null;
69
69
  let DOWNLOAD_URL = '';
70
- const documentResponse = yield this.getCurrentDocumentState();
70
+ const documentResponse = yield this.getCurrentState();
71
71
  const FETCH_URL = getFetchURL(format, layoutId);
72
72
  try {
73
73
  const response = yield fetch(FETCH_URL, {
@@ -1 +1 @@
1
- {"version":3,"file":"DocumentController.js","sourceRoot":"","sources":["../../../src/controllers/DocumentController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,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