@annotorious/react 3.0.0-rc.6 → 3.0.0-rc.8

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 (88) hide show
  1. package/dist/Annotorious.d.ts +15 -15
  2. package/dist/Annotorious.d.ts.map +1 -1
  3. package/dist/AnnotoriousPlugin.d.ts +1 -1
  4. package/dist/AnnotoriousPlugin.d.ts.map +1 -1
  5. package/dist/AnnotoriousPopup.d.ts +1 -1
  6. package/dist/AnnotoriousPopup.d.ts.map +1 -1
  7. package/dist/ImageAnnotator.d.ts +2 -2
  8. package/dist/ImageAnnotator.d.ts.map +1 -1
  9. package/dist/annotorious-react.es.js +26 -44
  10. package/dist/annotorious-react.es.js.map +1 -1
  11. package/dist/annotorious-react.es10.js +29 -3
  12. package/dist/annotorious-react.es10.js.map +1 -1
  13. package/dist/annotorious-react.es11.js +36 -27
  14. package/dist/annotorious-react.es11.js.map +1 -1
  15. package/dist/annotorious-react.es12.js +16 -20
  16. package/dist/annotorious-react.es12.js.map +1 -1
  17. package/dist/annotorious-react.es13.js +4 -54
  18. package/dist/annotorious-react.es13.js.map +1 -1
  19. package/dist/annotorious-react.es14.js +8 -17
  20. package/dist/annotorious-react.es14.js.map +1 -1
  21. package/dist/annotorious-react.es15.js +152 -21
  22. package/dist/annotorious-react.es15.js.map +1 -1
  23. package/dist/annotorious-react.es16.js +6 -2
  24. package/dist/annotorious-react.es16.js.map +1 -1
  25. package/dist/annotorious-react.es17.js +20708 -2
  26. package/dist/annotorious-react.es17.js.map +1 -1
  27. package/dist/annotorious-react.es18.js +30 -3924
  28. package/dist/annotorious-react.es18.js.map +1 -1
  29. package/dist/annotorious-react.es19.js +2 -29
  30. package/dist/annotorious-react.es19.js.map +1 -1
  31. package/dist/annotorious-react.es2.js +2 -2
  32. package/dist/annotorious-react.es2.js.map +1 -1
  33. package/dist/annotorious-react.es20.js +30 -36
  34. package/dist/annotorious-react.es20.js.map +1 -1
  35. package/dist/annotorious-react.es21.js +597 -14
  36. package/dist/annotorious-react.es21.js.map +1 -1
  37. package/dist/annotorious-react.es22.js +2 -4
  38. package/dist/annotorious-react.es22.js.map +1 -1
  39. package/dist/annotorious-react.es23.js +2 -8
  40. package/dist/annotorious-react.es23.js.map +1 -1
  41. package/dist/annotorious-react.es3.js.map +1 -1
  42. package/dist/annotorious-react.es4.js +2 -2
  43. package/dist/annotorious-react.es4.js.map +1 -1
  44. package/dist/annotorious-react.es5.js +12 -9
  45. package/dist/annotorious-react.es5.js.map +1 -1
  46. package/dist/annotorious-react.es8.js +79 -57
  47. package/dist/annotorious-react.es8.js.map +1 -1
  48. package/dist/annotorious-react.es9.js +3922 -10
  49. package/dist/annotorious-react.es9.js.map +1 -1
  50. package/dist/index.d.ts +8 -7
  51. package/dist/index.d.ts.map +1 -1
  52. package/dist/openseadragon/OpenSeadragonAnnotator.d.ts +1 -1
  53. package/dist/openseadragon/OpenSeadragonAnnotator.d.ts.map +1 -1
  54. package/package.json +1 -2
  55. package/dist/annotorious-react.es24.js +0 -156
  56. package/dist/annotorious-react.es24.js.map +0 -1
  57. package/dist/annotorious-react.es25.js +0 -9
  58. package/dist/annotorious-react.es25.js.map +0 -1
  59. package/dist/annotorious-react.es26.js +0 -5
  60. package/dist/annotorious-react.es26.js.map +0 -1
  61. package/dist/annotorious-react.es27.js +0 -33
  62. package/dist/annotorious-react.es27.js.map +0 -1
  63. package/dist/annotorious-react.es28.js +0 -602
  64. package/dist/annotorious-react.es28.js.map +0 -1
  65. package/dist/annotorious-react.es29.js +0 -20133
  66. package/dist/annotorious-react.es29.js.map +0 -1
  67. package/dist/annotorious-react.es30.js +0 -35
  68. package/dist/annotorious-react.es30.js.map +0 -1
  69. package/dist/annotorious-react.es31.js +0 -5
  70. package/dist/annotorious-react.es31.js.map +0 -1
  71. package/dist/annotorious-react.es32.js +0 -5
  72. package/dist/annotorious-react.es32.js.map +0 -1
  73. package/dist/annotorious-react.es33.js +0 -19
  74. package/dist/annotorious-react.es33.js.map +0 -1
  75. package/dist/annotorious-react.es34.js +0 -20
  76. package/dist/annotorious-react.es34.js.map +0 -1
  77. package/dist/annotorious-react.es35.js +0 -30
  78. package/dist/annotorious-react.es35.js.map +0 -1
  79. package/dist/annotorious-react.es36.js +0 -24
  80. package/dist/annotorious-react.es36.js.map +0 -1
  81. package/dist/annotorious-react.es37.js +0 -19
  82. package/dist/annotorious-react.es37.js.map +0 -1
  83. package/dist/annotorious-react.es38.js +0 -7
  84. package/dist/annotorious-react.es38.js.map +0 -1
  85. package/dist/annotorious-react.es39.js +0 -11
  86. package/dist/annotorious-react.es39.js.map +0 -1
  87. package/dist/annotorious-react.es40.js +0 -10
  88. package/dist/annotorious-react.es40.js.map +0 -1
