@annotorious/react-manifold 0.4.0 → 0.6.0

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 (37) hide show
  1. package/dist/Annotorious.d.ts +1 -1
  2. package/dist/Annotorious.d.ts.map +1 -1
  3. package/dist/AnnotoriousManifold.d.ts +6 -3
  4. package/dist/AnnotoriousManifold.d.ts.map +1 -1
  5. package/dist/AnnotoriousManifoldInstance.d.ts +1 -0
  6. package/dist/AnnotoriousManifoldInstance.d.ts.map +1 -1
  7. package/dist/annotorious-react-manifold.es.js +12 -9
  8. package/dist/annotorious-react-manifold.es.js.map +1 -1
  9. package/dist/annotorious-react-manifold.es10.js +599 -2
  10. package/dist/annotorious-react-manifold.es10.js.map +1 -1
  11. package/dist/annotorious-react-manifold.es11.js +2 -2
  12. package/dist/annotorious-react-manifold.es12.js +5 -0
  13. package/dist/annotorious-react-manifold.es12.js.map +1 -0
  14. package/dist/annotorious-react-manifold.es2.js +10 -10
  15. package/dist/annotorious-react-manifold.es2.js.map +1 -1
  16. package/dist/annotorious-react-manifold.es3.js +41 -37
  17. package/dist/annotorious-react-manifold.es3.js.map +1 -1
  18. package/dist/annotorious-react-manifold.es4.js +19 -18
  19. package/dist/annotorious-react-manifold.es4.js.map +1 -1
  20. package/dist/annotorious-react-manifold.es5.js +17 -15
  21. package/dist/annotorious-react-manifold.es5.js.map +1 -1
  22. package/dist/annotorious-react-manifold.es6.js +15 -6
  23. package/dist/annotorious-react-manifold.es6.js.map +1 -1
  24. package/dist/annotorious-react-manifold.es7.js +6 -2
  25. package/dist/annotorious-react-manifold.es7.js.map +1 -1
  26. package/dist/annotorious-react-manifold.es8.js +2 -30
  27. package/dist/annotorious-react-manifold.es8.js.map +1 -1
  28. package/dist/annotorious-react-manifold.es9.js +21 -590
  29. package/dist/annotorious-react-manifold.es9.js.map +1 -1
  30. package/dist/openseadragon/OpenSeadragonViewer.d.ts +12 -0
  31. package/dist/openseadragon/OpenSeadragonViewer.d.ts.map +1 -0
  32. package/dist/openseadragon/{OSDViewerManifold.d.ts → OpenSeadragonViewerManifold.d.ts} +1 -1
  33. package/dist/openseadragon/OpenSeadragonViewerManifold.d.ts.map +1 -0
  34. package/dist/openseadragon/index.d.ts +2 -1
  35. package/dist/openseadragon/index.d.ts.map +1 -1
  36. package/package.json +3 -3
  37. package/dist/openseadragon/OSDViewerManifold.d.ts.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  interface AnnotoriousProps {
3
3
  children: ReactNode;
4
- source: string;
4
+ id: string;
5
5
  }
