@annotorious/annotorious 3.0.0-rc.3 → 3.0.0-rc.31

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 (93) hide show
  1. package/dist/Annotorious.d.ts +10 -7
  2. package/dist/Annotorious.d.ts.map +1 -1
  3. package/dist/AnnotoriousOpts.d.ts +8 -6
  4. package/dist/AnnotoriousOpts.d.ts.map +1 -1
  5. package/dist/annotation/SVGAnnotationLayerPointerEvent.d.ts +4 -2
  6. package/dist/annotation/SVGAnnotationLayerPointerEvent.d.ts.map +1 -1
  7. package/dist/annotation/editors/Handle.svelte.d.ts +1 -0
  8. package/dist/annotation/editors/editorsRegistry.d.ts +4 -3
  9. package/dist/annotation/editors/editorsRegistry.d.ts.map +1 -1
  10. package/dist/annotation/editors/index.d.ts +1 -1
  11. package/dist/annotation/editors/index.d.ts.map +1 -1
  12. package/dist/annotation/tools/DrawingToolConfig.d.ts +2 -1
  13. package/dist/annotation/tools/drawingToolsRegistry.d.ts +5 -4
  14. package/dist/annotation/tools/drawingToolsRegistry.d.ts.map +1 -1
  15. package/dist/annotation/utils/responsive.d.ts +1 -1
  16. package/dist/annotation/utils/styling.d.ts +4 -3
  17. package/dist/annotation/utils/styling.d.ts.map +1 -1
  18. package/dist/annotation/utils/touch.d.ts.map +1 -1
  19. package/dist/annotorious.css +1 -1
  20. package/dist/annotorious.es.js +2540 -2178
  21. package/dist/annotorious.es.js.map +1 -1
  22. package/dist/annotorious.js +1 -1
  23. package/dist/annotorious.js.map +1 -1
  24. package/dist/index.d.ts +1 -7
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/keyboardCommands.d.ts +3 -2
  27. package/dist/keyboardCommands.d.ts.map +1 -1
  28. package/dist/model/core/ImageAnnotation.d.ts +3 -2
  29. package/dist/model/core/Shape.d.ts +2 -1
  30. package/dist/model/core/ellipse/Ellipse.d.ts +2 -1
  31. package/dist/model/core/polygon/Polygon.d.ts +2 -1
  32. package/dist/model/core/rectangle/Rectangle.d.ts +2 -1
  33. package/dist/model/core/rectangle/rectangleUtils.d.ts +3 -2
  34. package/dist/model/core/shapeUtils.d.ts +3 -5
  35. package/dist/model/core/shapeUtils.d.ts.map +1 -1
  36. package/dist/model/w3c/W3CImageAnnotation.d.ts +12 -0
  37. package/dist/model/w3c/W3CImageAnnotation.d.ts.map +1 -0
  38. package/dist/model/w3c/W3CImageFormatAdapter.d.ts +12 -6
  39. package/dist/model/w3c/W3CImageFormatAdapter.d.ts.map +1 -1
  40. package/dist/model/w3c/fragment/FragmentSelector.d.ts +3 -3
  41. package/dist/model/w3c/fragment/FragmentSelector.d.ts.map +1 -1
  42. package/dist/model/w3c/index.d.ts +1 -0
  43. package/dist/model/w3c/index.d.ts.map +1 -1
  44. package/dist/model/w3c/svg/SVG.d.ts.map +1 -1
  45. package/dist/model/w3c/svg/SVGSelector.d.ts +3 -3
  46. package/dist/model/w3c/svg/SVGSelector.d.ts.map +1 -1
  47. package/dist/state/ImageAnnotationStore.d.ts +3 -2
  48. package/dist/state/ImageAnnotatorState.d.ts +5 -4
  49. package/dist/state/ImageAnnotatorState.d.ts.map +1 -1
  50. package/dist/state/spatialTree.d.ts +3 -2
  51. package/dist/state/spatialTree.d.ts.map +1 -1
  52. package/dist/themes/smart/setTheme.d.ts +4 -1
  53. package/dist/themes/smart/setTheme.d.ts.map +1 -1
  54. package/package.json +16 -16
  55. package/src/Annotorious.css +9 -5
  56. package/src/Annotorious.ts +52 -36
  57. package/src/AnnotoriousOpts.ts +16 -15
  58. package/src/annotation/SVGAnnotationLayer.svelte +71 -36
  59. package/src/annotation/SVGAnnotationLayerPointerEvent.ts +2 -3
  60. package/src/annotation/Transform.ts +1 -1
  61. package/src/annotation/editors/Editor.svelte +10 -11
  62. package/src/annotation/editors/EditorMount.svelte +3 -3
  63. package/src/annotation/editors/Handle.svelte +66 -0
  64. package/src/annotation/editors/editorsRegistry.ts +2 -2
  65. package/src/annotation/editors/index.ts +2 -2
  66. package/src/annotation/editors/polygon/PolygonEditor.svelte +16 -16
  67. package/src/annotation/editors/rectangle/RectangleEditor.svelte +46 -43
  68. package/src/annotation/shapes/Ellipse.svelte +3 -3
  69. package/src/annotation/shapes/Polygon.svelte +3 -3
  70. package/src/annotation/shapes/Rectangle.svelte +3 -3
  71. package/src/annotation/tools/ToolMount.svelte +3 -3
  72. package/src/annotation/tools/drawingToolsRegistry.ts +2 -1
  73. package/src/annotation/tools/polygon/RubberbandPolygon.svelte +40 -13
  74. package/src/annotation/tools/rectangle/RubberbandRectangle.svelte +27 -11
  75. package/src/annotation/utils/responsive.ts +1 -1
  76. package/src/annotation/utils/styling.ts +5 -2
  77. package/src/annotation/utils/touch.ts +4 -1
  78. package/src/index.ts +22 -16
  79. package/src/keyboardCommands.ts +11 -7
  80. package/src/model/w3c/W3CImageAnnotation.ts +17 -0
  81. package/src/model/w3c/W3CImageFormatAdapter.ts +79 -31
  82. package/src/model/w3c/fragment/FragmentSelector.ts +5 -6
  83. package/src/model/w3c/index.ts +1 -0
  84. package/src/model/w3c/svg/SVG.ts +1 -2
  85. package/src/model/w3c/svg/SVGSelector.ts +11 -13
  86. package/src/state/ImageAnnotatorState.ts +4 -5
  87. package/src/state/spatialTree.ts +13 -6
  88. package/src/themes/dark/index.css +2 -2
  89. package/src/themes/light/index.css +2 -2
  90. package/src/themes/smart/setTheme.ts +10 -6
  91. package/dist/annotation/editors/Handle.d.ts +0 -14
  92. package/dist/annotation/editors/Handle.d.ts.map +0 -1
  93. package/src/annotation/editors/Handle.ts +0 -21
