@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.
- package/README.md +1 -1
- package/_bundles/main.js +1 -1
- package/_bundles/main.js.map +1 -1
- package/_bundles/report.html +2 -2
- package/lib/editor-engine.json +1 -1
- package/lib/package.json +1 -1
- package/lib/src/controllers/ActionController.d.ts +33 -25
- package/lib/src/controllers/ActionController.js +42 -31
- package/lib/src/controllers/ActionController.js.map +1 -1
- package/lib/src/controllers/AnimationController.d.ts +24 -24
- package/lib/src/controllers/AnimationController.js +28 -28
- package/lib/src/controllers/AnimationController.js.map +1 -1
- package/lib/src/controllers/CanvasController.d.ts +3 -2
- package/lib/src/controllers/CanvasController.js +4 -3
- package/lib/src/controllers/CanvasController.js.map +1 -1
- package/lib/src/controllers/CharacterStyleController.d.ts +23 -23
- package/lib/src/controllers/CharacterStyleController.js +26 -26
- package/lib/src/controllers/CharacterStyleController.js.map +1 -1
- package/lib/src/controllers/ColorStyleController.d.ts +22 -22
- package/lib/src/controllers/ColorStyleController.js +27 -27
- package/lib/src/controllers/ColorStyleController.js.map +1 -1
- package/lib/src/controllers/ConfigurationController.d.ts +1 -1
- package/lib/src/controllers/ConfigurationController.js +1 -1
- package/lib/src/controllers/ConnectorController.d.ts +21 -12
- package/lib/src/controllers/ConnectorController.js +28 -19
- package/lib/src/controllers/ConnectorController.js.map +1 -1
- package/lib/src/controllers/DebugController.d.ts +2 -2
- package/lib/src/controllers/DebugController.js +2 -2
- package/lib/src/controllers/DebugController.js.map +1 -1
- package/lib/src/controllers/DocumentController.d.ts +6 -6
- package/lib/src/controllers/DocumentController.js +7 -7
- package/lib/src/controllers/DocumentController.js.map +1 -1
- package/lib/src/controllers/ExperimentController.d.ts +32 -7
- package/lib/src/controllers/ExperimentController.js +42 -9
- package/lib/src/controllers/ExperimentController.js.map +1 -1
- package/lib/src/controllers/FontConnectorController.d.ts +36 -28
- package/lib/src/controllers/FontConnectorController.js +45 -37
- package/lib/src/controllers/FontConnectorController.js.map +1 -1
- package/lib/src/controllers/FontController.d.ts +15 -15
- package/lib/src/controllers/FontController.js +18 -18
- package/lib/src/controllers/FontController.js.map +1 -1
- package/lib/src/controllers/FrameController.d.ts +127 -127
- package/lib/src/controllers/FrameController.js +173 -173
- package/lib/src/controllers/FrameController.js.map +1 -1
- package/lib/src/controllers/LayoutController.d.ts +37 -37
- package/lib/src/controllers/LayoutController.js +48 -48
- package/lib/src/controllers/LayoutController.js.map +1 -1
- package/lib/src/controllers/MediaConnectorController.d.ts +33 -23
- package/lib/src/controllers/MediaConnectorController.js +41 -31
- package/lib/src/controllers/MediaConnectorController.js.map +1 -1
- package/lib/src/controllers/PageController.d.ts +11 -11
- package/lib/src/controllers/PageController.js +16 -16
- package/lib/src/controllers/PageController.js.map +1 -1
- package/lib/src/controllers/ParagraphStyleController.d.ts +20 -20
- package/lib/src/controllers/ParagraphStyleController.js +23 -23
- package/lib/src/controllers/ParagraphStyleController.js.map +1 -1
- package/lib/src/controllers/ShapeController.d.ts +28 -28
- package/lib/src/controllers/ShapeController.js +43 -43
- package/lib/src/controllers/ShapeController.js.map +1 -1
- package/lib/src/controllers/SubscriberController.d.ts +18 -18
- package/lib/src/controllers/SubscriberController.js +24 -24
- package/lib/src/controllers/SubscriberController.js.map +1 -1
- package/lib/src/controllers/TextStyleController.d.ts +7 -7
- package/lib/src/controllers/TextStyleController.js +7 -7
- package/lib/src/controllers/TextStyleController.js.map +1 -1
- package/lib/src/controllers/ToolController.d.ts +10 -10
- package/lib/src/controllers/ToolController.js +9 -9
- package/lib/src/controllers/ToolController.js.map +1 -1
- package/lib/src/controllers/UtilsController.d.ts +10 -4
- package/lib/src/controllers/UtilsController.js +10 -4
- package/lib/src/controllers/UtilsController.js.map +1 -1
- package/lib/src/controllers/VariableController.d.ts +78 -34
- package/lib/src/controllers/VariableController.js +106 -53
- package/lib/src/controllers/VariableController.js.map +1 -1
- package/lib/src/index.d.ts +4 -3
- package/lib/src/index.js +5 -4
- package/lib/src/index.js.map +1 -1
- package/lib/src/interactions/connector.d.ts +4 -3
- package/lib/src/interactions/connector.js +7 -3
- package/lib/src/interactions/connector.js.map +1 -1
- package/lib/src/tests/__mocks__/FrameProperties.d.ts +2 -2
- package/lib/src/tests/__mocks__/FrameProperties.js +2 -2
- package/lib/src/tests/__mocks__/FrameProperties.js.map +1 -1
- package/lib/src/tests/__mocks__/MockImageFrameSource.js +5 -5
- package/lib/src/tests/__mocks__/MockImageFrameSource.js.map +1 -1
- package/lib/src/tests/__mocks__/animations.js +1 -1
- package/lib/src/tests/__mocks__/animations.js.map +1 -1
- package/lib/src/tests/__mocks__/mockDocument.d.ts +1 -1
- package/lib/src/tests/__mocks__/mockDocument.js +1 -1
- package/lib/src/tests/__mocks__/mockDocument.js.map +1 -1
- package/lib/src/tests/controllers/ActionController.test.js +18 -9
- package/lib/src/tests/controllers/ActionController.test.js.map +1 -1
- package/lib/src/tests/controllers/AnimationController.test.js +14 -14
- package/lib/src/tests/controllers/AnimationController.test.js.map +1 -1
- package/lib/src/tests/controllers/CharacterStyleController.test.js +11 -11
- package/lib/src/tests/controllers/CharacterStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ColorStyleController.test.js +17 -17
- package/lib/src/tests/controllers/ColorStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ConnectorController.test.js +6 -6
- package/lib/src/tests/controllers/ConnectorController.test.js.map +1 -1
- package/lib/src/tests/controllers/DebugController.test.js +1 -1
- package/lib/src/tests/controllers/DebugController.test.js.map +1 -1
- package/lib/src/tests/controllers/DocumentController.test.js +6 -6
- package/lib/src/tests/controllers/DocumentController.test.js.map +1 -1
- package/lib/src/tests/controllers/ExperimentController.test.js +29 -1
- package/lib/src/tests/controllers/ExperimentController.test.js.map +1 -1
- package/lib/src/tests/controllers/FontConnectorController.test.js +11 -11
- package/lib/src/tests/controllers/FontController.test.js +11 -11
- package/lib/src/tests/controllers/FontController.test.js.map +1 -1
- package/lib/src/tests/controllers/FrameController.test.js +113 -113
- package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
- package/lib/src/tests/controllers/LayoutController.test.js +25 -27
- package/lib/src/tests/controllers/LayoutController.test.js.map +1 -1
- package/lib/src/tests/controllers/MediaConnectorController.test.js +1 -1
- package/lib/src/tests/controllers/PageController.test.js +11 -11
- package/lib/src/tests/controllers/PageController.test.js.map +1 -1
- package/lib/src/tests/controllers/ParagraphStyleController.test.js +12 -12
- package/lib/src/tests/controllers/ParagraphStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ShapeController.test.js +26 -26
- package/lib/src/tests/controllers/ShapeController.test.js.map +1 -1
- package/lib/src/tests/controllers/SubscriberContoller.test.js +7 -7
- package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -1
- package/lib/src/tests/controllers/TextStyleController.test.js +6 -6
- package/lib/src/tests/controllers/TextStyleController.test.js.map +1 -1
- package/lib/src/tests/controllers/ToolController.test.js +9 -9
- package/lib/src/tests/controllers/ToolController.test.js.map +1 -1
- package/lib/src/tests/controllers/UtilsController.test.js +20 -0
- package/lib/src/tests/controllers/UtilsController.test.js.map +1 -1
- package/lib/src/tests/controllers/VariableController.test.js +62 -31
- package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
- package/lib/src/tests/interactions/connector.test.js +14 -0
- package/lib/src/tests/interactions/connector.test.js.map +1 -1
- package/lib/src/tests/utils/getClaculatedValue.test.js +2 -2
- package/lib/src/tests/utils/getClaculatedValue.test.js.map +1 -1
- package/lib/src/types/ActionTypes.d.ts +3 -3
- package/lib/src/types/AnimationTypes.d.ts +3 -3
- package/lib/src/types/CharacterStyleTypes.d.ts +2 -1
- package/lib/src/types/ColorStyleTypes.d.ts +8 -7
- package/lib/src/types/ColorStyleTypes.js +1 -1
- package/lib/src/types/ColorStyleTypes.js.map +1 -1
- package/lib/src/types/CommonTypes.d.ts +7 -5
- package/lib/src/types/ConfigurationTypes.d.ts +3 -0
- package/lib/src/types/ConnectorTypes.d.ts +5 -4
- package/lib/src/types/ConnectorTypes.js.map +1 -1
- package/lib/src/types/DocumentTypes.d.ts +23 -25
- package/lib/src/types/DocumentTypes.js.map +1 -1
- package/lib/src/types/FontConnectorTypes.d.ts +2 -1
- package/lib/src/types/FontConnectorTypes.js.map +1 -1
- package/lib/src/types/FontTypes.d.ts +5 -4
- package/lib/src/types/FrameTypes.d.ts +20 -20
- package/lib/src/types/LayoutTypes.d.ts +14 -14
- package/lib/src/types/LayoutTypes.js.map +1 -1
- package/lib/src/types/MediaConnectorTypes.d.ts +2 -1
- package/lib/src/types/MediaConnectorTypes.js.map +1 -1
- package/lib/src/types/PageTypes.d.ts +3 -3
- package/lib/src/types/ParagraphStyleTypes.d.ts +6 -5
- package/lib/src/types/TextStyleTypes.d.ts +5 -5
- package/lib/src/types/TextStyleTypes.js +1 -1
- package/lib/src/types/TextStyleTypes.js.map +1 -1
- package/lib/src/types/TextTypes.d.ts +4 -0
- package/lib/src/types/TextTypes.js +6 -0
- package/lib/src/types/TextTypes.js.map +1 -0
- package/lib/src/types/VariableTypes.d.ts +12 -11
- package/lib/src/types/VariableTypes.js +3 -2
- package/lib/src/types/VariableTypes.js.map +1 -1
- package/lib/src/utils/enums.d.ts +8 -3
- package/lib/src/utils/enums.js +19 -13
- package/lib/src/utils/enums.js.map +1 -1
- package/lib/src/utils/getCalculatedValue.js +2 -2
- package/package.json +1 -1
|
@@ -35,137 +35,137 @@ export class ShapeController {
|
|
|
35
35
|
_ShapeController_editorAPI.set(this, void 0);
|
|
36
36
|
/**
|
|
37
37
|
* This method updates properties of the shape
|
|
38
|
-
* @param
|
|
38
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
39
39
|
* @param properties A property to update
|
|
40
40
|
* @returns
|
|
41
41
|
*/
|
|
42
|
-
this.setShapeProperties = (
|
|
42
|
+
this.setShapeProperties = (id, properties) => __awaiter(this, void 0, void 0, function* () {
|
|
43
43
|
const res = yield __classPrivateFieldGet(this, _ShapeController_editorAPI, "f");
|
|
44
44
|
return res
|
|
45
|
-
.setShapeProperties(
|
|
45
|
+
.setShapeProperties(id, JSON.stringify(properties))
|
|
46
46
|
.then((result) => getEditorResponseData(result));
|
|
47
47
|
});
|
|
48
48
|
/**
|
|
49
49
|
* This method will set the visibility of the shape fill.
|
|
50
|
-
* @param
|
|
50
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
51
51
|
* @param enableFill Whether the shape fill is visible.
|
|
52
52
|
* @returns
|
|
53
53
|
*/
|
|
54
|
-
this.setEnableFill = (
|
|
54
|
+
this.setEnableFill = (id, enableFill) => __awaiter(this, void 0, void 0, function* () {
|
|
55
55
|
const properties = { enableFill: enableFill };
|
|
56
|
-
return this.setShapeProperties(
|
|
56
|
+
return this.setShapeProperties(id, properties);
|
|
57
57
|
});
|
|
58
58
|
/**
|
|
59
59
|
* This method will set the shape fill color of a specified shape frame.
|
|
60
|
-
* @param
|
|
61
|
-
* @param fillColor
|
|
60
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
61
|
+
* @param fillColor the new shape fill color that you want to set to the shapeFrame.
|
|
62
62
|
* @returns
|
|
63
63
|
*/
|
|
64
|
-
this.setFillColor = (
|
|
64
|
+
this.setFillColor = (id, fillColor) => __awaiter(this, void 0, void 0, function* () {
|
|
65
65
|
const properties = { fillColor: fillColor };
|
|
66
|
-
return this.setShapeProperties(
|
|
66
|
+
return this.setShapeProperties(id, properties);
|
|
67
67
|
});
|
|
68
68
|
/**
|
|
69
69
|
* This method will set the visibility of the shape stroke.
|
|
70
|
-
* @param
|
|
70
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
71
71
|
* @param enableStroke Whether the shape stroke is visible.
|
|
72
72
|
* @returns
|
|
73
73
|
*/
|
|
74
|
-
this.setEnableStroke = (
|
|
74
|
+
this.setEnableStroke = (id, enableStroke) => __awaiter(this, void 0, void 0, function* () {
|
|
75
75
|
const properties = { enableStroke: enableStroke };
|
|
76
|
-
return this.setShapeProperties(
|
|
76
|
+
return this.setShapeProperties(id, properties);
|
|
77
77
|
});
|
|
78
78
|
/**
|
|
79
79
|
* This method will set the shape stroke color of a specified shape frame.
|
|
80
|
-
* @param
|
|
81
|
-
* @param strokeColor
|
|
80
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
81
|
+
* @param strokeColor the new shape stroke color that you want to set to the shapeFrame.
|
|
82
82
|
* @returns
|
|
83
83
|
*/
|
|
84
|
-
this.setStrokeColor = (
|
|
84
|
+
this.setStrokeColor = (id, strokeColor) => __awaiter(this, void 0, void 0, function* () {
|
|
85
85
|
const properties = { strokeColor: strokeColor };
|
|
86
|
-
return this.setShapeProperties(
|
|
86
|
+
return this.setShapeProperties(id, properties);
|
|
87
87
|
});
|
|
88
88
|
/**
|
|
89
89
|
* This method will set the shape stroke weight of a specified shape frame.
|
|
90
|
-
* @param
|
|
91
|
-
* @param strokeWeight
|
|
90
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
91
|
+
* @param strokeWeight the new shape stroke weight that you want to set to the shapeFrame.
|
|
92
92
|
* @returns
|
|
93
93
|
*/
|
|
94
|
-
this.setStrokeWeight = (
|
|
94
|
+
this.setStrokeWeight = (id, strokeWeight) => __awaiter(this, void 0, void 0, function* () {
|
|
95
95
|
const properties = { strokeWeight: strokeWeight };
|
|
96
|
-
return this.setShapeProperties(
|
|
96
|
+
return this.setShapeProperties(id, properties);
|
|
97
97
|
});
|
|
98
98
|
/**
|
|
99
99
|
* This method will set the flag to change the way the rectangle shape corners will be changed: all at once or separately.
|
|
100
|
-
* @param
|
|
101
|
-
* @param allCornersSame
|
|
100
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
101
|
+
* @param allCornersSame the new flag that you want to set to the shapeFrame.
|
|
102
102
|
* @returns
|
|
103
103
|
*/
|
|
104
|
-
this.setFlagAllCornersSame = (
|
|
104
|
+
this.setFlagAllCornersSame = (id, allCornersSame) => __awaiter(this, void 0, void 0, function* () {
|
|
105
105
|
const properties = { allCornersSame: allCornersSame };
|
|
106
|
-
return this.setShapeProperties(
|
|
106
|
+
return this.setShapeProperties(id, properties);
|
|
107
107
|
});
|
|
108
108
|
/**
|
|
109
109
|
* This method updates radii of the rectangle and polygon shapes
|
|
110
|
-
* @param
|
|
110
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
111
111
|
* @param radius A radius object to update a desired corner;
|
|
112
112
|
* @returns
|
|
113
113
|
*/
|
|
114
|
-
this.setShapeCorners = (
|
|
114
|
+
this.setShapeCorners = (id, radius) => __awaiter(this, void 0, void 0, function* () {
|
|
115
115
|
const res = yield __classPrivateFieldGet(this, _ShapeController_editorAPI, "f");
|
|
116
116
|
return res
|
|
117
|
-
.setShapeCorners(
|
|
117
|
+
.setShapeCorners(id, JSON.stringify(radius))
|
|
118
118
|
.then((result) => getEditorResponseData(result));
|
|
119
119
|
});
|
|
120
120
|
/**
|
|
121
121
|
* This method will set the radius for all corners of the rectangle and polygon shapes
|
|
122
|
-
* @param
|
|
122
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
123
123
|
* @param radius A radius to update all corners at once;
|
|
124
124
|
* @returns
|
|
125
125
|
*/
|
|
126
|
-
this.setRadiusAll = (
|
|
126
|
+
this.setRadiusAll = (id, radius) => __awaiter(this, void 0, void 0, function* () {
|
|
127
127
|
const cornerRadius = { radiusAll: radius };
|
|
128
|
-
return this.setShapeCorners(
|
|
128
|
+
return this.setShapeCorners(id, cornerRadius);
|
|
129
129
|
});
|
|
130
130
|
/**
|
|
131
131
|
* This method will set the radius for the top left corner of the rectangle shape
|
|
132
|
-
* @param
|
|
132
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
133
133
|
* @param radius A radius to update the top left corner;
|
|
134
134
|
* @returns
|
|
135
135
|
*/
|
|
136
|
-
this.setRadiusTopLeft = (
|
|
136
|
+
this.setRadiusTopLeft = (id, radius) => __awaiter(this, void 0, void 0, function* () {
|
|
137
137
|
const cornerRadius = { topLeft: radius };
|
|
138
|
-
return this.setShapeCorners(
|
|
138
|
+
return this.setShapeCorners(id, cornerRadius);
|
|
139
139
|
});
|
|
140
140
|
/**
|
|
141
141
|
* This method will set the radius for the bottom left corner of the rectangle shape
|
|
142
|
-
* @param
|
|
142
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
143
143
|
* @param radius A radius to update the bottom left corner;
|
|
144
144
|
* @returns
|
|
145
145
|
*/
|
|
146
|
-
this.setRadiusBottomLeft = (
|
|
146
|
+
this.setRadiusBottomLeft = (id, radius) => __awaiter(this, void 0, void 0, function* () {
|
|
147
147
|
const cornerRadius = { bottomLeft: radius };
|
|
148
|
-
return this.setShapeCorners(
|
|
148
|
+
return this.setShapeCorners(id, cornerRadius);
|
|
149
149
|
});
|
|
150
150
|
/**
|
|
151
151
|
* This method will set the radius for the top right corner of the rectangle shape
|
|
152
|
-
* @param
|
|
152
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
153
153
|
* @param radius A radius to update the top right corner;
|
|
154
154
|
* @returns
|
|
155
155
|
*/
|
|
156
|
-
this.setRadiusTopRight = (
|
|
156
|
+
this.setRadiusTopRight = (id, radius) => __awaiter(this, void 0, void 0, function* () {
|
|
157
157
|
const cornerRadius = { topRight: radius };
|
|
158
|
-
return this.setShapeCorners(
|
|
158
|
+
return this.setShapeCorners(id, cornerRadius);
|
|
159
159
|
});
|
|
160
160
|
/**
|
|
161
161
|
* This method will set the radius for the bottom right corner of the rectangle shape
|
|
162
|
-
* @param
|
|
162
|
+
* @param id the id of the shapeFrame that needs to get updated.
|
|
163
163
|
* @param radius A radius to update the bottom right corner;
|
|
164
164
|
* @returns
|
|
165
165
|
*/
|
|
166
|
-
this.setRadiusBottomRight = (
|
|
166
|
+
this.setRadiusBottomRight = (id, radius) => __awaiter(this, void 0, void 0, function* () {
|
|
167
167
|
const cornerRadius = { bottomRight: radius };
|
|
168
|
-
return this.setShapeCorners(
|
|
168
|
+
return this.setShapeCorners(id, cornerRadius);
|
|
169
169
|
});
|
|
170
170
|
__classPrivateFieldSet(this, _ShapeController_editorAPI, editorAPI, "f");
|
|
171
171
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShapeController.js","sourceRoot":"","sources":["../../../src/controllers/ShapeController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,eAAe;IAMxB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,6CAAsB;QAStB;;;;;WAKG;QACK,uBAAkB,GAAG,CAAO,
|
|
1
|
+
{"version":3,"file":"ShapeController.js","sourceRoot":"","sources":["../../../src/controllers/ShapeController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,eAAe;IAMxB;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,6CAAsB;QAStB;;;;;WAKG;QACK,uBAAkB,GAAG,CAAO,EAAM,EAAE,UAA2B,EAAE,EAAE;YACvE,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,kCAAW,CAAC;YAClC,OAAO,GAAG;iBACL,kBAAkB,CAAC,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;iBAClD,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,kBAAa,GAAG,CAAO,EAAM,EAAE,UAAmB,EAAE,EAAE;YAClD,MAAM,UAAU,GAAoB,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;YAC/D,OAAO,IAAI,CAAC,kBAAkB,CAAC,EAAE,EAAE,UAAU,CAAC,CAAC;QACnD,CAAC,CAAA,CAAC;QAEF;;;;;WAKG;QACH,iBAA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,CAAC;YACtE,OAAO,IAAI,CAAC,eAAe,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;QAClD,CAAC,CAAA,CAAC;QApJE,uBAAA,IAAI,8BAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CAoJJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConfigType, Id } from '../types/CommonTypes';
|
|
2
2
|
/**
|
|
3
|
-
* The SubscriberController is responsible for all listeners which can influence the
|
|
3
|
+
* The SubscriberController is responsible for all listeners which can influence the application-state from outside.
|
|
4
4
|
* Callbacks inside this controller can be set by `window.SDK.subscriber.{method-name}`
|
|
5
5
|
*/
|
|
6
6
|
export declare class SubscriberController {
|
|
@@ -23,27 +23,27 @@ export declare class SubscriberController {
|
|
|
23
23
|
*/
|
|
24
24
|
onAnimationChanged: (animation: string) => void;
|
|
25
25
|
/**
|
|
26
|
-
* Listener on the
|
|
26
|
+
* Listener on the playback state of the animation, it contains the current time of the playback (in milliseconds) and a flag that describes if the animation is currently playing
|
|
27
27
|
* @param animationPlaybackState Stringified array of AnimationPlaybackType
|
|
28
28
|
*/
|
|
29
29
|
onAnimationPlaybackChanged: (animationPlaybackState: string) => void;
|
|
30
30
|
/**
|
|
31
31
|
* Listener on the state of the currently selected layout, if its properties are changed, this listener will get triggered with the new properties
|
|
32
|
-
* @param
|
|
32
|
+
* @param layoutProperties Stringified object of LayoutPropertiesType
|
|
33
33
|
*/
|
|
34
|
-
onSelectedLayoutPropertiesChanged: (
|
|
34
|
+
onSelectedLayoutPropertiesChanged: (layoutProperties: string) => void;
|
|
35
35
|
/**
|
|
36
36
|
* Listener on the state of the currently selected frame, if this changes, this listener will get triggered with the updates
|
|
37
|
-
* @param
|
|
37
|
+
* @param frameLayout Stringified object of FrameLayoutType
|
|
38
38
|
*/
|
|
39
|
-
onSelectedFrameLayoutChanged: (
|
|
39
|
+
onSelectedFrameLayoutChanged: (frameLayout: string) => void;
|
|
40
40
|
/**
|
|
41
41
|
* Listener on the state of the currently selected frame, it contains some basic information on the type of frame it is
|
|
42
|
-
* @param
|
|
42
|
+
* @param frameContent Stringified object of FrameType
|
|
43
43
|
*/
|
|
44
|
-
onSelectedFrameContentChanged: (
|
|
44
|
+
onSelectedFrameContentChanged: (frameContent: string) => void;
|
|
45
45
|
/**
|
|
46
|
-
* A listener on the general state of the document, gets triggered
|
|
46
|
+
* A listener on the general state of the document, gets triggered every time a change is done on the document.
|
|
47
47
|
*/
|
|
48
48
|
onStateChanged: () => void;
|
|
49
49
|
/**
|
|
@@ -61,7 +61,7 @@ export declare class SubscriberController {
|
|
|
61
61
|
onVariableListChanged: (variablesJson: string) => void;
|
|
62
62
|
/**
|
|
63
63
|
* Listener on when the tool has changed by the canvas
|
|
64
|
-
* @param tool
|
|
64
|
+
* @param tool the string representation of a certain tool
|
|
65
65
|
*/
|
|
66
66
|
onSelectedToolChanged: (tool: string) => void;
|
|
67
67
|
/**
|
|
@@ -71,9 +71,9 @@ export declare class SubscriberController {
|
|
|
71
71
|
onUndoStateChanged: (undoState: string) => void;
|
|
72
72
|
/**
|
|
73
73
|
* Listener on the state of the currently selected layout's frames, if this changes, this listener will get triggered with the updates
|
|
74
|
-
* @param
|
|
74
|
+
* @param layoutFrames Stringified object of Frames
|
|
75
75
|
*/
|
|
76
|
-
onSelectedLayoutFramesChanged: (
|
|
76
|
+
onSelectedLayoutFramesChanged: (layoutFrames: string) => void;
|
|
77
77
|
/**
|
|
78
78
|
* Listener on the state of the currently selected text's styles, if this changes, this listener will get triggered with the updates
|
|
79
79
|
* @param styles Stringified object of styles
|
|
@@ -101,23 +101,23 @@ export declare class SubscriberController {
|
|
|
101
101
|
onFontsChanged: (fonts: string) => void;
|
|
102
102
|
/**
|
|
103
103
|
* Listener on selected layout id, this listener will get triggered when a different layout is selected.
|
|
104
|
-
* @param
|
|
104
|
+
* @param id the currently selected layout id
|
|
105
105
|
*/
|
|
106
|
-
onSelectedLayoutIdChanged: (
|
|
106
|
+
onSelectedLayoutIdChanged: (id: Id) => void;
|
|
107
107
|
/**
|
|
108
108
|
* Listener on layouts, this listener will get triggered when a (sub)layout is
|
|
109
|
-
* -
|
|
109
|
+
* - created
|
|
110
110
|
* - removed
|
|
111
111
|
* - renamed
|
|
112
|
-
* -
|
|
112
|
+
* - duplicated
|
|
113
113
|
* @param layouts Stringified object of layouts
|
|
114
114
|
*/
|
|
115
115
|
onLayoutsChanged: (layouts: string) => void;
|
|
116
116
|
/**
|
|
117
117
|
* Listener on scale factor of the canvas, this listener will get triggered when a zoom is applied to the canvas
|
|
118
|
-
* @param
|
|
118
|
+
* @param zoom Stringified scale factor
|
|
119
119
|
*/
|
|
120
|
-
onZoomChanged: (
|
|
120
|
+
onZoomChanged: (zoom: string) => void;
|
|
121
121
|
/**
|
|
122
122
|
* Listener on connector events, this listener will get triggered when a connector emits one of those events
|
|
123
123
|
* - reloadRequired
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The SubscriberController is responsible for all listeners which can influence the
|
|
2
|
+
* The SubscriberController is responsible for all listeners which can influence the application-state from outside.
|
|
3
3
|
* Callbacks inside this controller can be set by `window.SDK.subscriber.{method-name}`
|
|
4
4
|
*/
|
|
5
5
|
export class SubscriberController {
|
|
@@ -24,7 +24,7 @@ export class SubscriberController {
|
|
|
24
24
|
callBack && callBack(JSON.parse(animation));
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
|
-
* Listener on the
|
|
27
|
+
* Listener on the playback state of the animation, it contains the current time of the playback (in milliseconds) and a flag that describes if the animation is currently playing
|
|
28
28
|
* @param animationPlaybackState Stringified array of AnimationPlaybackType
|
|
29
29
|
*/
|
|
30
30
|
this.onAnimationPlaybackChanged = (animationPlaybackState) => {
|
|
@@ -33,30 +33,30 @@ export class SubscriberController {
|
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
35
35
|
* Listener on the state of the currently selected layout, if its properties are changed, this listener will get triggered with the new properties
|
|
36
|
-
* @param
|
|
36
|
+
* @param layoutProperties Stringified object of LayoutPropertiesType
|
|
37
37
|
*/
|
|
38
|
-
this.onSelectedLayoutPropertiesChanged = (
|
|
38
|
+
this.onSelectedLayoutPropertiesChanged = (layoutProperties) => {
|
|
39
39
|
const callBack = this.config.onSelectedLayoutPropertiesChanged;
|
|
40
|
-
callBack && callBack(JSON.parse(
|
|
40
|
+
callBack && callBack(JSON.parse(layoutProperties));
|
|
41
41
|
};
|
|
42
42
|
/**
|
|
43
43
|
* Listener on the state of the currently selected frame, if this changes, this listener will get triggered with the updates
|
|
44
|
-
* @param
|
|
44
|
+
* @param frameLayout Stringified object of FrameLayoutType
|
|
45
45
|
*/
|
|
46
|
-
this.onSelectedFrameLayoutChanged = (
|
|
46
|
+
this.onSelectedFrameLayoutChanged = (frameLayout) => {
|
|
47
47
|
const callBack = this.config.onSelectedFrameLayoutChanged;
|
|
48
|
-
callBack && callBack(JSON.parse(
|
|
48
|
+
callBack && callBack(JSON.parse(frameLayout));
|
|
49
49
|
};
|
|
50
50
|
/**
|
|
51
51
|
* Listener on the state of the currently selected frame, it contains some basic information on the type of frame it is
|
|
52
|
-
* @param
|
|
52
|
+
* @param frameContent Stringified object of FrameType
|
|
53
53
|
*/
|
|
54
|
-
this.onSelectedFrameContentChanged = (
|
|
54
|
+
this.onSelectedFrameContentChanged = (frameContent) => {
|
|
55
55
|
const callBack = this.config.onSelectedFrameContentChanged;
|
|
56
|
-
callBack && callBack(JSON.parse(
|
|
56
|
+
callBack && callBack(JSON.parse(frameContent));
|
|
57
57
|
};
|
|
58
58
|
/**
|
|
59
|
-
* A listener on the general state of the document, gets triggered
|
|
59
|
+
* A listener on the general state of the document, gets triggered every time a change is done on the document.
|
|
60
60
|
*/
|
|
61
61
|
this.onStateChanged = () => {
|
|
62
62
|
const callBack = this.config.onStateChanged;
|
|
@@ -86,7 +86,7 @@ export class SubscriberController {
|
|
|
86
86
|
};
|
|
87
87
|
/**
|
|
88
88
|
* Listener on when the tool has changed by the canvas
|
|
89
|
-
* @param tool
|
|
89
|
+
* @param tool the string representation of a certain tool
|
|
90
90
|
*/
|
|
91
91
|
this.onSelectedToolChanged = (tool) => {
|
|
92
92
|
const callBack = this.config.onSelectedToolChanged;
|
|
@@ -102,11 +102,11 @@ export class SubscriberController {
|
|
|
102
102
|
};
|
|
103
103
|
/**
|
|
104
104
|
* Listener on the state of the currently selected layout's frames, if this changes, this listener will get triggered with the updates
|
|
105
|
-
* @param
|
|
105
|
+
* @param layoutFrames Stringified object of Frames
|
|
106
106
|
*/
|
|
107
|
-
this.onSelectedLayoutFramesChanged = (
|
|
107
|
+
this.onSelectedLayoutFramesChanged = (layoutFrames) => {
|
|
108
108
|
const callBack = this.config.onSelectedLayoutFramesChanged;
|
|
109
|
-
callBack && callBack(JSON.parse(
|
|
109
|
+
callBack && callBack(JSON.parse(layoutFrames));
|
|
110
110
|
};
|
|
111
111
|
/**
|
|
112
112
|
* Listener on the state of the currently selected text's styles, if this changes, this listener will get triggered with the updates
|
|
@@ -150,18 +150,18 @@ export class SubscriberController {
|
|
|
150
150
|
};
|
|
151
151
|
/**
|
|
152
152
|
* Listener on selected layout id, this listener will get triggered when a different layout is selected.
|
|
153
|
-
* @param
|
|
153
|
+
* @param id the currently selected layout id
|
|
154
154
|
*/
|
|
155
|
-
this.onSelectedLayoutIdChanged = (
|
|
155
|
+
this.onSelectedLayoutIdChanged = (id) => {
|
|
156
156
|
const callBack = this.config.onSelectedLayoutIdChanged;
|
|
157
|
-
callBack && callBack(
|
|
157
|
+
callBack && callBack(id);
|
|
158
158
|
};
|
|
159
159
|
/**
|
|
160
160
|
* Listener on layouts, this listener will get triggered when a (sub)layout is
|
|
161
|
-
* -
|
|
161
|
+
* - created
|
|
162
162
|
* - removed
|
|
163
163
|
* - renamed
|
|
164
|
-
* -
|
|
164
|
+
* - duplicated
|
|
165
165
|
* @param layouts Stringified object of layouts
|
|
166
166
|
*/
|
|
167
167
|
this.onLayoutsChanged = (layouts) => {
|
|
@@ -170,11 +170,11 @@ export class SubscriberController {
|
|
|
170
170
|
};
|
|
171
171
|
/**
|
|
172
172
|
* Listener on scale factor of the canvas, this listener will get triggered when a zoom is applied to the canvas
|
|
173
|
-
* @param
|
|
173
|
+
* @param zoom Stringified scale factor
|
|
174
174
|
*/
|
|
175
|
-
this.onZoomChanged = (
|
|
175
|
+
this.onZoomChanged = (zoom) => {
|
|
176
176
|
const callBack = this.config.onZoomChanged;
|
|
177
|
-
callBack && callBack(JSON.parse(
|
|
177
|
+
callBack && callBack(JSON.parse(zoom));
|
|
178
178
|
};
|
|
179
179
|
/**
|
|
180
180
|
* Listener on connector events, this listener will get triggered when a connector emits one of those events
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubscriberController.js","sourceRoot":"","sources":["../../../src/controllers/SubscriberController.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,OAAO,oBAAoB;IAM7B;;OAEG;IACH,YAAY,MAAkB;QAI9B;;;WAGG;QACH,qBAAgB,GAAG,CAAC,OAAe,EAAE,EAAE;YACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC;YAC9C,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAC9C,CAAC,CAAC;QAEF;;;WAGG;QACH,uBAAkB,GAAG,CAAC,SAAiB,EAAE,EAAE;YACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,wBAAwB,CAAC;YACtD,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC;QAEF;;;WAGG;QACH,+BAA0B,GAAG,CAAC,sBAA8B,EAAE,EAAE;YAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,yBAAyB,CAAC;YACvD,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC;QAC7D,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,QAAgB,EAAE,EAAE;YACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC;YAC/C,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC/C,CAAC,CAAC;QAEF;;;WAGG;QACH,+BAA0B,GAAG,CAAC,YAAoB,EAAE,EAAE;YAClD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,0BAA0B,CAAC;YACxD,QAAQ,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;QACnD,CAAC,CAAC;QAEF;;;WAGG;QACH,+BAA0B,GAAG,CAAC,EAAO,EAAE,EAAE;YACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,0BAA0B,CAAC;YACxD,QAAQ,IAAI,QAAQ,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC,CAAC;QA1OE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;CA0OJ"}
|
|
@@ -14,18 +14,18 @@ export declare class TextStyleController {
|
|
|
14
14
|
* This method updates a selected Text's style properties
|
|
15
15
|
* @returns
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
set: (style: TextStyleUpdateType) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
18
18
|
/**
|
|
19
|
-
* This method
|
|
20
|
-
* If the text is selected, then the inline style properties will be
|
|
21
|
-
* If the text is not selected and user tried to change any style property, the temporary style will be
|
|
22
|
-
* if there is no text selection and there is no temporary style, the inline paragraph properties will be
|
|
19
|
+
* This method removes a selected Text's style properties
|
|
20
|
+
* If the text is selected, then the inline style properties will be removed
|
|
21
|
+
* If the text is not selected and user tried to change any style property, the temporary style will be removed
|
|
22
|
+
* if there is no text selection and there is no temporary style, the inline paragraph properties will be removed
|
|
23
23
|
* @returns
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
removeSelected: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
26
26
|
/**
|
|
27
27
|
* This method gets a selected Text's style properties
|
|
28
28
|
* @returns
|
|
29
29
|
*/
|
|
30
|
-
|
|
30
|
+
getSelected: () => Promise<import("../types/CommonTypes").EditorResponse<SelectedTextStyle>>;
|
|
31
31
|
}
|
|
@@ -37,20 +37,20 @@ export class TextStyleController {
|
|
|
37
37
|
* This method updates a selected Text's style properties
|
|
38
38
|
* @returns
|
|
39
39
|
*/
|
|
40
|
-
this.
|
|
40
|
+
this.set = (style) => __awaiter(this, void 0, void 0, function* () {
|
|
41
41
|
const res = yield __classPrivateFieldGet(this, _TextStyleController_editorAPI, "f");
|
|
42
42
|
return res
|
|
43
43
|
.selectedTextStyleDeltaUpdate(JSON.stringify(style))
|
|
44
44
|
.then((result) => getEditorResponseData(result));
|
|
45
45
|
});
|
|
46
46
|
/**
|
|
47
|
-
* This method
|
|
48
|
-
* If the text is selected, then the inline style properties will be
|
|
49
|
-
* If the text is not selected and user tried to change any style property, the temporary style will be
|
|
50
|
-
* if there is no text selection and there is no temporary style, the inline paragraph properties will be
|
|
47
|
+
* This method removes a selected Text's style properties
|
|
48
|
+
* If the text is selected, then the inline style properties will be removed
|
|
49
|
+
* If the text is not selected and user tried to change any style property, the temporary style will be removed
|
|
50
|
+
* if there is no text selection and there is no temporary style, the inline paragraph properties will be removed
|
|
51
51
|
* @returns
|
|
52
52
|
*/
|
|
53
|
-
this.
|
|
53
|
+
this.removeSelected = () => __awaiter(this, void 0, void 0, function* () {
|
|
54
54
|
const res = yield __classPrivateFieldGet(this, _TextStyleController_editorAPI, "f");
|
|
55
55
|
return res.selectedTextStyleClean().then((result) => getEditorResponseData(result));
|
|
56
56
|
});
|
|
@@ -58,7 +58,7 @@ export class TextStyleController {
|
|
|
58
58
|
* This method gets a selected Text's style properties
|
|
59
59
|
* @returns
|
|
60
60
|
*/
|
|
61
|
-
this.
|
|
61
|
+
this.getSelected = () => __awaiter(this, void 0, void 0, function* () {
|
|
62
62
|
const res = yield __classPrivateFieldGet(this, _TextStyleController_editorAPI, "f");
|
|
63
63
|
return res.getSelectedTextStyle().then((result) => getEditorResponseData(result));
|
|
64
64
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextStyleController.js","sourceRoot":"","sources":["../../../src/controllers/TextStyleController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAM5B;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,iDAA+B;QAS/B;;;WAGG;QACH,
|
|
1
|
+
{"version":3,"file":"TextStyleController.js","sourceRoot":"","sources":["../../../src/controllers/TextStyleController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEpE;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAM5B;;OAEG;IACH,YAAY,SAAoB;QARhC;;WAEG;QACH,iDAA+B;QAS/B;;;WAGG;QACH,QAAG,GAAG,CAAO,KAA0B,EAAE,EAAE;YACvC,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG;iBACL,4BAA4B,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;iBACnD,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAA,CAAC;QAEF;;;;;;WAMG;QACH,mBAAc,GAAG,GAAS,EAAE;YACxB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,sBAAsB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAO,MAAM,CAAC,CAAC,CAAC;QAC9F,CAAC,CAAA,CAAC;QAEF;;;WAGG;QACH,gBAAW,GAAG,GAAS,EAAE;YACrB,MAAM,GAAG,GAAG,MAAM,uBAAA,IAAI,sCAAW,CAAC;YAClC,OAAO,GAAG,CAAC,oBAAoB,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAoB,MAAM,CAAC,CAAC,CAAC;QACzG,CAAC,CAAA,CAAC;QAjCE,uBAAA,IAAI,kCAAc,SAAS,MAAA,CAAC;IAChC,CAAC;CAiCJ"}
|
|
@@ -14,41 +14,41 @@ export declare class ToolController {
|
|
|
14
14
|
* This method sets the currently used tool
|
|
15
15
|
* @param tool
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
setTool: (tool: ToolType) => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
18
18
|
/**
|
|
19
19
|
* This method returns selected tool
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
getSelected: () => Promise<import("../types/CommonTypes").EditorResponse<ToolType>>;
|
|
22
22
|
/**
|
|
23
23
|
* This method sets the used tool to a Pointer tool
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
setPointer: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
26
26
|
/**
|
|
27
27
|
* This method sets the used tool to a Move tool
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
setHand: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
30
30
|
/**
|
|
31
31
|
* This method sets the used tool to a Zoom tool
|
|
32
32
|
*/
|
|
33
|
-
|
|
33
|
+
setZoom: () => Promise<void>;
|
|
34
34
|
/**
|
|
35
35
|
* This method sets the used tool to a TextFrame tool
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
setTextFrame: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
38
38
|
/**
|
|
39
39
|
* This method sets the used tool to a ImageFrame tool
|
|
40
40
|
*/
|
|
41
|
-
|
|
41
|
+
setImageFrame: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
42
42
|
/**
|
|
43
43
|
* This method sets the used tool to a ShapeRectangle tool
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
setShapeRect: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
46
46
|
/**
|
|
47
47
|
* This method sets the used tool to a ShapeEllipse tool
|
|
48
48
|
*/
|
|
49
|
-
|
|
49
|
+
setShapeEllipse: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
50
50
|
/**
|
|
51
51
|
* This method sets the used tool to a ShapePolygon tool
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
setShapePolygon: () => Promise<import("../types/CommonTypes").EditorResponse<null>>;
|
|
54
54
|
}
|