@annotorious/react 3.0.0-rc.9 → 3.0.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.
- package/dist/Annotorious.d.ts +14 -43
- package/dist/Annotorious.d.ts.map +1 -1
- package/dist/AnnotoriousPlugin.d.ts +12 -6
- package/dist/AnnotoriousPlugin.d.ts.map +1 -1
- package/dist/AnnotoriousPopupProps.d.ts +10 -0
- package/dist/AnnotoriousPopupProps.d.ts.map +1 -0
- package/dist/ImageAnnotationPopup.d.ts +9 -0
- package/dist/ImageAnnotationPopup.d.ts.map +1 -0
- package/dist/ImageAnnotator.d.ts +2 -3
- package/dist/ImageAnnotator.d.ts.map +1 -1
- package/dist/annotorious-react.css +1 -1
- package/dist/annotorious-react.es.js +37 -34
- package/dist/annotorious-react.es.js.map +1 -1
- package/dist/annotorious-react.es10.js +15 -35
- package/dist/annotorious-react.es10.js.map +1 -1
- package/dist/annotorious-react.es11.js +6 -16
- package/dist/annotorious-react.es11.js.map +1 -1
- package/dist/annotorious-react.es12.js +8 -4
- package/dist/annotorious-react.es12.js.map +1 -1
- package/dist/annotorious-react.es13.js +272 -8
- package/dist/annotorious-react.es13.js.map +1 -1
- package/dist/annotorious-react.es14.js +9 -153
- package/dist/annotorious-react.es14.js.map +1 -1
- package/dist/annotorious-react.es15.js +193 -6
- package/dist/annotorious-react.es15.js.map +1 -1
- package/dist/annotorious-react.es16.js +327 -22113
- package/dist/annotorious-react.es16.js.map +1 -1
- package/dist/annotorious-react.es17.js +11 -32
- package/dist/annotorious-react.es17.js.map +1 -1
- package/dist/annotorious-react.es19.js +6 -10
- package/dist/annotorious-react.es19.js.map +1 -1
- package/dist/annotorious-react.es2.js +87 -68
- package/dist/annotorious-react.es2.js.map +1 -1
- package/dist/annotorious-react.es20.js +214 -207
- package/dist/annotorious-react.es20.js.map +1 -1
- package/dist/annotorious-react.es21.js +126 -2
- package/dist/annotorious-react.es21.js.map +1 -1
- package/dist/annotorious-react.es22.js +2 -2
- package/dist/annotorious-react.es23.js +5 -0
- package/dist/annotorious-react.es23.js.map +1 -0
- package/dist/annotorious-react.es24.js +10 -0
- package/dist/annotorious-react.es24.js.map +1 -0
- package/dist/annotorious-react.es25.js +8 -0
- package/dist/annotorious-react.es25.js.map +1 -0
- package/dist/annotorious-react.es26.js +10 -0
- package/dist/annotorious-react.es26.js.map +1 -0
- package/dist/annotorious-react.es27.js +129 -0
- package/dist/annotorious-react.es27.js.map +1 -0
- package/dist/annotorious-react.es28.js +466 -0
- package/dist/annotorious-react.es28.js.map +1 -0
- package/dist/annotorious-react.es3.js +10 -11
- package/dist/annotorious-react.es3.js.map +1 -1
- package/dist/annotorious-react.es4.js +90 -12
- package/dist/annotorious-react.es4.js.map +1 -1
- package/dist/annotorious-react.es5.js +21 -20
- package/dist/annotorious-react.es5.js.map +1 -1
- package/dist/annotorious-react.es8.js +27 -80
- package/dist/annotorious-react.es8.js.map +1 -1
- package/dist/annotorious-react.es9.js +103 -26
- package/dist/annotorious-react.es9.js.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/openseadragon/OpenSeadragonAnnotationPopup.d.ts +9 -0
- package/dist/openseadragon/OpenSeadragonAnnotationPopup.d.ts.map +1 -0
- package/dist/openseadragon/OpenSeadragonAnnotator.d.ts +7 -8
- package/dist/openseadragon/OpenSeadragonAnnotator.d.ts.map +1 -1
- package/dist/openseadragon/OpenSeadragonViewer.d.ts +2 -3
- package/dist/openseadragon/OpenSeadragonViewer.d.ts.map +1 -1
- package/dist/openseadragon/index.d.ts +1 -1
- package/dist/openseadragon/index.d.ts.map +1 -1
- package/dist/openseadragon/setPosition.d.ts +1 -1
- package/dist/openseadragon/setPosition.d.ts.map +1 -1
- package/dist/utils/toClientRects.d.ts +6 -0
- package/dist/utils/toClientRects.d.ts.map +1 -0
- package/package.json +15 -13
- package/dist/AnnotoriousPopup.d.ts +0 -16
- package/dist/AnnotoriousPopup.d.ts.map +0 -1
- package/dist/annotorious-react.es6.js +0 -5
- package/dist/annotorious-react.es6.js.map +0 -1
- package/dist/annotorious-react.es7.js +0 -5
- package/dist/annotorious-react.es7.js.map +0 -1
- package/dist/openseadragon/OpenSeadragonPopup.d.ts +0 -11
- package/dist/openseadragon/OpenSeadragonPopup.d.ts.map +0 -1
package/dist/Annotorious.d.ts
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
|
+
import { StoreObserveOptions, UserSelectActionExpression } from '@annotorious/core';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
|
-
import { Annotation, Annotator,
|
|
3
|
-
interface Selection<T extends Annotation = Annotation> {
|
|
3
|
+
import { Annotation, Annotator, Selection as CoreSelection, ImageAnnotation, Store, User } from '@annotorious/annotorious';
|
|
4
|
+
interface Selection<T extends Annotation = Annotation> extends Omit<CoreSelection, 'selected'> {
|
|
4
5
|
selected: {
|
|
5
6
|
annotation: T;
|
|
6
7
|
editable?: boolean;
|
|
7
8
|
}[];
|
|
8
|
-
pointerEvent?: PointerEvent;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
11
|
-
anno: Annotator;
|
|
12
|
-
setAnno(anno: Annotator<Annotation, unknown>): void;
|
|
13
|
-
annotations: Annotation[];
|
|
14
|
-
selection: Selection;
|
|
15
|
-
}
|
|
16
|
-
export declare const AnnotoriousContext: import("react").Context<{
|
|
10
|
+
export declare const AnnotoriousContext: import('react').Context<{
|
|
17
11
|
anno: any;
|
|
18
12
|
setAnno: any;
|
|
19
13
|
annotations: any[];
|
|
@@ -21,39 +15,16 @@ export declare const AnnotoriousContext: import("react").Context<{
|
|
|
21
15
|
selected: any[];
|
|
22
16
|
};
|
|
23
17
|
}>;
|
|
24
|
-
export declare const Annotorious: import(
|
|
18
|
+
export declare const Annotorious: import('react').ForwardRefExoticComponent<{
|
|
25
19
|
children: ReactNode;
|
|
26
|
-
} & import(
|
|
27
|
-
export declare const useAnnotator: <T extends Annotator<any, unknown>>() => T;
|
|
28
|
-
export declare const useAnnotationStore: <T extends
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
bulkUpdateBodies: (bodies: import("@annotorious/core/dist/model/Annotation").AnnotationBody[], origin?: import("@annotorious/core/dist/state/StoreObserver").Origin) => void;
|
|
36
|
-
bulkUpdateTargets: (targets: import("@annotorious/core/dist/model/Annotation").AnnotationTarget[], origin?: import("@annotorious/core/dist/state/StoreObserver").Origin) => void;
|
|
37
|
-
clear: (origin?: import("@annotorious/core/dist/state/StoreObserver").Origin) => void;
|
|
38
|
-
deleteAnnotation: (annotationOrId: string | Annotation, origin?: import("@annotorious/core/dist/state/StoreObserver").Origin) => void;
|
|
39
|
-
deleteBody: (body: {
|
|
40
|
-
id: string;
|
|
41
|
-
annotation: string;
|
|
42
|
-
}, origin?: import("@annotorious/core/dist/state/StoreObserver").Origin) => void;
|
|
43
|
-
getAnnotation: (id: string) => Annotation;
|
|
44
|
-
getBody: (id: string) => import("@annotorious/core/dist/model/Annotation").AnnotationBody;
|
|
45
|
-
observe: (onChange: (event: StoreChangeEvent<Annotation>) => void, options?: import("@annotorious/core").StoreObserveOptions) => number;
|
|
46
|
-
unobserve: (onChange: (event: StoreChangeEvent<Annotation>) => void) => void;
|
|
47
|
-
updateAnnotation: (arg1: string | Annotation, arg2?: Annotation | import("@annotorious/core/dist/state/StoreObserver").Origin, arg3?: import("@annotorious/core/dist/state/StoreObserver").Origin) => void;
|
|
48
|
-
updateBody: (oldBodyId: {
|
|
49
|
-
id: string;
|
|
50
|
-
annotation: string;
|
|
51
|
-
}, newBody: import("@annotorious/core/dist/model/Annotation").AnnotationBody, origin?: import("@annotorious/core/dist/state/StoreObserver").Origin) => void;
|
|
52
|
-
updateTarget: (target: import("@annotorious/core/dist/model/Annotation").AnnotationTarget, origin?: import("@annotorious/core/dist/state/StoreObserver").Origin) => void;
|
|
53
|
-
}>() => T;
|
|
54
|
-
export declare const useAnnotations: <T extends Annotation>(debounce?: number) => T[];
|
|
55
|
-
export declare const useSelection: <T extends Annotation>() => Selection<T>;
|
|
56
|
-
export declare const useAnnotatorUser: () => any;
|
|
57
|
-
export declare const useViewportState: <T extends Annotation>(debounce?: number) => T[];
|
|
20
|
+
} & import('react').RefAttributes<Annotator<Annotation, Annotation>>>;
|
|
21
|
+
export declare const useAnnotator: <T extends unknown = Annotator<any, unknown>>() => T;
|
|
22
|
+
export declare const useAnnotationStore: <T extends unknown = Store<Annotation>>() => T | undefined;
|
|
23
|
+
export declare const useAnnotations: <T extends Annotation = ImageAnnotation>(debounce?: number) => T[];
|
|
24
|
+
export declare const useAnnotation: <T extends Annotation = ImageAnnotation>(id: string, options?: Omit<StoreObserveOptions, "annotations">) => T;
|
|
25
|
+
export declare const useAnnotationSelectAction: <T extends Annotation = ImageAnnotation>(id: string, action: UserSelectActionExpression<T>) => import('@annotorious/core').UserSelectAction;
|
|
26
|
+
export declare const useSelection: <T extends Annotation = ImageAnnotation>() => Selection<T>;
|
|
27
|
+
export declare const useAnnotatorUser: () => User;
|
|
28
|
+
export declare const useViewportState: <T extends Annotation = ImageAnnotation>(debounce?: number) => T[];
|
|
58
29
|
export {};
|
|
59
30
|
//# sourceMappingURL=Annotorious.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Annotorious.d.ts","sourceRoot":"","sources":["../src/Annotorious.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Annotorious.d.ts","sourceRoot":"","sources":["../src/Annotorious.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,0BAA0B,EAAC,MAAM,mBAAmB,CAAC;AAExF,OAAO,EAGL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,SAAS,IAAI,aAAa,EAC1B,eAAe,EACf,KAAK,EAEL,IAAI,EACL,MAAM,0BAA0B,CAAC;AAElC,UAAU,SAAS,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,CAAE,SAAQ,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC;IAE5F,QAAQ,EAAE;QAAE,UAAU,EAAE,CAAC,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;CAEnD;AAED,eAAO,MAAM,kBAAkB;;;;;;;EAU7B,CAAC;AAEH,eAAO,MAAM,WAAW;cAAqC,SAAS;qEAuEpE,CAAC;AAEH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,OAAO,iCAE7B,CAChB,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,OAAO,2BAEtB,CAAC,GAAG,SACjC,CAAA;AAYD,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,UAAU,+BAA+B,MAAM,QACf,CAAC;AAE1E,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,UAAU,wBAC5C,MAAM,YACA,IAAI,CAAC,mBAAmB,EAAE,aAAa,CAAC,MAuBnD,CAAA;AAED,eAAO,MAAM,yBAAyB,GAAI,CAAC,SAAS,UAAU,wBAAwB,MAAM,UAAU,0BAA0B,CAAC,CAAC,CAAC,iDAGlI,CAAA;AAED,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,UAAU,yBAE3B,SAAS,CAAC,CAAC,CAChC,CAAA;AAED,eAAO,MAAM,gBAAgB,QAAO,IAGnC,CAAA;AAmDD,eAAO,MAAM,gBAAgB,GAAK,CAAC,SAAS,UAAU,+BAA+B,MAAM,QACd,CAAC"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { Annotator } from '@annotorious/annotorious';
|
|
3
|
+
export type AnnotatorPlugin<T extends unknown = Annotator<any, unknown>> = (anno: T, opts?: Object) => ({
|
|
4
|
+
unmount?: () => void;
|
|
5
|
+
}) | void;
|
|
6
|
+
export interface AnnotoriousPluginProps<T extends unknown = Annotator<any, unknown>> {
|
|
7
|
+
plugin: AnnotatorPlugin<T>;
|
|
6
8
|
opts?: Object;
|
|
7
9
|
}
|
|
8
|
-
|
|
10
|
+
type PluginReturnType<T> = ReturnType<AnnotatorPlugin<T>>;
|
|
11
|
+
export declare const AnnotoriousPlugin: <T extends unknown = Annotator<any, unknown>>(props: AnnotoriousPluginProps<T> & {
|
|
12
|
+
ref?: MutableRefObject<PluginReturnType<T>>;
|
|
13
|
+
}) => any;
|
|
14
|
+
export {};
|
|
9
15
|
//# sourceMappingURL=AnnotoriousPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnnotoriousPlugin.d.ts","sourceRoot":"","sources":["../src/AnnotoriousPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AnnotoriousPlugin.d.ts","sourceRoot":"","sources":["../src/AnnotoriousPlugin.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAyB,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGrD,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,OAAO,GAAG,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC,IACrE,CAAC,IAAI,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,CAAC;IAAE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC,GAAG,IAAI,CAAC;AAEhE,MAAM,WAAW,sBAAsB,CAAC,CAAC,SAAS,OAAO,GAAG,SAAS,CAAC,GAAG,EAAE,OAAO,CAAC;IAEjF,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAE3B,IAAI,CAAC,EAAE,MAAM,CAAC;CAEf;AAED,KAAK,gBAAgB,CAAC,CAAC,IAAI,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;AAE1D,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,OAAO,mCAC1C,sBAAsB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,QA0BnF,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnnotationBody, ImageAnnotation } from '@annotorious/annotorious';
|
|
2
|
+
export interface AnnotoriousPopupProps {
|
|
3
|
+
annotation: ImageAnnotation;
|
|
4
|
+
editable?: boolean;
|
|
5
|
+
event?: PointerEvent;
|
|
6
|
+
onCreateBody(body: AnnotationBody): void;
|
|
7
|
+
onDeleteBody(id: string): void;
|
|
8
|
+
onUpdateBody(current: AnnotationBody, next: AnnotationBody): void;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=AnnotoriousPopupProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AnnotoriousPopupProps.d.ts","sourceRoot":"","sources":["../src/AnnotoriousPopupProps.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3E,MAAM,WAAW,qBAAqB;IAEpC,UAAU,EAAE,eAAe,CAAC;IAE5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,KAAK,CAAC,EAAE,YAAY,CAAC;IAErB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;IAEzC,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAE/B,YAAY,CAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CAAC;CAEnE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AnnotoriousPopupProps } from './AnnotoriousPopupProps';
|
|
3
|
+
interface ImageAnnotationPopupProps {
|
|
4
|
+
arrow?: boolean;
|
|
5
|
+
popup: (props: AnnotoriousPopupProps) => ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare const ImageAnnotationPopup: (props: ImageAnnotationPopupProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ImageAnnotationPopup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageAnnotationPopup.d.ts","sourceRoot":"","sources":["../src/ImageAnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAc/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAchE,UAAU,yBAAyB;IAEjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,KAAK,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,SAAS,CAAC;CAEpD;AAED,eAAO,MAAM,oBAAoB,UAAW,yBAAyB,4CAwGpE,CAAA"}
|
package/dist/ImageAnnotator.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { AnnotoriousOpts } from '
|
|
3
|
-
import type { DrawingStyle, DrawingTool, Filter, ImageAnnotation } from '.';
|
|
2
|
+
import { AnnotoriousOpts, DrawingTool, Filter, ImageAnnotation } from '@annotorious/annotorious';
|
|
4
3
|
export interface ImageAnnotatorProps<E extends unknown> extends AnnotoriousOpts<ImageAnnotation, E> {
|
|
5
4
|
children: ReactElement<HTMLImageElement>;
|
|
5
|
+
containerClassName?: string;
|
|
6
6
|
filter?: Filter<ImageAnnotation>;
|
|
7
|
-
style?: DrawingStyle | ((annotation: ImageAnnotation) => DrawingStyle);
|
|
8
7
|
tool?: DrawingTool;
|
|
9
8
|
}
|
|
10
9
|
export declare const ImageAnnotator: <E extends unknown>(props: ImageAnnotatorProps<E>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageAnnotator.d.ts","sourceRoot":"","sources":["../src/ImageAnnotator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,YAAY,EAAuC,MAAM,OAAO,CAAC;AACpF,OAAO,EAAE,eAAe,EAAwB,MAAM,
|
|
1
|
+
{"version":3,"file":"ImageAnnotator.d.ts","sourceRoot":"","sources":["../src/ImageAnnotator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,YAAY,EAAuC,MAAM,OAAO,CAAC;AACpF,OAAO,EAAE,eAAe,EAAwB,MAAM,0BAA0B,CAAC;AACjF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAGrF,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,OAAO,CAAE,SAAQ,eAAe,CAAC,eAAe,EAAE,CAAC,CAAC;IAEjG,QAAQ,EAAE,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAEzC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,MAAM,CAAC,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC;IAEjC,IAAI,CAAC,EAAE,WAAW,CAAC;CAEpB;AAED,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,OAAO,SAAS,mBAAmB,CAAC,CAAC,CAAC,4CAwC9E,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-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-
|
|
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 .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}
|
|
@@ -1,37 +1,40 @@
|
|
|
1
|
-
import { Annotorious as
|
|
2
|
-
import { AnnotoriousPlugin as
|
|
3
|
-
import {
|
|
4
|
-
import { ImageAnnotator as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import { Origin as
|
|
8
|
-
import {
|
|
9
|
-
import { OpenSeadragonAnnotator as
|
|
10
|
-
import {
|
|
11
|
-
import { OpenSeadragonViewer as
|
|
1
|
+
import { Annotorious as u, AnnotoriousContext as c, useAnnotation as g, useAnnotationSelectAction as S, useAnnotationStore as f, useAnnotations as x, useAnnotator as I, useAnnotatorUser as d, useSelection as l, useViewportState as y } from "./annotorious-react.es2.js";
|
|
2
|
+
import { AnnotoriousPlugin as O } from "./annotorious-react.es3.js";
|
|
3
|
+
import { ImageAnnotationPopup as h } from "./annotorious-react.es4.js";
|
|
4
|
+
import { ImageAnnotator as F } from "./annotorious-react.es5.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { Origin as V, UserSelectAction as W, createAnonymousGuest as $, createBody as U, defaultColorProvider as v } from "@annotorious/core";
|
|
8
|
+
import { createImageAnnotator as o, ShapeType as e, W3CImageFormat as t } from "@annotorious/annotorious";
|
|
9
|
+
import { OpenSeadragonAnnotator as G, useViewer as b } from "./annotorious-react.es8.js";
|
|
10
|
+
import { OpenSeadragonAnnotationPopup as k } from "./annotorious-react.es9.js";
|
|
11
|
+
import { OpenSeadragonViewer as z } from "./annotorious-react.es10.js";
|
|
12
|
+
const p = o, m = e, s = t;
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
G as
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
14
|
+
u as Annotorious,
|
|
15
|
+
c as AnnotoriousContext,
|
|
16
|
+
O as AnnotoriousPlugin,
|
|
17
|
+
h as ImageAnnotationPopup,
|
|
18
|
+
F as ImageAnnotator,
|
|
19
|
+
k as OpenSeadragonAnnotationPopup,
|
|
20
|
+
G as OpenSeadragonAnnotator,
|
|
21
|
+
z as OpenSeadragonViewer,
|
|
22
|
+
V as Origin,
|
|
23
|
+
m as ShapeType,
|
|
24
|
+
W as UserSelectAction,
|
|
25
|
+
s as W3CImageFormat,
|
|
26
|
+
$ as createAnonymousGuest,
|
|
27
|
+
U as createBody,
|
|
28
|
+
p as createImageAnnotator,
|
|
29
|
+
v as defaultColorProvider,
|
|
30
|
+
g as useAnnotation,
|
|
31
|
+
S as useAnnotationSelectAction,
|
|
32
|
+
f as useAnnotationStore,
|
|
33
|
+
x as useAnnotations,
|
|
34
|
+
I as useAnnotator,
|
|
35
|
+
d as useAnnotatorUser,
|
|
36
|
+
l as useSelection,
|
|
37
|
+
b as useViewer,
|
|
38
|
+
y as useViewportState
|
|
36
39
|
};
|
|
37
40
|
//# sourceMappingURL=annotorious-react.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"annotorious-react.es.js","sources":["../src/index.ts"],"sourcesContent":["export * from './Annotorious';\nexport * from './AnnotoriousPlugin';\nexport * from './AnnotoriousPopupProps';\nexport * from './ImageAnnotationPopup';\nexport * from './ImageAnnotator';\n\nexport * from './openseadragon';\n\n// This ensures the Annotorious stylesheet gets packaged into annotorious-react\nimport '@annotorious/annotorious/annotorious.css';\nimport '@annotorious/openseadragon/annotorious-openseadragon.css';\n\n// Essential re-exports from @annotorious/core\nexport type {\n Annotation,\n AnnotationBody,\n AnnotationState,\n AnnotationTarget,\n Annotator,\n AnnotatorState,\n Appearance,\n AppearanceProvider,\n Color,\n DrawingStyle,\n DrawingStyleExpression,\n Filter,\n FormatAdapter,\n HoverState,\n LifecycleEvents,\n ParseResult,\n PresentUser,\n Selection,\n SelectionState,\n Store,\n StoreChangeEvent,\n StoreObserver,\n User,\n W3CAnnotation,\n W3CAnnotationBody,\n W3CAnnotationTarget\n} from '@annotorious/core';\n\nimport {\n createAnonymousGuest as _createAnonymousGuest, \n createBody as _createBody,\n defaultColorProvider as _defaultColorProvider,\n Origin as _Origin,\n UserSelectAction as _UserSelectAction\n} from '@annotorious/core';\n\nexport { _createAnonymousGuest as createAnonymousGuest };\nexport { _createBody as createBody };\nexport { _defaultColorProvider as defaultColorProvider };\nexport { _Origin as Origin };\nexport { _UserSelectAction as UserSelectAction };\n\n// Essential re-exports from @annotorious/annotorious \nexport type {\n AnnotoriousOpts,\n DrawingMode,\n DrawingTool,\n FragmentSelector,\n ImageAnnotator as AnnotoriousImageAnnotator,\n ImageAnnotation,\n ImageAnnotatorState,\n Polygon,\n PolygonGeometry,\n Rectangle,\n RectangleGeometry,\n Shape,\n SVGSelector,\n W3CImageAnnotation,\n W3CImageAnnotationTarget,\n W3CImageFormatAdapter, \n W3CImageFormatAdapterOpts\n} from '@annotorious/annotorious';\n\nimport { \n createImageAnnotator as _createImageAnnotator,\n ShapeType as _ShapeType,\n W3CImageFormat as _W3CImageFormat\n} from '@annotorious/annotorious';\n\nexport const createImageAnnotator = _createImageAnnotator;\nexport const ShapeType = _ShapeType;\nexport const W3CImageFormat = _W3CImageFormat;\n\n// Essential re-exports from @annotorious/openseadragon \nexport type {\n OpenSeadragonAnnotator as AnnotoriousOpenSeadragonAnnotator\n} from '@annotorious/openseadragon';\n\nexport type { Viewer } from 'openseadragon';\n"],"names":["createImageAnnotator","_createImageAnnotator","ShapeType","_ShapeType","W3CImageFormat","_W3CImageFormat"],"mappings":";;;;;;;;;;;AAmFO,MAAMA,IAAuBC,GACvBC,IAAYC,GACZC,IAAiBC;"}
|
|
@@ -1,39 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const q = (u) => {
|
|
8
|
-
const n = w(null), o = x(), { selected: t } = D(), [l, f] = d([]), [s, i] = d(!1), m = () => i(!0), p = () => {
|
|
9
|
-
const e = t[0].annotation;
|
|
10
|
-
I(o, e, n.current);
|
|
11
|
-
}, g = (e, r) => e.every((a) => r.includes(a)) && r.every((a) => e.includes(a));
|
|
1
|
+
import { j as a } from "./annotorious-react.es11.js";
|
|
2
|
+
import { forwardRef as m, useRef as p, useContext as u, useEffect as c, useImperativeHandle as d } from "react";
|
|
3
|
+
import l from "openseadragon";
|
|
4
|
+
import { OpenSeadragonAnnotatorContext as x } from "./annotorious-react.es8.js";
|
|
5
|
+
const S = m((n, s) => {
|
|
6
|
+
const { className: i, options: t } = n, r = p(null), { viewer: f, setViewer: e } = u(x);
|
|
12
7
|
return c(() => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
return o.addHandler("update-viewport", e), () => {
|
|
23
|
-
o.removeHandler("update-viewport", e);
|
|
24
|
-
};
|
|
25
|
-
}, [t, s]), t.length > 0 ? /* @__PURE__ */ v(
|
|
26
|
-
S,
|
|
27
|
-
{
|
|
28
|
-
ref: n,
|
|
29
|
-
className: "a9s-popup a9s-osd-popup",
|
|
30
|
-
onDragStart: m,
|
|
31
|
-
children: u.popup({ viewer: o, selected: t })
|
|
32
|
-
},
|
|
33
|
-
t.map(({ annotation: e }) => e.id).join("-")
|
|
34
|
-
) : null;
|
|
35
|
-
};
|
|
8
|
+
if (r.current) {
|
|
9
|
+
const o = l({ ...t, element: r.current });
|
|
10
|
+
return e && e(o), () => {
|
|
11
|
+
e && e(void 0), o.destroy();
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}, [JSON.stringify(t)]), d(s, () => f), /* @__PURE__ */ a.jsx("div", { className: i, ref: r });
|
|
15
|
+
});
|
|
36
16
|
export {
|
|
37
|
-
|
|
17
|
+
S as OpenSeadragonViewer
|
|
38
18
|
};
|
|
39
19
|
//# sourceMappingURL=annotorious-react.es10.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es10.js","sources":["../src/openseadragon/
|
|
1
|
+
{"version":3,"file":"annotorious-react.es10.js","sources":["../src/openseadragon/OpenSeadragonViewer.tsx"],"sourcesContent":["import { forwardRef, useContext, useEffect, useImperativeHandle, useRef } from 'react';\nimport OpenSeadragon from 'openseadragon';\nimport { OpenSeadragonAnnotatorContext } from './OpenSeadragonAnnotator';\n\nexport interface OpenSeadragonViewerProps {\n\n className?: string;\n\n options: OpenSeadragon.Options;\n\n}\n\nexport const OpenSeadragonViewer = forwardRef<OpenSeadragon.Viewer, OpenSeadragonViewerProps>((props: OpenSeadragonViewerProps, ref) => {\n\n const { className, options } = props;\n\n const element = useRef<HTMLDivElement>(null);\n\n const { viewer, setViewer } = useContext(OpenSeadragonAnnotatorContext);\n\n useEffect(() => { \n if (element.current) {\n const v = OpenSeadragon({...options, element: element.current });\n\n // Checking for setViewer is just a convenience so we can\n // use this component also without an OpenSeadragonAnnotator\n if (setViewer)\n setViewer(v);\n\n return () => {\n if (setViewer)\n setViewer(undefined);\n\n v.destroy();\n }\n }\n }, [JSON.stringify(options)]);\n\n useImperativeHandle(ref, () => viewer);\n\n return (\n <div className={className} ref={element} />\n );\n\n});"],"names":["OpenSeadragonViewer","forwardRef","props","ref","className","options","element","useRef","viewer","setViewer","useContext","OpenSeadragonAnnotatorContext","useEffect","v","OpenSeadragon","useImperativeHandle","jsx"],"mappings":";;;;AAYO,MAAMA,IAAsBC,EAA2D,CAACC,GAAiCC,MAAQ;AAEhI,QAAA,EAAE,WAAAC,GAAW,SAAAC,EAAY,IAAAH,GAEzBI,IAAUC,EAAuB,IAAI,GAErC,EAAE,QAAAC,GAAQ,WAAAC,EAAU,IAAIC,EAAWC,CAA6B;AAEtE,SAAAC,EAAU,MAAM;AACd,QAAIN,EAAQ,SAAS;AACb,YAAAO,IAAIC,EAAc,EAAC,GAAGT,GAAS,SAASC,EAAQ,SAAS;AAI3D,aAAAG,KACFA,EAAUI,CAAC,GAEN,MAAM;AACP,QAAAJ,KACFA,EAAU,MAAS,GAErBI,EAAE,QAAQ;AAAA,MAAA;AAAA,IAEd;AAAA,KACC,CAAC,KAAK,UAAUR,CAAO,CAAC,CAAC,GAERU,EAAAZ,GAAK,MAAMK,CAAM,GAGlCQ,gBAAAA,EAAAA,IAAA,OAAA,EAAI,WAAAZ,GAAsB,KAAKE,EAAS,CAAA;AAG7C,CAAC;"}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const { className: s, options: t } = n, r = c(null), { viewer: f, setViewer: e } = p(v);
|
|
7
|
-
return u(() => {
|
|
8
|
-
if (r.current) {
|
|
9
|
-
const o = l({ ...t, element: r.current });
|
|
10
|
-
return e && e(o), () => {
|
|
11
|
-
o.destroy(), e && e(void 0);
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
}, [JSON.stringify(t)]), d(i, () => f), /* @__PURE__ */ m("div", { className: s, ref: r });
|
|
15
|
-
});
|
|
1
|
+
import { __module as e } from "./annotorious-react.es18.js";
|
|
2
|
+
import { __require as r } from "./annotorious-react.es19.js";
|
|
3
|
+
import { __require as o } from "./annotorious-react.es20.js";
|
|
4
|
+
process.env.NODE_ENV === "production" ? e.exports = r() : e.exports = o();
|
|
5
|
+
var m = e.exports;
|
|
16
6
|
export {
|
|
17
|
-
|
|
7
|
+
m as j
|
|
18
8
|
};
|
|
19
9
|
//# sourceMappingURL=annotorious-react.es11.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es11.js","sources":["
|
|
1
|
+
{"version":3,"file":"annotorious-react.es11.js","sources":["../../../node_modules/react/jsx-runtime.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n"],"names":["jsxRuntimeModule","require$$0","require$$1"],"mappings":";;;AAEI,QAAQ,IAAI,aAAa,eAC3BA,EAAA,UAAiBC,MAEjBD,EAAA,UAAiBE;;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
1
|
+
import { useState as c, useRef as n, useEffect as s } from "react";
|
|
2
|
+
const m = (e, t) => {
|
|
3
|
+
const [u, o] = c(e), r = n();
|
|
4
|
+
return s(() => (r.current = setTimeout(() => o(e), t), () => {
|
|
5
|
+
clearTimeout(r.current);
|
|
6
|
+
}), [e, t]), u;
|
|
7
|
+
};
|
|
3
8
|
export {
|
|
4
|
-
|
|
5
|
-
r as jsx
|
|
9
|
+
m as useDebounce
|
|
6
10
|
};
|
|
7
11
|
//# sourceMappingURL=annotorious-react.es12.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es12.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"annotorious-react.es12.js","sources":["../src/useDebounce.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nexport const useDebounce = (value: any, delay: number) => {\n const [debouncedValue, setDebouncedValue] = useState<any>(value);\n\n const timerRef = useRef<ReturnType<typeof setTimeout>>();\n\n useEffect(() => {\n timerRef.current = \n setTimeout(() => setDebouncedValue(value), delay);\n\n return () => {\n clearTimeout(timerRef.current);\n };\n }, [value, delay]);\n\n return debouncedValue;\n}"],"names":["useDebounce","value","delay","debouncedValue","setDebouncedValue","useState","timerRef","useRef","useEffect"],"mappings":";AAEa,MAAAA,IAAc,CAACC,GAAYC,MAAkB;AACxD,QAAM,CAACC,GAAgBC,CAAiB,IAAIC,EAAcJ,CAAK,GAEzDK,IAAWC;AAEjB,SAAAC,EAAU,OACRF,EAAS,UACP,WAAW,MAAMF,EAAkBH,CAAK,GAAGC,CAAK,GAE3C,MAAM;AACX,iBAAaI,EAAS,OAAO;AAAA,EAAA,IAE9B,CAACL,GAAOC,CAAK,CAAC,GAEVC;AACT;"}
|