@inweb/markup 25.9.1 → 25.9.3

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/lib/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  export { IMarkup, MarkupMode } from "./markup/IMarkup";
2
- export { IMarkupArrow } from "./markup/IMarkupArrow";
3
- export { IMarkupCloud } from "./markup/IMarkupCloud";
2
+ export { IMarkupArrow, IMarkupArrowParams } from "./markup/IMarkupArrow";
3
+ export { IMarkupCloud, IMarkupCloudParams } from "./markup/IMarkupCloud";
4
4
  export { IMarkupColorable } from "./markup/IMarkupColorable";
5
- export { IMarkupEllipse } from "./markup/IMarkupEllipse";
6
- export { IMarkupImage } from "./markup/IMarkupImage";
5
+ export { IMarkupEllipse, IMarkupEllipseParams } from "./markup/IMarkupEllipse";
6
+ export { IMarkupImage, IMarkupImageParams } from "./markup/IMarkupImage";
7
7
  export { IMarkupLine, IMarkupLineParams, MarkupLineType } from "./markup/IMarkupLine";
8
8
  export { IMarkupObject } from "./markup/IMarkupObject";
9
- export { IMarkupRectangle } from "./markup/IMarkupRectangle";
10
- export { IMarkupText } from "./markup/IMarkupText";
9
+ export { IMarkupRectangle, IMarkupRectangleParams } from "./markup/IMarkupRectangle";
10
+ export { IMarkupText, IMarkupTextParams } from "./markup/IMarkupText";
11
11
  export { IWorldTransform } from "./markup/IWorldTransform";
12
12
  export { KonvaMarkup as Markup } from "./markup/Konva/KonvaMarkup";
