@annotorious/annotorious 3.0.0-rc.22 → 3.0.0-rc.24

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 (32) hide show
  1. package/dist/Annotorious.d.ts +7 -10
  2. package/dist/AnnotoriousOpts.d.ts +4 -3
  3. package/dist/AnnotoriousOpts.d.ts.map +1 -1
  4. package/dist/annotation/SVGAnnotationLayerPointerEvent.d.ts +3 -2
  5. package/dist/annotation/editors/editorsRegistry.d.ts +3 -2
  6. package/dist/annotation/tools/DrawingToolConfig.d.ts +2 -1
  7. package/dist/annotation/tools/drawingToolsRegistry.d.ts +3 -2
  8. package/dist/annotation/utils/responsive.d.ts +1 -1
  9. package/dist/annotation/utils/styling.d.ts +3 -2
  10. package/dist/annotorious.es.js +1738 -1714
  11. package/dist/annotorious.es.js.map +1 -1
  12. package/dist/annotorious.js +1 -1
  13. package/dist/annotorious.js.map +1 -1
  14. package/dist/keyboardCommands.d.ts +2 -1
  15. package/dist/model/core/ImageAnnotation.d.ts +3 -2
  16. package/dist/model/core/Shape.d.ts +2 -1
  17. package/dist/model/core/ellipse/Ellipse.d.ts +2 -1
  18. package/dist/model/core/polygon/Polygon.d.ts +2 -1
  19. package/dist/model/core/rectangle/Rectangle.d.ts +2 -1
  20. package/dist/model/core/rectangle/rectangleUtils.d.ts +3 -2
  21. package/dist/model/core/shapeUtils.d.ts +2 -1
  22. package/dist/model/w3c/W3CImageAnnotation.d.ts +4 -3
  23. package/dist/model/w3c/W3CImageFormatAdapter.d.ts +4 -3
  24. package/dist/model/w3c/fragment/FragmentSelector.d.ts +2 -1
  25. package/dist/model/w3c/svg/SVGSelector.d.ts +2 -1
  26. package/dist/state/ImageAnnotationStore.d.ts +3 -2
  27. package/dist/state/ImageAnnotatorState.d.ts +5 -4
  28. package/dist/state/spatialTree.d.ts +2 -1
  29. package/dist/themes/smart/setTheme.d.ts +2 -1
  30. package/package.json +9 -9
  31. package/src/Annotorious.ts +1 -1
  32. package/src/AnnotoriousOpts.ts +2 -2
