@inweb/markup 25.7.4 → 25.7.6

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.
@@ -3,19 +3,9 @@ import { IViewpoint } from "@inweb/viewer-core";
3
3
  import { IWorldTransform } from "./IWorldTransform";
4
4
  import { IMarkupObject } from "./IMarkupObject";
5
5
  /**
6
- * Defines type of markup object. For `VisualizeJS` markup only the `Line` and `Text` markup
7
- * objects are supported.
6
+ * Markup edit mode. Matches the type of markup object being created or object selecting mode.
8
7
  */
9
- export declare enum MarkupMode {
10
- SelectMarkup = "SelectMarkup",
11
- Line = "Line",
12
- Text = "Text",
13
- Rectangle = "Rectangle",
14
- Ellipse = "Ellipse",
15
- Arrow = "Arrow",
16
- Image = "Image",
17
- Cloud = "Cloud"
18
- }
8
+ export type MarkupMode = "SelectMarkup" | "Line" | "Text" | "Rectangle" | "Ellipse" | "Arrow" | "Image" | "Cloud";
19
9
  /**
20
10
  * 2D markup core interface.
21
11
  */
@@ -1,8 +1,9 @@
1
1
  import { IMarkupObject } from "./IMarkupObject";
2
+ import { IMarkupColorable } from "./IMarkupColorable";
2
3
  /**
3
4
  * Arrow Markup object
4
5
  */
