@chili-publish/studio-sdk 0.123.0 → 0.133.2

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 (170) 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 +21 -12
  25. package/lib/src/controllers/ConnectorController.js +28 -19
  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 +7 -7
  64. package/lib/src/controllers/TextStyleController.js +7 -7
  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 +6 -6
  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 +3 -3
  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 +7 -5
  142. package/lib/src/types/ConfigurationTypes.d.ts +3 -0
  143. package/lib/src/types/ConnectorTypes.d.ts +5 -4
  144. package/lib/src/types/ConnectorTypes.js.map +1 -1
  145. package/lib/src/types/DocumentTypes.d.ts +23 -25
  146. package/lib/src/types/DocumentTypes.js.map +1 -1
  147. package/lib/src/types/FontConnectorTypes.d.ts +2 -1
  148. package/lib/src/types/FontConnectorTypes.js.map +1 -1
  149. package/lib/src/types/FontTypes.d.ts +5 -4
  150. package/lib/src/types/FrameTypes.d.ts +20 -20
  151. package/lib/src/types/LayoutTypes.d.ts +14 -14
  152. package/lib/src/types/LayoutTypes.js.map +1 -1
  153. package/lib/src/types/MediaConnectorTypes.d.ts +2 -1
  154. package/lib/src/types/MediaConnectorTypes.js.map +1 -1
  155. package/lib/src/types/PageTypes.d.ts +3 -3
  156. package/lib/src/types/ParagraphStyleTypes.d.ts +6 -5
  157. package/lib/src/types/TextStyleTypes.d.ts +5 -5
  158. package/lib/src/types/TextStyleTypes.js +1 -1
  159. package/lib/src/types/TextStyleTypes.js.map +1 -1
  160. package/lib/src/types/TextTypes.d.ts +4 -0
  161. package/lib/src/types/TextTypes.js +6 -0
  162. package/lib/src/types/TextTypes.js.map +1 -0
  163. package/lib/src/types/VariableTypes.d.ts +12 -11
  164. package/lib/src/types/VariableTypes.js +3 -2
  165. package/lib/src/types/VariableTypes.js.map +1 -1
  166. package/lib/src/utils/enums.d.ts +8 -3
  167. package/lib/src/utils/enums.js +19 -13
  168. package/lib/src/utils/enums.js.map +1 -1
  169. package/lib/src/utils/getCalculatedValue.js +2 -2
  170. 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,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,SAAS,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAkB,MAAM,CAAC,CAAC,CAAC;Q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C;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");
