@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.
- package/README.md +6 -0
- package/dist/Annotorious.d.ts +15 -0
- package/dist/Annotorious.d.ts.map +1 -0
- package/dist/AnnotoriousOpts.d.ts +14 -0
- package/dist/AnnotoriousOpts.d.ts.map +1 -0
- package/dist/annotation/SVGAnnotationLayer.svelte.d.ts +1 -0
- package/dist/annotation/SVGAnnotationLayerPointerEvent.d.ts +11 -0
- package/dist/annotation/SVGAnnotationLayerPointerEvent.d.ts.map +1 -0
- package/dist/annotation/Transform.d.ts +6 -0
- package/dist/annotation/Transform.d.ts.map +1 -0
- package/dist/annotation/editors/Editor.svelte.d.ts +1 -0
- package/dist/annotation/editors/EditorMount.svelte.d.ts +1 -0
- package/dist/annotation/editors/Handle.d.ts +14 -0
- package/dist/annotation/editors/Handle.d.ts.map +1 -0
- package/dist/annotation/editors/editorsRegistry.d.ts +5 -0
- package/dist/annotation/editors/editorsRegistry.d.ts.map +1 -0
- package/dist/annotation/editors/index.d.ts +7 -0
- package/dist/annotation/editors/index.d.ts.map +1 -0
- package/dist/annotation/editors/polygon/PolygonEditor.svelte.d.ts +1 -0
- package/dist/annotation/editors/polygon/index.d.ts +2 -0
- package/dist/annotation/editors/polygon/index.d.ts.map +1 -0
- package/dist/annotation/editors/rectangle/RectangleEditor.svelte.d.ts +1 -0
- package/dist/annotation/editors/rectangle/index.d.ts +2 -0
- package/dist/annotation/editors/rectangle/index.d.ts.map +1 -0
- package/dist/annotation/index.d.ts +7 -0
- package/dist/annotation/index.d.ts.map +1 -0
- package/dist/annotation/shapes/Ellipse.svelte.d.ts +1 -0
- package/dist/annotation/shapes/Polygon.svelte.d.ts +1 -0
- package/dist/annotation/shapes/Rectangle.svelte.d.ts +1 -0
- package/dist/annotation/shapes/index.d.ts +4 -0
- package/dist/annotation/shapes/index.d.ts.map +1 -0
- package/dist/annotation/tools/DrawingToolConfig.d.ts +8 -0
- package/dist/annotation/tools/DrawingToolConfig.d.ts.map +1 -0
- package/dist/annotation/tools/ToolMount.svelte.d.ts +1 -0
- package/dist/annotation/tools/drawingToolsRegistry.d.ts +17 -0
- package/dist/annotation/tools/drawingToolsRegistry.d.ts.map +1 -0
- package/dist/annotation/tools/index.d.ts +5 -0
- package/dist/annotation/tools/index.d.ts.map +1 -0
- package/dist/annotation/tools/polygon/RubberbandPolygon.svelte.d.ts +1 -0
- package/dist/annotation/tools/polygon/index.d.ts +2 -0
- package/dist/annotation/tools/polygon/index.d.ts.map +1 -0
- package/dist/annotation/tools/rectangle/RubberbandRectangle.svelte.d.ts +1 -0
- package/dist/annotation/tools/rectangle/index.d.ts +2 -0
- package/dist/annotation/tools/rectangle/index.d.ts.map +1 -0
- package/dist/annotation/utils/index.d.ts +4 -0
- package/dist/annotation/utils/index.d.ts.map +1 -0
- package/dist/annotation/utils/math.d.ts +2 -0
- package/dist/annotation/utils/math.d.ts.map +1 -0
- package/dist/annotation/utils/responsive.d.ts +5 -0
- package/dist/annotation/utils/responsive.d.ts.map +1 -0
- package/dist/annotation/utils/styling.d.ts +4 -0
- package/dist/annotation/utils/styling.d.ts.map +1 -0
- package/dist/annotation/utils/touch.d.ts +2 -0
- package/dist/annotation/utils/touch.d.ts.map +1 -0
- package/dist/annotorious.css +1 -0
- package/dist/annotorious.es.js +3890 -0
- package/dist/annotorious.es.js.map +1 -0
- package/dist/annotorious.js +2 -0
- package/dist/annotorious.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/model/core/ImageAnnotation.d.ts +9 -0
- package/dist/model/core/ImageAnnotation.d.ts.map +1 -0
- package/dist/model/core/Shape.d.ts +20 -0
- package/dist/model/core/Shape.d.ts.map +1 -0
- package/dist/model/core/ellipse/Ellipse.d.ts +12 -0
- package/dist/model/core/ellipse/Ellipse.d.ts.map +1 -0
- package/dist/model/core/ellipse/ellipseUtils.d.ts +2 -0
- package/dist/model/core/ellipse/ellipseUtils.d.ts.map +1 -0
- package/dist/model/core/ellipse/index.d.ts +3 -0
- package/dist/model/core/ellipse/index.d.ts.map +1 -0
- package/dist/model/core/index.d.ts +7 -0
- package/dist/model/core/index.d.ts.map +1 -0
- package/dist/model/core/polygon/Polygon.d.ts +9 -0
- package/dist/model/core/polygon/Polygon.d.ts.map +1 -0
- package/dist/model/core/polygon/index.d.ts +3 -0
- package/dist/model/core/polygon/index.d.ts.map +1 -0
- package/dist/model/core/polygon/polygonUtils.d.ts +2 -0
- package/dist/model/core/polygon/polygonUtils.d.ts.map +1 -0
- package/dist/model/core/rectangle/Rectangle.d.ts +12 -0
- package/dist/model/core/rectangle/Rectangle.d.ts.map +1 -0
- package/dist/model/core/rectangle/index.d.ts +3 -0
- package/dist/model/core/rectangle/index.d.ts.map +1 -0
- package/dist/model/core/rectangle/rectangleUtils.d.ts +4 -0
- package/dist/model/core/rectangle/rectangleUtils.d.ts.map +1 -0
- package/dist/model/core/shapeUtils.d.ts +35 -0
- package/dist/model/core/shapeUtils.d.ts.map +1 -0
- package/dist/model/index.d.ts +3 -0
- package/dist/model/index.d.ts.map +1 -0
- package/dist/model/w3c/W3CImageFormatAdapter.d.ts +7 -0
- package/dist/model/w3c/W3CImageFormatAdapter.d.ts.map +1 -0
- package/dist/model/w3c/fragment/FragmentSelector.d.ts +10 -0
- package/dist/model/w3c/fragment/FragmentSelector.d.ts.map +1 -0
- package/dist/model/w3c/fragment/index.d.ts +2 -0
- package/dist/model/w3c/fragment/index.d.ts.map +1 -0
- package/dist/model/w3c/index.d.ts +4 -0
- package/dist/model/w3c/index.d.ts.map +1 -0
- package/dist/model/w3c/svg/SVG.d.ts +5 -0
- package/dist/model/w3c/svg/SVG.d.ts.map +1 -0
- package/dist/model/w3c/svg/SVGSelector.d.ts +9 -0
- package/dist/model/w3c/svg/SVGSelector.d.ts.map +1 -0
- package/dist/model/w3c/svg/index.d.ts +2 -0
- package/dist/model/w3c/svg/index.d.ts.map +1 -0
- package/dist/state/ImageAnnotationStore.d.ts +11 -0
- package/dist/state/ImageAnnotationStore.d.ts.map +1 -0
- package/dist/state/ImageAnnotatorState.d.ts +12 -0
- package/dist/state/ImageAnnotatorState.d.ts.map +1 -0
- package/dist/state/index.d.ts +3 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/spatialTree.d.ts +21 -0
- package/dist/state/spatialTree.d.ts.map +1 -0
- package/dist/themes/index.d.ts +2 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/smart/index.d.ts +2 -0
- package/dist/themes/smart/index.d.ts.map +1 -0
- package/dist/themes/smart/setTheme.d.ts +3 -0
- package/dist/themes/smart/setTheme.d.ts.map +1 -0
- package/package.json +55 -0
- package/src/Annotorious.css +74 -0
- package/src/Annotorious.ts +158 -0
- package/src/AnnotoriousOpts.ts +40 -0
- package/src/annotation/SVGAnnotationLayer.svelte +169 -0
- package/src/annotation/SVGAnnotationLayerPointerEvent.ts +55 -0
- package/src/annotation/Transform.ts +24 -0
- package/src/annotation/editors/Editor.svelte +61 -0
- package/src/annotation/editors/EditorMount.svelte +44 -0
- package/src/annotation/editors/Handle.ts +21 -0
- package/src/annotation/editors/editorsRegistry.ts +14 -0
- package/src/annotation/editors/index.ts +7 -0
- package/src/annotation/editors/polygon/PolygonEditor.svelte +64 -0
- package/src/annotation/editors/polygon/index.ts +1 -0
- package/src/annotation/editors/rectangle/RectangleEditor.svelte +143 -0
- package/src/annotation/editors/rectangle/index.ts +1 -0
- package/src/annotation/index.ts +7 -0
- package/src/annotation/shapes/Ellipse.svelte +32 -0
- package/src/annotation/shapes/Polygon.svelte +26 -0
- package/src/annotation/shapes/Rectangle.svelte +32 -0
- package/src/annotation/shapes/index.ts +3 -0
- package/src/annotation/tools/DrawingToolConfig.ts +9 -0
- package/src/annotation/tools/ToolMount.svelte +49 -0
- package/src/annotation/tools/drawingToolsRegistry.ts +26 -0
- package/src/annotation/tools/index.ts +4 -0
- package/src/annotation/tools/polygon/RubberbandPolygon.svelte +165 -0
- package/src/annotation/tools/polygon/index.ts +1 -0
- package/src/annotation/tools/rectangle/RubberbandRectangle.svelte +131 -0
- package/src/annotation/tools/rectangle/index.ts +1 -0
- package/src/annotation/utils/index.ts +3 -0
- package/src/annotation/utils/math.ts +6 -0
- package/src/annotation/utils/responsive.ts +56 -0
- package/src/annotation/utils/styling.ts +19 -0
- package/src/annotation/utils/touch.ts +1 -0
- package/src/index.ts +20 -0
- package/src/model/core/ImageAnnotation.ts +14 -0
- package/src/model/core/Shape.ts +37 -0
- package/src/model/core/ellipse/Ellipse.ts +21 -0
- package/src/model/core/ellipse/ellipseUtils.ts +28 -0
- package/src/model/core/ellipse/index.ts +2 -0
- package/src/model/core/index.ts +6 -0
- package/src/model/core/polygon/Polygon.ts +15 -0
- package/src/model/core/polygon/index.ts +2 -0
- package/src/model/core/polygon/polygonUtils.ts +43 -0
- package/src/model/core/rectangle/Rectangle.ts +21 -0
- package/src/model/core/rectangle/index.ts +2 -0
- package/src/model/core/rectangle/rectangleUtils.ts +17 -0
- package/src/model/core/shapeUtils.ts +57 -0
- package/src/model/index.ts +2 -0
- package/src/model/w3c/W3CImageFormatAdapter.ts +83 -0
- package/src/model/w3c/fragment/FragmentSelector.ts +59 -0
- package/src/model/w3c/fragment/index.ts +1 -0
- package/src/model/w3c/index.ts +3 -0
- package/src/model/w3c/svg/SVG.ts +36 -0
- package/src/model/w3c/svg/SVGSelector.ts +99 -0
- package/src/model/w3c/svg/index.ts +1 -0
- package/src/state/ImageAnnotationStore.ts +18 -0
- package/src/state/ImageAnnotatorState.ts +88 -0
- package/src/state/index.ts +2 -0
- package/src/state/spatialTree.ts +108 -0
- package/src/themes/dark/index.css +24 -0
- package/src/themes/index.ts +1 -0
- package/src/themes/light/index.css +30 -0
- package/src/themes/smart/index.ts +1 -0
- package/src/themes/smart/setTheme.ts +46 -0
- 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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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 @@
|
|
|
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}
|