@annotorious/annotorious 3.0.0-rc.9 → 3.0.1

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 (160) hide show
  1. package/dist/Annotorious.d.ts +9 -10
  2. package/dist/AnnotoriousOpts.d.ts +5 -7
  3. package/dist/annotation/SVGAnnotationLayer.svelte.d.ts +1 -1
  4. package/dist/annotation/SVGAnnotationLayerPointerEvent.d.ts +6 -6
  5. package/dist/annotation/Transform.d.ts +0 -1
  6. package/dist/annotation/editors/Editor.svelte.d.ts +1 -1
  7. package/dist/annotation/editors/EditorMount.svelte.d.ts +1 -1
  8. package/dist/annotation/editors/Handle.svelte.d.ts +1 -0
  9. package/dist/annotation/editors/editorsRegistry.d.ts +3 -4
  10. package/dist/annotation/editors/index.d.ts +1 -2
  11. package/dist/annotation/editors/polygon/PolygonEditor.svelte.d.ts +1 -1
  12. package/dist/annotation/editors/polygon/index.d.ts +0 -1
  13. package/dist/annotation/editors/rectangle/RectangleEditor.svelte.d.ts +1 -1
  14. package/dist/annotation/editors/rectangle/index.d.ts +0 -1
  15. package/dist/annotation/index.d.ts +0 -1
  16. package/dist/annotation/shapes/Ellipse.svelte.d.ts +1 -1
  17. package/dist/annotation/shapes/Polygon.svelte.d.ts +1 -1
  18. package/dist/annotation/shapes/Rectangle.svelte.d.ts +1 -1
  19. package/dist/annotation/shapes/index.d.ts +0 -1
  20. package/dist/annotation/tools/DrawingToolConfig.d.ts +1 -2
  21. package/dist/annotation/tools/ToolMount.svelte.d.ts +1 -1
  22. package/dist/annotation/tools/drawingToolsRegistry.d.ts +4 -5
  23. package/dist/annotation/tools/index.d.ts +0 -1
  24. package/dist/annotation/tools/polygon/RubberbandPolygon.svelte.d.ts +1 -1
  25. package/dist/annotation/tools/polygon/index.d.ts +0 -1
  26. package/dist/annotation/tools/rectangle/RubberbandRectangle.svelte.d.ts +1 -1
  27. package/dist/annotation/tools/rectangle/index.d.ts +0 -1
  28. package/dist/annotation/utils/index.d.ts +0 -1
  29. package/dist/annotation/utils/math.d.ts +0 -1
  30. package/dist/annotation/utils/responsive.d.ts +1 -2
  31. package/dist/annotation/utils/styling.d.ts +3 -4
  32. package/dist/annotation/utils/touch.d.ts +0 -1
  33. package/dist/annotorious.css +1 -1
  34. package/dist/annotorious.es.js +2538 -2061
  35. package/dist/annotorious.es.js.map +1 -1
  36. package/dist/annotorious.js +1 -1
  37. package/dist/annotorious.js.map +1 -1
  38. package/dist/index.d.ts +1 -2
  39. package/dist/keyboardCommands.d.ts +2 -2
  40. package/dist/model/core/ImageAnnotation.d.ts +4 -3
  41. package/dist/model/core/Shape.d.ts +1 -2
  42. package/dist/model/core/ellipse/Ellipse.d.ts +1 -2
  43. package/dist/model/core/ellipse/ellipseUtils.d.ts +0 -1
  44. package/dist/model/core/ellipse/index.d.ts +0 -1
  45. package/dist/model/core/index.d.ts +0 -1
  46. package/dist/model/core/polygon/Polygon.d.ts +1 -2
  47. package/dist/model/core/polygon/index.d.ts +0 -1
  48. package/dist/model/core/polygon/polygonUtils.d.ts +0 -1
  49. package/dist/model/core/rectangle/Rectangle.d.ts +1 -2
  50. package/dist/model/core/rectangle/index.d.ts +0 -1
  51. package/dist/model/core/rectangle/rectangleUtils.d.ts +2 -3
  52. package/dist/model/core/shapeUtils.d.ts +2 -6
  53. package/dist/model/index.d.ts +0 -1
  54. package/dist/model/w3c/W3CImageAnnotation.d.ts +10 -0
  55. package/dist/model/w3c/W3CImageFormatAdapter.d.ts +11 -7
  56. package/dist/model/w3c/fragment/FragmentSelector.d.ts +2 -4
  57. package/dist/model/w3c/fragment/index.d.ts +0 -1
  58. package/dist/model/w3c/index.d.ts +1 -1
  59. package/dist/model/w3c/svg/SVG.d.ts +0 -1
  60. package/dist/model/w3c/svg/SVGSelector.d.ts +2 -4
  61. package/dist/model/w3c/svg/index.d.ts +0 -1
  62. package/dist/state/ImageAnnotationStore.d.ts +6 -7
  63. package/dist/state/ImageAnnotatorState.d.ts +8 -9
  64. package/dist/state/index.d.ts +0 -1
  65. package/dist/state/spatialTree.d.ts +7 -7
  66. package/dist/themes/index.d.ts +0 -1
  67. package/dist/themes/smart/index.d.ts +0 -1
  68. package/dist/themes/smart/setTheme.d.ts +1 -2
  69. package/package.json +16 -17
  70. package/src/Annotorious.css +13 -5
  71. package/src/Annotorious.ts +42 -26
  72. package/src/AnnotoriousOpts.ts +13 -17
  73. package/src/annotation/SVGAnnotationLayer.svelte +77 -42
  74. package/src/annotation/SVGAnnotationLayerPointerEvent.ts +8 -9
  75. package/src/annotation/Transform.ts +1 -1
  76. package/src/annotation/editors/Editor.svelte +10 -11
  77. package/src/annotation/editors/EditorMount.svelte +3 -3
  78. package/src/annotation/editors/Handle.svelte +66 -0
  79. package/src/annotation/editors/editorsRegistry.ts +2 -2
  80. package/src/annotation/editors/index.ts +2 -2
  81. package/src/annotation/editors/polygon/PolygonEditor.svelte +16 -16
  82. package/src/annotation/editors/rectangle/RectangleEditor.svelte +46 -43
  83. package/src/annotation/shapes/Ellipse.svelte +4 -4
  84. package/src/annotation/shapes/Polygon.svelte +4 -4
  85. package/src/annotation/shapes/Rectangle.svelte +4 -4
  86. package/src/annotation/tools/ToolMount.svelte +3 -3
  87. package/src/annotation/tools/drawingToolsRegistry.ts +2 -1
  88. package/src/annotation/tools/polygon/RubberbandPolygon.svelte +36 -11
  89. package/src/annotation/tools/rectangle/RubberbandRectangle.svelte +27 -11
  90. package/src/annotation/utils/responsive.ts +1 -1
  91. package/src/annotation/utils/styling.ts +18 -9
  92. package/src/annotation/utils/touch.ts +9 -1
  93. package/src/index.ts +1 -3
  94. package/src/keyboardCommands.ts +13 -5
  95. package/src/model/core/ImageAnnotation.ts +12 -1
  96. package/src/model/w3c/W3CImageAnnotation.ts +17 -0
  97. package/src/model/w3c/W3CImageFormatAdapter.ts +79 -32
  98. package/src/model/w3c/fragment/FragmentSelector.ts +5 -6
  99. package/src/model/w3c/index.ts +1 -0
  100. package/src/model/w3c/svg/SVG.ts +1 -2
  101. package/src/model/w3c/svg/SVGSelector.ts +11 -13
  102. package/src/state/ImageAnnotationStore.ts +5 -5
  103. package/src/state/ImageAnnotatorState.ts +19 -19
  104. package/src/state/spatialTree.ts +23 -11
  105. package/src/themes/dark/index.css +3 -3
  106. package/src/themes/light/index.css +2 -2
  107. package/src/themes/smart/setTheme.ts +2 -2
  108. package/dist/Annotorious.d.ts.map +0 -1
  109. package/dist/AnnotoriousOpts.d.ts.map +0 -1
  110. package/dist/annotation/SVGAnnotationLayerPointerEvent.d.ts.map +0 -1
  111. package/dist/annotation/Transform.d.ts.map +0 -1
  112. package/dist/annotation/editors/Handle.d.ts +0 -14
  113. package/dist/annotation/editors/Handle.d.ts.map +0 -1
  114. package/dist/annotation/editors/editorsRegistry.d.ts.map +0 -1
  115. package/dist/annotation/editors/index.d.ts.map +0 -1
  116. package/dist/annotation/editors/polygon/index.d.ts.map +0 -1
  117. package/dist/annotation/editors/rectangle/index.d.ts.map +0 -1
  118. package/dist/annotation/index.d.ts.map +0 -1
  119. package/dist/annotation/shapes/index.d.ts.map +0 -1
  120. package/dist/annotation/tools/DrawingToolConfig.d.ts.map +0 -1
  121. package/dist/annotation/tools/drawingToolsRegistry.d.ts.map +0 -1
  122. package/dist/annotation/tools/index.d.ts.map +0 -1
  123. package/dist/annotation/tools/polygon/index.d.ts.map +0 -1
  124. package/dist/annotation/tools/rectangle/index.d.ts.map +0 -1
  125. package/dist/annotation/utils/index.d.ts.map +0 -1
  126. package/dist/annotation/utils/math.d.ts.map +0 -1
  127. package/dist/annotation/utils/responsive.d.ts.map +0 -1
  128. package/dist/annotation/utils/styling.d.ts.map +0 -1
  129. package/dist/annotation/utils/touch.d.ts.map +0 -1
  130. package/dist/index.d.ts.map +0 -1
  131. package/dist/keyboardCommands.d.ts.map +0 -1
  132. package/dist/model/core/ImageAnnotation.d.ts.map +0 -1
  133. package/dist/model/core/Shape.d.ts.map +0 -1
  134. package/dist/model/core/ellipse/Ellipse.d.ts.map +0 -1
  135. package/dist/model/core/ellipse/ellipseUtils.d.ts.map +0 -1
  136. package/dist/model/core/ellipse/index.d.ts.map +0 -1
  137. package/dist/model/core/index.d.ts.map +0 -1
  138. package/dist/model/core/polygon/Polygon.d.ts.map +0 -1
  139. package/dist/model/core/polygon/index.d.ts.map +0 -1
  140. package/dist/model/core/polygon/polygonUtils.d.ts.map +0 -1
  141. package/dist/model/core/rectangle/Rectangle.d.ts.map +0 -1
  142. package/dist/model/core/rectangle/index.d.ts.map +0 -1
  143. package/dist/model/core/rectangle/rectangleUtils.d.ts.map +0 -1
  144. package/dist/model/core/shapeUtils.d.ts.map +0 -1
  145. package/dist/model/index.d.ts.map +0 -1
  146. package/dist/model/w3c/W3CImageFormatAdapter.d.ts.map +0 -1
  147. package/dist/model/w3c/fragment/FragmentSelector.d.ts.map +0 -1
  148. package/dist/model/w3c/fragment/index.d.ts.map +0 -1
  149. package/dist/model/w3c/index.d.ts.map +0 -1
  150. package/dist/model/w3c/svg/SVG.d.ts.map +0 -1
  151. package/dist/model/w3c/svg/SVGSelector.d.ts.map +0 -1
  152. package/dist/model/w3c/svg/index.d.ts.map +0 -1
  153. package/dist/state/ImageAnnotationStore.d.ts.map +0 -1
  154. package/dist/state/ImageAnnotatorState.d.ts.map +0 -1
  155. package/dist/state/index.d.ts.map +0 -1
  156. package/dist/state/spatialTree.d.ts.map +0 -1
  157. package/dist/themes/index.d.ts.map +0 -1
  158. package/dist/themes/smart/index.d.ts.map +0 -1
  159. package/dist/themes/smart/setTheme.d.ts.map +0 -1
  160. package/src/annotation/editors/Handle.ts +0 -21
