@annotorious/openseadragon 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 (39) hide show
  1. package/README.md +3 -0
  2. package/dist/Annotorious.d.ts +21 -0
  3. package/dist/Annotorious.d.ts.map +1 -0
  4. package/dist/annotation/index.d.ts +3 -0
  5. package/dist/annotation/index.d.ts.map +1 -0
  6. package/dist/annotation/pixi/PixiLayer.svelte.d.ts +1 -0
  7. package/dist/annotation/pixi/PixiLayerClickEvent.d.ts +6 -0
  8. package/dist/annotation/pixi/PixiLayerClickEvent.d.ts.map +1 -0
  9. package/dist/annotation/pixi/PixiLayerConfiguration.d.ts +14 -0
  10. package/dist/annotation/pixi/PixiLayerConfiguration.d.ts.map +1 -0
  11. package/dist/annotation/pixi/index.d.ts +4 -0
  12. package/dist/annotation/pixi/index.d.ts.map +1 -0
  13. package/dist/annotation/pixi/stageRenderer.d.ts +12 -0
  14. package/dist/annotation/pixi/stageRenderer.d.ts.map +1 -0
  15. package/dist/annotation/svg/OSDLayer.svelte.d.ts +1 -0
  16. package/dist/annotation/svg/drawing/OSDToolMount.svelte.d.ts +1 -0
  17. package/dist/annotation/svg/drawing/SVGDrawingLayer.svelte.d.ts +1 -0
  18. package/dist/annotation/svg/index.d.ts +3 -0
  19. package/dist/annotation/svg/index.d.ts.map +1 -0
  20. package/dist/annotation/svg/presence/SVGPresenceLabel.svelte.d.ts +1 -0
  21. package/dist/annotation/svg/presence/SVGPresenceLayer.svelte.d.ts +1 -0
  22. package/dist/annotation/svg/presence/shapes/PresencePolygon.svelte.d.ts +1 -0
  23. package/dist/annotation/svg/presence/shapes/PresenceRectangle.svelte.d.ts +1 -0
  24. package/dist/annotorious-openseadragon.css +1 -0
  25. package/dist/annotorious-openseadragon.es.js +21876 -0
  26. package/dist/annotorious-openseadragon.es.js.map +1 -0
  27. package/dist/annotorious-openseadragon.js +1559 -0
  28. package/dist/annotorious-openseadragon.js.map +1 -0
  29. package/dist/api/fitBounds.d.ts +13 -0
  30. package/dist/api/fitBounds.d.ts.map +1 -0
  31. package/dist/api/index.d.ts +2 -0
  32. package/dist/api/index.d.ts.map +1 -0
  33. package/dist/index.d.ts +17 -0
  34. package/dist/index.d.ts.map +1 -0
  35. package/dist/keyCommands.d.ts +4 -0
  36. package/dist/keyCommands.d.ts.map +1 -0
  37. package/dist/themes/setTheme.d.ts +3 -0
  38. package/dist/themes/setTheme.d.ts.map +1 -0
  39. package/package.json +56 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @annotorious/openseadragon