@@ -1,13 +1,10 @@
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 Theme } from './AnnotoriousOpts';
7
- import type { AnnotoriousOpts } from './AnnotoriousOpts';
8
- import './Annotorious.css';
9
- import './themes/dark/index.css';
10
- import './themes/light/index.css';
1
+ import { SvelteComponent } from 'svelte';
2
+ import { Annotator } from '@annotorious/core';
3
+ import { DrawingTool } from './annotation/tools';
4
+ import { DrawingToolOpts } from './annotation';
5
+ import { ImageAnnotation, ShapeType } from './model';
6
+ import { Theme, AnnotoriousOpts } from './AnnotoriousOpts';
7
+
11
8
  export interface ImageAnnotator<E extends unknown = ImageAnnotation> extends Annotator<ImageAnnotation, E> {
12
9
  listDrawingTools(): string[];
13
10
  registerDrawingTool(name: string, tool: typeof SvelteComponent, opts?: DrawingToolOpts): void;
@@ -1,12 +1,13 @@
1
- import type { Annotation, DrawingStyle, FormatAdapter, PointerSelectAction } from '@annotorious/core';
2
- import type { ImageAnnotation } from './model';
1
+ import { Annotation, DrawingStyleExpression, FormatAdapter, PointerSelectAction } from '@annotorious/core';
2
+ import { ImageAnnotation } from './model';
3
+
3
4
  export interface AnnotoriousOpts<I extends Annotation = ImageAnnotation, E extends unknown = ImageAnnotation> {
4
5
  adapter?: FormatAdapter<I, E>;
5
6
  autoSave?: boolean;
6
7
  drawingEnabled?: boolean;
7
8
  drawingMode?: DrawingMode;
8
9
  pointerSelectAction?: PointerSelectAction | ((a: I) => PointerSelectAction);
9
- style?: DrawingStyle | ((annotation: I) => DrawingStyle);
10
+ style?: DrawingStyleExpression<ImageAnnotation>;
10
11
  theme?: Theme;
11
12
  }
12
13
  export type DrawingMode = 'click' | 'drag';
@@ -1 +1 @@
1
- {"version":3,"file":"AnnotoriousOpts.d.ts","sourceRoot":"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W,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,sBAAsB,CAAC,eAAe,CAAC,CAAC;IAEhD,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,2FACjB,gBAAgB,CAAC,EAAE,CAAC,CAAC,YACjB,gBAAgB,CAAC,EAAE,CAAC,CAAC,KAC9B,gBAAgB,CAAC,EAAE,CAAC,CAUtB,CAAC"}
@@ -1,5 +1,6 @@
1
- import type { SvelteImageAnnotationStore } from '../state';
2
- import type { ImageAnnotation } from '../model';
1
+ import { SvelteImageAnnotationStore } from '../state';
2
+ import { ImageAnnotation } from '../model';
3
+
3
4
  export interface SVGAnnotationLayerPointerEvent {
4
5
  originalEvent: PointerEvent;
5
6
  annotation?: ImageAnnotation;
@@ -1,5 +1,6 @@
1
- import { ShapeType, type Shape } from '../../model';
2
- import type { SvelteComponent } from 'svelte';
1
+ import { ShapeType, Shape } from '../../model';
2
+ import { SvelteComponent } from 'svelte';
3
+
3
4
  export declare const getEditor: (shape: Shape) => typeof SvelteComponent | undefined;
4
5
  export declare const registerEditor: (shapeType: ShapeType, editor: typeof SvelteComponent) => Map<ShapeType, typeof SvelteComponent>;
5
6
  //# sourceMappingURL=editorsRegistry.d.ts.map
@@ -1,4 +1,5 @@
1
- import type { SvelteComponent } from 'svelte';
1
+ import { SvelteComponent } from 'svelte';
2
+
2
3
  export interface ToolConfig {
3
4
  component: typeof SvelteComponent;
4
5
  opts?: {
@@ -1,5 +1,6 @@
1
- import type { SvelteComponent } from 'svelte';
2
- import type { DrawingMode } from '../../AnnotoriousOpts';
1
+ import { SvelteComponent } from 'svelte';
2
+ import { DrawingMode } from '../../AnnotoriousOpts';
3
+
3
4
  export type DrawingTool = 'rectangle' | 'polygon' | string;
4
5
  export type DrawingToolOpts = {
5
6
  drawingMode?: DrawingMode;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="svelte" />
2
2
  export declare const enableResponsive: (image: HTMLImageElement | HTMLCanvasElement, svg: SVGSVGElement) => {
3
3
  destroy: () => void;
4
- subscribe: (this: void, run: import("svelte/store").Subscriber<number>, invalidate?: import("svelte/store").Invalidator<number> | undefined) => import("svelte/store").Unsubscriber;
4
+ subscribe: (this: void, run: import('svelte/store').Subscriber<number>, invalidate?: import('svelte/store').Invalidator<number> | undefined) => import('svelte/store').Unsubscriber;
5
5
  };
6
6
  //# sourceMappingURL=responsive.d.ts.map
@@ -1,4 +1,5 @@
1
- import type { DrawingStyleExpression } from '@annotorious/core';
2
- import type { ImageAnnotation } from '../../model';
1
+ import { DrawingStyleExpression } from '@annotorious/core';
2
+ import { ImageAnnotation } from '../../model';
3
+
3
4
  export declare const computeStyle: (annotation: ImageAnnotation, style?: DrawingStyleExpression<ImageAnnotation>) => string | undefined;
4
5
  //# sourceMappingURL=styling.d.ts.map