@@ -1,14 +1,13 @@
1
- import type { W3CSelector } from '@annotorious/core';
2
- import { boundsFromPoints, ShapeType } from '../../core';
3
1
  import type { Ellipse, EllipseGeometry, Polygon, PolygonGeometry, Shape } from '../../core';
4
- import { SVG_NAMESPACE, insertSVGNamespace, sanitize } from './SVG';
2
+ import { boundsFromPoints, ShapeType } from '../../core';
3
+ import { insertSVGNamespace, sanitize, SVG_NAMESPACE } from './SVG';
5
4
 
6
- export interface SVGSelector extends W3CSelector {
5
+ export interface SVGSelector {
7
6
 
8
7
  type: 'SvgSelector';
9
8
 
10
9
  value: string;
11
-
10
+
12
11
  }
13
12
 
14
13
  const parseSVGXML = (value: string): Element => {
@@ -29,9 +28,6 @@ const parseSVGXML = (value: string): Element => {
29
28
 
30
29
  const parseSVGPolygon = (value: string): Polygon => {
31
30
  const [a, b, str] = value.match(/(<polygon points=["|'])([^("|')]*)/) || [];
32
-
33
- if (!str) return;
34
-
35
31
  const points = str.split(' ').map((p) => p.split(',').map(parseFloat));
36
32
 
37
33
  return {
@@ -46,10 +42,10 @@ const parseSVGPolygon = (value: string): Polygon => {
46
42
  const parseSVGEllipse = (value: string): Ellipse => {
47
43
  const doc = parseSVGXML(value);
48
44
 
49
- const cx = parseFloat(doc.getAttribute('cx'));
50
- const cy = parseFloat(doc.getAttribute('cy'));
51
- const rx = parseFloat(doc.getAttribute('rx'));
52
- const ry = parseFloat(doc.getAttribute('ry'));
45
+ const cx = parseFloat(doc.getAttribute('cx')!);
46
+ const cy = parseFloat(doc.getAttribute('cy')!);
47
+ const rx = parseFloat(doc.getAttribute('rx')!);
48
+ const ry = parseFloat(doc.getAttribute('ry')!);
53
49
 
54
50
  const bounds = {
55
51
  minX: cx - rx,
@@ -77,10 +73,12 @@ export const parseSVGSelector = <T extends Shape>(valueOrSelector: SVGSelector |
77
73
  return parseSVGPolygon(value) as unknown as T;
78
74
  else if (value.includes('<ellipse '))
79
75
  return parseSVGEllipse(value) as unknown as T;
76
+ else
77
+ throw 'Unsupported SVG shape: ' + value;
80
78
  }
81
79
 
82
80
  export const serializeSVGSelector = (shape: Shape): SVGSelector => {
83
- let value: string;
81
+ let value: string | undefined;
84
82
 
85
83
  if (shape.type === ShapeType.POLYGON) {
86
84
  const geom = shape.geometry as PolygonGeometry;
@@ -1,7 +1,7 @@
1
- import type { Store, SvelteAnnotatorState, SvelteStore } from '@annotorious/core';
1
+ import type { Annotation, Store, SvelteAnnotatorState, SvelteStore } from '@annotorious/core';
2
2
  import type { ImageAnnotation } from '../model';
3
3
 
4
- export type ImageAnnotationStore = Store<ImageAnnotation> & {
4
+ export type ImageAnnotationStore<I extends Annotation> = Store<I> & {
5
5
 
6
6
  getAt(x: number, y: number): ImageAnnotation | undefined;
7
7
 
@@ -9,10 +9,10 @@ export type ImageAnnotationStore = Store<ImageAnnotation> & {
9
9
 
10
10
  }
11
11
 
12
- export type SvelteImageAnnotationStore = SvelteStore<ImageAnnotation> & ImageAnnotationStore;
12
+ export type SvelteImageAnnotationStore<I extends Annotation = Annotation> = SvelteStore<I> & ImageAnnotationStore<I>;
13
13
 
14
- export type SvelteImageAnnotatorState = SvelteAnnotatorState<ImageAnnotation> & {
14
+ export type SvelteImageAnnotatorState<I extends Annotation = Annotation> = SvelteAnnotatorState<I> & {
15
15
 
16
- store: SvelteImageAnnotationStore;
16
+ store: SvelteImageAnnotationStore<I>;
17
17
 
18
18
  }
@@ -4,6 +4,7 @@ import { createSpatialTree } from './spatialTree';
4
4
  import {
5
5
  createViewportState,
6
6
  toSvelteStore,
7
+ type Annotation,
7
8
  type AnnotatorState,
8
9
  type HoverState,
9
10
  type SelectionState
@@ -19,9 +20,9 @@ import type {
19
20
  SvelteImageAnnotatorState
20
21
  } from './ImageAnnotationStore';
21
22
 
22
- export type ImageAnnotatorState<T extends ImageAnnotationStore = ImageAnnotationStore> = AnnotatorState<ImageAnnotation> & {
23
+ export type ImageAnnotatorState<I extends Annotation> = AnnotatorState<I> & {
23
24
 
24
- store: T;
25
+ store: ImageAnnotationStore<I>;
25
26
 
26
27
  selection: SelectionState<ImageAnnotation>;
27
28
 
@@ -29,60 +30,59 @@ export type ImageAnnotatorState<T extends ImageAnnotationStore = ImageAnnotation
29
30
 
30
31
  }
31
32
 
32
- export const createImageAnnotatorState = <E extends unknown>(
33
- opts: AnnotoriousOpts<ImageAnnotation, E>
34
- ): ImageAnnotatorState<ImageAnnotationStore> => {
33
+ export const createImageAnnotatorState = <I extends Annotation, E extends unknown> (
34
+ opts: AnnotoriousOpts<I, E>
35
+ ): ImageAnnotatorState<I> => {
35
36
 
36
- const store = createStore<ImageAnnotation>();
37
+ const store = createStore<I>();
37
38
 
38
39
  const tree = createSpatialTree();
39
40
 
40
- const selection = createSelectionState(store, opts.pointerSelectAction);
41
+ const selection = createSelectionState<I>(store, opts.userSelectAction);
41
42
 
42
43
  const hover = createHoverState(store);
43
44
 
44
45
  const viewport = createViewportState();
45
46
 
46
47
  store.observe(({ changes }) => {
47
- tree.set(changes.created.map(a => a.target as ImageAnnotationTarget), false);
48
+ tree.set((changes.created || []).map(a => a.target as ImageAnnotationTarget), false);
48
49
 
49
- changes.deleted.forEach(a => tree.remove(a.target as ImageAnnotationTarget));
50
+ (changes.deleted || []).forEach(a => tree.remove(a.target as ImageAnnotationTarget));
50
51
 
51
- changes.updated.forEach(({ oldValue, newValue }) =>
52
+ (changes.updated || []).forEach(({ oldValue, newValue }) =>
52
53
  tree.update(oldValue.target, newValue.target));
53
54
  });
54
55
 
55
56
  const getAt = (x: number, y: number): ImageAnnotation | undefined => {
56
57
  const target = tree.getAt(x, y);
57
- return target ? store.getAnnotation(target.annotation) : undefined;
58
+ return target ? store.getAnnotation(target.annotation) as unknown as ImageAnnotation : undefined;
58
59
  }
59
60
 
60
61
  const getIntersecting = (x: number, y: number, width: number, height: number) =>
61
- tree.getIntersecting(x, y, width, height).map(target => store.getAnnotation(target.annotation));
62
+ tree.getIntersecting(x, y, width, height).map(target => store.getAnnotation(target.annotation) as unknown as ImageAnnotation);
62
63
 
63
64
  return {
64
65
  store: {
65
66
  ...store,
66
67
  getAt,
67
68
  getIntersecting
68
- } as ImageAnnotationStore,
69
+ },
69
70
  selection,
70
71
  hover,
71
72
  viewport
72
- }
73
+ } as ImageAnnotatorState<I>;
73
74
 
74
75
  }
75
76
 
76
- export const createSvelteImageAnnotatorState = <E extends unknown>(
77
- opts: AnnotoriousOpts<ImageAnnotation, E>
78
- ): SvelteImageAnnotatorState => {
77
+ export const createSvelteImageAnnotatorState = <I extends Annotation, E extends unknown>(
78
+ opts: AnnotoriousOpts<I, E>
79
+ ): SvelteImageAnnotatorState<I> => {
79
80
 
80
81
  const state = createImageAnnotatorState(opts);
81
82
 
82
83
  return {
83
84
  ...state,
84
- store: toSvelteStore(state.store) as SvelteImageAnnotationStore
85
+ store: toSvelteStore(state.store) as SvelteImageAnnotationStore<I>
85
86
  }
86
87
 
87
88
  }
88
-
@@ -1,6 +1,7 @@
1
1
  import RBush from 'rbush';
2
- import { ShapeType,computeArea, intersects } from '../model';
2
+ import { ShapeType,computeArea, intersects, isImageAnnotationTarget } from '../model';
3
3
  import type { ImageAnnotationTarget } from '../model';
4
+ import type { AnnotationTarget } from '@annotorious/core';
4
5
 
5
6
  interface IndexedTarget {
6
7
 
@@ -29,7 +30,9 @@ export const createSpatialTree = () => {
29
30
  index.clear();
30
31
  }
31
32
 
32
- const insert = (target: ImageAnnotationTarget) => {
33
+ const insert = (target: AnnotationTarget) => {
34
+ if (!isImageAnnotationTarget(target)) return;
35
+
33
36
  const { minX, minY, maxX, maxY } = target.selector.geometry.bounds;
34
37
 
35
38
  const t = { minX, minY, maxX, maxY, target };
@@ -38,31 +41,40 @@ export const createSpatialTree = () => {
38
41
  index.set(target.annotation, t);
39
42
  };
40
43
 
41
- const remove = (target: ImageAnnotationTarget) => {
44
+ const remove = (target: AnnotationTarget) => {
45
+ if (!isImageAnnotationTarget(target)) return;
46
+
42
47
  const item = index.get(target.annotation);
43
- tree.remove(item);
48
+ if (item)
49
+ tree.remove(item);
44
50
  index.delete(target.annotation);
45
51
  };
46
52
 
47
- const update = (previous: ImageAnnotationTarget, updated: ImageAnnotationTarget) => {
53
+ const update = (previous: AnnotationTarget, updated: AnnotationTarget) => {
48
54
  remove(previous);
49
55
  insert(updated);
50
56
  };
51
57
 
52
- const set = (targets: ImageAnnotationTarget[], replace: boolean = true) => {
58
+ const set = (targets: AnnotationTarget[], replace: boolean = true) => {
53
59
  if (replace)
54
60
  clear();
55
61
 
56
- const indexedTargets = targets.map(target => {
57
- const { minX, minY, maxX, maxY } = target.selector.geometry.bounds;
58
- return { minX, minY, maxX, maxY, target };
59
- });
62
+ const indexedTargets = targets.reduce<IndexedTarget[]>((all, target) => {
63
+ if (isImageAnnotationTarget(target)) {
64
+ // In case the host app injects any custom annotations, the
65
+ // spatial index should simply ignore them.
66
+ const { minX, minY, maxX, maxY } = target.selector.geometry.bounds;
67
+ return [...all, { minX, minY, maxX, maxY, target } as IndexedTarget];
68
+ } else {
69
+ return all;
70
+ }
71
+ }, []);
60
72
 
61
73
  indexedTargets.forEach(t => index.set(t.target.annotation, t));
62
74
  tree.load(indexedTargets);
63
75
  };
64
76
 
65
- const getAt = (x: number, y: number): ImageAnnotationTarget | null => {
77
+ const getAt = (x: number, y: number): ImageAnnotationTarget | undefined => {
66
78
  const idxHits = tree.search({
67
79
  minX: x,
68
80
  minY: y,
@@ -1,4 +1,4 @@
1
- /** A simple black theme that works best on ligh backgrounds **/
1
+ /** A simple black theme that works best on light backgrounds **/
2
2
  .a9s-annotationlayer .a9s-outer,
3
3
  div[data-theme="dark"] .a9s-annotationlayer .a9s-outer {
4
4
  display: none;
@@ -11,8 +11,8 @@ div[data-theme="dark"] .a9s-annotationlayer .a9s-inner {
11
11
  stroke-width: 1px;
12
12
  }
13
13
 
14
- rect.a9s-corner-handle,
15
- div[data-theme="dark"] rect.a9s-corner-handle {
14
+ rect.a9s-handle,
15
+ div[data-theme="dark"] rect.a9s-handle {
16
16
  fill: #000;
17
17
  rx: 2px;
18
18
  }
@@ -13,8 +13,8 @@ div[data-theme="light"] .a9s-annotationlayer .a9s-inner {
13
13
  stroke-width: 1.5px;
14
14
  }
15
15
 
16
- rect.a9s-corner-handle,
17
- div[data-theme="light"] rect.a9s-corner-handle {
16
+ rect.a9s-handle,
17
+ div[data-theme="light"] rect.a9s-handle {
18
18
  fill: #fff;
19
19
  rx: 1px;
20
20
  stroke: rgba(0, 0, 0, 0.45);
@@ -8,7 +8,7 @@ export const sampleBrightness = (imageOrCanvas: HTMLElement) => {
8
8
 
9
9
  if (imageOrCanvas.nodeName === 'CANVAS') {
10
10
  canvas = imageOrCanvas as HTMLCanvasElement;
11
- context = canvas.getContext('2d', { willReadFrequently: true });
11
+ context = canvas.getContext('2d', { willReadFrequently: true })!;
12
12
  } else {
13
13
  const img = imageOrCanvas as HTMLImageElement;
14
14
  // Copy image to in-memory canvas for processing
@@ -16,7 +16,7 @@ export const sampleBrightness = (imageOrCanvas: HTMLElement) => {
16
16
  canvas.width = img.width;
17
17
  canvas.height = img.height;
18
18
 
19
- context = canvas.getContext('2d', { willReadFrequently: true });
19
+ context = canvas.getContext('2d', { willReadFrequently: true })!;
20
20
  context.drawImage(img, 0, 0, img.width, img.height);
21
21
  }
22
22
 
@@ -1 +0,0 @@
1
- {"version":3,"file":"Annotorious.d.ts","sourceRoot":"","sources":["../src/Annotorious.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAA8B,MAAM,mBAAmB,CAAC;AAG/E,OAAO,EAA2C,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE/F,OAAO,KAAK,EAAE,eAAe,EAAkC,MAAM,cAAc,CAAC;AACpF,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAG1D,OAAO,EAAgB,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,yBAAyB,CAAC;AACjC,OAAO,0BAA0B,CAAC;AAElC,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,OAAO,GAAG,eAAe,CAAE,SAAQ,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC;IAExG,gBAAgB,IAAI,MAAM,EAAE,CAAC;IAE7B,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,eAAe,EAAE,IAAI,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAE9F,mBAAmB,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,eAAe,GAAG,IAAI,CAAC;IAEhF,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IAExC,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAE1C,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAE9B;AAED,eAAO,MAAM,oBAAoB,+CACxB,MAAM,GAAG,gBAAgB,GAAG,iBAAiB,qEAmIrD,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AnnotoriousOpts.d.ts","sourceRoot":"","sources":["../src/AnnotoriousOpts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,UAAU,GAAG,eAAe,EAAE,CAAC,SAAS,OAAO,GAAG,eAAe;IAE1G,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAE9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,cAAc,CAAC,EAAE,OAAO,CAAC;IAIzB,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,mBAAmB,CAAC,EAAE,mBAAmB,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,mBAAmB,CAAC,CAAC;IAE5E,KAAK,CAAC,EAAE,YAAY,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC,KAAK,YAAY,CAAC,CAAC;IAEzD,KAAK,CAAC,EAAE,KAAK,CAAC;CAEf;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAE9C,eAAO,MAAM,YAAY,0IAYxB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SVGAnnotationLayerPointerEvent.d.ts","sourceRoot":"","sources":["../../src/annotation/SVGAnnotationLayerPointerEvent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,WAAW,8BAA8B;IAE7C,aAAa,EAAE,YAAY,CAAC;IAE5B,UAAU,CAAC,EAAE,eAAe,CAAC;CAE9B;AAKD,eAAO,MAAM,iBAAiB,QAAS,aAAa,SAAS,0BAA0B;;uBAQ3D,YAAY;CAgBvC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Transform.d.ts","sourceRoot":"","sources":["../../src/annotation/Transform.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IAExB,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,CAAE,MAAM,EAAE,MAAM,CAAE,CAAA;CAEzE;AAED,eAAO,MAAM,iBAAiB,EAAE,SAI/B,CAAA;AAED,eAAO,MAAM,kBAAkB,QAAS,aAAa,KAAG,SAatD,CAAC"}
@@ -1,14 +0,0 @@
1
- export type Handle = string;
2
- export declare const Handle: {
3
- (value: string | number): string;
4
- SHAPE: string;
5
- TOP: string;
6
- RIGHT: string;
7
- BOTTOM: string;
8
- LEFT: string;
9
- TOP_LEFT: string;
10
- TOP_RIGHT: string;
11
- BOTTOM_RIGHT: string;
12
- BOTTOM_LEFT: string;
13
- };
14
- //# sourceMappingURL=Handle.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Handle.d.ts","sourceRoot":"","sources":["../../../src/annotation/editors/Handle.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAE5B,eAAO,MAAM,MAAM;YAAW,MAAM,GAAG,MAAM;;;;;;;;;;CAAsB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"editorsRegistry.d.ts","sourceRoot":"","sources":["../../../src/annotation/editors/editorsRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAS9C,eAAO,MAAM,SAAS,UAAW,KAAK,2BAA+B,CAAC;AAEtE,eAAO,MAAM,cAAc,cAAe,SAAS,UAAU,sBAAsB,2CAChD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/annotation/editors/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/annotation/editors/polygon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/annotation/editors/rectangle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,0BAA0B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/annotation/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AAExB,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,cAAc,kCAAkC,CAAC;AACjD,cAAc,aAAa,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/annotation/shapes/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DrawingToolConfig.d.ts","sourceRoot":"","sources":["../../../src/annotation/tools/DrawingToolConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,MAAM,WAAW,UAAU;IAEzB,SAAS,EAAE,OAAO,eAAe,CAAC;IAElC,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAA;CAE9B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"drawingToolsRegistry.d.ts","sourceRoot":"","sources":["../../../src/annotation/tools/drawingToolsRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAG9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;AAE3D,MAAM,MAAM,eAAe,GAAG;IAE5B,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CAEvB,CAAA;AAOD,eAAO,MAAM,gBAAgB,gBAA+B,CAAC;AAE7D,eAAO,MAAM,OAAO,SAAU,MAAM;UAPY,sBAAsB;WAAS,eAAe;CAOjC,CAAC;AAE9D,eAAO,MAAM,YAAY,SAAU,MAAM,QAAQ,sBAAsB,SAAS,eAAe;UAT/C,sBAAsB;WAAS,eAAe;EAUxD,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/annotation/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/annotation/tools/polygon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/annotation/tools/rectangle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,8BAA8B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/annotation/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../../../src/annotation/utils/math.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,MAAO,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,MAKnE,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"responsive.d.ts","sourceRoot":"","sources":["../../../src/annotation/utils/responsive.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,gBAAgB,UAAW,gBAAgB,GAAG,iBAAiB,OAAO,aAAa;;;CAgC/F,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"styling.d.ts","sourceRoot":"","sources":["../../../src/annotation/utils/styling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,YAAY,eAAgB,eAAe,8BAA8B,eAAe,KAAK,YAAY,YAerH,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"touch.d.ts","sourceRoot":"","sources":["../../../src/annotation/utils/touch.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SAA2D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AAGnC,YAAY,EACV,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,UAAU,EACV,kBAAkB,EAClB,KAAK,EACL,YAAY,EACZ,MAAM,EACN,aAAa,EACb,UAAU,EACV,eAAe,EACf,WAAW,EACX,WAAW,EACX,OAAO,EACP,SAAS,EACT,cAAc,EACd,KAAK,EACL,gBAAgB,EAChB,aAAa,EACb,IAAI,EACJ,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACZ,MAAM,mBAAmB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"keyboardCommands.d.ts","sourceRoot":"","sources":["../src/keyboardCommands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI/D,eAAO,MAAM,oBAAoB,8DAEnB,OAAO;;CAuCpB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImageAnnotation.d.ts","sourceRoot":"","sources":["../../../src/model/core/ImageAnnotation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,WAAW,eAAgB,SAAQ,UAAU;IAEjD,MAAM,EAAE,qBAAqB,CAAC;CAE/B;AAED,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAE7D,QAAQ,EAAE,KAAK,CAAA;CAEhB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Shape.d.ts","sourceRoot":"","sources":["../../../src/model/core/Shape.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,WAAW,KAAM,SAAQ,gBAAgB;IAE7C,IAAI,EAAE,SAAS,CAAC;IAEhB,QAAQ,EAAE,QAAQ,CAAC;CAEpB;AAED,oBAAY,SAAS;IAEnB,OAAO,YAAY;IAEnB,OAAO,YAAY;IAEnB,SAAS,cAAc;CAExB;AAED,MAAM,WAAW,QAAQ;IAEvB,MAAM,EAAE,MAAM,CAAC;CAEhB;AAED,MAAM,WAAW,MAAM;IAErB,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;CAEd"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Ellipse.d.ts","sourceRoot":"","sources":["../../../../src/model/core/ellipse/Ellipse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,WAAW,OAAQ,SAAQ,KAAK;IAEpC,QAAQ,EAAE,eAAe,CAAC;CAE3B;AAED,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAE/C,EAAE,EAAE,MAAM,CAAC;IAEX,EAAE,EAAE,MAAM,CAAC;IAEX,EAAE,EAAE,MAAM,CAAC;IAEX,EAAE,EAAE,MAAM,CAAC;IAEX,MAAM,EAAE,MAAM,CAAC;CAEhB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ellipseUtils.d.ts","sourceRoot":"","sources":["../../../../src/model/core/ellipse/ellipseUtils.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/model/core/ellipse/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/model/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Polygon.d.ts","sourceRoot":"","sources":["../../../../src/model/core/polygon/Polygon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,WAAW,OAAQ,SAAQ,KAAK;IAEpC,QAAQ,EAAE,eAAe,CAAC;CAE3B;AAED,MAAM,WAAW,eAAgB,SAAQ,QAAQ;IAE/C,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAE7B,MAAM,EAAE,MAAM,CAAC;CAEhB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/model/core/polygon/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"polygonUtils.d.ts","sourceRoot":"","sources":["../../../../src/model/core/polygon/polygonUtils.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Rectangle.d.ts","sourceRoot":"","sources":["../../../../src/model/core/rectangle/Rectangle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,WAAW,SAAU,SAAQ,KAAK;IAEtC,QAAQ,EAAE,iBAAiB,CAAC;CAE7B;AAED,MAAM,WAAW,iBAAkB,SAAQ,QAAQ;IAEjD,CAAC,EAAE,MAAM,CAAC;IAEV,CAAC,EAAE,MAAM,CAAC;IAEV,CAAC,EAAE,MAAM,CAAC;IAEV,CAAC,EAAE,MAAM,CAAC;IAEV,MAAM,EAAE,MAAM,CAAC;CAEhB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/model/core/rectangle/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"rectangleUtils.d.ts","sourceRoot":"","sources":["../../../../src/model/core/rectangle/rectangleUtils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAqB,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAElE,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,SAAS,CAU9C,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"shapeUtils.d.ts","sourceRoot":"","sources":["../../../src/model/core/shapeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAExD,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,KAAK;IAExC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,MAAM,CAAC;IAE3B,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC;CAEzD;AAID;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,SAAU,SAAS,GAAG,MAAM,QAAQ,UAAU,GAAG,CAAC,mBAC1D,CAAC;AAEvB;;;GAGG;AACH,eAAO,MAAM,WAAW,UAAW,KAAK,WAAkC,CAAC;AAE3E;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,UAAW,KAAK,KAAK,MAAM,KAAK,MAAM,KAAG,OACrB,CAAC;AAE5C;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,WAAY,MAAM;IAAC,MAAM;IAAE,MAAM;CAAC,CAAC,KAAG,MAclE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"W3CImageFormatAdapter.d.ts","sourceRoot":"","sources":["../../../src/model/w3c/W3CImageFormatAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAMlE,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AAElF,eAAO,MAAM,cAAc,WACjB,MAAM,YACL,OAAO,0BAUjB,CAAA;AAED,eAAO,MAAM,uBAAuB,eACtB,aAAa,YAChB,OAAO,KACf,YAAY,eAAe,CAgC7B,CAAA;AAED,eAAO,MAAM,2BAA2B,eAC1B,eAAe,UACnB,MAAM,KACb,aAmBF,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FragmentSelector.d.ts","sourceRoot":"","sources":["../../../../src/model/w3c/fragment/FragmentSelector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/D,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IAEnD,IAAI,EAAE,kBAAkB,CAAC;IAEzB,UAAU,EAAE,mCAAmC,CAAC;IAEhD,KAAK,EAAE,MAAM,CAAC;CAEf;AAED,eAAO,MAAM,qBAAqB,uBACZ,gBAAgB,GAAG,MAAM,wBAE5C,SA+BF,CAAC;AAEF,eAAO,MAAM,yBAAyB,aAAc,iBAAiB,KAAG,gBAQvE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/model/w3c/fragment/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/model/w3c/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,OAAO,CAAC;AACtB,cAAc,yBAAyB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SVG.d.ts","sourceRoot":"","sources":["../../../../src/model/w3c/svg/SVG.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAE1D,eAAO,MAAM,QAAQ,QAAS,OAAO,GAAG,QAAQ,uBAmB/C,CAAA;AAED,uDAAuD;AACvD,eAAO,MAAM,kBAAkB,gBAAiB,QAAQ,KAAG,OAW1D,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SVGSelector.d.ts","sourceRoot":"","sources":["../../../../src/model/w3c/svg/SVGSelector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAAsD,KAAK,EAAE,MAAM,YAAY,CAAC;AAG5F,MAAM,WAAW,WAAY,SAAQ,WAAW;IAE9C,IAAI,EAAE,aAAa,CAAC;IAEpB,KAAK,EAAE,MAAM,CAAC;CAEf;AA6DD,eAAO,MAAM,gBAAgB,qCAAsC,WAAW,GAAG,MAAM,MAOtF,CAAA;AAED,eAAO,MAAM,oBAAoB,UAAW,KAAK,KAAG,WAiBnD,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/model/w3c/svg/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImageAnnotationStore.d.ts","sourceRoot":"","sources":["../../src/state/ImageAnnotationStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAClF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,eAAe,CAAC,GAAG;IAE1D,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;IAEzD,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,eAAe,EAAE,CAAC;CAEzF,CAAA;AAED,MAAM,MAAM,0BAA0B,GAAG,WAAW,CAAC,eAAe,CAAC,GAAG,oBAAoB,CAAC;AAE7F,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAAC,eAAe,CAAC,GAAG;IAE9E,KAAK,EAAE,0BAA0B,CAAC;CAEnC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImageAnnotatorState.d.ts","sourceRoot":"","sources":["../../src/state/ImageAnnotatorState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAyB,MAAM,UAAU,CAAC;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,KAAK,EACV,oBAAoB,EAEpB,yBAAyB,EAC1B,MAAM,wBAAwB,CAAC;AAEhC,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,IAAI,cAAc,CAAC,eAAe,CAAC,GAAG;IAEzH,KAAK,EAAE,CAAC,CAAC;IAET,SAAS,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC;IAE3C,KAAK,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;CAEpC,CAAA;AAED,eAAO,MAAM,yBAAyB,oEAEnC,oBAAoB,oBAAoB,CAwC1C,CAAA;AAED,eAAO,MAAM,+BAA+B,oEAEzC,yBASF,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/state/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"spatialTree.d.ts","sourceRoot":"","sources":["../../src/state/spatialTree.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,UAAU,aAAa;IAErB,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;IAEb,IAAI,EAAE,MAAM,CAAC;IAEb,MAAM,EAAE,qBAAqB,CAAC;CAE/B;AAED,eAAO,MAAM,iBAAiB;;;eA8CV,MAAM,KAAK,MAAM,KAAG,qBAAqB,GAAG,IAAI;yBAqBtC,MAAM,KAAK,MAAM,SAAS,MAAM,UAAU,MAAM;qBAtDpD,qBAAqB;qBASrB,qBAAqB;mBAWvB,qBAAqB,EAAE,YAAW,OAAO;;uBALrC,qBAAqB,WAAW,qBAAqB;CA6DhF,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/themes/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/themes/smart/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"setTheme.d.ts","sourceRoot":"","sources":["../../../src/themes/smart/setTheme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAEnD,eAAO,MAAM,gBAAgB,kBAAmB,WAAW,WAmC1D,CAAA;AAED,eAAO,MAAM,WAAW,kBAAmB,WAAW,qBAOrD,CAAA;AAED,eAAO,MAAM,QAAQ,kBAAmB,WAAW,aAAa,WAAW,SAAS,KAAK,SACI,CAAC"}
@@ -1,21 +0,0 @@
1
- export type Handle = string;
2
-
3
- export const Handle = (value: string | number) => `HANDLE-${value}`;
4
-
5
- Handle.SHAPE = 'SHAPE';
6
-
7
- Handle.TOP = 'TOP';
8
-
9
- Handle.RIGHT = 'RIGHT';
10
-
11
- Handle.BOTTOM = 'BOTTOM';
12
-
13
- Handle.LEFT = 'LEFT';
14
-
15
- Handle.TOP_LEFT = 'TOP_LEFT';
16
-
17
- Handle.TOP_RIGHT = 'TOP_RIGHT';
18
-
19
- Handle.BOTTOM_RIGHT = 'BOTTOM_RIGHT';
20
-
21
- Handle.BOTTOM_LEFT = 'BOTTOM_LEFT';