@@ -1,15 +1,18 @@
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';
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
+
7
8
  export interface ImageAnnotator<E extends unknown = ImageAnnotation> extends Annotator<ImageAnnotation, E> {
9
+ element: HTMLDivElement;
8
10
  listDrawingTools(): string[];
9
11
  registerDrawingTool(name: string, tool: typeof SvelteComponent, opts?: DrawingToolOpts): void;
10
12
  registerShapeEditor(shapeType: ShapeType, editor: typeof SvelteComponent): void;
11
- setDrawingTool(tool: DrawingTool): void;
13
+ setDrawingTool(name: DrawingTool): void;
12
14
  setDrawingEnabled(enabled: boolean): void;
15
+ setTheme(theme: Theme): void;
13
16
  }
14
17
  export declare const createImageAnnotator: <E extends unknown = ImageAnnotation>(image: string | HTMLImageElement | HTMLCanvasElement, options?: AnnotoriousOpts<ImageAnnotation, E>) => ImageAnnotator<E>;
15
18
  //# sourceMappingURL=Annotorious.d.ts.map
@@ -1 +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,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;AAI1D,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;CAE3C;AAED,eAAO,MAAM,oBAAoB,+CACxB,MAAM,GAAG,gBAAgB,GAAG,iBAAiB,qEAqIrD,CAAA"}
1
+ {"version":3,"file":"Annotorious.d.ts","sourceRoot":"","sources":["../src/Annotorious.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,KAAK,EAAE,SAAS,EAAwC,MAAM,mBAAmB,CAAC;AAGzF,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,OAAO,EAAE,cAAc,CAAC;IAExB,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,GAAI,CAAC,SAAS,OAAO,2BAC7C,MAAM,GAAG,gBAAgB,GAAG,iBAAiB,YAC3C,eAAe,CAAC,eAAe,EAAE,CAAC,CAAC,KAC3C,cAAc,CAAC,CAAC,CA8IlB,CAAA"}
@@ -1,14 +1,16 @@
1
- import { PointerSelectAction } from '@annotorious/core';
2
- import type { Annotation, DrawingStyle, FormatAdapter } from '@annotorious/core';
3
- import type { ImageAnnotation } from './model';
1
+ import { Annotation, DrawingStyleExpression, FormatAdapter, UserSelectActionExpression } from '@annotorious/core';
2
+ import { ImageAnnotation } from './model';
3
+
4
4
  export interface AnnotoriousOpts<I extends Annotation = ImageAnnotation, E extends unknown = ImageAnnotation> {
5
5
  adapter?: FormatAdapter<I, E>;
6
6
  autoSave?: boolean;
7
7
  drawingEnabled?: boolean;
8
8
  drawingMode?: DrawingMode;
9
- pointerSelectAction?: PointerSelectAction | ((a: I) => PointerSelectAction);
10
- style?: DrawingStyle | ((annotation: I) => DrawingStyle);
9
+ userSelectAction?: UserSelectActionExpression<I>;
10
+ style?: DrawingStyleExpression<ImageAnnotation>;
11
+ theme?: Theme;
11
12
  }
12
13
  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
+ export type Theme = 'dark' | 'light' | 'auto';
15
+ export declare const fillDefaults: <I extends ImageAnnotation = ImageAnnotation, E extends unknown = ImageAnnotation>(opts: AnnotoriousOpts<I, E>, defaults: AnnotoriousOpts<I, E>) => AnnotoriousOpts<I, E>;
14
16
  //# sourceMappingURL=AnnotoriousOpts.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"AnnotoriousOpts.d.ts","sourceRoot":"","sources":["../src/AnnotoriousOpts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,sBAAsB,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACvH,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,gBAAgB,CAAC,EAAE,0BAA0B,CAAC,CAAC,CAAC,CAAC;IAEjD,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,GAAI,CAAC,SAAS,eAAe,oBAAoB,CAAC,SAAS,OAAO,0BACnF,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,YACjB,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,KAC9B,eAAe,CAAC,CAAC,EAAE,CAAC,CAMrB,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;
@@ -8,4 +9,5 @@ export declare const addEventListeners: (svg: SVGSVGElement, store: SvelteImageA
8
9
  onPointerDown: () => number;
9
10
  onPointerUp: (evt: PointerEvent) => void;
10
11
  };
12
+ export declare const getSVGPoint: (evt: PointerEvent, svg: SVGSVGElement) => DOMPoint;
11
13
  //# sourceMappingURL=SVGAnnotationLayerPointerEvent.d.ts.map
@@ -1 +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"}
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;AAEhD,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;AAED,eAAO,MAAM,WAAW,QAAS,YAAY,OAAO,aAAa,aAYhE,CAAA"}
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -1,5 +1,6 @@
1
- import { ShapeType, type Shape } from '../../model';
2
- import type { SvelteComponent } from 'svelte';
3
- export declare const getEditor: (shape: Shape) => typeof SvelteComponent;
1
+ import { ShapeType, Shape } from '../../model';
2
+ import { SvelteComponent } from 'svelte';
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 +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"}
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,uCAA+B,CAAC;AAEtE,eAAO,MAAM,cAAc,cAAe,SAAS,UAAU,OAAO,eAAe,2CAChD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  export * from './polygon';
2
2
  export * from './rectangle';
3
3
  export * from './editorsRegistry';
4
- export * from './Handle';
5
4
  export { default as Editor } from './Editor.svelte';
6
5
  export { default as EditorMount } from './EditorMount.svelte';
6
+ export { default as Handle } from './Handle.svelte';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
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;AAElC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,iBAAiB,CAAC"}
@@ -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,15 +1,16 @@
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;
6
- [key: string]: string;
7
+ [key: string]: any;
7
8
  };