@@ -1,32 +1,5 @@
1
- import { jsx as d } from "./annotorious-react.es22.js";
2
- import { createContext as w, useState as u, useContext as l, useEffect as n } from "react";
3
- import { createOSDAnnotator as m } from "./annotorious-react.es29.js";
4
- import { AnnotoriousContext as g } from "./annotorious-react.es2.js";
5
- const s = w({ viewer: null, setViewer: null }), C = (e) => {
6
- const { children: v, tool: i, ...c } = e, [o, f] = u(), { anno: t, setAnno: a } = l(g);
7
- return n(() => {
8
- if (o) {
9
- const r = m(o, c);
10
- return e.tool && r.setDrawingTool(e.tool), a(r), () => {
11
- r.destroy(), a(void 0);
12
- };
13
- }
14
- }, [o]), n(() => {
15
- t && t.setDrawingTool(i);
16
- }, [i]), n(() => {
17
- t && t.setDrawingEnabled(e.drawingEnabled);
18
- }, [e.drawingEnabled]), n(() => {
19
- t && t.setFilter(e.filter);
20
- }, [e.filter]), n(() => {
21
- t && t.setStyle(e.style);
22
- }, [e.style]), /* @__PURE__ */ d(s.Provider, { value: { viewer: o, setViewer: f }, children: e.children });
23
- }, D = () => {
24
- const { viewer: e } = l(s);
25
- return e;
26
- };
1
+ var e = { exports: {} };
27
2
  export {
28
- C as OpenSeadragonAnnotator,
29
- s as OpenSeadragonAnnotatorContext,
30
- D as useViewer
3
+ e as __module
31
4
  };
32
5
  //# sourceMappingURL=annotorious-react.es19.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-react.es19.js","sources":["../src/openseadragon/OpenSeadragonAnnotator.tsx"],"sourcesContent":["import { createContext, ReactNode, useContext, useEffect, useState } from 'react';\nimport OpenSeadragon from 'openseadragon';\nimport { createOSDAnnotator } from '@annotorious/openseadragon';\nimport { AnnotoriousOpts, DrawingStyle, Filter, ImageAnnotation } from '@annotorious/annotorious';\nimport { AnnotoriousContext } from '../Annotorious';\n\nexport const OpenSeadragonAnnotatorContext = createContext<{ \n viewer: OpenSeadragon.Viewer,\n setViewer(viewer: OpenSeadragon.Viewer): void\n}>({ viewer: null, setViewer: null });\n\nexport type OpenSeadragonAnnotatorProps<E extends unknown> = AnnotoriousOpts<ImageAnnotation, E> & {\n\n children?: ReactNode;\n\n drawingEnabled?: boolean;\n\n filter?: Filter<ImageAnnotation>;\n\n style?: DrawingStyle | ((annotation: ImageAnnotation) => DrawingStyle);\n\n tool?: string | null;\n\n}\n\nexport const OpenSeadragonAnnotator = <E extends unknown>(props: OpenSeadragonAnnotatorProps<E>) => {\n\n const { children, tool, ...opts } = props;\n\n const [viewer, setViewer] = useState<OpenSeadragon.Viewer>();\n\n const { anno, setAnno } = useContext(AnnotoriousContext);\n\n useEffect(() => {\n if (viewer) {\n const anno = createOSDAnnotator<E>(viewer, opts);\n\n if (props.tool)\n anno.setDrawingTool(props.tool);\n\n setAnno(anno);\n\n return () => {\n anno.destroy();\n setAnno(undefined);\n }\n }\n }, [viewer]);\n\n useEffect(() => {\n if (anno) anno.setDrawingTool(tool);\n }, [tool]);\n\n useEffect(() => {\n if (anno) anno.setDrawingEnabled(props.drawingEnabled);\n }, [props.drawingEnabled]);\n\n useEffect(() => {\n if (anno) anno.setFilter(props.filter);\n }, [props.filter]);\n\n useEffect(() => {\n if (anno) anno.setStyle(props.style);\n }, [props.style]);\n\n return (\n <OpenSeadragonAnnotatorContext.Provider value={{ viewer, setViewer }}>\n {props.children}\n </OpenSeadragonAnnotatorContext.Provider>\n )\n\n}\n\nexport const useViewer = () => {\n const { viewer } = useContext(OpenSeadragonAnnotatorContext);\n return viewer;\n}"],"names":["OpenSeadragonAnnotatorContext","createContext","OpenSeadragonAnnotator","props","children","tool","opts","viewer","setViewer","useState","anno","setAnno","useContext","AnnotoriousContext","useEffect","createOSDAnnotator","jsx","useViewer"],"mappings":";;;;AAMO,MAAMA,IAAgCC,EAG1C,EAAE,QAAQ,MAAM,WAAW,MAAM,GAgBvBC,IAAyB,CAAoBC,MAA0C;AAElG,QAAM,EAAE,UAAAC,GAAU,MAAAC,GAAM,GAAGC,MAASH,GAE9B,CAACI,GAAQC,CAAS,IAAIC,EAA+B,GAErD,EAAE,MAAAC,GAAM,SAAAC,EAAQ,IAAIC,EAAWC,CAAkB;AAEvD,SAAAC,EAAU,MAAM;AACd,QAAIP,GAAQ;AACJG,YAAAA,IAAOK,EAAsBR,GAAQD,CAAI;AAE/C,aAAIH,EAAM,QACRO,EAAK,eAAeP,EAAM,IAAI,GAEhCQ,EAAQD,CAAI,GAEL,MAAM;AACXA,QAAAA,EAAK,QAAQ,GACbC,EAAQ,MAAS;AAAA,MAAA;AAAA,IAErB;AAAA,EAAA,GACC,CAACJ,CAAM,CAAC,GAEXO,EAAU,MAAM;AACV,IAAAJ,KAAMA,EAAK,eAAeL,CAAI;AAAA,EAAA,GACjC,CAACA,CAAI,CAAC,GAETS,EAAU,MAAM;AACV,IAAAJ,KAAWA,EAAA,kBAAkBP,EAAM,cAAc;AAAA,EAAA,GACpD,CAACA,EAAM,cAAc,CAAC,GAEzBW,EAAU,MAAM;AACV,IAAAJ,KAAWA,EAAA,UAAUP,EAAM,MAAM;AAAA,EAAA,GACpC,CAACA,EAAM,MAAM,CAAC,GAEjBW,EAAU,MAAM;AACV,IAAAJ,KAAWA,EAAA,SAASP,EAAM,KAAK;AAAA,EAAA,GAClC,CAACA,EAAM,KAAK,CAAC,GAGd,gBAAAa,EAAChB,EAA8B,UAA9B,EAAuC,OAAO,EAAE,QAAAO,GAAQ,WAAAC,EACtD,GAAA,UAAAL,EAAM,SACT,CAAA;AAGJ,GAEac,IAAY,MAAM;AAC7B,QAAM,EAAE,QAAAV,EAAA,IAAWK,EAAWZ,CAA6B;AACpD,SAAAO;AACT;"}
