@annotorious/openseadragon 3.0.0-rc.21 → 3.0.0-rc.23

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.
@@ -1,9 +1,9 @@
1
- import type OpenSeadragon from 'openseadragon';
2
- import type { SvelteComponent } from 'svelte';
3
- import type { Annotator } from '@annotorious/core';
4
- import type { AnnotoriousOpts, DrawingTool, DrawingToolOpts, ImageAnnotation, ShapeType } from '@annotorious/annotorious';
5
- import { type FitboundsOptions } from './api';
6
- import '@annotorious/annotorious/annotorious.css';
1
+ import { FitboundsOptions } from './api';
2
+ import { AnnotoriousOpts, DrawingTool, DrawingToolOpts, ImageAnnotation, ShapeType } from '@annotorious/annotorious';
3
+ import { Annotator } from '@annotorious/core';
4
+ import { SvelteComponent } from 'svelte';
5
+ import { default as OpenSeadragon } from 'openseadragon';
6
+
7
7
  export interface OpenSeadragonAnnotator<E extends unknown = ImageAnnotation> extends Annotator<ImageAnnotation, E> {
8
8
  viewer: OpenSeadragon.Viewer;
9
9
  fitBounds(arg: {
@@ -1 +1 @@
1
- {"version":3,"file":"Annotorious.d.ts","sourceRoot":"","sources":["../src/Annotorious.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAQ9C,OAAO,KAAK,EACV,SAAS,EAKV,MAAM,mBAAmB,CAAC;AAW3B,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,eAAe,EACf,eAAe,EACf,SAAS,EAEV,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,OAAO,CAAC;AAEf,OAAO,0CAA0C,CAAC;AAElD,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,OAAO,GAAG,eAAe,CAAE,SAAQ,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC;IAEhH,MAAM,EAAE,aAAa,CAA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AEf,OAAO,0CAA0C,CAAC;AAElD,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,OAAO,GAAG,eAAe,CAAE,SAAQ,SAAS,CAAC,eAAe,EAAE,CAAC,CAAC;IAEhH,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC;IAE7B,SAAS,CAAC,GAAG,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAEvE,wBAAwB,CAAC,GAAG,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAEtF,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,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;CAElD;AAED,eAAO,MAAM,kBAAkB,gDACrB,cAAc,MAAM,YACnB,gBAAgB,eAAe,EAAE,CAAC,CAAC,KAC3C,uBAAuB,CAAC,CA8K1B,CAAA"}
@@ -1,4 +1,5 @@
1
- import type { ImageAnnotation } from '@annotorious/annotorious/src';
1
+ import { ImageAnnotation } from '@annotorious/annotorious/src';
2
+
2
3
  export interface PixiLayerClickEvent {
3
4
  originalEvent: PointerEvent;
4
5
  annotation?: ImageAnnotation;
@@ -1,4 +1,5 @@
1
- import type { DrawingStyle, ImageAnnotation } from '@annotorious/annotorious/src';
1
+ import { DrawingStyle, ImageAnnotation } from '@annotorious/annotorious/src';
2
+
2
3
  export interface PixiLayerConfiguration {
3
4
  /**
4
5
  * Filter functions determine whether an annotation
@@ -1,15 +1,18 @@
1
- import type OpenSeadragon from 'openseadragon';
2
- import type { DrawingStyle, Filter, Selection } from '@annotorious/core';
3
- import type { ImageAnnotation } from '@annotorious/annotorious';
1
+ import { ImageAnnotation } from '@annotorious/annotorious';
2
+ import { AnnotationState, DrawingStyleExpression, Filter, Selection } from '@annotorious/core';
3
+ import { default as OpenSeadragon } from 'openseadragon';
4
+
4
5
  export declare const createStage: (viewer: OpenSeadragon.Viewer, canvas: HTMLCanvasElement) => {
5
- addAnnotation: (annotation: ImageAnnotation) => void;
6
+ addAnnotation: (annotation: ImageAnnotation, state?: AnnotationState) => void;
6
7
  destroy: () => void;
7
8
  redraw: () => void;
8
9
  removeAnnotation: (annotation: ImageAnnotation) => void;
9
10
  resize: (width: number, height: number) => void;
10
11
  setFilter: (filter?: Filter<ImageAnnotation>) => void;
12
+ setHovered: (annotationId?: string) => void;
11
13
  setSelected: (selection: Selection) => void;
12
- setStyle: (s: DrawingStyle | ((a: ImageAnnotation) => DrawingStyle) | undefined) => void;
13
- updateAnnotation: (oldValue: ImageAnnotation, newValue: ImageAnnotation) => void;
14
+ setStyle: (s?: DrawingStyleExpression<ImageAnnotation>) => void;
15
+ setVisible: (visible: boolean) => void;
16
+ updateAnnotation: (oldValue: ImageAnnotation, newValue: ImageAnnotation, state?: AnnotationState) => void;
14
17
  };
15
18
  //# sourceMappingURL=stageRenderer.d.ts.map
@@ -1 +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,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,KAAK,EAAW,eAAe,EAA6B,MAAM,0BAA0B,CAAC;AAsJpG,eAAO,MAAM,WAAW,WAAY,cAAc,MAAM,UAAU,iBAAiB;gCAwB9C,eAAe;;;mCAwBZ,eAAe;oBAwB9B,MAAM,UAAU,MAAM;yBAKjB,OAAO,eAAe,CAAC;6BAwBnB,SAAS;sCAKA,eAAe,KAAK,YAAY;iCAjDrC,eAAe,YAAY,eAAe;CAqG/E,CAAA"}
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,EAAE,eAAe,EAAgB,sBAAsB,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAClH,OAAO,KAAK,EAAW,eAAe,EAA6B,MAAM,0BAA0B,CAAC;AAsJpG,eAAO,MAAM,WAAW,WAAY,cAAc,MAAM,UAAU,iBAAiB;gCA2B9C,eAAe,UAAU,eAAe;;;mCAwBrC,eAAe;oBAmC9B,MAAM,UAAU,MAAM;yBAKjB,OAAO,eAAe,CAAC;gCAwBhB,MAAM;6BAgBT,SAAS;mBAiBnB,uBAAuB,eAAe,CAAC;0BAsChC,OAAO;iCA9HA,eAAe,YAAY,eAAe,UAAU,eAAe;CAqJxG,CAAA"}
@@ -1 +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-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 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
+ canvas.a9s-gl-canvas{height:100%;left:0;position:absolute;top:0;width:100%}canvas.a9s-gl-canvas.hidden{display:none}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-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}