@@ -46,7 +46,7 @@ export interface IMarkup {
46
46
  */
47
47
  initialize(container: HTMLElement, containerEvents?: string[], viewer?: IEventEmitter, worldTransformer?: IWorldTransform): void;
48
48
  /**
49
- * Releases all resources allocated by this markup instance.
49
+ * Releases resources allocated in the {@link initialize | initialize()}.
50
50
  */
51
51
  dispose(): void;
52
52
  /**
@@ -19,7 +19,7 @@ export interface IMarkupArrow extends IMarkupObject, IMarkupColorable {
19
19
  setPoints(points: {
20
20
  x: number;
21
21
  y: number;
22
- }[]): any;
22
+ }[]): void;
23
23
  /**
24
24
  * Returns the coordinales of the start point of arrow.
25
25
  */
@@ -30,7 +30,7 @@ export interface IMarkupArrow extends IMarkupObject, IMarkupColorable {
30
30
  /**
31
31
  * Sets the coordinales of the start point of the arrow.
32
32
  */
33
- setStartPoint(x: number, y: number): any;
33
+ setStartPoint(x: number, y: number): void;
34
34
  /**
35
35
  * Returns the coordinales of the end point of arrow.
36
36
  */
@@ -41,5 +41,35 @@ export interface IMarkupArrow extends IMarkupObject, IMarkupColorable {
41
41
  /**
42
42
  * Sets the coordinales of the end point of the arrow.
43
43
  */
44
- setEndPoint(x: number, y: number): any;
44
+ setEndPoint(x: number, y: number): void;
45
+ }
46
+ /**
47
+ * Defines the parameters for creating a {@link IMarkupArrow | markup arrow}.
48
+ */
49
+ export interface IMarkupArrowParams {
50
+ /**
51
+ * Coordinales of the start point of arrow.
52
+ */
53
+ start?: {
54
+ x: number;
55
+ y: number;
56
+ };
57
+ /**
58
+ * Coordinales of the end point of arrow.
59
+ */
60
+ end?: {
61
+ x: number;
62
+ y: number;
63
+ };
64
+ /**
65
+ * Line color as a string in hexadecimal color syntax `#RGB` color using its primary color
66
+ * components (red, green, blue) written as hexadecimal numbers.
67
+ *
68
+ * @default "#ff0000"
69
+ */
70
+ color?: string;
71
+ /**
72
+ * Internal markup object identifier.
73
+ */
74
+ id?: string;
45
75
  }
@@ -14,7 +14,7 @@ export interface IMarkupCloud extends IMarkupObject, IMarkupColorable {
14
14
  /**
15
15
  * Sets the coordinates of the top-left point (position) of the cloud.
16
16
  */
17
- setPosition(x: number, y: number): any;
17
+ setPosition(x: number, y: number): void;
18
18
  /**
19
19
  * Returns the width of the cloud.
20
20
  */
@@ -22,7 +22,7 @@ export interface IMarkupCloud extends IMarkupObject, IMarkupColorable {
22
22
  /**
23
23
  * Sets the width of the cloud.
24
24
  */
25
- setWidth(w: number): any;
25
+ setWidth(w: number): void;
26
26
  /**
27
27
  * Returns the height of the cloud.
28
28
  */
@@ -30,7 +30,7 @@ export interface IMarkupCloud extends IMarkupObject, IMarkupColorable {
30
30
  /**
31
31
  * Sets the height of the cloud.
32
32
  */
33
- setHeight(h: number): any;
33
+ setHeight(h: number): void;
34
34
  /**
35
35
  * Returns the line width of the cloud.
36
36
  */
@@ -38,5 +38,46 @@ export interface IMarkupCloud extends IMarkupObject, IMarkupColorable {
38
38
  /**
39
39
  * Sets the line width of the cloud.
40
40
  */
41
- setLineWidth(size: number): any;
41
+ setLineWidth(size: number): void;
42
+ }
43
+ /**
44
+ * Defines the parameters for creating a {@link IMarkupCloudParams | markup cloud}.
45
+ */
46
+ export interface IMarkupCloudParams {
47
+ /**
48
+ * Coordinates of the top-left point (position) of the cloud.
49
+ */
50
+ position?: {
51
+ x: number;
52
+ y: number;
53
+ };
54
+ /**
55
+ * Width of the cloud.
56
+ *
57
+ * @default 200
58
+ */
59
+ width?: number;
60
+ /**
61
+ * Height of the cloud.
62
+ *
63
+ * @default 200
64
+ */
65
+ height?: number;
66
+ /**
67
+ * Line width.
68
+ *
69
+ * @default 4
70
+ */
71
+ lineWidth?: number;
72
+ /**
73
+ * Line color as a string in hexadecimal color syntax `#RGB` color using its primary color
74
+ * components (red, green, blue) written as hexadecimal numbers.
75
+ *
76
+ * @default "#ff0000"
77
+ */
78
+ color?: string;
79
+ /**
80
+ * Internal markup object identifier.
81
+ */
82
+ id?: string;
42
83
  }
@@ -14,7 +14,7 @@ export interface IMarkupEllipse extends IMarkupObject, IMarkupColorable {
14
14
  /**
15
15
  * Sets the coordinates of the top-left point (position) of the ellipse.
16
16
  */
17
- setPosition(x: number, y: number): any;
17
+ setPosition(x: number, y: number): void;
18
18
  /**
19
19
  * Returns the X radius of the ellipse.
20
20
  */
@@ -22,7 +22,7 @@ export interface IMarkupEllipse extends IMarkupObject, IMarkupColorable {
22
22
  /**
23
23
  * Sets the X radius of the ellipse.
24
24
  */
25
- setRadiusX(r: number): any;
25
+ setRadiusX(r: number): void;
26
26
  /**
27
27
  * Returns the Y radius of the ellipse.
28
28
  */
@@ -30,7 +30,7 @@ export interface IMarkupEllipse extends IMarkupObject, IMarkupColorable {
30
30
  /**
31
31
  * Sets the X radius of the ellipse.
32
32
  */
33
- setRadiusY(r: number): any;
33
+ setRadiusY(r: number): void;
34
34
  /**
35
35
  * Returns the line width of the ellipse.
36
36
  */
@@ -38,5 +38,43 @@ export interface IMarkupEllipse extends IMarkupObject, IMarkupColorable {
38
38
  /**
39
39
  * Sets the line width of the ellipse.
40
40
  */
41
- setLineWidth(size: number): any;
41
+ setLineWidth(size: number): void;
42
+ }
43
+ /**
44
+ * Defines the parameters for creating a {@link IMarkupEllipse | markup ellipse}.
45
+ */
46
+ export interface IMarkupEllipseParams {
47
+ /**
48
+ * Coordinates of the center point (position) of the ellipse.
49
+ */
50
+ position?: {
51
+ x: number;
52
+ y: number;
53
+ };
54
+ /**
55
+ * Radius of the ellipse along the X and Y axes.
56
+ *
57
+ * @default 25
58
+ */
59
+ radius?: {
60
+ x: number;
61
+ y: number;
62
+ };
63
+ /**
64
+ * Line width.
65
+ *
66
+ * @default 4
67
+ */
68
+ lineWidth?: number;
69
+ /**
70
+ * Line color as a string in hexadecimal color syntax `#RGB` color using its primary color
71
+ * components (red, green, blue) written as hexadecimal numbers.
72
+ *
73
+ * @default "#ff0000"
74
+ */
75
+ color?: string;
76
+ /**
77
+ * Internal markup object identifier.
78
+ */
79
+ id?: string;
42
80
  }
@@ -13,7 +13,7 @@ export interface IMarkupImage extends IMarkupObject {
13
13
  /**
14
14
  * Sets the coordinates of the top-left point (position) of the image.
15
15
  */
16
- setPosition(x: number, y: number): any;
16
+ setPosition(x: number, y: number): void;
17
17
  /**
18
18
  * Returns the image source as a base64-encoded
19
19
  * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.
@@ -25,7 +25,7 @@ export interface IMarkupImage extends IMarkupObject {
25
25
  *
26
26
  * @param src - Image source as base64-encoded string.
27
27
  */
28
- setSrc(src: string): any;
28
+ setSrc(src: string): void;
29
29
  /**
30
30
  * Returns the width of the image. The original image is scaled to this width.
31
31
  */
@@ -34,7 +34,7 @@ export interface IMarkupImage extends IMarkupObject {
34
34
  * Sets the width of the image. The image height will be automatically updated to match its
35
35
  * aspect ratio.
36
36
  */
37
- setWidth(w: number): any;
37
+ setWidth(w: number): void;
38
38
  /**
39
39
  * Returns the height of the image. The original image is scaled to this height.
40
40
  */
@@ -43,5 +43,50 @@ export interface IMarkupImage extends IMarkupObject {
43
43
  * Sets the height of the image. The image width will be automatically updated to match its
44
44
  * aspect ratio.
45
45
  */
46
- setHeight(h: number): any;
46
+ setHeight(h: number): void;
47
+ }
48
+ /**
49
+ * Defines the parameters for creating a {@link IMarkupImage | markup image}.
50
+ */
51
+ export interface IMarkupImageParams {
52
+ /**
53
+ * Coordinates of the top-left point (position) of the image.
54
+ */
55
+ position?: {
56
+ x: number;
57
+ y: number;
58
+ };
59
+ /**
60
+ * Image source as a base64-encoded
61
+ * {@link https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs | Data URL}.
62
+ */
63
+ src?: string;
64
+ /**
65
+ * Width of the image. The original image is scaled to this width. Specify 0 to set width of
66
+ * the source image.
67
+ *
68
+ * @default 0
69
+ */
70
+ width?: number;
71
+ /**
72
+ * Height of the image. The original image is scaled to this height. Specify 0 to set height
73
+ * of the source image.
74
+ *
75
+ * @default 0
76
+ */
77
+ height?: number;
78
+ /**
79
+ * Maximum width of the image. Specify a max width if you want to set the width to the
80
+ * original image but not more than the max.
81
+ */
82
+ maxWidth?: number;
83
+ /**
84
+ * Maximum height of the image. Specify a max height if you want to set the height to the
85
+ * original image but not more than the max.
86
+ */
87
+ maxHeight?: number;
88
+ /**
89
+ * Internal markup object identifier.
90
+ */
91
+ id?: string;
47
92
  }
@@ -14,7 +14,7 @@ export interface IMarkupRectangle extends IMarkupObject, IMarkupColorable {
14
14
  /**
15
15
  * Sets the coordinates of the top-left point (position) of the rectangle.
16
16
  */
17
- setPosition(x: number, y: number): any;
17
+ setPosition(x: number, y: number): void;
18
18
  /**
19
19
  * Returns the width of the rectangle.
20
20
  */
@@ -22,7 +22,7 @@ export interface IMarkupRectangle extends IMarkupObject, IMarkupColorable {
22
22
  /**
23
23
  * Sets the width of the rectangle.
24
24
  */
25
- setWidth(w: number): any;
25
+ setWidth(w: number): void;
26
26
  /**
27
27
  * Returns the height of the rectangle.
28
28
  */
@@ -30,7 +30,7 @@ export interface IMarkupRectangle extends IMarkupObject, IMarkupColorable {
30
30
  /**
31
31
  * Sets the height of the rectangle.
32
32
  */
33
- setHeight(h: number): any;
33
+ setHeight(h: number): void;
34
34
  /**
35
35
  * Returns the line width of the rectangle.
36
36
  */
@@ -38,5 +38,46 @@ export interface IMarkupRectangle extends IMarkupObject, IMarkupColorable {
38
38
  /**
39
39
  * Sets the line width of the rectangle.
40
40
  */
41
- setLineWidth(size: number): any;
41
+ setLineWidth(size: number): void;
42
+ }
43
+ /**
44
+ * Defines the parameters for creating a {@link IMarkupRectangle | markup rectangle}.
45
+ */
46
+ export interface IMarkupRectangleParams {
47
+ /**
48
+ * Coordinates of the top-left point (position) of the rectangle.
49
+ */
50
+ position?: {
51
+ x: number;
52
+ y: number;
53
+ };
54
+ /**
55
+ * Width of the rectangle.
56
+ *
57
+ * @default 200
58
+ */
59
+ width?: number;
60
+ /**
61
+ * Height of the rectangle.
62
+ *
63
+ * @default 200
64
+ */
65
+ height?: number;
66
+ /**
67
+ * Line width.
68
+ *
69
+ * @default 4
70
+ */
71
+ lineWidth?: number;
72
+ /**
73
+ * Line color as a string in hexadecimal color syntax `#RGB` color using its primary color
74
+ * components (red, green, blue) written as hexadecimal numbers.
75
+ *
76
+ * @default "#ff0000"
77
+ */
78
+ color?: string;
79
+ /**
80
+ * Internal markup object identifier.
81
+ */
82
+ id?: string;
42
83
  }
@@ -22,13 +22,52 @@ export interface IMarkupText extends IMarkupObject, IMarkupColorable {
22
22
  /**
23
23
  * Sets the coordinates of the top-left point (position) of the text.
24
24
  */
25
- setPosition(x: number, y: number): any;
25
+ setPosition(x: number, y: number): void;
26
26
  /**
27
27
  * Returns the font size of the text.
28
28
  */
29
- getFontSize(): any;
29
+ getFontSize(): number;
30
30
  /**
31
31
  * Sets the font size of the text.
32
32
  */
33
- setFontSize(size: number): any;
33
+ setFontSize(size: number): void;
34
+ }
35
+ /**
36
+ * Defines the parameters for creating a {@link IMarkupText | markup text}.
37
+ */
38
+ export interface IMarkupTextParams {
39
+ /**
40
+ * Coordinates of the top-left point (position) of the text.
41
+ */
42
+ position?: {
43
+ x: number;
44
+ y: number;
45
+ };
46
+ /**
47
+ * Text string.
48
+ */
49
+ text?: string;
50
+ /**
51
+ * Rotation angle of the text, in degress.
52
+ *
53
+ * @default 0
54
+ */
55
+ rotation?: number;
56
+ /**
57
+ * Font size of the text.
58
+ *
59
+ * @default 34
60
+ */
61
+ fontSize?: number;
62
+ /**
63
+ * Text color as a string in hexadecimal color syntax `#RGB` color using its primary color
64
+ * components (red, green, blue) written as hexadecimal numbers.
65
+ *
66
+ * @default "#ff0000"
67
+ */
68
+ color?: string;
69
+ /**
70
+ * Internal markup object identifier.
71
+ */
72
+ id?: string;
34
73
  }
@@ -1,18 +1,7 @@
1
- import { IMarkupArrow } from "../IMarkupArrow";
1
+ import { IMarkupArrow, IMarkupArrowParams } from "../IMarkupArrow";
2
2
  export declare class KonvaArrow implements IMarkupArrow {
3
3
  private _ref;
4
- constructor(params: {
5
- start?: {
6
- x: number;
7
- y: number;
8
- };
9
- end?: {
10
- x: number;
11
- y: number;
12
- };
13
- color?: string;
14
- id?: string;
15
- }, ref?: any);
4
+ constructor(params: IMarkupArrowParams, ref?: any);
16
5
  ref(): import("konva/lib/shapes/Arrow").Arrow;
17
6
  id(): string;
18
7
  enableMouseEditing(value: boolean): void;
@@ -1,17 +1,7 @@
1
- import { IMarkupCloud } from "../IMarkupCloud";
1
+ import { IMarkupCloud, IMarkupCloudParams } from "../IMarkupCloud";
2
2
  export declare class KonvaCloud implements IMarkupCloud {
3
3
  private _ref;
4
- constructor(params: {
5
- position?: {
6
- x: number;
7
- y: number;
8
- };
9
- width?: number;
10
- height?: number;
11
- lineWidth?: number;
12
- color?: string;
13
- id?: string;
14
- }, ref?: any);
4
+ constructor(params: IMarkupCloudParams, ref?: any);
15
5
  ref(): import("konva/lib/Shape").Shape<import("konva/lib/Shape").ShapeConfig>;
16
6
  id(): string;
17
7
  enableMouseEditing(value: boolean): void;
@@ -1,19 +1,7 @@
1
- import { IMarkupEllipse } from "../IMarkupEllipse";
1
+ import { IMarkupEllipse, IMarkupEllipseParams } from "../IMarkupEllipse";
2
2
  export declare class KonvaEllipse implements IMarkupEllipse {
3
3
  private _ref;
4
- constructor(params: {
5
- position?: {
6
- x: number;
7
- y: number;
8
- };
9
- radius?: {
10
- x: number;
11
- y: number;
12
- };
13
- lineWidth?: number;
14
- color?: string;
15
- id?: string;
16
- }, ref?: any);
4
+ constructor(params: IMarkupEllipseParams, ref?: any);
17
5
  getPosition(): {
18
6
  x: number;
19
7
  y: number;
@@ -1,4 +1,4 @@
1
- import { IMarkupImage } from "../IMarkupImage";
1
+ import { IMarkupImage, IMarkupImageParams } from "../IMarkupImage";
2
2
  export declare class KonvaImage implements IMarkupImage {
3
3
  private _ref;
4
4
  private _canvasImage;
@@ -6,18 +6,7 @@ export declare class KonvaImage implements IMarkupImage {
6
6
  private readonly EPSILON;
7
7
  private readonly BASE64_HEADER_START;
8
8
  private readonly BASE64_NOT_FOUND;
9
- constructor(params: {
10
- position?: {
11
- x: number;
12
- y: number;
13
- };
14
- src?: string;
15
- width?: number;
16
- height?: number;
17
- maxWidth?: number;
18
- maxHeight?: number;
19
- id?: string;
20
- }, ref?: any);
9
+ constructor(params: IMarkupImageParams, ref?: any);
21
10
  getSrc(): string;
22
11
  setSrc(src: any): void;
23
12
  getWidth(): number;
@@ -1,17 +1,7 @@
1
- import { IMarkupRectangle } from "../IMarkupRectangle";
1
+ import { IMarkupRectangle, IMarkupRectangleParams } from "../IMarkupRectangle";
2
2
  export declare class KonvaRectangle implements IMarkupRectangle {
3
3
  private _ref;
4
- constructor(params: {
5
- position?: {
6
- x: number;
7
- y: number;
8
- };
9
- width?: number;
10
- height?: number;
11
- lineWidth?: number;
12
- color?: string;
13
- id?: string;
14
- }, ref?: any);
4
+ constructor(params: IMarkupRectangleParams, ref?: any);
15
5
  getPosition(): {
16
6
  x: number;
17
7
  y: number;
@@ -1,18 +1,8 @@
1
- import { IMarkupText } from "../IMarkupText";
1
+ import { IMarkupText, IMarkupTextParams } from "../IMarkupText";
2
2
  export declare class KonvaText implements IMarkupText {
3
3
  private _ref;
4
4
  private readonly TEXT_FONT_FAMILY;
5
- constructor(params: {
6
- position?: {
7
- x: number;
8
- y: number;
9
- };
10
- text?: string;
11
- rotation?: number;
12
- fontSize?: number;
13
- color?: string;
14
- id?: string;
15
- }, ref?: any);
5
+ constructor(params: IMarkupTextParams, ref?: any);
16
6
  ref(): import("konva/lib/shapes/Text").Text;
17
7
  id(): string;
18
8
  enableMouseEditing(value: boolean): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/markup",
3
- "version": "25.9.1",
3
+ "version": "25.9.3",
4
4
  "description": "JavaScript 2D markups",
5
5
  "homepage": "https://cloud.opendesign.com/docs/index.html",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -26,8 +26,8 @@
26
26
  "docs": "typedoc"
27
27
  },
28
28
  "dependencies": {
29
- "@inweb/eventemitter2": "~25.9.1",
30
- "@inweb/viewer-core": "~25.9.1"
29
+ "@inweb/eventemitter2": "~25.9.3",
30
+ "@inweb/viewer-core": "~25.9.3"
31
31
  },
32
32
  "devDependencies": {
33
33
  "konva": "^9.3.14"
package/src/index.ts CHANGED
@@ -22,14 +22,14 @@
22
22
  ///////////////////////////////////////////////////////////////////////////////
23
23
 
24
24
  export { IMarkup, MarkupMode } from "./markup/IMarkup";
25
- export { IMarkupArrow } from "./markup/IMarkupArrow";
26
- export { IMarkupCloud } from "./markup/IMarkupCloud";
25
+ export { IMarkupArrow, IMarkupArrowParams } from "./markup/IMarkupArrow";
26
+ export { IMarkupCloud, IMarkupCloudParams } from "./markup/IMarkupCloud";
27
27
  export { IMarkupColorable } from "./markup/IMarkupColorable";
28
- export { IMarkupEllipse } from "./markup/IMarkupEllipse";
29
- export { IMarkupImage } from "./markup/IMarkupImage";
28
+ export { IMarkupEllipse, IMarkupEllipseParams } from "./markup/IMarkupEllipse";
29
+ export { IMarkupImage, IMarkupImageParams } from "./markup/IMarkupImage";
30
30
  export { IMarkupLine, IMarkupLineParams, MarkupLineType } from "./markup/IMarkupLine";
31
31
  export { IMarkupObject } from "./markup/IMarkupObject";
32
- export { IMarkupRectangle } from "./markup/IMarkupRectangle";
33
- export { IMarkupText } from "./markup/IMarkupText";
32
+ export { IMarkupRectangle, IMarkupRectangleParams } from "./markup/IMarkupRectangle";
33
+ export { IMarkupText, IMarkupTextParams } from "./markup/IMarkupText";
34
34
  export { IWorldTransform } from "./markup/IWorldTransform";
35
35
  export { KonvaMarkup as Markup } from "./markup/Konva/KonvaMarkup";
@@ -80,7 +80,7 @@ export interface IMarkup {
80
80
  ): void;
81
81
 
82
82
  /**
83
- * Releases all resources allocated by this markup instance.
83
+ * Releases resources allocated in the {@link initialize | initialize()}.
84
84
  */
85
85
  dispose(): void;
86
86
 
@@ -38,7 +38,7 @@ export interface IMarkupArrow extends IMarkupObject, IMarkupColorable {
38
38
  *
39
39
  * @param {{ x: number; y: number }} points - Array of points.
40
40
  */
41
- setPoints(points: { x: number; y: number }[]);
41
+ setPoints(points: { x: number; y: number }[]): void;
42
42
 
43
43
  /**
44
44
  * Returns the coordinales of the start point of arrow.
@@ -48,7 +48,7 @@ export interface IMarkupArrow extends IMarkupObject, IMarkupColorable {
48
48
  /**
49
49
  * Sets the coordinales of the start point of the arrow.
50
50
  */
51
- setStartPoint(x: number, y: number);
51
+ setStartPoint(x: number, y: number): void;
52
52
 
53
53
  /**
54
54
  * Returns the coordinales of the end point of arrow.
@@ -58,5 +58,33 @@ export interface IMarkupArrow extends IMarkupObject, IMarkupColorable {
58
58
  /**
59
59
  * Sets the coordinales of the end point of the arrow.
60
60
  */
61
- setEndPoint(x: number, y: number);
61
+ setEndPoint(x: number, y: number): void;
62
+ }
63
+
64
+ /**
65
+ * Defines the parameters for creating a {@link IMarkupArrow | markup arrow}.
66
+ */
67
+ export interface IMarkupArrowParams {
68
+ /**
69
+ * Coordinales of the start point of arrow.
70
+ */
71
+ start?: { x: number; y: number };
72
+
73
+ /**
74
+ * Coordinales of the end point of arrow.
75
+ */
76
+ end?: { x: number; y: number };
77
+
78
+ /**
79
+ * Line color as a string in hexadecimal color syntax `#RGB` color using its primary color
80
+ * components (red, green, blue) written as hexadecimal numbers.
81
+ *
82
+ * @default "#ff0000"
83
+ */
84
+ color?: string;
85
+
86
+ /**
87
+ * Internal markup object identifier.
88
+ */
89
+ id?: string;
62
90
  }