@annotorious/annotorious 3.0.0-rc.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 (183) hide show
  1. package/README.md +6 -0
  2. package/dist/Annotorious.d.ts +15 -0
  3. package/dist/Annotorious.d.ts.map +1 -0
  4. package/dist/AnnotoriousOpts.d.ts +14 -0
  5. package/dist/AnnotoriousOpts.d.ts.map +1 -0
  6. package/dist/annotation/SVGAnnotationLayer.svelte.d.ts +1 -0
  7. package/dist/annotation/SVGAnnotationLayerPointerEvent.d.ts +11 -0
  8. package/dist/annotation/SVGAnnotationLayerPointerEvent.d.ts.map +1 -0
  9. package/dist/annotation/Transform.d.ts +6 -0
  10. package/dist/annotation/Transform.d.ts.map +1 -0
  11. package/dist/annotation/editors/Editor.svelte.d.ts +1 -0
  12. package/dist/annotation/editors/EditorMount.svelte.d.ts +1 -0
  13. package/dist/annotation/editors/Handle.d.ts +14 -0
  14. package/dist/annotation/editors/Handle.d.ts.map +1 -0
  15. package/dist/annotation/editors/editorsRegistry.d.ts +5 -0
  16. package/dist/annotation/editors/editorsRegistry.d.ts.map +1 -0
  17. package/dist/annotation/editors/index.d.ts +7 -0
  18. package/dist/annotation/editors/index.d.ts.map +1 -0
  19. package/dist/annotation/editors/polygon/PolygonEditor.svelte.d.ts +1 -0
  20. package/dist/annotation/editors/polygon/index.d.ts +2 -0
  21. package/dist/annotation/editors/polygon/index.d.ts.map +1 -0
  22. package/dist/annotation/editors/rectangle/RectangleEditor.svelte.d.ts +1 -0
  23. package/dist/annotation/editors/rectangle/index.d.ts +2 -0
  24. package/dist/annotation/editors/rectangle/index.d.ts.map +1 -0
  25. package/dist/annotation/index.d.ts +7 -0
  26. package/dist/annotation/index.d.ts.map +1 -0
  27. package/dist/annotation/shapes/Ellipse.svelte.d.ts +1 -0
  28. package/dist/annotation/shapes/Polygon.svelte.d.ts +1 -0
  29. package/dist/annotation/shapes/Rectangle.svelte.d.ts +1 -0
  30. package/dist/annotation/shapes/index.d.ts +4 -0
  31. package/dist/annotation/shapes/index.d.ts.map +1 -0
  32. package/dist/annotation/tools/DrawingToolConfig.d.ts +8 -0
  33. package/dist/annotation/tools/DrawingToolConfig.d.ts.map +1 -0
  34. package/dist/annotation/tools/ToolMount.svelte.d.ts +1 -0
  35. package/dist/annotation/tools/drawingToolsRegistry.d.ts +17 -0
  36. package/dist/annotation/tools/drawingToolsRegistry.d.ts.map +1 -0
  37. package/dist/annotation/tools/index.d.ts +5 -0
  38. package/dist/annotation/tools/index.d.ts.map +1 -0
  39. package/dist/annotation/tools/polygon/RubberbandPolygon.svelte.d.ts +1 -0
  40. package/dist/annotation/tools/polygon/index.d.ts +2 -0
  41. package/dist/annotation/tools/polygon/index.d.ts.map +1 -0
  42. package/dist/annotation/tools/rectangle/RubberbandRectangle.svelte.d.ts +1 -0
  43. package/dist/annotation/tools/rectangle/index.d.ts +2 -0
  44. package/dist/annotation/tools/rectangle/index.d.ts.map +1 -0
  45. package/dist/annotation/utils/index.d.ts +4 -0
  46. package/dist/annotation/utils/index.d.ts.map +1 -0
  47. package/dist/annotation/utils/math.d.ts +2 -0
  48. package/dist/annotation/utils/math.d.ts.map +1 -0
  49. package/dist/annotation/utils/responsive.d.ts +5 -0
  50. package/dist/annotation/utils/responsive.d.ts.map +1 -0
  51. package/dist/annotation/utils/styling.d.ts +4 -0
  52. package/dist/annotation/utils/styling.d.ts.map +1 -0
  53. package/dist/annotation/utils/touch.d.ts +2 -0
  54. package/dist/annotation/utils/touch.d.ts.map +1 -0
  55. package/dist/annotorious.css +1 -0
  56. package/dist/annotorious.es.js +3890 -0
  57. package/dist/annotorious.es.js.map +1 -0
  58. package/dist/annotorious.js +2 -0
  59. package/dist/annotorious.js.map +1 -0
  60. package/dist/index.d.ts +12 -0
  61. package/dist/index.d.ts.map +1 -0
  62. package/dist/model/core/ImageAnnotation.d.ts +9 -0
  63. package/dist/model/core/ImageAnnotation.d.ts.map +1 -0
  64. package/dist/model/core/Shape.d.ts +20 -0
  65. package/dist/model/core/Shape.d.ts.map +1 -0
  66. package/dist/model/core/ellipse/Ellipse.d.ts +12 -0
  67. package/dist/model/core/ellipse/Ellipse.d.ts.map +1 -0
  68. package/dist/model/core/ellipse/ellipseUtils.d.ts +2 -0
  69. package/dist/model/core/ellipse/ellipseUtils.d.ts.map +1 -0
  70. package/dist/model/core/ellipse/index.d.ts +3 -0
  71. package/dist/model/core/ellipse/index.d.ts.map +1 -0
  72. package/dist/model/core/index.d.ts +7 -0
  73. package/dist/model/core/index.d.ts.map +1 -0
  74. package/dist/model/core/polygon/Polygon.d.ts +9 -0
  75. package/dist/model/core/polygon/Polygon.d.ts.map +1 -0
  76. package/dist/model/core/polygon/index.d.ts +3 -0
  77. package/dist/model/core/polygon/index.d.ts.map +1 -0
  78. package/dist/model/core/polygon/polygonUtils.d.ts +2 -0
  79. package/dist/model/core/polygon/polygonUtils.d.ts.map +1 -0
  80. package/dist/model/core/rectangle/Rectangle.d.ts +12 -0
  81. package/dist/model/core/rectangle/Rectangle.d.ts.map +1 -0
  82. package/dist/model/core/rectangle/index.d.ts +3 -0
  83. package/dist/model/core/rectangle/index.d.ts.map +1 -0
  84. package/dist/model/core/rectangle/rectangleUtils.d.ts +4 -0
  85. package/dist/model/core/rectangle/rectangleUtils.d.ts.map +1 -0
  86. package/dist/model/core/shapeUtils.d.ts +35 -0
  87. package/dist/model/core/shapeUtils.d.ts.map +1 -0
  88. package/dist/model/index.d.ts +3 -0
  89. package/dist/model/index.d.ts.map +1 -0
  90. package/dist/model/w3c/W3CImageFormatAdapter.d.ts +7 -0
  91. package/dist/model/w3c/W3CImageFormatAdapter.d.ts.map +1 -0
  92. package/dist/model/w3c/fragment/FragmentSelector.d.ts +10 -0
  93. package/dist/model/w3c/fragment/FragmentSelector.d.ts.map +1 -0
  94. package/dist/model/w3c/fragment/index.d.ts +2 -0
  95. package/dist/model/w3c/fragment/index.d.ts.map +1 -0
  96. package/dist/model/w3c/index.d.ts +4 -0
  97. package/dist/model/w3c/index.d.ts.map +1 -0
  98. package/dist/model/w3c/svg/SVG.d.ts +5 -0
  99. package/dist/model/w3c/svg/SVG.d.ts.map +1 -0
  100. package/dist/model/w3c/svg/SVGSelector.d.ts +9 -0
  101. package/dist/model/w3c/svg/SVGSelector.d.ts.map +1 -0
  102. package/dist/model/w3c/svg/index.d.ts +2 -0
  103. package/dist/model/w3c/svg/index.d.ts.map +1 -0
  104. package/dist/state/ImageAnnotationStore.d.ts +11 -0
  105. package/dist/state/ImageAnnotationStore.d.ts.map +1 -0
  106. package/dist/state/ImageAnnotatorState.d.ts +12 -0
  107. package/dist/state/ImageAnnotatorState.d.ts.map +1 -0
  108. package/dist/state/index.d.ts +3 -0
  109. package/dist/state/index.d.ts.map +1 -0
  110. package/dist/state/spatialTree.d.ts +21 -0
  111. package/dist/state/spatialTree.d.ts.map +1 -0
  112. package/dist/themes/index.d.ts +2 -0
  113. package/dist/themes/index.d.ts.map +1 -0
  114. package/dist/themes/smart/index.d.ts +2 -0
  115. package/dist/themes/smart/index.d.ts.map +1 -0
  116. package/dist/themes/smart/setTheme.d.ts +3 -0
  117. package/dist/themes/smart/setTheme.d.ts.map +1 -0
  118. package/package.json +55 -0
  119. package/src/Annotorious.css +74 -0
  120. package/src/Annotorious.ts +158 -0
  121. package/src/AnnotoriousOpts.ts +40 -0
  122. package/src/annotation/SVGAnnotationLayer.svelte +169 -0
  123. package/src/annotation/SVGAnnotationLayerPointerEvent.ts +55 -0
  124. package/src/annotation/Transform.ts +24 -0
  125. package/src/annotation/editors/Editor.svelte +61 -0
  126. package/src/annotation/editors/EditorMount.svelte +44 -0
  127. package/src/annotation/editors/Handle.ts +21 -0
  128. package/src/annotation/editors/editorsRegistry.ts +14 -0
  129. package/src/annotation/editors/index.ts +7 -0
  130. package/src/annotation/editors/polygon/PolygonEditor.svelte +64 -0
  131. package/src/annotation/editors/polygon/index.ts +1 -0
  132. package/src/annotation/editors/rectangle/RectangleEditor.svelte +143 -0
  133. package/src/annotation/editors/rectangle/index.ts +1 -0
  134. package/src/annotation/index.ts +7 -0
  135. package/src/annotation/shapes/Ellipse.svelte +32 -0
  136. package/src/annotation/shapes/Polygon.svelte +26 -0
  137. package/src/annotation/shapes/Rectangle.svelte +32 -0
  138. package/src/annotation/shapes/index.ts +3 -0
  139. package/src/annotation/tools/DrawingToolConfig.ts +9 -0
  140. package/src/annotation/tools/ToolMount.svelte +49 -0
  141. package/src/annotation/tools/drawingToolsRegistry.ts +26 -0
  142. package/src/annotation/tools/index.ts +4 -0
  143. package/src/annotation/tools/polygon/RubberbandPolygon.svelte +165 -0
  144. package/src/annotation/tools/polygon/index.ts +1 -0
  145. package/src/annotation/tools/rectangle/RubberbandRectangle.svelte +131 -0
  146. package/src/annotation/tools/rectangle/index.ts +1 -0
  147. package/src/annotation/utils/index.ts +3 -0
  148. package/src/annotation/utils/math.ts +6 -0
  149. package/src/annotation/utils/responsive.ts +56 -0
  150. package/src/annotation/utils/styling.ts +19 -0
  151. package/src/annotation/utils/touch.ts +1 -0
  152. package/src/index.ts +20 -0
  153. package/src/model/core/ImageAnnotation.ts +14 -0
  154. package/src/model/core/Shape.ts +37 -0
  155. package/src/model/core/ellipse/Ellipse.ts +21 -0
  156. package/src/model/core/ellipse/ellipseUtils.ts +28 -0
  157. package/src/model/core/ellipse/index.ts +2 -0
  158. package/src/model/core/index.ts +6 -0
  159. package/src/model/core/polygon/Polygon.ts +15 -0
  160. package/src/model/core/polygon/index.ts +2 -0
  161. package/src/model/core/polygon/polygonUtils.ts +43 -0
  162. package/src/model/core/rectangle/Rectangle.ts +21 -0
  163. package/src/model/core/rectangle/index.ts +2 -0
  164. package/src/model/core/rectangle/rectangleUtils.ts +17 -0
  165. package/src/model/core/shapeUtils.ts +57 -0
  166. package/src/model/index.ts +2 -0
  167. package/src/model/w3c/W3CImageFormatAdapter.ts +83 -0
  168. package/src/model/w3c/fragment/FragmentSelector.ts +59 -0
  169. package/src/model/w3c/fragment/index.ts +1 -0
  170. package/src/model/w3c/index.ts +3 -0
  171. package/src/model/w3c/svg/SVG.ts +36 -0
  172. package/src/model/w3c/svg/SVGSelector.ts +99 -0
  173. package/src/model/w3c/svg/index.ts +1 -0
  174. package/src/state/ImageAnnotationStore.ts +18 -0
  175. package/src/state/ImageAnnotatorState.ts +88 -0
  176. package/src/state/index.ts +2 -0
  177. package/src/state/spatialTree.ts +108 -0
  178. package/src/themes/dark/index.css +24 -0
  179. package/src/themes/index.ts +1 -0
  180. package/src/themes/light/index.css +30 -0
  181. package/src/themes/smart/index.ts +1 -0
  182. package/src/themes/smart/setTheme.ts +46 -0
  183. package/src/vite-env.d.ts +2 -0