2
+
3
+ Annotorious for [OpenSeadragon](https://openseadragon.github.io/).
@@ -0,0 +1,21 @@
1
+ import type OpenSeadragon from 'openseadragon';
2
+ import type { SvelteComponent } from 'svelte';
3
+ import type { Annotator } from '@annotorious/core/src';
4
+ import type { AnnotoriousOpts, DrawingTool, DrawingToolOpts, ImageAnnotation, ShapeType } from '@annotorious/annotorious/src';
5
+ import { type FitboundsOptions } from './api';
6
+ export interface OpenSeadragonAnnotator<E extends unknown = ImageAnnotation> extends Annotator<ImageAnnotation, E> {
7
+ viewer: OpenSeadragon.Viewer;
8
+ fitBounds(arg: {
9
+ id: string;
10
+ } | string, opts?: FitboundsOptions): void;
11
+ fitBoundsWithConstraints(arg: {
12
+ id: string;
13
+ } | string, opts?: FitboundsOptions): void;
14
+ listDrawingTools(): string[];
15
+ registerDrawingTool(name: string, tool: typeof SvelteComponent, opts?: DrawingToolOpts): void;
16
+ registerShapeEditor(shapeType: ShapeType, editor: typeof SvelteComponent): void;
17
+ setDrawingTool(tool: DrawingTool): void;
18
+ setDrawingEnabled(enabled: boolean): void;
19
+ }
20
+ export declare const createOSDAnnotator: <E extends unknown = ImageAnnotation>(viewer: OpenSeadragon.Viewer, options?: AnnotoriousOpts<ImageAnnotation, E>) => OpenSeadragonAnnotator<E>;
21
+ //# sourceMappingURL=Annotorious.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Annotor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J7B,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './pixi';
2
+ export * from './svg';
3
+ //# 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,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC"}
@@ -0,0 +1 @@
1
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1,6 @@
1
+ import type { ImageAnnotation } from '@annotorious/annotorious/src';
2
+ export interface PixiLayerClickEvent {
3
+ originalEvent: PointerEvent;
4
+ annotation?: ImageAnnotation;
5
+ }
6
+ //# sourceMappingURL=PixiLayerClickEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PixiLayerClickEvent.d.ts","sourceRoot":"","sources":["../../../src/annotation/pixi/PixiLayerClickEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAEpE,MAAM,WAAW,mBAAmB;IAElC,aAAa,EAAE,YAAY,CAAC;IAE5B,UAAU,CAAC,EAAE,eAAe,CAAC;CAE9B"}
@@ -0,0 +1,14 @@
1
+ import type { DrawingStyle, ImageAnnotation } from '@annotorious/annotorious/src';
2
+ export interface PixiLayerConfiguration {
3
+ /**
4
+ * Filter functions determine whether an annotation
5
+ * should be rendered at all, or not
6
+ */
7
+ filters?: PixiLayerFilter[];
8
+ /** Determines the annotation rendering style **/
9
+ style?: DrawingStyle | ((a: ImageAnnotation) => DrawingStyle);
10
+ }
11
+ export type PixiLayerFilter = {
12
+ (annotation: ImageAnnotation): boolean;
13
+ };
14
+ //# sourceMappingURL=PixiLayerConfiguration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PixiLayerConfiguration.d.ts","sourceRoot":"","sources":["../../../src/annotation/pixi/PixiLayerConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAElF,MAAM,WAAW,sBAAsB;IAErC;;;OAGG;IACH,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;IAE5B,iDAAiD;IACjD,KAAK,CAAC,EAAE,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE,eAAe,KAAK,YAAY,CAAC,CAAC;CAE/D;AAED,MAAM,MAAM,eAAe,GAAG;IAAE,CAAC,UAAU,EAAE,eAAe,GAAG,OAAO,CAAA;CAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ export { default as PixiLayer } from './PixiLayer.svelte';
2
+ export * from './PixiLayerClickEvent';
3
+ export * from './PixiLayerConfiguration';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/annotation/pixi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC1D,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type OpenSeadragon from 'openseadragon';
2
+ import type { ImageAnnotation } from '@annotorious/annotorious/src';
3
+ import type { DrawingStyle } from '@annotorious/core';
4
+ export declare const createStage: (viewer: OpenSeadragon.Viewer, canvas: HTMLCanvasElement) => {
5
+ addAnnotation: (annotation: ImageAnnotation) => void;
6
+ redraw: () => void;
7
+ removeAnnotation: (annotation: ImageAnnotation) => void;
8
+ resize: (width: number, height: number) => void;
9
+ setStyle: (s: DrawingStyle | ((a: ImageAnnotation) => DrawingStyle)) => void;
10
+ updateAnnotation: (oldValue: ImageAnnotation, newValue: ImageAnnotation) => void;
11
+ };
12
+ //# sourceMappingURL=stageRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stageRenderer.d.ts","sourceRoot":"","sources":["../../../src/annotation/pixi/stageRenderer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,aAAa,MAAM,eAAe,CAAC;AAE/C,OAAO,KAAK,EAAW,eAAe,EAA6B,MAAM,8BAA8B,CAAC;AACxG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAsEtD,eAAO,MAAM,WAAW,WAAY,cAAc,MAAM,UAAU,iBAAiB;gCAiB9C,eAAe;;mCAuBZ,eAAe;oBAmB9B,MAAM,UAAU,MAAM;sCAKJ,eAAe,KAAK,YAAY;iCAhBrC,eAAe,YAAY,eAAe;CA+C/E,CAAA"}
@@ -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,3 @@
1
+ export { default as SVGDrawingLayer } from './drawing/SVGDrawingLayer.svelte';
2
+ export { default as SVGPresenceLayer } from './presence/SVGPresenceLayer.svelte';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/annotation/svg/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oCAAoC,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
+ export { SvelteComponentTyped as default } from 'svelte';
@@ -0,0 +1 @@
1
+ canvas.a9s-gl-canvas{height:100%;left:0;position:absolute;top:0;width:100%}canvas.a9s-gl-canvas.hover{cursor:pointer!important}svg.svelte-190cqdf.svelte-190cqdf{pointer-events:none}svg.drawing.svelte-190cqdf.svelte-190cqdf{pointer-events:all}svg.svelte-190cqdf .svelte-190cqdf{pointer-events:all}text.svelte-1rehw2p{fill:#fff;font-family:Arial,Helvetica,sans-serif;font-weight:600}rect.svelte-1rehw2p{stroke-width:1.2;vector-effect:non-scaling-stroke}polygon.svelte-fgq4n0{stroke-width:1.2;vector-effect:non-scaling-stroke}rect.svelte-gze948{stroke-width:1.2;vector-effect:non-scaling-stroke}svg.svelte-1krwc4m{position:absolute;top:0;left:0;width:100%;height:100%;outline:none;pointer-events:none}.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}