1
+ {"version":3,"file":"annotorious-react.es19.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,6 +1,6 @@
1
- import { jsx as U } from "./annotorious-react.es22.js";
1
+ import { jsx as U } from "./annotorious-react.es13.js";
2
2
  import { createContext as j, forwardRef as E, useState as f, useImperativeHandle as H, useEffect as h, useContext as c } from "react";
3
- import { useDebounce as C } from "./annotorious-react.es23.js";
3
+ import { useDebounce as C } from "./annotorious-react.es14.js";
4
4
  const o = j({
5
5
  anno: void 0,
6
6
  setAnno: void 0,
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-react.es2.js","sources":["../src/Annotorious.tsx"],"sourcesContent":["import { createContext, forwardRef, ReactNode} from 'react';\nimport { useContext, useEffect, useImperativeHandle, useState } from 'react';\nimport { Annotation, Annotator, Store, StoreChangeEvent } from '@annotorious/core';\nimport { useDebounce } from './useDebounce';\n\ninterface Selection<T extends Annotation = Annotation> {\n\n selected: { annotation: T, editable?: boolean }[];\n\n pointerEvent?: PointerEvent;\n\n}\n\nexport interface AnnotoriousContextState {\n\n anno: Annotator;\n\n setAnno(anno: Annotator<Annotation, unknown>): void;\n\n annotations: Annotation[];\n\n selection: Selection;\n\n}\n\nexport const AnnotoriousContext = createContext({ \n\n anno: undefined, \n\n setAnno: undefined, \n\n annotations: [], \n\n selection: { selected: [] }\n\n});\n\nexport const Annotorious = forwardRef<Annotator, { children: ReactNode }>((props: { children: ReactNode }, ref) => {\n\n const [anno, setAnno] = useState<Annotator>(null);\n\n const [annotations, setAnnotations] = useState<Annotation[]>([]);\n\n const [selection, setSelection] = useState<Selection>({ selected: [] });\n\n useImperativeHandle(ref, () => anno);\n\n useEffect(() => {\n if (anno) {\n const { selection, store } = anno.state;\n\n // Components below <Annotorious /> may have\n // loaded annotations into the store already! \n if (store.all().length > 0)\n setAnnotations(store.all());\n\n // Keeps annotations in sync with a React state,\n // so clients can render components the usual React way.\n const onStoreChange = (event: StoreChangeEvent<Annotation>) =>\n setAnnotations(() => store.all());\n\n store.observe(onStoreChange);\n\n // Keep selection in sync with a react state, and resolve them\n // from IDs to annotations automatically, for convenience\n let selectionStoreObserver: (event: StoreChangeEvent<Annotation>) => void;\n\n const unsubscribeSelection = selection.subscribe(({ selected, pointerEvent }) => {\n if (selectionStoreObserver) \n store.unobserve(selectionStoreObserver);\n\n const resolved = (selected || [])\n .map(({ id, editable }) => ({ annotation: store.getAnnotation(id), editable }));\n\n setSelection({ selected: resolved, pointerEvent });\n\n selectionStoreObserver = event => {\n const { updated } = event.changes;\n\n setSelection(({ selected }) => ({\n selected: selected.map(({ annotation, editable }) => {\n const next = updated.find(u => u.oldValue.id === annotation.id);\n return next ? { annotation: next.newValue, editable } : { annotation, editable };\n })\n }));\n }\n\n store.observe(selectionStoreObserver, { annotations: selected.map(({ id }) => id) });\n });\n\n return () => {\n store.unobserve(onStoreChange);\n unsubscribeSelection();\n }\n }\n }, [anno]);\n\n return (\n <AnnotoriousContext.Provider value={{ \n anno, \n setAnno,\n annotations, \n selection \n }}>\n {props.children}\n </AnnotoriousContext.Provider>\n )\n\n});\n\nexport const useAnnotator = <T extends Annotator<any, unknown>>() => {\n const { anno } = useContext(AnnotoriousContext);\n return anno as T;\n}\n\nexport const useAnnotationStore = <T extends Store<Annotation>>() => {\n const { anno } = useContext(AnnotoriousContext);\n return anno?.state.store as T | undefined;\n}\n\nconst _useAnnotations = <T extends Annotation>() => {\n const { annotations } = useContext(AnnotoriousContext);\n return annotations as T[];\n}\n\nconst _useAnnotationsDebouced = <T extends Annotation>(debounce: number) => {\n const { annotations } = useContext(AnnotoriousContext);\n return useDebounce(annotations, debounce) as T[];\n}\n\nexport const useAnnotations = <T extends Annotation>(debounce?: number) =>\n debounce ? _useAnnotationsDebouced<T>(debounce) : _useAnnotations<T>();\n\nexport const useSelection = <T extends Annotation>() => {\n const { selection } = useContext(AnnotoriousContext);\n return selection as Selection<T>;\n}\n\nexport const useAnnotatorUser = () => {\n const { anno } = useContext(AnnotoriousContext);\n return anno?.getUser();\n}\n\nconst _useViewportState = <T extends Annotation>() => {\n const { anno } = useContext(AnnotoriousContext);\n\n const [inViewport, setInViewport] = useState<T[]>([]);\n\n useEffect(() => {\n if (anno) {\n const { store, viewport } = anno.state;\n\n if (!viewport)\n return;\n\n // Keep viewport annotations in sync with a react state, and resolve them\n // from IDs to annotations automatically, for convenience\n let viewportStoreObserver: (event: StoreChangeEvent<T>) => void;\n\n const unsubscribeViewport = viewport.subscribe(ids => {\n if (viewportStoreObserver) \n store.unobserve(viewportStoreObserver);\n\n const resolved = ids.map(id => store.getAnnotation(id)) as T[];\n setInViewport(resolved);\n\n viewportStoreObserver = event => {\n const { updated } = event.changes;\n\n setInViewport(annotations => annotations.map(annotation => {\n const next = updated.find(u => u.oldValue.id === annotation.id);\n return next ? next.newValue : annotation;\n }));\n }\n\n store.observe(viewportStoreObserver, { annotations: ids });\n });\n\n return () => {\n unsubscribeViewport();\n }\n }\n }, [anno]);\n\n return inViewport;\n}\n\nconst _useViewportStateDebounced = <T extends Annotation>(debounce: number) => {\n const inViewport = _useViewportState();\n return useDebounce(inViewport, debounce) as T[];\n}\n\nexport const useViewportState = <T extends Annotation>(debounce?: number) =>\n debounce ? _useViewportStateDebounced<T>(debounce) : _useViewportState<T>();\n"],"names":["AnnotoriousContext","createContext","Annotorious","forwardRef","props","ref","anno","setAnno","useState","annotations","setAnnotations","selection","setSelection","useImperativeHandle","useEffect","store","onStoreChange","event","selectionStoreObserver","unsubscribeSelection","selected","pointerEvent","resolved","id","editable","updated","annotation","next","u","jsx","useAnnotator","useContext","useAnnotationStore","_useAnnotations","_useAnnotationsDebouced","debounce","useDebounce","useAnnotations","useSelection","useAnnotatorUser","_useViewportState","inViewport","setInViewport","viewport","viewportStoreObserver","unsubscribeViewport","ids","_useViewportStateDebounced","useViewportState"],"mappings":";;;AAyBO,MAAMA,IAAqBC,EAAc;AAAA,EAE9C,MAAM;AAAA,EAEN,SAAS;AAAA,EAET,aAAa,CAAC;AAAA,EAEd,WAAW,EAAE,UAAU,GAAG;AAE5B,CAAC,GAEYC,IAAcC,EAA+C,CAACC,GAAgCC,MAAQ;AAEjH,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAoB,IAAI,GAE1C,CAACC,GAAaC,CAAc,IAAIF,EAAuB,CAAE,CAAA,GAEzD,CAACG,GAAWC,CAAY,IAAIJ,EAAoB,EAAE,UAAU,CAAC,EAAA,CAAG;AAElD,SAAAK,EAAAR,GAAK,MAAMC,CAAI,GAEnCQ,EAAU,MAAM;AACd,QAAIR,GAAM;AACR,YAAM,EAAE,WAAAK,GAAW,OAAAI,EAAA,IAAUT,EAAK;AAI9B,MAAAS,EAAM,MAAM,SAAS,KACRL,EAAAK,EAAM,KAAK;AAI5B,YAAMC,IAAgB,CAACC,MACrBP,EAAe,MAAMK,EAAM,KAAK;AAElC,MAAAA,EAAM,QAAQC,CAAa;AAIvB,UAAAE;AAEJ,YAAMC,IAAuBR,EAAU,UAAU,CAAC,EAAE,UAAAS,GAAU,cAAAC,QAAmB;AAC3E,QAAAH,KACFH,EAAM,UAAUG,CAAsB;AAExC,cAAMI,KAAYF,KAAY,CAC3B,GAAA,IAAI,CAAC,EAAE,IAAAG,GAAI,UAAAC,EAAS,OAAO,EAAE,YAAYT,EAAM,cAAcQ,CAAE,GAAG,UAAAC,EAAW,EAAA;AAEhF,QAAAZ,EAAa,EAAE,UAAUU,GAAU,cAAAD,EAAc,CAAA,GAEjDH,IAAyB,CAASD,MAAA;AAC1B,gBAAA,EAAE,SAAAQ,EAAQ,IAAIR,EAAM;AAE1B,UAAAL,EAAa,CAAC,EAAE,UAAAQ,SAAgB;AAAA,YAC9B,UAAUA,EAAS,IAAI,CAA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qB;"}
1
+ {"version":3,"file":"annotorious-react.es2.js","sources":["../src/Annotorious.tsx"],"sourcesContent":["import { createContext, forwardRef, ReactNode} from 'react';\nimport { useContext, useEffect, useImperativeHandle, useState } from 'react';\nimport { Annotation, Annotator, Store, StoreChangeEvent } from '.';\nimport { useDebounce } from './useDebounce';\n\ninterface Selection<T extends Annotation = Annotation> {\n\n selected: { annotation: T, editable?: boolean }[];\n\n pointerEvent?: PointerEvent;\n\n}\n\nexport interface AnnotoriousContextState {\n\n anno: Annotator;\n\n setAnno(anno: Annotator<Annotation, unknown>): void;\n\n annotations: Annotation[];\n\n selection: Selection;\n\n}\n\nexport const AnnotoriousContext = createContext({ \n\n anno: undefined, \n\n setAnno: undefined, \n\n annotations: [], \n\n selection: { selected: [] }\n\n});\n\nexport const Annotorious = forwardRef<Annotator, { children: ReactNode }>((props: { children: ReactNode }, ref) => {\n\n const [anno, setAnno] = useState<Annotator>(null);\n\n const [annotations, setAnnotations] = useState<Annotation[]>([]);\n\n const [selection, setSelection] = useState<Selection>({ selected: [] });\n\n useImperativeHandle(ref, () => anno);\n\n useEffect(() => {\n if (anno) {\n const { selection, store } = anno.state;\n\n // Components below <Annotorious /> may have\n // loaded annotations into the store already! \n if (store.all().length > 0)\n setAnnotations(store.all());\n\n // Keeps annotations in sync with a React state,\n // so clients can render components the usual React way.\n const onStoreChange = (event: StoreChangeEvent<Annotation>) =>\n setAnnotations(() => store.all());\n\n store.observe(onStoreChange);\n\n // Keep selection in sync with a react state, and resolve them\n // from IDs to annotations automatically, for convenience\n let selectionStoreObserver: (event: StoreChangeEvent<Annotation>) => void;\n\n const unsubscribeSelection = selection.subscribe(({ selected, pointerEvent }) => {\n if (selectionStoreObserver) \n store.unobserve(selectionStoreObserver);\n\n const resolved = (selected || [])\n .map(({ id, editable }) => ({ annotation: store.getAnnotation(id), editable }));\n\n setSelection({ selected: resolved, pointerEvent });\n\n selectionStoreObserver = event => {\n const { updated } = event.changes;\n\n setSelection(({ selected }) => ({\n selected: selected.map(({ annotation, editable }) => {\n const next = updated.find(u => u.oldValue.id === annotation.id);\n return next ? { annotation: next.newValue, editable } : { annotation, editable };\n })\n }));\n }\n\n store.observe(selectionStoreObserver, { annotations: selected.map(({ id }) => id) });\n });\n\n return () => {\n store.unobserve(onStoreChange);\n unsubscribeSelection();\n }\n }\n }, [anno]);\n\n return (\n <AnnotoriousContext.Provider value={{ \n anno, \n setAnno,\n annotations, \n selection \n }}>\n {props.children}\n </AnnotoriousContext.Provider>\n )\n\n});\n\nexport const useAnnotator = <T extends Annotator<any, unknown>>() => {\n const { anno } = useContext(AnnotoriousContext);\n return anno as T;\n}\n\nexport const useAnnotationStore = <T extends Store<Annotation>>() => {\n const { anno } = useContext(AnnotoriousContext);\n return anno?.state.store as T | undefined;\n}\n\nconst _useAnnotations = <T extends Annotation>() => {\n const { annotations } = useContext(AnnotoriousContext);\n return annotations as T[];\n}\n\nconst _useAnnotationsDebouced = <T extends Annotation>(debounce: number) => {\n const { annotations } = useContext(AnnotoriousContext);\n return useDebounce(annotations, debounce) as T[];\n}\n\nexport const useAnnotations = <T extends Annotation>(debounce?: number) =>\n debounce ? _useAnnotationsDebouced<T>(debounce) : _useAnnotations<T>();\n\nexport const useSelection = <T extends Annotation>() => {\n const { selection } = useContext(AnnotoriousContext);\n return selection as Selection<T>;\n}\n\nexport const useAnnotatorUser = () => {\n const { anno } = useContext(AnnotoriousContext);\n return anno?.getUser();\n}\n\nconst _useViewportState = <T extends Annotation>() => {\n const { anno } = useContext(AnnotoriousContext);\n\n const [inViewport, setInViewport] = useState<T[]>([]);\n\n useEffect(() => {\n if (anno) {\n const { store, viewport } = anno.state;\n\n if (!viewport)\n return;\n\n // Keep viewport annotations in sync with a react state, and resolve them\n // from IDs to annotations automatically, for convenience\n let viewportStoreObserver: (event: StoreChangeEvent<T>) => void;\n\n const unsubscribeViewport = viewport.subscribe(ids => {\n if (viewportStoreObserver) \n store.unobserve(viewportStoreObserver);\n\n const resolved = ids.map(id => store.getAnnotation(id)) as T[];\n setInViewport(resolved);\n\n viewportStoreObserver = event => {\n const { updated } = event.changes;\n\n setInViewport(annotations => annotations.map(annotation => {\n const next = updated.find(u => u.oldValue.id === annotation.id);\n return next ? next.newValue : annotation;\n }));\n }\n\n store.observe(viewportStoreObserver, { annotations: ids });\n });\n\n return () => {\n unsubscribeViewport();\n }\n }\n }, [anno]);\n\n return inViewport;\n}\n\nconst _useViewportStateDebounced = <T extends Annotation>(debounce: number) => {\n const inViewport = _useViewportState();\n return useDebounce(inViewport, debounce) as T[];\n}\n\nexport const useViewportState = <T extends Annotation>(debounce?: number) =>\n debounce ? _useViewportStateDebounced<T>(debounce) : _useViewportState<T>();\n"],"names":["AnnotoriousContext","createContext","Annotorious","forwardRef","props","ref","anno","setAnno","useState","annotations","setAnnotations","selection","setSelection","useImperativeHandle","useEffect","store","onStoreChange","event","selectionStoreObserver","unsubscribeSelection","selected","pointerEvent","resolved","id","editable","updated","annotation","next","u","jsx","useAnnotator","useContext","useAnnotationStore","_useAnnotations","_useAnnotationsDebouced","debounce","useDebounce","useAnnotations","useSelection","useAnnotatorUser","_useViewportState","inViewport","setInViewport","viewport","viewportStoreObserver","unsubscribeViewport","ids","_useViewportStateDebounced","useViewportState"],"mappings":";;;AAyBO,MAAMA,IAAqBC,EAAc;AAAA,EAE9C,MAAM;AAAA,EAEN,SAAS;AAAA,EAET,aAAa,CAAC;AAAA,EAEd,WAAW,EAAE,UAAU,GAAG;AAE5B,CAAC,GAEYC,IAAcC,EAA+C,CAACC,GAAgCC,MAAQ;AAEjH,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAoB,IAAI,GAE1C,CAACC,GAAaC,CAAc,IAAIF,EAAuB,CAAE,CAAA,GAEzD,CAACG,GAAWC,CAAY,IAAIJ,EAAoB,EAAE,UAAU,CAAC,EAAA,CAAG;AAElD,SAAAK,EAAAR,GAAK,MAAMC,CAAI,GAEnCQ,EAAU,MAAM;AACd,QAAIR,GAAM;AACR,YAAM,EAAE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,OAAM/B,EAAM,cAAcQ,CAAE,CAAC;AACtD,QAAAmB,EAAcpB,CAAQ,GAEtBsB,IAAwB,CAAS3B,MAAA;AACzB,gBAAA,EAAE,SAAAQ,EAAQ,IAAIR,EAAM;AAEZ,UAAAyB,EAAA,CAAAjC,MAAeA,EAAY,IAAI,CAAciB,MAAA;AACnD,kBAAAC,IAAOF,EAAQ,KAAK,CAAAG,MAAKA,EAAE,SAAS,OAAOF,EAAW,EAAE;AACvD,mBAAAC,IAAOA,EAAK,WAAWD;AAAA,UAC/B,CAAA,CAAC;AAAA,QAAA,GAGJX,EAAM,QAAQ6B,GAAuB,EAAE,aAAaE,EAAK,CAAA;AAAA,MAAA,CAC1D;AAED,aAAO,MAAM;AACS,QAAAD;MAAA;AAAA,IAExB;AAAA,EAAA,GACC,CAACvC,CAAI,CAAC,GAEFmC;AACT,GAEMM,IAA8B,CAAuBZ,MAAqB;AAC9E,QAAMM,IAAaD;AACZ,SAAAJ,EAAYK,GAAYN,CAAQ;AACzC,GAEaa,IAAoB,CAAuBb,MACtDA,IAAWY,EAA8BZ,CAAQ,IAAIK,EAAqB;"}
@@ -1,39 +1,33 @@
1
- import { jsx as v } from "./annotorious-react.es22.js";
2
- import { useRef as w, useState as d, useEffect as c } from "react";
3
- import { Draggable as S } from "./annotorious-react.es4.js";
4
- import { useViewer as x } from "./annotorious-react.es19.js";
5
- import { useSelection as D } from "./annotorious-react.es2.js";
6
- import { setPosition as I } from "./annotorious-react.es30.js";
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));
12
- return c(() => {
13
- const e = t.map(({ annotation: r }) => r.id);
14
- g(l, e) || (i(!1), f(e));
15
- }, [t]), c(() => {
16
- if (!n.current)
17
- return;
18
- s || p();
19
- const e = () => {
20
- s || p();
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
- };
1
+ import { __exports as t } from "./annotorious-react.es22.js";
2
+ import R from "react";
3
+ /**
4
+ * @license React
5
+ * react-jsx-runtime.production.min.js
6
+ *
7
+ * Copyright (c) Facebook, Inc. and its affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+ var p;
13
+ function v() {
14
+ if (p)
15
+ return t;
16
+ p = 1;
17
+ var s = R, m = Symbol.for("react.element"), l = Symbol.for("react.fragment"), c = Object.prototype.hasOwnProperty, d = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 };
18
+ function i(o, r, u) {
19
+ var e, n = {}, _ = null, f = null;
20
+ u !== void 0 && (_ = "" + u), r.key !== void 0 && (_ = "" + r.key), r.ref !== void 0 && (f = r.ref);
21
+ for (e in r)
22
+ c.call(r, e) && !y.hasOwnProperty(e) && (n[e] = r[e]);
23
+ if (o && o.defaultProps)
24
+ for (e in r = o.defaultProps, r)
25
+ n[e] === void 0 && (n[e] = r[e]);
26
+ return { $$typeof: m, type: o, key: _, ref: f, props: n, _owner: d.current };
27
+ }
28
+ return t.Fragment = l, t.jsx = i, t.jsxs = i, t;
29
+ }
36
30
  export {
37
- q as OpenSeadragonPopup
31
+ v as __require
38
32
  };
39
33
  //# sourceMappingURL=annotorious-react.es20.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-react.es20.js","sources":["../src/openseadragon/OpenSeadragonPopup.tsx"],"sourcesContent":["import { ReactNode, useEffect, useRef, useState } from 'react';\nimport { ImageAnnotation } from '@annotorious/annotorious';\nimport OpenSeadragon from 'openseadragon';\nimport { AnnotoriousPopupProps, Draggable } from '../AnnotoriousPopup';\nimport { useViewer } from './OpenSeadragonAnnotator';\nimport { useSelection } from '../Annotorious';\nimport { setPosition } from './setPosition';\n\nexport type OpenSeadragonPopupProps = AnnotoriousPopupProps & {\n\n viewer: OpenSeadragon.Viewer\n\n}\n\nexport type OpenSeadragonPopupContainerProps = {\n\n popup(props: OpenSeadragonPopupProps): ReactNode\n\n}\n\nexport const OpenSeadragonPopup = (props: OpenSeadragonPopupContainerProps) => {\n\n const el = useRef<HTMLDivElement>(null);\n\n const viewer = useViewer();\n\n const { selected } = useSelection<ImageAnnotation>();\n\n const [selectedIds, setSelectedIds] = useState<string[]>([]);\n\n const [dragged, setDragged] = useState(false);\n\n const onDragStart = () => setDragged(true);\n\n const updatePosition = () => {\n // Note: this popup only supports a single selection\n const annotation = selected[0].annotation;\n setPosition(viewer, annotation, el.current);\n }\n\n const equal = (a: string[], b: string[]) => \n a.every(str => b.includes(str)) && b.every(str => a.includes(str));\n\n useEffect(() => {\n // Reset drag flag if selected IDs have changed\n const nextIds = selected.map(({ annotation }) => annotation.id);\n\n if (!equal(selectedIds, nextIds)) {\n setDragged(false);\n setSelectedIds(nextIds);\n }\n }, [selected]);\n\n useEffect(() => {\n if (!el.current) return;\n\n if (!dragged) updatePosition();\n\n const onUpdateViewport = () => {\n if (!dragged) updatePosition();\n }\n\n viewer.addHandler('update-viewport', onUpdateViewport);\n\n return () => {\n viewer.removeHandler('update-viewport', onUpdateViewport);\n }\n }, [selected, dragged]);\n \n return selected.length > 0 ? (\n <Draggable \n ref={el} \n key={selected.map(({ annotation }) => annotation.id).join('-')} \n className=\"a9s-popup a9s-osd-popup\" \n onDragStart={onDragStart}>\n\n {props.popup({ viewer, selected })}\n \n </Draggable>\n ) : null;\n\n}"],"names":["OpenSeadragonPopup","props","el","useRef","viewer","useViewer","selected","useSelection","selectedIds","setSelectedIds","useState","dragged","setDragged","onDragStart","updatePosition","annotation","setPosition","equal","a","b","str","useEffect","nextIds","onUpdateViewport","jsx","Draggable"],"mappings":";;;;;;AAoBa,MAAAA,IAAqB,CAACC,MAA4C;AAEvE,QAAAC,IAAKC,EAAuB,IAAI,GAEhCC,IAASC,KAET,EAAE,UAAAC,MAAaC,KAEf,CAACC,GAAaC,CAAc,IAAIC,EAAmB,CAAE,CAAA,GAErD,CAACC,GAASC,CAAU,IAAIF,EAAS,EAAK,GAEtCG,IAAc,MAAMD,EAAW,EAAI,GAEnCE,IAAiB,MAAM;AAErB,UAAAC,IAAaT,EAAS,CAAC,EAAE;AACnB,IAAAU,EAAAZ,GAAQW,GAAYb,EAAG,OAAO;AAAA,EAAA,GAGtCe,IAAQ,CAACC,GAAaC,MAC1BD,EAAE,MAAM,OAAOC,EAAE,SAASC,CAAG,CAAC,KAAKD,EAAE,MAAM,OAAOD,EAAE,SAASE,CAAG,CAAC;AAEnE,SAAAC,EAAU,MAAM;AAER,UAAAC,IAAUhB,EAAS,IAAI,CAAC,EAAE,YAAAS,QAAiBA,EAAW,EAAE;AAE9D,IAAKE,EAAMT,GAAac,CAAO,MAC7BV,EAAW,EAAK,GAChBH,EAAea,CAAO;AAAA,EACxB,GACC,CAAChB,CAAQ,CAAC,GAEbe,EAAU,MAAM;AACd,QAAI,CAACnB,EAAG;AAAS;AAEjB,IAAKS,KAAwBG;AAE7B,UAAMS,IAAmB,MAAM;AAC7B,MAAKZ,KAAwBG;IAAA;AAGxB,WAAAV,EAAA,WAAW,mBAAmBmB,CAAgB,GAE9C,MAAM;AACJ,MAAAnB,EAAA,cAAc,mBAAmBmB,CAAgB;AAAA,IAAA;AAAA,EAC1D,GACC,CAACjB,GAAUK,CAAO,CAAC,GAEfL,EAAS,SAAS,IACvB,gBAAAkB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAKvB;AAAA,MAEL,WAAU;AAAA,MACV,aAAAW;AAAA,MAEC,UAAMZ,EAAA,MAAM,EAAE,QAAAG,GAAQ,UAAAE,GAAU;AAAA,IAAA;AAAA,IAJ5BA,EAAS,IAAI,CAAC,EAAE,YAAAS,EAAA,MAAiBA,EAAW,EAAE,EAAE,KAAK,GAAG;AAAA,EAO7D,IAAA;AAEN;"}
1
+ {"version":3,"file":"annotorious-react.es20.js","sources":["../../../node_modules/react/cjs/react-jsx-runtime.production.min.js"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n"],"names":["f","require$$0","k","m","n","p","q","c","a","g","b","d","e","h","reactJsxRuntime_production_min"],"mappings":";;;;;;;;;;;;;;;;AASa,MAAIA,IAAEC,GAAiBC,IAAE,OAAO,IAAI,eAAe,GAAE,IAAE,OAAO,IAAI,gBAAgB,GAAEC,IAAE,OAAO,UAAU,gBAAeC,IAAEJ,EAAE,mDAAmD,mBAAkBK,IAAE,EAAC,KAAI,IAAG,KAAI,IAAG,QAAO,IAAG,UAAS,GAAE;AAClP,WAASC,EAAEC,GAAEC,GAAEC,GAAE;AAAC,QAAIC,GAAEC,IAAE,IAAGC,IAAE,MAAKC,IAAE;AAAK,IAASJ,MAAT,WAAaG,IAAE,KAAGH,IAAYD,EAAE,QAAX,WAAiBI,IAAE,KAAGJ,EAAE,MAAcA,EAAE,QAAX,WAAiBK,IAAEL,EAAE;AAAK,SAAIE,KAAKF;AAAE,MAAAL,EAAE,KAAKK,GAAEE,CAAC,KAAG,CAACL,EAAE,eAAeK,CAAC,MAAIC,EAAED,CAAC,IAAEF,EAAEE,CAAC;AAAG,QAAGH,KAAGA,EAAE;AAAa,WAAIG,KAAKF,IAAED,EAAE,cAAaC;AAAE,QAASG,EAAED,CAAC,MAAZ,WAAgBC,EAAED,CAAC,IAAEF,EAAEE,CAAC;AAAG,WAAM,EAAC,UAASR,GAAE,MAAKK,GAAE,KAAIK,GAAE,KAAIC,GAAE,OAAMF,GAAE,QAAOP,EAAE,QAAO;AAAA,EAAC;AAAC,SAAAU,aAAiB,GAAEA,EAAW,MAACR,GAAEQ,EAAA,OAAaR;;","x_google_ignoreList":[0]}