@annotorious/annotorious 3.0.0-rc.30 → 3.0.0-rc.32
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/dist/Annotorious.d.ts +1 -2
- package/dist/AnnotoriousOpts.d.ts +2 -4
- package/dist/annotation/SVGAnnotationLayer.svelte.d.ts +1 -1
- package/dist/annotation/SVGAnnotationLayerPointerEvent.d.ts +1 -2
- package/dist/annotation/Transform.d.ts +0 -1
- package/dist/annotation/editors/Editor.svelte.d.ts +1 -1
- package/dist/annotation/editors/EditorMount.svelte.d.ts +1 -1
- package/dist/annotation/editors/Handle.svelte.d.ts +1 -1
- package/dist/annotation/editors/editorsRegistry.d.ts +0 -2
- package/dist/annotation/editors/index.d.ts +0 -1
- package/dist/annotation/editors/polygon/PolygonEditor.svelte.d.ts +1 -1
- package/dist/annotation/editors/polygon/index.d.ts +0 -1
- package/dist/annotation/editors/rectangle/RectangleEditor.svelte.d.ts +1 -1
- package/dist/annotation/editors/rectangle/index.d.ts +0 -1
- package/dist/annotation/index.d.ts +0 -1
- package/dist/annotation/shapes/Ellipse.svelte.d.ts +1 -1
- package/dist/annotation/shapes/Polygon.svelte.d.ts +1 -1
- package/dist/annotation/shapes/Rectangle.svelte.d.ts +1 -1
- package/dist/annotation/shapes/index.d.ts +0 -1
- package/dist/annotation/tools/DrawingToolConfig.d.ts +0 -2
- package/dist/annotation/tools/ToolMount.svelte.d.ts +1 -1
- package/dist/annotation/tools/drawingToolsRegistry.d.ts +0 -2
- package/dist/annotation/tools/index.d.ts +0 -1
- package/dist/annotation/tools/polygon/RubberbandPolygon.svelte.d.ts +1 -1
- package/dist/annotation/tools/polygon/index.d.ts +0 -1
- package/dist/annotation/tools/rectangle/RubberbandRectangle.svelte.d.ts +1 -1
- package/dist/annotation/tools/rectangle/index.d.ts +0 -1
- package/dist/annotation/utils/index.d.ts +0 -1
- package/dist/annotation/utils/math.d.ts +0 -1
- package/dist/annotation/utils/responsive.d.ts +0 -1
- package/dist/annotation/utils/styling.d.ts +0 -2
- package/dist/annotation/utils/touch.d.ts +0 -1
- package/dist/annotorious.css +1 -1
- package/dist/annotorious.es.js +1717 -1622
- package/dist/annotorious.es.js.map +1 -1
- package/dist/annotorious.js +1 -1
- package/dist/annotorious.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/keyboardCommands.d.ts +0 -2
- package/dist/model/core/ImageAnnotation.d.ts +0 -2
- package/dist/model/core/Shape.d.ts +0 -2
- package/dist/model/core/ellipse/Ellipse.d.ts +0 -2
- package/dist/model/core/ellipse/ellipseUtils.d.ts +0 -1
- package/dist/model/core/ellipse/index.d.ts +0 -1
- package/dist/model/core/index.d.ts +0 -1
- package/dist/model/core/polygon/Polygon.d.ts +0 -2
- package/dist/model/core/polygon/index.d.ts +0 -1
- package/dist/model/core/polygon/polygonUtils.d.ts +0 -1
- package/dist/model/core/rectangle/Rectangle.d.ts +0 -2
- package/dist/model/core/rectangle/index.d.ts +0 -1
- package/dist/model/core/rectangle/rectangleUtils.d.ts +0 -2
- package/dist/model/core/shapeUtils.d.ts +0 -2
- package/dist/model/index.d.ts +0 -1
- package/dist/model/w3c/W3CImageAnnotation.d.ts +0 -2
- package/dist/model/w3c/W3CImageFormatAdapter.d.ts +7 -5
- package/dist/model/w3c/fragment/FragmentSelector.d.ts +0 -2
- package/dist/model/w3c/fragment/index.d.ts +0 -1
- package/dist/model/w3c/index.d.ts +0 -1
- package/dist/model/w3c/svg/SVG.d.ts +0 -1
- package/dist/model/w3c/svg/SVGSelector.d.ts +0 -2
- package/dist/model/w3c/svg/index.d.ts +0 -1
- package/dist/state/ImageAnnotationStore.d.ts +0 -2
- package/dist/state/ImageAnnotatorState.d.ts +0 -2
- package/dist/state/index.d.ts +0 -1
- package/dist/state/spatialTree.d.ts +0 -2
- package/dist/themes/index.d.ts +0 -1
- package/dist/themes/smart/index.d.ts +0 -1
- package/dist/themes/smart/setTheme.d.ts +0 -2
- package/package.json +12 -12
- package/src/Annotorious.css +4 -0
- package/src/Annotorious.ts +10 -6
- package/src/AnnotoriousOpts.ts +9 -13
- package/src/annotation/SVGAnnotationLayer.svelte +47 -20
- package/src/annotation/SVGAnnotationLayerPointerEvent.ts +1 -1
- package/src/annotation/editors/editorsRegistry.ts +2 -2
- package/src/annotation/shapes/Ellipse.svelte +1 -1
- package/src/annotation/shapes/Polygon.svelte +1 -1
- package/src/annotation/shapes/Rectangle.svelte +1 -1
- package/src/annotation/utils/styling.ts +14 -8
- package/src/annotation/utils/touch.ts +4 -4
- package/src/model/w3c/W3CImageFormatAdapter.ts +29 -13
- package/src/state/ImageAnnotatorState.ts +1 -2
- package/src/state/spatialTree.ts +10 -4
- package/src/themes/dark/index.css +1 -1
- package/dist/Annotorious.d.ts.map +0 -1
- package/dist/AnnotoriousOpts.d.ts.map +0 -1
- package/dist/annotation/SVGAnnotationLayerPointerEvent.d.ts.map +0 -1
- package/dist/annotation/Transform.d.ts.map +0 -1
- package/dist/annotation/editors/editorsRegistry.d.ts.map +0 -1
- package/dist/annotation/editors/index.d.ts.map +0 -1
- package/dist/annotation/editors/polygon/index.d.ts.map +0 -1
- package/dist/annotation/editors/rectangle/index.d.ts.map +0 -1
- package/dist/annotation/index.d.ts.map +0 -1
- package/dist/annotation/shapes/index.d.ts.map +0 -1
- package/dist/annotation/tools/DrawingToolConfig.d.ts.map +0 -1
- package/dist/annotation/tools/drawingToolsRegistry.d.ts.map +0 -1
- package/dist/annotation/tools/index.d.ts.map +0 -1
- package/dist/annotation/tools/polygon/index.d.ts.map +0 -1
- package/dist/annotation/tools/rectangle/index.d.ts.map +0 -1
- package/dist/annotation/utils/index.d.ts.map +0 -1
- package/dist/annotation/utils/math.d.ts.map +0 -1
- package/dist/annotation/utils/responsive.d.ts.map +0 -1
- package/dist/annotation/utils/styling.d.ts.map +0 -1
- package/dist/annotation/utils/touch.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/keyboardCommands.d.ts.map +0 -1
- package/dist/model/core/ImageAnnotation.d.ts.map +0 -1
- package/dist/model/core/Shape.d.ts.map +0 -1
- package/dist/model/core/ellipse/Ellipse.d.ts.map +0 -1
- package/dist/model/core/ellipse/ellipseUtils.d.ts.map +0 -1
- package/dist/model/core/ellipse/index.d.ts.map +0 -1
- package/dist/model/core/index.d.ts.map +0 -1
- package/dist/model/core/polygon/Polygon.d.ts.map +0 -1
- package/dist/model/core/polygon/index.d.ts.map +0 -1
- package/dist/model/core/polygon/polygonUtils.d.ts.map +0 -1
- package/dist/model/core/rectangle/Rectangle.d.ts.map +0 -1
- package/dist/model/core/rectangle/index.d.ts.map +0 -1
- package/dist/model/core/rectangle/rectangleUtils.d.ts.map +0 -1
- package/dist/model/core/shapeUtils.d.ts.map +0 -1
- package/dist/model/index.d.ts.map +0 -1
- package/dist/model/w3c/W3CImageAnnotation.d.ts.map +0 -1
- package/dist/model/w3c/W3CImageFormatAdapter.d.ts.map +0 -1
- package/dist/model/w3c/fragment/FragmentSelector.d.ts.map +0 -1
- package/dist/model/w3c/fragment/index.d.ts.map +0 -1
- package/dist/model/w3c/index.d.ts.map +0 -1
- package/dist/model/w3c/svg/SVG.d.ts.map +0 -1
- package/dist/model/w3c/svg/SVGSelector.d.ts.map +0 -1
- package/dist/model/w3c/svg/index.d.ts.map +0 -1
- package/dist/state/ImageAnnotationStore.d.ts.map +0 -1
- package/dist/state/ImageAnnotatorState.d.ts.map +0 -1
- package/dist/state/index.d.ts.map +0 -1
- package/dist/state/spatialTree.d.ts.map +0 -1
- package/dist/themes/index.d.ts.map +0 -1
- package/dist/themes/smart/index.d.ts.map +0 -1
- package/dist/themes/smart/setTheme.d.ts.map +0 -1
package/dist/Annotorious.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { DrawingTool } from './annotation/tools';
|
|
|
4
4
|
import { DrawingToolOpts } from './annotation';
|
|
5
5
|
import { ImageAnnotation, ShapeType } from './model';
|
|
6
6
|
import { Theme, AnnotoriousOpts } from './AnnotoriousOpts';
|
|
7
|
-
|
|
8
7
|
export interface ImageAnnotator<E extends unknown = ImageAnnotation> extends Annotator<ImageAnnotation, E> {
|
|
8
|
+
element: HTMLDivElement;
|
|
9
9
|
listDrawingTools(): string[];
|
|
10
10
|
registerDrawingTool(name: string, tool: typeof SvelteComponent, opts?: DrawingToolOpts): void;
|
|
11
11
|
registerShapeEditor(shapeType: ShapeType, editor: typeof SvelteComponent): void;
|
|
@@ -14,4 +14,3 @@ export interface ImageAnnotator<E extends unknown = ImageAnnotation> extends Ann
|
|
|
14
14
|
setTheme(theme: Theme): void;
|
|
15
15
|
}
|
|
16
16
|
export declare const createImageAnnotator: <E extends unknown = ImageAnnotation>(image: string | HTMLImageElement | HTMLCanvasElement, options?: AnnotoriousOpts<ImageAnnotation, E>) => ImageAnnotator<E>;
|
|
17
|
-
//# sourceMappingURL=Annotorious.d.ts.map
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { Annotation, DrawingStyleExpression, FormatAdapter,
|
|
1
|
+
import { Annotation, DrawingStyleExpression, FormatAdapter, UserSelectActionExpression } from '@annotorious/core';
|
|
2
2
|
import { ImageAnnotation } from './model';
|
|
3
|
-
|
|
4
3
|
export interface AnnotoriousOpts<I extends Annotation = ImageAnnotation, E extends unknown = ImageAnnotation> {
|
|
5
4
|
adapter?: FormatAdapter<I, E>;
|
|
6
5
|
autoSave?: boolean;
|
|
7
6
|
drawingEnabled?: boolean;
|
|
8
7
|
drawingMode?: DrawingMode;
|
|
9
|
-
|
|
8
|
+
userSelectAction?: UserSelectActionExpression<I>;
|
|
10
9
|
style?: DrawingStyleExpression<ImageAnnotation>;
|
|
11
10
|
theme?: Theme;
|
|
12
11
|
}
|
|
13
12
|
export type DrawingMode = 'click' | 'drag';
|
|
14
13
|
export type Theme = 'dark' | 'light' | 'auto';
|
|
15
14
|
export declare const fillDefaults: <I extends ImageAnnotation = ImageAnnotation, E extends unknown = ImageAnnotation>(opts: AnnotoriousOpts<I, E>, defaults: AnnotoriousOpts<I, E>) => AnnotoriousOpts<I, E>;
|
|
16
|
-
//# sourceMappingURL=AnnotoriousOpts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SvelteImageAnnotationStore } from '../state';
|
|
2
2
|
import { ImageAnnotation } from '../model';
|
|
3
|
-
|
|
4
3
|
export interface SVGAnnotationLayerPointerEvent {
|
|
5
4
|
originalEvent: PointerEvent;
|
|
6
5
|
annotation?: ImageAnnotation;
|
|
@@ -9,4 +8,4 @@ export declare const addEventListeners: (svg: SVGSVGElement, store: SvelteImageA
|
|
|
9
8
|
onPointerDown: () => number;
|
|
10
9
|
onPointerUp: (evt: PointerEvent) => void;
|
|
11
10
|
};
|
|
12
|
-
|
|
11
|
+
export declare const getSVGPoint: (evt: PointerEvent, svg: SVGSVGElement) => DOMPoint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { ShapeType, Shape } from '../../model';
|
|
2
2
|
import { SvelteComponent } from 'svelte';
|
|
3
|
-
|
|
4
3
|
export declare const getEditor: (shape: Shape) => typeof SvelteComponent | undefined;
|
|
5
4
|
export declare const registerEditor: (shapeType: ShapeType, editor: typeof SvelteComponent) => Map<ShapeType, typeof SvelteComponent>;
|
|
6
|
-
//# sourceMappingURL=editorsRegistry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SvelteComponent } from 'svelte';
|
|
2
2
|
import { DrawingMode } from '../../AnnotoriousOpts';
|
|
3
|
-
|
|
4
3
|
export type DrawingTool = 'rectangle' | 'polygon' | string;
|
|
5
4
|
export type DrawingToolOpts = {
|
|
6
5
|
drawingMode?: DrawingMode;
|
|
@@ -15,4 +14,3 @@ export declare const registerTool: (name: string, tool: typeof SvelteComponent,
|
|
|
15
14
|
tool: typeof SvelteComponent;
|
|
16
15
|
opts?: DrawingToolOpts;
|
|
17
16
|
}>;
|
|
18
|
-
//# sourceMappingURL=drawingToolsRegistry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SvelteComponent as default } from 'svelte';
|
|
@@ -2,4 +2,3 @@ export declare const enableResponsive: (image: HTMLImageElement | HTMLCanvasElem
|
|
|
2
2
|
destroy: () => void;
|
|
3
3
|
subscribe: (this: void, run: import('svelte/store').Subscriber<number>, invalidate?: import('svelte/store').Invalidator<number> | undefined) => import('svelte/store').Unsubscriber;
|
|
4
4
|
};
|
|
5
|
-
//# sourceMappingURL=responsive.d.ts.map
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { DrawingStyleExpression } from '@annotorious/core';
|
|
2
2
|
import { ImageAnnotation } from '../../model';
|
|
3
|
-
|
|
4
3
|
export declare const computeStyle: (annotation: ImageAnnotation, style?: DrawingStyleExpression<ImageAnnotation>) => string | undefined;
|
|
5
|
-
//# sourceMappingURL=styling.d.ts.map
|
package/dist/annotorious.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.a9s-touch-halo.svelte-1sgkh33{fill:transparent;stroke-width:0}.a9s-touch-halo.touched.svelte-1sgkh33{fill:#ffffff40}.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.hidden{display: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-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-handle.a9s-corner-handle-topleft{cursor:nw-resize}.a9s-handle.a9s-corner-handle-topright{cursor:ne-resize}.a9s-handle.a9s-corner-handle-bottomright{cursor:se-resize}.a9s-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-handle,div[data-theme=dark] rect.a9s-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-handle,div[data-theme=light] rect.a9s-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}
|
|
1
|
+
.a9s-touch-halo.svelte-1sgkh33{fill:transparent;stroke-width:0}.a9s-touch-halo.touched.svelte-1sgkh33{fill:#ffffff40}.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.hidden{display:none}.a9s-annotationlayer .a9s-annotation{cursor:pointer}.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-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-handle.a9s-corner-handle-topleft{cursor:nw-resize}.a9s-handle.a9s-corner-handle-topright{cursor:ne-resize}.a9s-handle.a9s-corner-handle-bottomright{cursor:se-resize}.a9s-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-handle,div[data-theme=dark] rect.a9s-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-handle,div[data-theme=light] rect.a9s-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}
|