@@ -4,7 +4,7 @@ import { ConnectorState, ConnectorMapping, ConnectorRegistration, ConnectorInsta
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
@@ -23,36 +23,41 @@ export declare class ConnectorController {
23
23
  /**
24
24
  * Gets all available connectors of a 'ConnectorType'
25
25
  * @param type type of connector you want to get
26
+ * @returns list of all available connectors of a 'ConnectorType'
26
27
  */
27
- getConnectors: (type: ConnectorType) => Promise<EditorResponse<ConnectorInstance[]>>;
28
+ getAllByType: (type: ConnectorType) => Promise<EditorResponse<ConnectorInstance[]>>;
28
29
  /**
29
30
  * Registers a new connector in the SDK. After successful registration, depending
30
31
  * on the connector type, the connector can be configured and used in the template
31
32
  * Remember to add custom authentication information after registering the connector
32
33
  * @param registration registration object containing all details about the connector
34
+ * @returns
33
35
  */
34
- registerConnector: (registration: ConnectorRegistration) => Promise<EditorResponse<null>>;
36
+ register: (registration: ConnectorRegistration) => Promise<EditorResponse<null>>;
35
37
  /**
36
38
  * Configures a registered connector. A configurator helper is passed as an argument
37
39
  * of the callback for you to setup your connector.
38
- * @param connectorId Id of your registered connector
40
+ * @param id the id of your registered connector
39
41
  * @param configurationCallback callback to setup the connector
42
+ * @returns
40
43
  */
41
- configure: (connectorId: string, configurationCallback: (configurator: ConnectorConfigurator) => Promise<void>) => Promise<EditorResponse<null>>;
44
+ configure: (id: string, configurationCallback: (configurator: ConnectorConfigurator) => Promise<void>) => Promise<EditorResponse<null>>;
42
45
  /**
43
46
  * Gets the current state a connector is in, to wait until a connector is ready to be used, use the 'waitForConnectorReady'
44
47
  * method in this controller.
45
- * @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
46
50
  */
47
- getState: (connectorId: string) => Promise<EditorResponse<ConnectorState>>;
51
+ getById: (id: string) => Promise<EditorResponse<ConnectorState>>;
48
52
  /**
49
53
  * Connectors are loaded asynchronously in the editor engine, this causes some challenges while configuring them. To make sure
50
54
  * an action on the connector will be available, it's advised to await this method. After the Promise resolves we are sure
51
55
  * the connector is up and running. This is used internally by the configure method to ensure correct execution. It's especially
52
- * usefull during startup of the SDK / rigth after the loadDocument call.
53
- * @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
54
59
  */
55
- waitForConnectorReady: (connectorId: string, timeoutMilliseconds?: number) => Promise<EditorResponse<null>>;
60
+ waitToBeReady: (id: string, timeoutMilliseconds?: number) => Promise<EditorResponse<null>>;
56
61
  }
57
62
  /**
58
63
  * Helper to setup your connector
@@ -62,25 +67,28 @@ declare class ConnectorConfigurator {
62
67
  /**
63
68
  * @ignore
64
69
  */
65
- constructor(connectorId: string, res: EditorAPI);
70
+ constructor(id: string, res: EditorAPI);
66
71
  /**
67
72
  * Allows to customize the context data a connector can work with. The options data
68
73
  * will be available using the context parameter in the connector implementation code.
69
74
  * @param options object containing key value data to pass to connector context
75
+ * @returns
70
76
  */
71
77
  setOptions: (options: ConnectorOptions) => Promise<EditorResponse<null>>;
72
78
  /**
73
79
  * Allows to map document data (variables, selectedFrame, etc) to connector context data.
74
- * 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)
75
81
  * or populate filters for the query endpoint. The mapped data will be available using
76
82
  * the context parameter in the connector implementation code.
77
83
  * @param mappings collection of mappings to set to this connector
84
+ * @returns
78
85
  */
79
86
  setMappings: (mappings: ConnectorMapping[]) => Promise<EditorResponse<null>>;
80
87
  /**
81
88
  * This method sets the CHILI GraFx Access Token in the Authentication HTTP header for the 'chili' authentication type.
82
89
  * The CHILI Token will be used to authenticate every grafx connector http call.
83
90
  * @param token token for the CHILI authentication
91
+ * @returns
84
92
  */
85
93
  setChiliToken: (token: string) => Promise<EditorResponse<null>>;
86
94
  /**
@@ -89,6 +97,7 @@ declare class ConnectorConfigurator {
89
97
  * Can only be used after a connector has been registered. (if you are using a grafx connector no registration is needed)
90
98
  * @param headerName name of the header
91
99
  * @param headerValue value of the header
100
+ * @returns
92
101
  */
93
102
  setHttpHeader: (headerName: string, headerValue: string) => Promise<EditorResponse<null>>;
94
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
@@ -47,8 +47,9 @@ export class ConnectorController {
47
47
  /**
48
48
  * Gets all available connectors of a 'ConnectorType'
49
49
  * @param type type of connector you want to get
50
+ * @returns list of all available connectors of a 'ConnectorType'
50
51
  */
51
- this.getConnectors = (type) => __awaiter(this, void 0, void 0, function* () {
52
+ this.getAllByType = (type) => __awaiter(this, void 0, void 0, function* () {
52
53
  const res = yield __classPrivateFieldGet(this, _ConnectorController_editorAPI, "f");
53
54
  return res.getConnectors(type).then((result) => getEditorResponseData(result));
54
55
  });
@@ -57,8 +58,9 @@ export class ConnectorController {
57
58
  * on the connector type, the connector can be configured and used in the template
58
59
  * Remember to add custom authentication information after registering the connector
59
60
  * @param registration registration object containing all details about the connector
61
+ * @returns
60
62
  */
61
- this.registerConnector = (registration) => __awaiter(this, void 0, void 0, function* () {
63
+ this.register = (registration) => __awaiter(this, void 0, void 0, function* () {
62
64
  const res = yield __classPrivateFieldGet(this, _ConnectorController_editorAPI, "f");
63
65
  return res
64
66
  .registerConnector(JSON.stringify(registration))
@@ -67,35 +69,38 @@ export class ConnectorController {
67
69
  /**
68
70
  * Configures a registered connector. A configurator helper is passed as an argument
69
71
  * of the callback for you to setup your connector.
70
- * @param connectorId Id of your registered connector
72
+ * @param id the id of your registered connector
71
73
  * @param configurationCallback callback to setup the connector
74
+ * @returns
72
75
  */
73
- this.configure = (connectorId, configurationCallback) => __awaiter(this, void 0, void 0, function* () {
76
+ this.configure = (id, configurationCallback) => __awaiter(this, void 0, void 0, function* () {
74
77
  const res = yield __classPrivateFieldGet(this, _ConnectorController_editorAPI, "f");
75
78
  // wait for connector to be ready
76
- yield this.waitForConnectorReady(connectorId);
79
+ yield this.waitToBeReady(id);
77
80
  // execute callback
78
- yield configurationCallback(new ConnectorConfigurator(connectorId, res));
81
+ yield configurationCallback(new ConnectorConfigurator(id, res));
79
82
  // invalidate connector in engine
80
- return res.updateConnectorConfiguration(connectorId).then((result) => getEditorResponseData(result));
83
+ return res.updateConnectorConfiguration(id).then((result) => getEditorResponseData(result));
81
84
  });
82
85
  /**
83
86
  * Gets the current state a connector is in, to wait until a connector is ready to be used, use the 'waitForConnectorReady'
84
87
  * method in this controller.
85
- * @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
86
90
  */
87
- this.getState = (connectorId) => __awaiter(this, void 0, void 0, function* () {
91
+ this.getById = (id) => __awaiter(this, void 0, void 0, function* () {
88
92
  const res = yield __classPrivateFieldGet(this, _ConnectorController_editorAPI, "f");
89
- return res.getConnectorState(connectorId).then((result) => getEditorResponseData(result));
93
+ return res.getConnectorState(id).then((result) => getEditorResponseData(result));
90
94
  });
91
95
  /**
92
96
  * Connectors are loaded asynchronously in the editor engine, this causes some challenges while configuring them. To make sure
93
97
  * an action on the connector will be available, it's advised to await this method. After the Promise resolves we are sure
94
98
  * the connector is up and running. This is used internally by the configure method to ensure correct execution. It's especially
95
- * usefull during startup of the SDK / rigth after the loadDocument call.
96
- * @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
97
102
  */
98
- 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* () {
99
104
  // minimum timeout is 500ms
100
105
  let timeout = Math.max(timeoutMilliseconds, 500);
101
106
  // maximum timeout is 5000ms
@@ -103,10 +108,10 @@ export class ConnectorController {
103
108
  const waitTime = 100;
104
109
  let retries = 0;
105
110
  try {
106
- // using while loop will prevent stackoverflow issues when using recursion
111
+ // using while loop will prevent stack overflow issues when using recursion
107
112
  // wait for maximum 2 seconds to fail
108
113
  while (retries * waitTime < timeout) {
109
- const result = yield this.getState(connectorId);
114
+ const result = yield this.getById(id);
110
115
  if (result.success &&
111
116
  result.parsedData &&
112
117
  (result.parsedData.type === ConnectorStateType.running ||
@@ -145,7 +150,7 @@ class ConnectorConfigurator {
145
150
  /**
146
151
  * @ignore
147
152
  */
148
- constructor(connectorId, res) {
153
+ constructor(id, res) {
149
154
  /**
150
155
  * @ignore
151
156
  */
@@ -155,6 +160,7 @@ class ConnectorConfigurator {
155
160
  * Allows to customize the context data a connector can work with. The options data
156
161
  * will be available using the context parameter in the connector implementation code.
157
162
  * @param options object containing key value data to pass to connector context
163
+ * @returns
158
164
  */
159
165
  this.setOptions = (options) => __awaiter(this, void 0, void 0, function* () {
160
166
  return __classPrivateFieldGet(this, _ConnectorConfigurator_res, "f")
@@ -163,10 +169,11 @@ class ConnectorConfigurator {
163
169
  });
164
170
  /**
165
171
  * Allows to map document data (variables, selectedFrame, etc) to connector context data.
166
- * 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)
167
173
  * or populate filters for the query endpoint. The mapped data will be available using
168
174
  * the context parameter in the connector implementation code.
169
175
  * @param mappings collection of mappings to set to this connector
176
+ * @returns
170
177
  */
171
178
  this.setMappings = (mappings) => __awaiter(this, void 0, void 0, function* () {
172
179
  const result = yield __classPrivateFieldGet(this, _ConnectorConfigurator_res, "f").setConnectorMappings(__classPrivateFieldGet(this, _ConnectorConfigurator_connectorId, "f"), mappings.map(function (m) {
@@ -178,6 +185,7 @@ class ConnectorConfigurator {
178
185
  * This method sets the CHILI GraFx Access Token in the Authentication HTTP header for the 'chili' authentication type.
179
186
  * The CHILI Token will be used to authenticate every grafx connector http call.
180
187
  * @param token token for the CHILI authentication
188
+ * @returns
181
189
  */
182
190
  this.setChiliToken = (token) => __awaiter(this, void 0, void 0, function* () {
183
191
  return __classPrivateFieldGet(this, _ConnectorConfigurator_res, "f")
@@ -190,13 +198,14 @@ class ConnectorConfigurator {
190
198
  * Can only be used after a connector has been registered. (if you are using a grafx connector no registration is needed)
191
199
  * @param headerName name of the header
192
200
  * @param headerValue value of the header
201
+ * @returns
193
202
  */
194
203
  this.setHttpHeader = (headerName, headerValue) => __awaiter(this, void 0, void 0, function* () {
195
204
  return __classPrivateFieldGet(this, _ConnectorConfigurator_res, "f")
196
205
  .connectorAuthenticationSetHttpHeader(__classPrivateFieldGet(this, _ConnectorConfigurator_connectorId, "f"), headerName, headerValue)
197
206
  .then((result) => getEditorResponseData(result));
198
207
  });
199
- __classPrivateFieldSet(this, _ConnectorConfigurator_connectorId, connectorId, "f");
208
+ __classPrivateFieldSet(this, _ConnectorConfigurator_connectorId, id, "f");
200
209
  __classPrivateFieldSet(this, _ConnectorConfigurator_res, res, "f");
201
210
  }
202
211
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ConnectorController.js","sourceRoot":"","sources":["../../../src/controllers/ConnectorController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAEH,kBAAkB,GAKrB,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;;;WAGG;QACH,kBAAa,GAAG,CAAO,IAAmB,EAAE,EAAE;YAC1C,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAsB,MAAM,CAAC,CAAC,CAAC;QACxG,CAAC,CAAA,CAAC;QAEF;;;;;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,IAAI,sCAAW,CAAC;Y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C,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;QACH,iBAAY,GAAG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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,sBAAsB,CAAC;AAC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