@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
@@ -1,4 +1,5 @@
1
1
  import { EditorAPI, Id } from '../types/CommonTypes';
2
+ import { TextType } from '../types/TextTypes';
2
3
  /**
3
4
  * The ExperimentController contains all SDK functions that are considered for addition,
4
5
  * or functions we want to keep open for changing definitions. This is a sneak peak
@@ -13,27 +14,51 @@ export declare class ExperimentController {
13
14
  constructor(editorAPI: EditorAPI);
14
15
  /**
15
16
  * This method will assign an image from a variable to the correct ImageFrame
16
- * @param imageFrameId The ID of the imageFrame where an image needs to be assigned to
17
- * @param variableId The ID of the variable which contains the image
17
+ * @param imageFrameId the id of the imageFrame where an image needs to be assigned to
18
+ * @param variableId the id of the variable which contains the image
18
19
  * @returns
19
20
  */
20
- insertImageVariableToFrame: (imageFrameId: Id, variableId: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
21
+ insertImageVariableToFrame: (imageFrameId: Id, variableId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
21
22
  /**
22
23
  * This method will insert a text variable in the selected frame. Calling this method
23
24
  * requires that the selected frame is in text editing mode.
24
- * @param variableId The ID of the variable to be inserted.
25
+ * @param id the id of the variable to be inserted.
25
26
  * @returns
26
27
  */
27
- insertTextVariable: (variableId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
28
+ insertTextVariable: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
28
29
  /**
29
30
  * This method will enter text editing mode on the provided frame.
30
- * @param frameId The ID frame to enter text edit mode on.
31
+ * @param id the id frame to enter text edit mode on.
31
32
  * @returns
32
33
  */
33
- enterTextEditMode: (frameId: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
34
+ enterTextEditMode: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
34
35
  /**
35
36
  * This method will exit text editing mode.
36
37
  * @returns
37
38
  */
38
39
  exitTextEditMode: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
40
+ /**
41
+ * This method gets the text content of a text frame.
42
+ * The variables contained in the text will return their values only if you
43
+ * are in text editing mode.
44
+ * @param frameId The ID of a text frame
45
+ * @param textType The type of the text
46
+ * @returns the text content
47
+ */
48
+ getText: (frameId: string, textType: TextType) => Promise<import("../types/CommonTypes").EditorResponse<string>>;
49
+ /**
50
+ * This method sets the text content of a text frame
51
+ * @param frameId The ID of a text frame
52
+ * @param text The new text content
53
+ * @returns
54
+ */
55
+ setText: (frameId: string, text: string) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
56
+ /**
57
+ * This method selects the text content of a text frame
58
+ * @param frameId The ID of a text frame
59
+ * @param startIndex The index where the selection starts
60
+ * @param length The length of selection from startIndex
61
+ * @returns
62
+ */
63
+ selectText: (frameId: string, startIndex: number, length: number) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
39
64
  }
@@ -38,13 +38,13 @@ export class ExperimentController {
38
38
  _ExperimentController_editorAPI.set(this, void 0);
39
39
  /**
40
40
  * This method will assign an image from a variable to the correct ImageFrame
41
- * @param imageFrameId The ID of the imageFrame where an image needs to be assigned to
42
- * @param variableId The ID of the variable which contains the image
41
+ * @param imageFrameId the id of the imageFrame where an image needs to be assigned to
42
+ * @param variableId the id of the variable which contains the image
43
43
  * @returns
44
44
  */
45
45
  this.insertImageVariableToFrame = (imageFrameId, variableId) => __awaiter(this, void 0, void 0, function* () {
46
46
  const res = yield __classPrivateFieldGet(this, _ExperimentController_editorAPI, "f");
47
- const src = { variableId: variableId, sourceType: ImageSourceTypeEnum.variable };
47
+ const src = { id: variableId, type: ImageSourceTypeEnum.variable };
48
48
  return res
49
49
  .setImageSource(imageFrameId, JSON.stringify(src))
50
50
  .then((result) => getEditorResponseData(result));
@@ -52,21 +52,21 @@ export class ExperimentController {
52
52
  /**
53
53
  * This method will insert a text variable in the selected frame. Calling this method
54
54
  * requires that the selected frame is in text editing mode.
55
- * @param variableId The ID of the variable to be inserted.
55
+ * @param id the id of the variable to be inserted.
56
56
  * @returns
57
57
  */
58
- this.insertTextVariable = (variableId) => __awaiter(this, void 0, void 0, function* () {
58
+ this.insertTextVariable = (id) => __awaiter(this, void 0, void 0, function* () {
59
59
  const res = yield __classPrivateFieldGet(this, _ExperimentController_editorAPI, "f");
60
- return res.insertTextVariable(variableId).then((result) => getEditorResponseData(result));
60
+ return res.insertTextVariable(id).then((result) => getEditorResponseData(result));
61
61
  });
62
62
  /**
63
63
  * This method will enter text editing mode on the provided frame.
64
- * @param frameId The ID frame to enter text edit mode on.
64
+ * @param id the id frame to enter text edit mode on.
65
65
  * @returns
66
66
  */
67
- this.enterTextEditMode = (frameId) => __awaiter(this, void 0, void 0, function* () {
67
+ this.enterTextEditMode = (id) => __awaiter(this, void 0, void 0, function* () {
68
68
  const res = yield __classPrivateFieldGet(this, _ExperimentController_editorAPI, "f");
69
- return res.enterTextEditMode(frameId).then((result) => getEditorResponseData(result));
69
+ return res.enterTextEditMode(id).then((result) => getEditorResponseData(result));
70
70
  });
71
71
  /**
72
72
  * This method will exit text editing mode.
@@ -76,6 +76,39 @@ export class ExperimentController {
76
76
  const res = yield __classPrivateFieldGet(this, _ExperimentController_editorAPI, "f");
77
77
  return res.exitTextEditMode().then((result) => getEditorResponseData(result));
78
78
  });
79
+ /**
80
+ * This method gets the text content of a text frame.
81
+ * The variables contained in the text will return their values only if you
82
+ * are in text editing mode.
83
+ * @param frameId The ID of a text frame
84
+ * @param textType The type of the text
85
+ * @returns the text content
86
+ */
87
+ this.getText = (frameId, textType) => __awaiter(this, void 0, void 0, function* () {
88
+ const res = yield __classPrivateFieldGet(this, _ExperimentController_editorAPI, "f");
89
+ return res.getTextByFrameId(frameId, textType).then((result) => getEditorResponseData(result));
90
+ });
91
+ /**
92
+ * This method sets the text content of a text frame
93
+ * @param frameId The ID of a text frame
94
+ * @param text The new text content
95
+ * @returns
96
+ */
97
+ this.setText = (frameId, text) => __awaiter(this, void 0, void 0, function* () {
98
+ const res = yield __classPrivateFieldGet(this, _ExperimentController_editorAPI, "f");
99
+ return res.setTextByFrameId(frameId, text).then((result) => getEditorResponseData(result));
100
+ });
101
+ /**
102
+ * This method selects the text content of a text frame
103
+ * @param frameId The ID of a text frame
104
+ * @param startIndex The index where the selection starts
105
+ * @param length The length of selection from startIndex
106
+ * @returns
107
+ */
108
+ this.selectText = (frameId, startIndex, length) => __awaiter(this, void 0, void 0, function* () {
109
+ const res = yield __classPrivateFieldGet(this, _ExperimentController_editorAPI, "f");
110
+ return res.selectTextById(frameId, startIndex, length).then((result) => getEditorResponseData(result));
111
+ });
79
112
  __classPrivateFieldSet(this, _ExperimentController_editorAPI, editorAPI, "f");
80
113
  }
81
114
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ExperimentController.js","sourceRoot":"","sources":["../../../src/controllers/ExperimentController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAA4B,MAAM,qBAAqB,CAAC;AAEpF;;;;;GAKG;AACH,MAAM,OAAO,oBAAoB;IAM7B;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,kDAAsB;QAStB;;;;;WAKG;QACH,+BAA0B,GAAG,CAAO,YAAgB,EAAE,UAAkB,EAAE,EAAE;YACxE,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,MAAM,GAAG,GAA6B,EAAE,UAAU,EAAE,UAAU,EAAE,UAAU,EAAE,mBAAmB,CAAC,QAAQ,EAAE,CAAC;YAC3G,OAAO,GAAG;iBACL,cAAc,CAAC,YAAY,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;iBACjD,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,uBAAkB,GAAG,CAAO,UAAc,EAAE,EAAE;YAC1C,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACpG,CAAC,CAAA,CAAC;QAEF;;;;WAIG;QACH,sBAAiB,GAAG,CAAO,OAAW,EAAE,EAAE;YACtC,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAChG,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACH,qBAAgB,GAAG,GAAS,EAAE;YAC1B,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,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;QA7CE,uBAAA,IAAI,mCAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CA6CJ"}
1
+ {"version":3,"file":"ExperimentController.js","sourceRoot":"","sources":["../../../src/controllers/ExperimentController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAA4B,MAAM,qBAAqB,CAAC;AAGpF;;;;;GAKG;AACH,MAAM,OAAO,oBAAoB;IAM7B;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,kDAAsB;QAStB;;;;;WAKG;QACH,+BAA0B,GAAG,CAAO,YAAgB,EAAE,UAAc,EAAE,EAAE;YACpE,MAAM,GAAG,G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MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAS,MAAM,CAAC,CAAC,CAAC;QAC3G,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,YAAO,GAAG,CAAO,OAAe,EAAE,IAAY,EAAE,EAAE;YAC9C,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACrG,CAAC,CAAA,CAAC;QAEF;;;;;;WAMG;QACH,eAAU,GAAG,CAAO,OAAe,EAAE,UAAkB,EAAE,MAAc,EAAE,EAAE;YACvE,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,uCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACjH,CAAC,CAAA,CAAC;QAjFE,uBAAA,IAAI,mCAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CAiFJ"}
@@ -22,74 +22,82 @@ export declare class FontConnectorController {
22
22
  /**
23
23
  * Query a specific FontConnector for data using both standardized queryOptions and the dynamic
24
24
  * context as parameters. This call returns an array of Font items.
25
- * @param connectorId unique Id of the Font connector
25
+ * @param id unique id of the Font connector
26
26
  * @param queryOptions stringified instance of `QueryOptions`
27
27
  * @param context stringified `Map<string, string>` of dynamic options
28
+ * @returns array of font items
28
29
  */
29
- query: (connectorId: string, queryOptions: QueryOptions, context: MetaData) => Promise<EditorResponse<QueryPage<Font>>>;
30
+ query: (id: string, queryOptions: QueryOptions, context: MetaData) => Promise<EditorResponse<QueryPage<Font>>>;
30
31
  /**
31
- * Returns a single font using a specific FontConnector.
32
- *
33
- * The connector needs to list `detail` as a supported capability.
34
- * @param connectorId unique Id of the Font connector
32
+ * Returns a single font using a specific FontConnector. The connector needs to list `detail` as a supported capability.
33
+ * @param id unique id of the Font connector
35
34
  * @param fontId unique id of the Font
35
+ * @returns font details
36
36
  */
37
- detail: (connectorId: string, fontId: string) => Promise<EditorResponse<Font>>;
37
+ detail: (id: string, fontId: string) => Promise<EditorResponse<Font>>;
38
38
  /**
39
- * The combination of a `connectorId` and `FontId` is typically enough for a Font connector to
39
+ * The combination of a `connectorId` and `fontId` is typically enough for a Font connector to
40
40
  * perform the download of this asset. The `download` endpoint is capable of relaying this information to the
41
41
  * Font connector instance running in the editor engine.
42
- * @param connectorId unique Id of the Font connector
43
- * @param FontId unique Id of the Font to download
42
+ * @param id unique id of the Font connector
43
+ * @param fontId unique id of the Font to download
44
44
  * @param downloadType hint to the Font connector about desired quality of the downloaded Font
45
45
  * @param context dynamic map of additional options potentially used by the connector
46
+ * @returns
46
47
  */
47
- download: (connectorId: string, FontId: string, downloadType: FontDownloadType, context: MetaData) => Promise<Uint8Array>;
48
+ download: (id: string, fontId: string, downloadType: FontDownloadType, context: MetaData) => Promise<Uint8Array>;
48
49
  /**
49
50
  * Depending on the connector capabilities, this api method allows you to upload new Font to the
50
51
  * connector's backend.
51
- * @param connectorId unique Id of the Font connector
52
- * @param FontId unique Id of the Font to upload
52
+ * @param id unique id of the Font connector
53
+ * @param fontId unique id of the Font to upload
53
54
  * @param blob byte array representation of the Font to upload
55
+ * @returns
54
56
  */
55
- upload: (connectorId: string, FontId: string, blob: Uint8Array) => Promise<EditorResponse<null>>;
57
+ upload: (id: string, fontId: string, blob: Uint8Array) => Promise<EditorResponse<null>>;
56
58
  /**
57
- * Depending on the connector capabilities, removes Font identified by `FontId` from the connector's backend storage
58
- * @param connectorId unique Id of the Font connector
59
- * @param FontId unique Id of the Font to download
59
+ * Depending on the connector capabilities, removes Font identified by `fontId` from the connector's backend storage
60
+ * @param id unique id of the Font connector
61
+ * @param fontId unique id of the Font to download
62
+ * @returns
60
63
  */
61
- remove: (connectorId: string, FontId: string) => Promise<EditorResponse<null>>;
64
+ remove: (id: string, fontId: string) => Promise<EditorResponse<null>>;
62
65
  /**
63
- * Depending on the connector capabilities, copies Font identified by `FontId` to a new Font item on the
66
+ * Depending on the connector capabilities, copies Font identified by `fontId` to a new Font item on the
64
67
  * connector's backend
65
- * @param connectorId unique Id of the Font connector
66
- * @param FontId unique Id of the Font to download
68
+ * @param id unique id of the Font connector
69
+ * @param fontId unique id of the Font to download
67
70
  * @param newName name of the copied Font on the connector's backend
71
+ * @returns
68
72
  */
69
- copy: (connectorId: string, FontId: string, newName: string) => Promise<EditorResponse<null>>;
73
+ copy: (id: string, fontId: string, newName: string) => Promise<EditorResponse<null>>;
70
74
  /**
71
75
  * All connectors have a certain set of queryOptions they allow to be passed in the query context. This
72
76
  * method allows you to discover what options are available for a given connector. If you want to use any of these
73
77
  * options, they need to be passed in the `context` parameter of the `query` api method.
74
- * @param connectorId unique Id of the Font connector
78
+ * @param id unique id of the Font connector
79
+ * @returns query options
75
80
  */
76
- getQueryOptions: (connectorId: string) => Promise<EditorResponse<ConnectorOptions>>;
81
+ getQueryOptions: (id: string) => Promise<EditorResponse<ConnectorOptions>>;
77
82
  /**
78
83
  * All connectors have a certain set of downloadOptions they allow to be passed in the download context. This
79
84
  * method allows you to discover what options are available for a given connector. If you want to use any of these
80
85
  * options, they need to be passed in the `context` parameter of the `download` api method.
81
- * @param connectorId unique Id of the Font connector
86
+ * @param id unique id of the Font connector
87
+ * @returns download options
82
88
  */
83
- getDownloadOptions: (connectorId: string) => Promise<EditorResponse<ConnectorOptions>>;
89
+ getDownloadOptions: (id: string) => Promise<EditorResponse<ConnectorOptions>>;
84
90
  /**
85
91
  * This method returns what capabilities the selected connector has. It gives an indication what methods can
86
92
  * be used successfully for a certain connector.
87
- * @param connectorId unique Id of the Font connector
93
+ * @param id unique id of the Font connector
94
+ * @returns connector capabilities
88
95
  */
89
- getCapabilities: (connectorId: string) => Promise<EditorResponse<ConnectorCapabilities>>;
96
+ getCapabilities: (id: string) => Promise<EditorResponse<ConnectorCapabilities>>;
90
97
  /**
91
98
  * This method will parse the deprecatedFontType to the new Font type. This method will be removed once the deprecatedFontType is out of use
92
99
  * @param deprecatedType is 0 or 1
100
+ * @returns MediaType value
93
101
  */
94
102
  parseDeprecatedFontType: (deprecatedType: DeprecatedMediaType) => MediaType | undefined;
95
103
  }
@@ -46,113 +46,121 @@ export class FontConnectorController {
46
46
  /**
47
47
  * Query a specific FontConnector for data using both standardized queryOptions and the dynamic
48
48
  * context as parameters. This call returns an array of Font items.
49
- * @param connectorId unique Id of the Font connector
49
+ * @param id unique id of the Font connector
50
50
  * @param queryOptions stringified instance of `QueryOptions`
51
51
  * @param context stringified `Map<string, string>` of dynamic options
52
+ * @returns array of font items
52
53
  */
53
- this.query = (connectorId, queryOptions, context) => __awaiter(this, void 0, void 0, function* () {
54
+ this.query = (id, queryOptions, context) => __awaiter(this, void 0, void 0, function* () {
54
55
  const res = yield __classPrivateFieldGet(this, _FontConnectorController_editorAPI, "f");
55
56
  return res
56
- .fontConnectorQuery(connectorId, JSON.stringify(queryOptions), JSON.stringify(context))
57
+ .fontConnectorQuery(id, JSON.stringify(queryOptions), JSON.stringify(context))
57
58
  .then((result) => getEditorResponseData(result));
58
59
  });
59
60
  /**
60
- * Returns a single font using a specific FontConnector.
61
- *
62
- * The connector needs to list `detail` as a supported capability.
63
- * @param connectorId unique Id of the Font connector
61
+ * Returns a single font using a specific FontConnector. The connector needs to list `detail` as a supported capability.
62
+ * @param id unique id of the Font connector
64
63
  * @param fontId unique id of the Font
64
+ * @returns font details
65
65
  */
66
- this.detail = (connectorId, fontId) => __awaiter(this, void 0, void 0, function* () {
66
+ this.detail = (id, fontId) => __awaiter(this, void 0, void 0, function* () {
67
67
  const res = yield __classPrivateFieldGet(this, _FontConnectorController_editorAPI, "f");
68
- return res.fontConnectorDetail(connectorId, fontId).then((result) => getEditorResponseData(result));
68
+ return res.fontConnectorDetail(id, fontId).then((result) => getEditorResponseData(result));
69
69
  });
70
70
  /**
71
- * The combination of a `connectorId` and `FontId` is typically enough for a Font connector to
71
+ * The combination of a `connectorId` and `fontId` is typically enough for a Font connector to
72
72
  * perform the download of this asset. The `download` endpoint is capable of relaying this information to the
73
73
  * Font connector instance running in the editor engine.
74
- * @param connectorId unique Id of the Font connector
75
- * @param FontId unique Id of the Font to download
74
+ * @param id unique id of the Font connector
75
+ * @param fontId unique id of the Font to download
76
76
  * @param downloadType hint to the Font connector about desired quality of the downloaded Font
77
77
  * @param context dynamic map of additional options potentially used by the connector
78
+ * @returns
78
79
  */
79
- this.download = (connectorId, FontId, downloadType, context) => __awaiter(this, void 0, void 0, function* () {
80
+ this.download = (id, fontId, downloadType, context) => __awaiter(this, void 0, void 0, function* () {
80
81
  const res = yield __classPrivateFieldGet(this, _FontConnectorController_blobAPI, "f");
81
82
  return res
82
- .fontConnectorDownload(connectorId, FontId, downloadType, JSON.stringify(context))
83
+ .fontConnectorDownload(id, fontId, downloadType, JSON.stringify(context))
83
84
  .then((result) => { var _a; return (_a = result) !== null && _a !== void 0 ? _a : result; });
84
85
  });
85
86
  /**
86
87
  * Depending on the connector capabilities, this api method allows you to upload new Font to the
87
88
  * connector's backend.
88
- * @param connectorId unique Id of the Font connector
89
- * @param FontId unique Id of the Font to upload
89
+ * @param id unique id of the Font connector
90
+ * @param fontId unique id of the Font to upload
90
91
  * @param blob byte array representation of the Font to upload
92
+ * @returns
91
93
  */
92
- this.upload = (connectorId, FontId, blob) => __awaiter(this, void 0, void 0, function* () {
94
+ this.upload = (id, fontId, blob) => __awaiter(this, void 0, void 0, function* () {
93
95
  const res = yield __classPrivateFieldGet(this, _FontConnectorController_editorAPI, "f");
94
- return res.fontConnectorUpload(connectorId, FontId, blob).then((result) => getEditorResponseData(result));
96
+ return res.fontConnectorUpload(id, fontId, blob).then((result) => getEditorResponseData(result));
95
97
  });
96
98
  /**
97
- * Depending on the connector capabilities, removes Font identified by `FontId` from the connector's backend storage
98
- * @param connectorId unique Id of the Font connector
99
- * @param FontId unique Id of the Font to download
99
+ * Depending on the connector capabilities, removes Font identified by `fontId` from the connector's backend storage
100
+ * @param id unique id of the Font connector
101
+ * @param fontId unique id of the Font to download
102
+ * @returns
100
103
  */
101
- this.remove = (connectorId, FontId) => __awaiter(this, void 0, void 0, function* () {
104
+ this.remove = (id, fontId) => __awaiter(this, void 0, void 0, function* () {
102
105
  const res = yield __classPrivateFieldGet(this, _FontConnectorController_editorAPI, "f");
103
- return res.fontConnectorRemove(connectorId, FontId).then((result) => getEditorResponseData(result));
106
+ return res.fontConnectorRemove(id, fontId).then((result) => getEditorResponseData(result));
104
107
  });
105
108
  /**
106
- * Depending on the connector capabilities, copies Font identified by `FontId` to a new Font item on the
109
+ * Depending on the connector capabilities, copies Font identified by `fontId` to a new Font item on the
107
110
  * connector's backend
108
- * @param connectorId unique Id of the Font connector
109
- * @param FontId unique Id of the Font to download
111
+ * @param id unique id of the Font connector
112
+ * @param fontId unique id of the Font to download
110
113
  * @param newName name of the copied Font on the connector's backend
114
+ * @returns
111
115
  */
112
- this.copy = (connectorId, FontId, newName) => __awaiter(this, void 0, void 0, function* () {
116
+ this.copy = (id, fontId, newName) => __awaiter(this, void 0, void 0, function* () {
113
117
  const res = yield __classPrivateFieldGet(this, _FontConnectorController_editorAPI, "f");
114
118
  return res
115
- .fontConnectorCopy(connectorId, FontId, newName)
119
+ .fontConnectorCopy(id, fontId, newName)
116
120
  .then((result) => getEditorResponseData(result));
117
121
  });
118
122
  /**
119
123
  * All connectors have a certain set of queryOptions they allow to be passed in the query context. This
120
124
  * method allows you to discover what options are available for a given connector. If you want to use any of these
121
125
  * options, they need to be passed in the `context` parameter of the `query` api method.
122
- * @param connectorId unique Id of the Font connector
126
+ * @param id unique id of the Font connector
127
+ * @returns query options
123
128
  */
124
- this.getQueryOptions = (connectorId) => __awaiter(this, void 0, void 0, function* () {
129
+ this.getQueryOptions = (id) => __awaiter(this, void 0, void 0, function* () {
125
130
  const res = yield __classPrivateFieldGet(this, _FontConnectorController_editorAPI, "f");
126
131
  return res
127
- .fontConnectorGetQueryOptions(connectorId)
132
+ .fontConnectorGetQueryOptions(id)
128
133
  .then((result) => getEditorResponseData(result));
129
134
  });
130
135
  /**
131
136
  * All connectors have a certain set of downloadOptions they allow to be passed in the download context. This
132
137
  * method allows you to discover what options are available for a given connector. If you want to use any of these
133
138
  * options, they need to be passed in the `context` parameter of the `download` api method.
134
- * @param connectorId unique Id of the Font connector
139
+ * @param id unique id of the Font connector
140
+ * @returns download options
135
141
  */
136
- this.getDownloadOptions = (connectorId) => __awaiter(this, void 0, void 0, function* () {
142
+ this.getDownloadOptions = (id) => __awaiter(this, void 0, void 0, function* () {
137
143
  const res = yield __classPrivateFieldGet(this, _FontConnectorController_editorAPI, "f");
138
144
  return res
139
- .fontConnectorGetDownloadOptions(connectorId)
145
+ .fontConnectorGetDownloadOptions(id)
140
146
  .then((result) => getEditorResponseData(result));
141
147
  });
142
148
  /**
143
149
  * This method returns what capabilities the selected connector has. It gives an indication what methods can
144
150
  * be used successfully for a certain connector.
145
- * @param connectorId unique Id of the Font connector
151
+ * @param id unique id of the Font connector
152
+ * @returns connector capabilities
146
153
  */
147
- this.getCapabilities = (connectorId) => __awaiter(this, void 0, void 0, function* () {
154
+ this.getCapabilities = (id) => __awaiter(this, void 0, void 0, function* () {
148
155
  const res = yield __classPrivateFieldGet(this, _FontConnectorController_editorAPI, "f");
149
156
  return res
150
- .fontConnectorGetCapabilities(connectorId)
157
+ .fontConnectorGetCapabilities(id)
151
158
  .then((result) => getEditorResponseData(result));
152
159
  });
153
160
  /**
154
161
  * This method will parse the deprecatedFontType to the new Font type. This method will be removed once the deprecatedFontType is out of use
155
162
  * @param deprecatedType is 0 or 1
163
+ * @returns MediaType value
156
164
  */
157
165
  this.parseDeprecatedFontType = (deprecatedType) => {
158
166
  if (deprecatedType === DeprecatedMediaType.file)
@@ -1 +1 @@
1
- {"version":3,"file":"FontConnectorController.js","sourceRoot":"","sources":["../../../src/controllers/FontConnectorController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EACH,mBAAmB,EAEnB,SAAS,GAGZ,MAAM,yBAAyB,CAAC;AAIjC;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,uBAAuB;IAOhC;;OAEG;IACH,YAAY,SAAoB;QAThC;;WAEG;QACH,qDAAsB;QACtB,mDAAuB;QAUvB;;;;;;WAMG;QACH,UAAK,GAAG,CAAO,WAAmB,EAAE,YAA0B,EAAE,OAAiB,EAAE,EAAE;YACjF,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,0CAAW,CAAC;YAClC,OAAO,GAAG;iBACL,kBAAkB,CAAC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;iBACtF,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAkB,MAAM,CAAC,CAAC,CAAC;QAC1E,CAAC,CAAA,CAAC;QAEF;;;;;;WAMG;QACH,WAAM,GAAG,CAAO,WAAmB,EAAE,MAAc,EAAE,EAAE;YACnD,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,0CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC9G,CAAC,CAAA,CAAC;QAEF;;;;;;;;WAQG;QACH,aAAQ,GAAG,CACP,WAAmB,EACnB,MAAc,EACd,YAA8B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CAAC;IAC5D,CAAC;CAmIJ"}
1
+ {"version":3,"file":"FontConnectorController.js","sourceRoot":"","sources":["../../../src/controllers/FontConnectorController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EACH,mBAAmB,EAEnB,SAAS,GAGZ,MAAM,yBAAyB,CAAC;AAIjC;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,uBAAuB;IAOhC;;OAEG;IACH,YAAY,SAAoB;QAThC;;WAEG;QACH,qDAAsB;QACtB,mDAAuB;QAUvB;;;;;;;WAOG;QACH,UAAK,GAAG,CAAO,EAAU,EAAE,YAA0B,EAAE,OAAiB,EAAE,EAAE;YACxE,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,0CAAW,CAAC;YAClC,OAAO,GAAG;iBACL,kBAAkB,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;iBAC7E,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAkB,MAAM,CAAC,CAAC,CAAC;QAC1E,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,WAAM,GAAG,CAAO,EAAU,EAAE,MAAc,EAAE,EAAE;YAC1C,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,0CAAW,CAAC;YAClC,OAAO,GAAG,CAAC,mBAAmB,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QACrG,CAAC,CAAA,CAAC;QAEF;;;;;;;;;WASG;QACH,aAAQ,GAAG,CACP,EAAU,EACV,MAAc,EACd,YAA8B,EAC9B,OAAiB,EACE,EAAE;YACrB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,wCAAS,CAAC;YACh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13
13
  /**
14
14
  * This method returns the list of fonts
15
- * @returns
15
+ * @returns list of all fonts
16
16
  */
17
- getFonts: () => Promise<import("../types/CommonTypes").EditorResponse<DocumentFont[]>>;
17
+ getAll: () => Promise<import("../types/CommonTypes").EditorResponse<DocumentFont[]>>;
18
18
  /**
19
19
  * This method returns a font by id
20
- * @param fontId The ID of a specific font
21
- * @returns
20
+ * @param id the id of a specific font
21
+ * @returns font properties
22
22
  */
23
- getFontById: (fontId: Id) => Promise<import("../types/CommonTypes").EditorResponse<DocumentFont>>;
23
+ getById: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<DocumentFont>>;
24
24
  /**
25
25
  * This method returns the default font.
26
26
  * Be aware that the default font will not change during the entire lifetime of the SDK session.
27
27
  * It is not necessary to call this more than once in an integration, this value can be safely stored during the lifetime of this SDK session.
28
- * @returns
28
+ * @returns font properties
29
29
  */
30
- getDefaultFont: () => Promise<import("../types/CommonTypes").EditorResponse<DocumentFont>>;
30
+ getDefault: () => Promise<import("../types/CommonTypes").EditorResponse<DocumentFont>>;
31
31
  /**
32
32
  * This method removes a font
33
- * @param id The ID of a specific font
33
+ * @param id the id of a specific font
34
34
  * @returns
35
35
  */
36
- removeFont: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
36
+ remove: (id: Id) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
37
37
  /**
38
38
  * This method adds a font
39
- * @param connectorId unique Id of the font connector
40
- * @param font The font object
39
+ * @param id unique id of the font connector
40
+ * @param font the font object
41
41
  * @returns
42
42
  */
43
- addFont: (connectorId: Id, font: AddDocumentFont) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
43
+ add: (id: Id, font: AddDocumentFont) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
44
44
  /**
45
45
  * Check if the font is used anywhere in the document
46
- * @param fontKey The ID of the font to check
47
- * @returns Whether the font is used
46
+ * @param id the id of the font to check
47
+ * @returns whether the font is used
48
48
  */
49
- isFontUsed: (fontKey: string) => Promise<import("../types/CommonTypes").EditorResponse<boolean>>;
49
+ isUsed: (id: string) => Promise<import("../types/CommonTypes").EditorResponse<boolean>>;
50
50
  }
@@ -35,58 +35,58 @@ export class FontController {
35
35
  _FontController_editorAPI.set(this, void 0);
36
36
  /**
37
37
  * This method returns the list of fonts
38
- * @returns
38
+ * @returns list of all fonts
39
39
  */
40
- this.getFonts = () => __awaiter(this, void 0, void 0, function* () {
40
+ this.getAll = () => __awaiter(this, void 0, void 0, function* () {
41
41
  const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
42
42
  return res.getFonts().then((result) => getEditorResponseData(result));
43
43
  });
44
44
  /**
45
45
  * This method returns a font by id
46
- * @param fontId The ID of a specific font
47
- * @returns
46
+ * @param id the id of a specific font
47
+ * @returns font properties
48
48
  */
49
- this.getFontById = (fontId) => __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, _FontController_editorAPI, "f");
51
- return res.getFontById(fontId).then((result) => getEditorResponseData(result));
51
+ return res.getFontById(id).then((result) => getEditorResponseData(result));
52
52
  });
53
53
  /**
54
54
  * This method returns the default font.
55
55
  * Be aware that the default font will not change during the entire lifetime of the SDK session.
56
56
  * It is not necessary to call this more than once in an integration, this value can be safely stored during the lifetime of this SDK session.
57
- * @returns
57
+ * @returns font properties
58
58
  */
59
- this.getDefaultFont = () => __awaiter(this, void 0, void 0, function* () {
59
+ this.getDefault = () => __awaiter(this, void 0, void 0, function* () {
60
60
  const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
61
61
  return res.getDefaultFont().then((result) => getEditorResponseData(result));
62
62
  });
63
63
  /**
64
64
  * This method removes a font
65
- * @param id The ID of a specific font
65
+ * @param id the id of a specific font
66
66
  * @returns
67
67
  */
68
- this.removeFont = (id) => __awaiter(this, void 0, void 0, function* () {
68
+ this.remove = (id) => __awaiter(this, void 0, void 0, function* () {
69
69
  const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
70
70
  return res.removeFont(id).then((result) => getEditorResponseData(result));
71
71
  });
72
72
  /**
73
73
  * This method adds a font
74
- * @param connectorId unique Id of the font connector
75
- * @param font The font object
74
+ * @param id unique id of the font connector
75
+ * @param font the font object
76
76
  * @returns
77
77
  */
78
- this.addFont = (connectorId, font) => __awaiter(this, void 0, void 0, function* () {
78
+ this.add = (id, font) => __awaiter(this, void 0, void 0, function* () {
79
79
  const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
80
- return res.addFont(connectorId, JSON.stringify(font)).then((result) => getEditorResponseData(result));
80
+ return res.addFont(id, JSON.stringify(font)).then((result) => getEditorResponseData(result));
81
81
  });
82
82
  /**
83
83
  * Check if the font is used anywhere in the document
84
- * @param fontKey The ID of the font to check
85
- * @returns Whether the font is used
84
+ * @param id the id of the font to check
85
+ * @returns whether the font is used
86
86
  */
87
- this.isFontUsed = (fontKey) => __awaiter(this, void 0, void 0, function* () {
87
+ this.isUsed = (id) => __awaiter(this, void 0, void 0, function* () {
88
88
  const res = yield __classPrivateFieldGet(this, _FontController_editorAPI, "f");
89
- return res.isFontUsed(fontKey).then((result) => getEditorResponseData(result));
89
+ return res.isFontUsed(id).then((result) => getEditorResponseData(result));
90
90
  });
91
91
  __classPrivateFieldSet(this, _FontController_editorAPI, editorAPI, "f");
92
92
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FontController.js","sourceRoot":"","sources":["../../../src/controllers/FontController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,cAAc;IAMvB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,4CAAsB;QAStB;;;WAGG;QACH,aAAQ,GAAG,GAAS,EAAE;YAClB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,iCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,Q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