8
9
  export declare const listDrawingTools: () => string[];
9
10
  export declare const getTool: (name: string) => {
10
11
  tool: typeof SvelteComponent;
11
12
  opts?: DrawingToolOpts;
12
- };
13
+ } | undefined;
13
14
  export declare const registerTool: (name: string, tool: typeof SvelteComponent, opts?: DrawingToolOpts) => Map<string, {
14
15
  tool: typeof SvelteComponent;
15
16
  opts?: DrawingToolOpts;
@@ -1 +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"}
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,GAAG,CAAC;CAEpB,CAAA;AAQD,eAAO,MAAM,gBAAgB,gBAA+B,CAAC;AAE7D,eAAO,MAAM,OAAO,SAAU,MAAM;UAPY,OAAO,eAAe;WAAS,eAAe;aAOjC,CAAC;AAE9D,eAAO,MAAM,YAAY,SAAU,MAAM,QAAQ,OAAO,eAAe,SAAS,eAAe;UAT/C,OAAO,eAAe;WAAS,eAAe;EAUxD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export declare const enableResponsive: (image: HTMLImageElement | HTMLCanvasElement, svg: SVGSVGElement) => {
2
2
  destroy: () => void;
3
- subscribe: (this: void, run: import("svelte/store").Subscriber<number>, invalidate?: (value?: number) => void) => import("svelte/store").Unsubscriber;
3
+ subscribe: (this: void, run: import('svelte/store').Subscriber<number>, invalidate?: import('svelte/store').Invalidator<number> | undefined) => import('svelte/store').Unsubscriber;
4
4
  };
5
5
  //# sourceMappingURL=responsive.d.ts.map
@@ -1,4 +1,5 @@
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;
1
+ import { DrawingStyleExpression } from '@annotorious/core';
2
+ import { ImageAnnotation } from '../../model';
3
+
4
+ export declare const computeStyle: (annotation: ImageAnnotation, style?: DrawingStyleExpression<ImageAnnotation>) => string | undefined;
4
5
  //# sourceMappingURL=styling.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"styling.d.ts","sourceRoot":"","sources":["../../../src/annotation/utils/styling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,YAAY,eACX,eAAe,UACnB,sBAAsB,CAAC,eAAe,CAAC,uBAgBhD,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"touch.d.ts","sourceRoot":"","sources":["../../../src/annotation/utils/touch.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SAA2D,CAAC"}
1
+ {"version":3,"file":"touch.d.ts","sourceRoot":"","sources":["../../../src/annotation/utils/touch.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,SAGe,CAAC"}
@@ -1 +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}
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}