6
6
  /**
7
7
  * An alternative <Annotorious /> component that mimicks the original
@@ -1 +1 @@
1
- {"version":3,"file":"Annotorious.d.ts","sourceRoot":"","sources":["../src/Annotorious.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAyB,MAAM,OAAO,CAAC;AAKhE,UAAU,gBAAgB;IAExB,QAAQ,EAAE,SAAS,CAAC;IAEpB,MAAM,EAAE,MAAM,CAAC;CAEhB;AAsBD;;;;GAIG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,4CAUlD,CAAA"}
1
+ {"version":3,"file":"Annotorious.d.ts","sourceRoot":"","sources":["../src/Annotorious.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,OAAO,CAAC;AAKzD,UAAU,gBAAgB;IAExB,QAAQ,EAAE,SAAS,CAAC;IAEpB,EAAE,EAAE,MAAM,CAAC;CAEZ;AAsBD;;;;GAIG;AACH,eAAO,MAAM,WAAW,UAAW,gBAAgB,4CAUlD,CAAA"}
@@ -1,4 +1,4 @@
1
- import React, { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import type { Annotation, Annotator } from '@annotorious/react';
3
3
  import { AnnotoriousManifoldInstance } from './AnnotoriousManifoldInstance';
4
4
  interface AnnotoriousManifoldContextValue {
@@ -12,20 +12,23 @@ interface AnnotoriousManifoldContextValue {
12
12
  }>): () => void;
13
13
  }
14
14
  interface ManifoldSelection<T extends Annotation = Annotation> {
15
- source?: string;
15
+ id?: string;
16
16
  selected: {
17
17
  annotation: T;
18
18
  editable?: boolean;
19
19
  }[];
20
20
  pointerEvent?: PointerEvent;
21
21
  }
22
- export declare const AnnotoriousManifoldContext: React.Context<AnnotoriousManifoldContextValue>;
22
+ export declare const AnnotoriousManifoldContext: import("react").Context<AnnotoriousManifoldContextValue>;
23
23
  export declare const AnnotoriousManifold: (props: {
24
24
  children: ReactNode;
25
25
  }) => import("react/jsx-runtime").JSX.Element;
26
26
  export declare const useAnnotoriousManifold: <I extends Annotation = Annotation, E extends {
27
27
  id: string;
28
28
  } = Annotation>() => AnnotoriousManifoldInstance<I, E>;
29
+ export declare const useAnnotator: <I extends Annotation = Annotation, E extends {
30
+ id: string;
31
+ } = Annotation>(id: string) => Annotator<I, E>;
29
32
  export declare const useAnnotations: <T extends Annotation>() => Map<string, T[]>;
30
33
  export declare const useSelection: <T extends Annotation>() => ManifoldSelection<T>;
31
34
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"AnnotoriousManifold.d.ts","sourceRoot":"","sources":["../src/AnnotoriousManifold.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA0D,MAAM,OAAO,CAAC;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,2BAA2B,EAA0B,MAAM,+BAA+B,CAAC;AAEpG,UAAU,+BAA+B;IAEvC,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;IAExD,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;IAEvC,SAAS,EAAE,iBAAiB,CAAC;IAE7B,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,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MAAM,IAAI,CAAC;CAEpF;AAED,UAAU,iBAAiB,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU;IAE3D,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,QAAQ,EAAE;QAAE,UAAU,EAAE,CAAC,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,EAAE,CAAC;IAElD,YAAY,CAAC,EAAE,YAAY,CAAC;CAE7B;AAGD,eAAO,MAAM,0BAA0B,0DAAmD,CAAC;AAE3F,eAAO,MAAM,mBAAmB,UAAW;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CA+FjE,CAAA;AAED,eAAO,MAAM,sBAAsB;QAAuD,MAAM;sDAG/F,CAAA;AAED,eAAO,MAAM,YAAY;QAAuD,MAAM;oBAAqB,MAAM,oBAGhH,CAAA;AAED,eAAO,MAAM,cAAc,8CAG1B,CAAA;AAED,eAAO,MAAM,YAAY,kDAGxB,CAAA"}
@@ -14,6 +14,7 @@ export interface AnnotoriousManifoldInstance<I extends Annotation = Annotation,
14
14
  findSource(annotationId: string): string | undefined;
15
15
  getAnnotation(id: string): I | undefined;
16
16
  getAnnotations(): I[];
17
+ getAnnotator(id: string): Annotator<I, E> | undefined;
17
18
  setSelected(annotationId: string): void;
18
19
  updateAnnotation(arg1: string | I, arg2?: I | Origin, arg3?: Origin): void;
19
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AnnotoriousManifoldInstance.d.ts","sourceRoot":"","sources":["../src/AnnotoriousManifoldInstance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,SAAS,EACV,MAAM,oBAAoB,CAAC;AAE5B,MAAM,WAAW,2BAA2B,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,EAAE,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,UAAU;IAEnH,UAAU,EAAE,S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
2
- import { AnnotoriousManifold as r, AnnotoriousManifoldContext as i, useAnnotations as s, useAnnotoriousManifold as f, useSelection as a } from "./annotorious-react-manifold.es3.js";
3
- import { createManifoldInstance as l } from "./annotorious-react-manifold.es4.js";
4
- import { OSDViewerContext as d, OSDViewerManifold as A, useViewers as M } from "./annotorious-react-manifold.es5.js";
2
+ import { AnnotoriousManifold as t, AnnotoriousManifoldContext as i, useAnnotations as s, useAnnotator as a, useAnnotoriousManifold as f, useSelection as u } from "./annotorious-react-manifold.es3.js";
3
+ import { createManifoldInstance as d } from "./annotorious-react-manifold.es4.js";
4
+ import { OpenSeadragonViewer as p } from "./annotorious-react-manifold.es5.js";
5
+ import { OSDViewerContext as m, OSDViewerManifold as M, useViewers as w } from "./annotorious-react-manifold.es6.js";
5
6
  export {
6
7
  n as Annotorious,
7
- r as AnnotoriousManifold,
8
+ t as AnnotoriousManifold,
8
9
  i as AnnotoriousManifoldContext,
9
- d as OSDViewerContext,
10
- A as OSDViewerManifold,
11
- l as createManifoldInstance,
10
+ m as OSDViewerContext,
11
+ M as OSDViewerManifold,
12
+ p as OpenSeadragonViewer,
13
+ d as createManifoldInstance,
12
14
  s as useAnnotations,
15
+ a as useAnnotator,
13
16
  f as useAnnotoriousManifold,
14
- a as useSelection,
15
- M as useViewers
17
+ u as useSelection,
18
+ w as useViewers
16
19
  };
17
20
  //# sourceMappingURL=annotorious-react-manifold.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-react-manifold.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"annotorious-react-manifold.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}