5
- export interface IMarkupArrow extends IMarkupObject {
6
+ export interface IMarkupArrow extends IMarkupObject, IMarkupColorable {
6
7
  /**
7
8
  * Get points of current Arrow
8
9
  *
@@ -1,8 +1,9 @@
1
1
  import { IMarkupObject } from "./IMarkupObject";
2
+ import { IMarkupColorable } from "./IMarkupColorable";
2
3
  /**
3
4
  * Cloud Markup object
4
5
  */
5
- export interface IMarkupCloud extends IMarkupObject {
6
+ export interface IMarkupCloud extends IMarkupObject, IMarkupColorable {
6
7
  /**
7
8
  * Get position of the Cloud
8
9
  */
@@ -1,8 +1,9 @@
1
1
  import { IMarkupObject } from "./IMarkupObject";
2
+ import { IMarkupColorable } from "./IMarkupColorable";
2
3
  /**
3
4
  * Ellipse Markup object
4
5
  */
5
- export interface IMarkupEllipse extends IMarkupObject {
6
+ export interface IMarkupEllipse extends IMarkupObject, IMarkupColorable {
6
7
  /**
7
8
  * Get position of the Ellipse
8
9
  */
@@ -1,4 +1,5 @@
1
1
  import { IMarkupObject } from "./IMarkupObject";
2
+ import { IMarkupColorable } from "./IMarkupColorable";
2
3
  /**
3
4
  * Type of the markup line.
4
5
  */
@@ -6,7 +7,7 @@ export type MarkupLineType = "solid" | "dot" | "dash";
6
7
  /**
7
8
  * Line Markup object
8
9
  */
9
- export interface IMarkupLine extends IMarkupObject {
10
+ export interface IMarkupLine extends IMarkupObject, IMarkupColorable {
10
11
  /**
11
12
  * Get points of the Line
12
13
  */
@@ -1,8 +1,9 @@
1
1
  import { IMarkupObject } from "./IMarkupObject";
2
+ import { IMarkupColorable } from "./IMarkupColorable";
2
3
  /**
3
4
  * Rectangle Markup object
4
5
  */
5
- export interface IMarkupRectangle extends IMarkupObject {
6
+ export interface IMarkupRectangle extends IMarkupObject, IMarkupColorable {
6
7
  /**
7
8
  * Get position of the Rectangle
8
9
  */
@@ -1,8 +1,9 @@
1
1
  import { IMarkupObject } from "./IMarkupObject";
2
+ import { IMarkupColorable } from "./IMarkupColorable";
2
3
  /**
3
4
  * Text Markup object
4
5
  */
5
- export interface IMarkupText extends IMarkupObject {
6
+ export interface IMarkupText extends IMarkupObject, IMarkupColorable {
6
7
  /**
7
8
  * Get Text value
8
9
  */
@@ -1,6 +1,5 @@
1
1
  import { IMarkupArrow } from "../IMarkupArrow";
2
- import { IMarkupColorable } from "../IMarkupColorable";
3
- export declare class KonvaArrow implements IMarkupArrow, IMarkupColorable {
2
+ export declare class KonvaArrow implements IMarkupArrow {
4
3
  private _ref;
5
4
  constructor(params: {
6
5
  start: {
@@ -1,6 +1,5 @@
1
- import { IMarkupColorable } from "../IMarkupColorable";
2
1
  import { IMarkupCloud } from "../IMarkupCloud";
3
- export declare class KonvaCloud implements IMarkupCloud, IMarkupColorable {
2
+ export declare class KonvaCloud implements IMarkupCloud {
4
3
  private _ref;
5
4
  constructor(params: {
6
5
  position: {
@@ -1,6 +1,5 @@
1
1
  import { IMarkupEllipse } from "../IMarkupEllipse";
2
- import { IMarkupColorable } from "../IMarkupColorable";
3
- export declare class KonvaEllipse implements IMarkupEllipse, IMarkupColorable {
2
+ export declare class KonvaEllipse implements IMarkupEllipse {
4
3
  private _ref;
5
4
  constructor(params: {
6
5
  position: {
@@ -1,6 +1,5 @@
1
1
  import { IMarkupLine, MarkupLineType } from "../IMarkupLine";
2
- import { IMarkupColorable } from "../IMarkupColorable";
3
- export declare class KonvaLine implements IMarkupLine, IMarkupColorable {
2
+ export declare class KonvaLine implements IMarkupLine {
4
3
  private _ref;
5
4
  constructor(params: {
6
5
  points: {
@@ -1,6 +1,5 @@
1
1
  import { IMarkupRectangle } from "../IMarkupRectangle";
2
- import { IMarkupColorable } from "../IMarkupColorable";
3
- export declare class KonvaRectangle implements IMarkupRectangle, IMarkupColorable {
2
+ export declare class KonvaRectangle implements IMarkupRectangle {
4
3
  private _ref;
5
4
  constructor(params: {
6
5
  position: {
@@ -1,6 +1,5 @@
1
1
  import { IMarkupText } from "../IMarkupText";
2
- import { IMarkupColorable } from "../IMarkupColorable";
3
- export declare class KonvaText implements IMarkupText, IMarkupColorable {
2
+ export declare class KonvaText implements IMarkupText {
4
3
  private _ref;
5
4
  private readonly TEXT_FONT_FAMILY;
6
5
  constructor(params: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inweb/markup",
3
- "version": "25.7.4",
3
+ "version": "25.7.6",
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.7.4",
30
- "@inweb/viewer-core": "~25.7.4"
29
+ "@inweb/eventemitter2": "~25.7.6",
30
+ "@inweb/viewer-core": "~25.7.6"
31
31
  },
32
32
  "devDependencies": {
33
33
  "canvas": "^2.11.2",
@@ -27,19 +27,9 @@ import { IWorldTransform } from "./IWorldTransform";
27
27
  import { IMarkupObject } from "./IMarkupObject";
28
28
 
29
29
  /**
30
- * Defines type of markup object. For `VisualizeJS` markup only the `Line` and `Text` markup
31
- * objects are supported.
30
+ * Markup edit mode. Matches the type of markup object being created or object selecting mode.
32
31
  */
33
- export enum MarkupMode {
34
- SelectMarkup = "SelectMarkup",
35
- Line = "Line",
36
- Text = "Text",
37
- Rectangle = "Rectangle",
38
- Ellipse = "Ellipse",
39
- Arrow = "Arrow",
40
- Image = "Image",
41
- Cloud = "Cloud",
42
- }
32
+ export type MarkupMode = "SelectMarkup" | "Line" | "Text" | "Rectangle" | "Ellipse" | "Arrow" | "Image" | "Cloud";
43
33
 
44
34
  /**
45
35
  * 2D markup core interface.
@@ -22,11 +22,12 @@
22
22
  ///////////////////////////////////////////////////////////////////////////////
23
23
 
24
24
  import { IMarkupObject } from "./IMarkupObject";
25
+ import { IMarkupColorable } from "./IMarkupColorable";
25
26
 
26
27
  /**
27
28
  * Arrow Markup object
28
29
  */
29
- export interface IMarkupArrow extends IMarkupObject {
30
+ export interface IMarkupArrow extends IMarkupObject, IMarkupColorable {
30
31
  /**
31
32
  * Get points of current Arrow
32
33
  *
@@ -22,11 +22,12 @@
22
22
  ///////////////////////////////////////////////////////////////////////////////
23
23
 
24
24
  import { IMarkupObject } from "./IMarkupObject";
25
+ import { IMarkupColorable } from "./IMarkupColorable";
25
26
 
26
27
  /**
27
28
  * Cloud Markup object
28
29
  */
29
- export interface IMarkupCloud extends IMarkupObject {
30
+ export interface IMarkupCloud extends IMarkupObject, IMarkupColorable {
30
31
  /**
31
32
  * Get position of the Cloud
32
33
  */
@@ -22,11 +22,12 @@
22
22
  ///////////////////////////////////////////////////////////////////////////////
23
23
 
24
24
  import { IMarkupObject } from "./IMarkupObject";
25
+ import { IMarkupColorable } from "./IMarkupColorable";
25
26
 
26
27
  /**
27
28
  * Ellipse Markup object
28
29
  */
29
- export interface IMarkupEllipse extends IMarkupObject {
30
+ export interface IMarkupEllipse extends IMarkupObject, IMarkupColorable {
30
31
  /**
31
32
  * Get position of the Ellipse
32
33
  */
@@ -22,6 +22,7 @@
22
22
  ///////////////////////////////////////////////////////////////////////////////
23
23
 
24
24
  import { IMarkupObject } from "./IMarkupObject";
25
+ import { IMarkupColorable } from "./IMarkupColorable";
25
26
 
26
27
  /**
27
28
  * Type of the markup line.
@@ -31,7 +32,7 @@ export type MarkupLineType = "solid" | "dot" | "dash";
31
32
  /**
32
33
  * Line Markup object
33
34
  */
34
- export interface IMarkupLine extends IMarkupObject {
35
+ export interface IMarkupLine extends IMarkupObject, IMarkupColorable {
35
36
  /**
36
37
  * Get points of the Line
37
38
  */
@@ -22,11 +22,12 @@
22
22
  ///////////////////////////////////////////////////////////////////////////////
23
23
 
24
24
  import { IMarkupObject } from "./IMarkupObject";
25
+ import { IMarkupColorable } from "./IMarkupColorable";
25
26
 
26
27
  /**
27
28
  * Rectangle Markup object
28
29
  */
29
- export interface IMarkupRectangle extends IMarkupObject {
30
+ export interface IMarkupRectangle extends IMarkupObject, IMarkupColorable {
30
31
  /**
31
32
  * Get position of the Rectangle
32
33
  */
@@ -22,11 +22,12 @@
22
22
  ///////////////////////////////////////////////////////////////////////////////
23
23
 
24
24
  import { IMarkupObject } from "./IMarkupObject";
25
+ import { IMarkupColorable } from "./IMarkupColorable";
25
26
 
26
27
  /**
27
28
  * Text Markup object
28
29
  */
29
- export interface IMarkupText extends IMarkupObject {
30
+ export interface IMarkupText extends IMarkupObject, IMarkupColorable {
30
31
  /**
31
32
  * Get Text value
32
33
  */
@@ -23,9 +23,8 @@
23
23
 
24
24
  import Konva from "konva";
25
25
  import { IMarkupArrow } from "../IMarkupArrow";
26
- import { IMarkupColorable } from "../IMarkupColorable";
27
26
 
28
- export class KonvaArrow implements IMarkupArrow, IMarkupColorable {
27
+ export class KonvaArrow implements IMarkupArrow {
29
28
  private _ref: Konva.Arrow;
30
29
 
31
30
  constructor(
@@ -1,8 +1,7 @@
1
1
  import Konva from "konva";
2
- import { IMarkupColorable } from "../IMarkupColorable";
3
2
  import { IMarkupCloud } from "../IMarkupCloud";
4
3
 
5
- export class KonvaCloud implements IMarkupCloud, IMarkupColorable {
4
+ export class KonvaCloud implements IMarkupCloud {
6
5
  private _ref: Konva.Shape;
7
6
 
8
7
  constructor(
@@ -1,8 +1,7 @@
1
1
  import Konva from "konva";
2
2
  import { IMarkupEllipse } from "../IMarkupEllipse";
3
- import { IMarkupColorable } from "../IMarkupColorable";
4
3
 
5
- export class KonvaEllipse implements IMarkupEllipse, IMarkupColorable {
4
+ export class KonvaEllipse implements IMarkupEllipse {
6
5
  private _ref: Konva.Ellipse;
7
6
 
8
7
  constructor(
@@ -1,6 +1,5 @@
1
1
  import Konva from "konva";
2
2
  import { IMarkupLine, MarkupLineType } from "../IMarkupLine";
3
- import { IMarkupColorable } from "../IMarkupColorable";
4
3
 
5
4
  const LineTypeSpecs = new Map<string, number[]>([
6
5
  ["solid", []],
@@ -8,7 +7,7 @@ const LineTypeSpecs = new Map<string, number[]>([
8
7
  ["dash", [30, 30]],
9
8
  ]);
10
9
 
11
- export class KonvaLine implements IMarkupLine, IMarkupColorable {
10
+ export class KonvaLine implements IMarkupLine {
12
11
  private _ref: Konva.Line;
13
12
 
14
13
  constructor(