package/README.md ADDED
@@ -0,0 +1,6 @@
1
+ # @annotorious/annotorious
2
+
3
+ JavaScript image annotation library.
4
+
5
+ __This repository is work in progress on the next major release (v3) of Annotorious. Code in this repository is
6
+ unfinished. Please keep using [Annotorious 2.x](https://annotorious.com) until the official release of v3.__
@@ -0,0 +1,15 @@
1
+ import type { SvelteComponent } from 'svelte';
2
+ import type { Annotator } from '@annotorious/core';
3
+ import { type DrawingTool } from './annotation/tools';
4
+ import type { DrawingToolOpts } from './annotation';
5
+ import type { ImageAnnotation, ShapeType } from './model';
6
+ import type { AnnotoriousOpts } from './AnnotoriousOpts';
7
+ export interface ImageAnnotator<E extends unknown = ImageAnnotation> extends Annotator<ImageAnnotation, E> {
8
+ listDrawingTools(): string[];
9
+ registerDrawingTool(name: string, tool: typeof SvelteComponent, opts?: DrawingToolOpts): void;
10
+ registerShapeEditor(shapeType: ShapeType, editor: typeof SvelteComponent): void;
11
+ setDrawingTool(tool: DrawingTool): void;
12
+ setDrawingEnabled(enabled: boolean): void;
13
+ }
14
+ export declare const createImageAnnotator: <E extends unknown = ImageAnnotation>(image: string | HTMLImageElement | HTMLCanvasElement, options?: AnnotoriousOpts<ImageAnnotation, E>) => ImageAnnotator<E>;
15
+ //# sourceMappingURL=Annotorious.d.ts.map
@@ -0,0 +1 @@
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,EAAsB,MAAM,mBAAmB,CAAC;AAGvE,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;AAI1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,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;CAE3C;AAED,eAAO,MAAM,oBAAoB,+CACxB,MAAM,GAAG,gBAAgB,GAAG,iBAAiB,qEA6HrD,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { PointerSelectAction } from '@annotorious/core';
2
+ import type { Annotation, DrawingStyle, FormatAdapter } from '@annotorious/core';
3
+ import type { ImageAnnotation } from './model';
4
+ export interface AnnotoriousOpts<I extends Annotation = ImageAnnotation, E extends unknown = ImageAnnotation> {
5
+ adapter?: FormatAdapter<I, E>;
6
+ autoSave?: boolean;
7
+ drawingEnabled?: boolean;
8
+ drawingMode?: DrawingMode;
9
+ pointerSelectAction?: PointerSelectAction | ((a: I) => PointerSelectAction);
10
+ style?: DrawingStyle | ((annotation: I) => DrawingStyle);
11
+ }
12
+ export type DrawingMode = 'click' | 'drag';
13
+ export declare const fillDefaults: <I extends ImageAnnotation = ImageAnnotation, E extends unknown = ImageAnnotation>(opts: AnnotoriousOpts<I, E>) => AnnotoriousOpts<I, E>;
14
+ //# sourceMappingURL=AnnotoriousOpts.d.ts.map
@@ -0,0 +1 @@
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;CAE1D;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,CAAC;AAE3C,eAAO,MAAM,YAAY,0IAWxB,CAAC"}
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1,11 @@
1
+ import type { SvelteImageAnnotationStore } from '../state';
2
+ import type { ImageAnnotation } from '../model';
3
+ export interface SVGAnnotationLayerPointerEvent {
4
+ originalEvent: PointerEvent;
5
+ annotation?: ImageAnnotation;
6
+ }
7
+ export declare const addEventListeners: (svg: SVGSVGElement, store: SvelteImageAnnotationStore) => {
8
+ onPointerDown: () => number;
9
+ onPointerUp: (evt: PointerEvent) => void;
10
+ };
11
+ //# sourceMappingURL=SVGAnnotationLayerPointerEvent.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,6 @@
1
+ export interface Transform {
2
+ elementToImage: (offsetX: number, offsetY: number) => [number, number];
3
+ }
4
+ export declare const IdentityTransform: Transform;
5
+ export declare const createSVGTransform: (svg: SVGSVGElement) => Transform;
6
+ //# sourceMappingURL=Transform.d.ts.map
@@ -0,0 +1 @@
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,SAWtD,CAAC"}
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1,14 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,5 @@
1
+ import { ShapeType, type Shape } from '../../model';
2
+ import type { SvelteComponent } from 'svelte';
3
+ export declare const getEditor: (shape: Shape) => typeof SvelteComponent;
4
+ export declare const registerEditor: (shapeType: ShapeType, editor: typeof SvelteComponent) => Map<ShapeType, typeof SvelteComponent>;
5
+ //# sourceMappingURL=editorsRegistry.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,7 @@
1
+ export * from './polygon';
2
+ export * from './rectangle';
3
+ export * from './editorsRegistry';
4
+ export * from './Handle';
5
+ export { default as Editor } from './Editor.svelte';
6
+ export { default as EditorMount } from './EditorMount.svelte';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1,2 @@
1
+ export { default as PolygonEditor } from './PolygonEditor.svelte';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1,2 @@
1
+ export { default as RectangleEditor } from './RectangleEditor.svelte';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,7 @@
1
+ export * from './editors';
2
+ export * from './tools';
3
+ export * from './utils';
4
+ export { default as SVGAnnotationLayer } from './SVGAnnotationLayer.svelte';
5
+ export * from './SVGAnnotationLayerPointerEvent';
6
+ export * from './Transform';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1,4 @@
1
+ export { default as Ellipse } from './Ellipse.svelte';
2
+ export { default as Polygon } from './Polygon.svelte';
3
+ export { default as Rectangle } from './Rectangle.svelte';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,8 @@
1
+ import type { SvelteComponent } from 'svelte';
2
+ export interface ToolConfig {
3
+ component: typeof SvelteComponent;
4
+ opts?: {
5
+ [key: string]: any;
6
+ };
7
+ }
8
+ //# sourceMappingURL=DrawingToolConfig.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1,17 @@
1
+ import type { SvelteComponent } from 'svelte';
2
+ import type { DrawingMode } from '../../AnnotoriousOpts';
3
+ export type DrawingTool = 'rectangle' | 'polygon' | string;
4
+ export type DrawingToolOpts = {
5
+ drawingMode?: DrawingMode;
6
+ [key: string]: string;
7
+ };
8
+ export declare const listDrawingTools: () => string[];
9
+ export declare const getTool: (name: string) => {
10
+ tool: typeof SvelteComponent;
11
+ opts?: DrawingToolOpts;
12
+ };
13
+ export declare const registerTool: (name: string, tool: typeof SvelteComponent, opts?: DrawingToolOpts) => Map<string, {
14
+ tool: typeof SvelteComponent;
15
+ opts?: DrawingToolOpts;
16
+ }>;
17
+ //# sourceMappingURL=drawingToolsRegistry.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,5 @@
1
+ export { default as ToolMount } from './ToolMount.svelte';
2
+ export * from './rectangle';
3
+ export * from './DrawingToolConfig';
4
+ export * from './drawingToolsRegistry';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1,2 @@
1
+ export { default as RubberbandPolygon } from './RubberbandPolygon.svelte';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1,2 @@
1
+ export { default as RubberbandRectangle } from './RubberbandRectangle.svelte';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,4 @@
1
+ export * from './math';
2
+ export * from './responsive';
3
+ export * from './touch';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export declare const distance: (a: [number, number], b: [number, number]) => number;
2
+ //# sourceMappingURL=math.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,5 @@
1
+ export declare const enableResponsive: (image: HTMLImageElement | HTMLCanvasElement, svg: SVGSVGElement) => {
2
+ destroy: () => void;
3
+ subscribe: (this: void, run: import("svelte/store").Subscriber<number>, invalidate?: (value?: number) => void) => import("svelte/store").Unsubscriber;
4
+ };
5
+ //# sourceMappingURL=responsive.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,4 @@
1
+ import type { DrawingStyle } from '@annotorious/core';
2
+ import type { ImageAnnotation } from '../../model';
3
+ export declare const computeStyle: (annotation: ImageAnnotation, style?: DrawingStyle | ((a: ImageAnnotation) => DrawingStyle)) => string;
4
+ //# sourceMappingURL=styling.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,2 @@
1
+ export declare const isTouch: boolean;
2
+ //# sourceMappingURL=touch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"touch.d.ts","sourceRoot":"","sources":["../../../src/annotation/utils/touch.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SAA2D,CAAC"}
@@ -0,0 +1 @@
1
+ .a9s-annotationlayer{box-sizing:border-box;height:100%;left:0;outline:none;position:absolute;top:0;touch-action:none;width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.a9s-annotationlayer ellipse,.a9s-annotationlayer polygon,.a9s-annotationlayer rect{fill:transparent;shape-rendering:geometricPrecision;vector-effect:non-scaling-stroke}.a9s-edge-handle{fill:transparent;stroke:transparent;stroke-width:6px}.a9s-shape-handle,.a9s-corner-handle{cursor:move}.a9s-edge-handle-top{cursor:n-resize}.a9s-edge-handle-right{cursor:e-resize}.a9s-edge-handle-bottom{cursor:s-resize}.a9s-edge-handle-left{cursor:w-resize}.a9s-corner-handle.a9s-corner-handle-topleft{cursor:nw-resize}.a9s-corner-handle.a9s-corner-handle-topright{cursor:ne-resize}.a9s-corner-handle.a9s-corner-handle-bottomright{cursor:se-resize}.a9s-corner-handle.a9s-corner-handle-bottomleft{cursor:sw-resize}.a9s-annotationlayer .a9s-outer,div[data-theme=dark] .a9s-annotationlayer .a9s-outer{display:none}.a9s-annotationlayer .a9s-inner,div[data-theme=dark] .a9s-annotationlayer .a9s-inner{fill:#0000001f;stroke:#000;stroke-width:1px}rect.a9s-corner-handle,div[data-theme=dark] rect.a9s-corner-handle{fill:#000;rx:2px}rect.a9s-close-polygon-handle,div[data-theme=dark] rect.a9s-close-polygon-handle{fill:#000;rx:1px}.a9s-annotationlayer .a9s-outer,div[data-theme=light] .a9s-annotationlayer .a9s-outer{display:block;stroke:#00000040;stroke-width:3.5px}.a9s-annotationlayer .a9s-inner,div[data-theme=light] .a9s-annotationlayer .a9s-inner{fill:#ffffff26;stroke:#fff;stroke-width:1.5px}rect.a9s-corner-handle,div[data-theme=light] rect.a9s-corner-handle{fill:#fff;rx:1px;stroke:#00000073;stroke-width:1px}rect.a9s-close-polygon-handle,div[data-theme=light] rect.a9s-close-polygon-handle{fill:#fff;rx:1px;stroke:#00000073;stroke-width:1px}