@annotorious/react 3.7.7 → 3.7.9

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,40 +1,41 @@
1
- import { jsx as b } from "react/jsx-runtime";
2
- import { useState as c, useEffect as E } from "react";
3
- import { createPortal as h } from "react-dom";
4
- import { useAnnotator as y } from "./annotorious-react.es2.js";
5
- import { useViewer as A } from "./annotorious-react.es8.js";
6
- const m = 10, T = (n) => {
7
- const a = n.offsetX || m, v = n.offsetY || m, o = y(), t = A(), [s, p] = c(), [r, i] = c();
8
- return E(() => {
1
+ import { jsx as h } from "react/jsx-runtime";
2
+ import { useMemo as S, useState as m, useEffect as g } from "react";
3
+ import { createPortal as y } from "react-dom";
4
+ import { useAnnotator as A, useSelection as F } from "./annotorious-react.es2.js";
5
+ import { useViewer as H } from "./annotorious-react.es8.js";
6
+ const l = 10, w = (n) => {
7
+ const a = n.offsetX || l, v = n.offsetY || l, o = A(), r = F(), p = S(() => r.selected.length > 0, [r]), t = H(), [s, u] = m(), [i, c] = m();
8
+ return g(() => {
9
9
  if (!o || !t) return;
10
- const l = (e) => {
11
- i(e ? o.state.store.getAnnotation(e) : void 0);
10
+ const d = (e) => {
11
+ c(e ? o.state.store.getAnnotation(e) : void 0);
12
12
  }, f = (e) => {
13
- const { offsetX: d, offsetY: x } = e;
14
- p({ x: d, y: x });
13
+ const { offsetX: E, offsetY: b } = e;
14
+ u({ x: E, y: b });
15
15
  };
16
16
  t.element.addEventListener("pointermove", f);
17
- const u = o.state.hover.subscribe(l);
17
+ const x = o.state.hover.subscribe(d);
18
18
  return () => {
19
19
  var e;
20
- (e = t.element) == null || e.removeEventListener("pointermove", f), u();
20
+ (e = t.element) == null || e.removeEventListener("pointermove", f), x();
21
21
  };
22
- }, [o, t]), r && s && h(
23
- /* @__PURE__ */ b(
22
+ }, [o, t]), i && s && !p && y(
23
+ /* @__PURE__ */ h(
24
24
  "div",
25
25
  {
26
26
  style: {
27
27
  position: "absolute",
28
28
  top: `${s.y + v}px`,
29
- left: `${s.x + a}px`
29
+ left: `${s.x + a}px`,
30
+ pointerEvents: "none"
30
31
  },
31
- children: n.tooltip({ annotation: r })
32
+ children: n.tooltip({ annotation: i })
32
33
  }
33
34
  ),
34
35
  t.element
35
36
  );
36
37
  };
37
38
  export {
38
- T as OpenSeadragonHoverTooltip
39
+ w as OpenSeadragonHoverTooltip
39
40
  };
40
41
  //# sourceMappingURL=annotorious-react.es10.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-react.es10.js","sources":["../src/openseadragon/OpenSeadragonHoverTooltip.tsx"],"sourcesContent":["import { ReactNode, useEffect, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { Annotation } from '@annotorious/core';\nimport { ImageAnnotation } from '@annotorious/annotorious';\nimport { useAnnotator } from '../Annotorious';\nimport { AnnotoriousOpenSeadragonAnnotator, useViewer } from '.';\n\ninterface HoverTooltipContentProps <T extends Annotation = ImageAnnotation> {\n \n annotation: T;\n\n}\n\ninterface OpenSeadragonHoverTooltipProps {\n\n offsetX?: number;\n\n offsetY?: number;\n\n tooltip: (props: HoverTooltipContentProps) => ReactNode;\n\n}\n\nconst DEFAULT_OFFSET = 10;\n\nexport const OpenSeadragonHoverTooltip = (props: OpenSeadragonHoverTooltipProps) => {\n\n const offsetX = props.offsetX || DEFAULT_OFFSET;\n const offsetY = props.offsetY || DEFAULT_OFFSET;\n\n const anno = useAnnotator<AnnotoriousOpenSeadragonAnnotator>();\n\n const viewer = useViewer();\n\n const [pos, setPos] = useState<{ x: number, y: number } | undefined>();\n\n const [hovered, setHovered] = useState<ImageAnnotation | undefined>();\n\n useEffect(() => {\n if (!anno || !viewer) return;\n\n const onHover = (id: string) => {\n if (id)\n setHovered(anno.state.store.getAnnotation(id));\n else\n setHovered(undefined);\n }\n\n const onPointerMove = (evt: PointerEvent) => {\n const { offsetX: x, offsetY: y } = evt;\n setPos({ x, y });\n }\n\n viewer.element.addEventListener('pointermove', onPointerMove);\n const unsubscribe = anno.state.hover.subscribe(onHover);\n\n return () => {\n viewer.element?.removeEventListener('pointermove', onPointerMove);\n unsubscribe();\n }\n }, [anno, viewer]);\n\n return (hovered && pos) && createPortal(\n <div \n style={{ \n position: 'absolute',\n top: `${pos.y + offsetY}px`,\n left: `${pos.x + offsetX}px`\n }}>\n {props.tooltip({ annotation: hovered })}\n </div>\n , viewer.element)\n\n}"],"names":["DEFAULT_OFFSET","OpenSeadragonHoverTooltip","props","offsetX","offsetY","anno","useAnnotator","viewer","useViewer","pos","setPos","useState","hovered","setHovered","useEffect","onHover","id","onPointerMove","evt","x","y","unsubscribe","_a","createPortal","jsx"],"mappings":";;;;;AAuBA,MAAMA,IAAiB,IAEVC,IAA4B,CAACC,MAA0C;AAElF,QAAMC,IAAUD,EAAM,WAAWF,GAC3BI,IAAUF,EAAM,WAAWF,GAE3BK,IAAOC,EAAA,GAEPC,IAASC,EAAA,GAET,CAACC,GAAKC,CAAM,IAAIC,EAAA,GAEhB,CAACC,GAASC,CAAU,IAAIF,EAAA;AAE9B,SAAAG,EAAU,MAAM;AACd,QAAI,CAACT,KAAQ,CAACE,EAAQ;AAEtB,UAAMQ,IAAU,CAACC,MAAe;AAC9B,MACEH,EADEG,IACSX,EAAK,MAAM,MAAM,cAAcW,CAAE,IAEjC,MAFkC;AAAA,IAGjD,GAEMC,IAAgB,CAACC,MAAsB;AAC3C,YAAM,EAAE,SAASC,GAAG,SAASC,MAAMF;AACnC,MAAAR,EAAO,EAAE,GAAAS,GAAG,GAAAC,GAAG;AAAA,IACjB;AAEA,IAAAb,EAAO,QAAQ,iBAAiB,eAAeU,CAAa;AAC5D,UAAMI,IAAchB,EAAK,MAAM,MAAM,UAAUU,CAAO;AAEtD,WAAO,MAAM;;AACX,OAAAO,IAAAf,EAAO,YAAP,QAAAe,EAAgB,oBAAoB,eAAeL,IACnDI,EAAA;AAAA,IACF;AAAA,EACF,GAAG,CAAChB,GAAME,CAAM,CAAC,GAETK,KAAWH,KAAQc;AAAA,IACzB,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL,UAAU;AAAA,UACV,KAAK,GAAGf,EAAI,IAAIL,CAAO;AAAA,UACvB,MAAM,GAAGK,EAAI,IAAIN,CAAO;AAAA,QAAA;AAAA,QAEzB,UAAAD,EAAM,QAAQ,EAAE,YAAYU,GAAS;AAAA,MAAA;AAAA,IAAA;AAAA,IAExCL,EAAO;AAAA,EAAA;AAEX;"}
1
+ {"version":3,"file":"annotorious-react.es10.js","sources":["../src/openseadragon/OpenSeadragonHoverTooltip.tsx"],"sourcesContent":["import { ReactNode, useEffect, useMemo, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport { Annotation } from '@annotorious/core';\nimport { ImageAnnotation } from '@annotorious/annotorious';\nimport { useAnnotator, useSelection } from '../Annotorious';\nimport { AnnotoriousOpenSeadragonAnnotator, useViewer } from '.';\n\ninterface HoverTooltipContentProps <T extends Annotation = ImageAnnotation> {\n \n annotation: T;\n\n}\n\ninterface OpenSeadragonHoverTooltipProps {\n\n offsetX?: number;\n\n offsetY?: number;\n\n tooltip: (props: HoverTooltipContentProps) => ReactNode;\n\n}\n\nconst DEFAULT_OFFSET = 10;\n\nexport const OpenSeadragonHoverTooltip = (props: OpenSeadragonHoverTooltipProps) => {\n\n const offsetX = props.offsetX || DEFAULT_OFFSET;\n const offsetY = props.offsetY || DEFAULT_OFFSET;\n\n const anno = useAnnotator<AnnotoriousOpenSeadragonAnnotator>();\n\n const selection = useSelection();\n\n const hasSelection = useMemo(() => selection.selected.length > 0, [selection]);\n\n const viewer = useViewer();\n\n const [pos, setPos] = useState<{ x: number, y: number } | undefined>();\n\n const [hovered, setHovered] = useState<ImageAnnotation | undefined>();\n\n useEffect(() => {\n if (!anno || !viewer) return;\n\n const onHover = (id: string) => {\n if (id)\n setHovered(anno.state.store.getAnnotation(id));\n else\n setHovered(undefined);\n }\n\n const onPointerMove = (evt: PointerEvent) => {\n const { offsetX: x, offsetY: y } = evt;\n setPos({ x, y });\n }\n\n viewer.element.addEventListener('pointermove', onPointerMove);\n const unsubscribe = anno.state.hover.subscribe(onHover);\n\n return () => {\n viewer.element?.removeEventListener('pointermove', onPointerMove);\n unsubscribe();\n }\n }, [anno, viewer]);\n\n return (hovered && pos && !hasSelection) && createPortal(\n <div \n style={{ \n position: 'absolute',\n top: `${pos.y + offsetY}px`,\n left: `${pos.x + offsetX}px`,\n pointerEvents: 'none'\n }}>\n {props.tooltip({ annotation: hovered })}\n </div>\n , viewer.element)\n\n}"],"names":["DEFAULT_OFFSET","OpenSeadragonHoverTooltip","props","offsetX","offsetY","anno","useAnnotator","selection","useSelection","hasSelection","useMemo","viewer","useViewer","pos","setPos","useState","hovered","setHovered","useEffect","onHover","id","onPointerMove","evt","x","y","unsubscribe","_a","createPortal","jsx"],"mappings":";;;;;AAuBA,MAAMA,IAAiB,IAEVC,IAA4B,CAACC,MAA0C;AAElF,QAAMC,IAAUD,EAAM,WAAWF,GAC3BI,IAAUF,EAAM,WAAWF,GAE3BK,IAAOC,EAAA,GAEPC,IAAYC,EAAA,GAEZC,IAAeC,EAAQ,MAAMH,EAAU,SAAS,SAAS,GAAG,CAACA,CAAS,CAAC,GAEvEI,IAASC,EAAA,GAET,CAACC,GAAKC,CAAM,IAAIC,EAAA,GAEhB,CAACC,GAASC,CAAU,IAAIF,EAAA;AAE9B,SAAAG,EAAU,MAAM;AACd,QAAI,CAACb,KAAQ,CAACM,EAAQ;AAEtB,UAAMQ,IAAU,CAACC,MAAe;AAC9B,MACEH,EADEG,IACSf,EAAK,MAAM,MAAM,cAAce,CAAE,IAEjC,MAFkC;AAAA,IAGjD,GAEMC,IAAgB,CAACC,MAAsB;AAC3C,YAAM,EAAE,SAASC,GAAG,SAASC,MAAMF;AACnC,MAAAR,EAAO,EAAE,GAAAS,GAAG,GAAAC,GAAG;AAAA,IACjB;AAEA,IAAAb,EAAO,QAAQ,iBAAiB,eAAeU,CAAa;AAC5D,UAAMI,IAAcpB,EAAK,MAAM,MAAM,UAAUc,CAAO;AAEtD,WAAO,MAAM;;AACX,OAAAO,IAAAf,EAAO,YAAP,QAAAe,EAAgB,oBAAoB,eAAeL,IACnDI,EAAA;AAAA,IACF;AAAA,EACF,GAAG,CAACpB,GAAMM,CAAM,CAAC,GAETK,KAAWH,KAAO,CAACJ,KAAiBkB;AAAA,IAC1C,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,OAAO;AAAA,UACL,UAAU;AAAA,UACV,KAAK,GAAGf,EAAI,IAAIT,CAAO;AAAA,UACvB,MAAM,GAAGS,EAAI,IAAIV,CAAO;AAAA,UACxB,eAAe;AAAA,QAAA;AAAA,QAEhB,UAAAD,EAAM,QAAQ,EAAE,YAAYc,GAAS;AAAA,MAAA;AAAA,IAAA;AAAA,IAExCL,EAAO;AAAA,EAAA;AAEX;"}
@@ -1,19 +1,43 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { forwardRef as m, useRef as p, useContext as u, useLayoutEffect as c, useImperativeHandle as d } from "react";
3
- import l from "openseadragon";
4
- import { OpenSeadragonAnnotatorContext as v } from "./annotorious-react.es8.js";
5
- const S = m((n, s) => {
6
- const { className: i, options: t } = n, r = p(null), { viewer: a, setViewer: e } = u(v);
7
- return c(() => {
8
- if (r.current) {
9
- const o = l({ ...t, element: r.current });
10
- return e && e(o), () => {
11
- e && e(void 0), o.destroy();
1
+ import { jsx as g } from "react/jsx-runtime";
2
+ import { forwardRef as y, useRef as d, useContext as O, useLayoutEffect as v, useImperativeHandle as R } from "react";
3
+ import w from "openseadragon";
4
+ import { dequal as m } from "./annotorious-react.es12.js";
5
+ import { OpenSeadragonAnnotatorContext as h } from "./annotorious-react.es8.js";
6
+ const x = (c, u) => {
7
+ if (!c) return !1;
8
+ const { tileSources: l, ...e } = c, { tileSources: o, ...n } = u, s = !m(l, o), a = !m(e, n);
9
+ return s && !a;
10
+ }, H = y((c, u) => {
11
+ const { className: l, options: e } = c, o = d(null), n = d(null), s = d(null), { viewer: a, setViewer: t } = O(h);
12
+ return v(() => {
13
+ if (o.current && !n.current) {
14
+ const r = w({ ...e, element: o.current });
15
+ return n.current = r, s.current = e, t && t(r), () => {
16
+ t && t(void 0), r.destroy(), n.current = void 0;
12
17
  };
13
18
  }
14
- }, [t]), d(s, () => a), /* @__PURE__ */ f("div", { className: i, ref: r });
19
+ }, []), v(() => {
20
+ const r = n.current, f = s.current;
21
+ if (!(!r || !f)) {
22
+ if (x(f, e)) {
23
+ const i = Array.isArray(e.tileSources) ? e.tileSources : [e.tileSources];
24
+ r.world.removeAll(), i.forEach((S, p) => {
25
+ r.addTiledImage({
26
+ tileSource: S,
27
+ index: p,
28
+ success: () => {
29
+ p === 0 && r.viewport.goHome();
30
+ }
31
+ });
32
+ });
33
+ } else if (!m(f, e) && (console.warn("Forced re-creation of OpenSeadragon viewer. Beware of race conditions!"), t && t(void 0), r.destroy(), o.current)) {
34
+ const i = w({ ...e, element: o.current });
35
+ n.current = i, s.current = e, t && t(i);
36
+ }
37
+ }
38
+ }, [e]), R(u, () => a), /* @__PURE__ */ g("div", { className: l, ref: o });
15
39
  });
16
40
  export {
17
- S as OpenSeadragonViewer
41
+ H as OpenSeadragonViewer
18
42
  };
19
43
  //# sourceMappingURL=annotorious-react.es11.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-react.es11.js","sources":["../src/openseadragon/OpenSeadragonViewer.tsx"],"sourcesContent":["import { forwardRef, useContext, useEffect, useImperativeHandle, useLayoutEffect, 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 useLayoutEffect(() => { \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 }, [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","useLayoutEffect","v","OpenSeadragon","useImperativeHandle","jsx"],"mappings":";;;;AAYO,MAAMA,IAAsBC,EAA2D,CAACC,GAAiCC,MAAQ;AAEtI,QAAM,EAAE,WAAAC,GAAW,SAAAC,EAAA,IAAYH,GAEzBI,IAAUC,EAAuB,IAAI,GAErC,EAAE,QAAAC,GAAQ,WAAAC,MAAcC,EAAWC,CAA6B;AAEtE,SAAAC,EAAgB,MAAM;AACpB,QAAIN,EAAQ,SAAS;AACnB,YAAMO,IAAIC,EAAc,EAAC,GAAGT,GAAS,SAASC,EAAQ,SAAS;AAI/D,aAAIG,KACFA,EAAUI,CAAC,GAEN,MAAM;AACX,QAAIJ,KACFA,EAAU,MAAS,GAErBI,EAAE,QAAA;AAAA,MACJ;AAAA,IACF;AAAA,EACF,GAAG,CAACR,CAAO,CAAC,GAEZU,EAAoBZ,GAAK,MAAMK,CAAM,GAGnC,gBAAAQ,EAAC,OAAA,EAAI,WAAAZ,GAAsB,KAAKE,EAAA,CAAS;AAG7C,CAAC;"}
1
+ {"version":3,"file":"annotorious-react.es11.js","sources":["../src/openseadragon/OpenSeadragonViewer.tsx"],"sourcesContent":["import { forwardRef, useContext, useImperativeHandle, useLayoutEffect, useRef } from 'react';\nimport OpenSeadragon from 'openseadragon';\nimport { dequal } from 'dequal/lite';\nimport { OpenSeadragonAnnotatorContext } from './OpenSeadragonAnnotator';\n\nexport interface OpenSeadragonViewerProps {\n\n className?: string;\n\n options: OpenSeadragon.Options;\n\n}\n\n/**\n * If the only thing that changes about the options are the tileSources, \n * there's no need to destroy and re-create the viewer, which can introduce\n * dangerous race conditions and break interop with plugins. (Changing \n * tileSources is probably the main use case by far.)\n */\nconst onlyTileSourcesChanged = (prev: OpenSeadragon.Options | undefined, next: OpenSeadragon.Options): boolean => {\n if (!prev) return false;\n\n const { tileSources: prevTiles, ...prevRest } = prev;\n const { tileSources: nextTiles, ...nextRest } = next;\n\n const tileSourcesChanged = !dequal(prevTiles, nextTiles);\n const otherOptionsChanged = !dequal(prevRest, nextRest);\n\n return tileSourcesChanged && !otherOptionsChanged;\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 const viewerRef = useRef<OpenSeadragon.Viewer | undefined>(null);\n const prevOptionsRef = useRef<OpenSeadragon.Options>(null);\n\n const { viewer, setViewer } = useContext(OpenSeadragonAnnotatorContext);\n\n // Init and destroy the OSD viewer on mount/unmount\n useLayoutEffect(() => { \n if (element.current && !viewerRef.current) {\n const v = OpenSeadragon({...options, element: element.current });\n viewerRef.current = v;\n prevOptionsRef.current = options;\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 viewerRef.current = undefined;\n }\n }\n }, []);\n\n useLayoutEffect(() => { \n const v = viewerRef.current;\n const prev = prevOptionsRef.current;\n if (!v || !prev) return; \n\n if (onlyTileSourcesChanged(prev, options)) { \n const tileSources: OpenSeadragon.Options['tileSources'][] = \n Array.isArray(options.tileSources) ? options.tileSources : [options.tileSources];\n \n v.world.removeAll();\n\n tileSources.forEach((tileSource, index) => {\n v.addTiledImage({\n tileSource,\n index,\n success: () => {\n if (index === 0) {\n v.viewport.goHome();\n }\n }\n });\n });\n } else if (!dequal(prev, options)) {\n console.warn('Forced re-creation of OpenSeadragon viewer. Beware of race conditions!');\n \n if (setViewer)\n setViewer(undefined);\n \n v.destroy();\n\n if (element.current) {\n const newViewer = OpenSeadragon({...options, element: element.current });\n viewerRef.current = newViewer;\n prevOptionsRef.current = options;\n\n if (setViewer)\n setViewer(newViewer);\n }\n }\n }, [options]);\n\n useImperativeHandle(ref, () => viewer);\n\n return (\n <div className={className} ref={element} />\n );\n\n});"],"names":["onlyTileSourcesChanged","prev","next","prevTiles","prevRest","nextTiles","nextRest","tileSourcesChanged","dequal","otherOptionsChanged","OpenSeadragonViewer","forwardRef","props","ref","className","options","element","useRef","viewerRef","prevOptionsRef","viewer","setViewer","useContext","OpenSeadragonAnnotatorContext","useLayoutEffect","v","OpenSeadragon","tileSources","tileSource","index","newViewer","useImperativeHandle","jsx"],"mappings":";;;;;AAmBA,MAAMA,IAAyB,CAACC,GAAyCC,MAAyC;AAC9G,MAAI,CAACD,EAAM,QAAO;AAElB,QAAM,EAAE,aAAaE,GAAW,GAAGC,MAAaH,GAC1C,EAAE,aAAaI,GAAW,GAAGC,MAAaJ,GAE1CK,IAAqB,CAACC,EAAOL,GAAWE,CAAS,GACjDI,IAAsB,CAACD,EAAOJ,GAAUE,CAAQ;AAEtD,SAAOC,KAAsB,CAACE;AAChC,GAEWC,IAAsBC,EAA2D,CAACC,GAAiCC,MAAQ;AAEtI,QAAM,EAAE,WAAAC,GAAW,SAAAC,EAAA,IAAYH,GAEzBI,IAAUC,EAAuB,IAAI,GACrCC,IAAYD,EAAyC,IAAI,GACzDE,IAAiBF,EAA8B,IAAI,GAEnD,EAAE,QAAAG,GAAQ,WAAAC,MAAcC,EAAWC,CAA6B;AAGtE,SAAAC,EAAgB,MAAM;AACpB,QAAIR,EAAQ,WAAW,CAACE,EAAU,SAAS;AACzC,YAAMO,IAAIC,EAAc,EAAC,GAAGX,GAAS,SAASC,EAAQ,SAAS;AAC/D,aAAAE,EAAU,UAAUO,GACpBN,EAAe,UAAUJ,GAIrBM,KACFA,EAAUI,CAAC,GAEN,MAAM;AACX,QAAIJ,KACFA,EAAU,MAAS,GAErBI,EAAE,QAAA,GACFP,EAAU,UAAU;AAAA,MACtB;AAAA,IACF;AAAA,EACF,GAAG,CAAA,CAAE,GAELM,EAAgB,MAAM;AACpB,UAAMC,IAAIP,EAAU,SACdjB,IAAOkB,EAAe;AAC5B,QAAI,GAACM,KAAK,CAACxB;AAEX,UAAID,EAAuBC,GAAMc,CAAO,GAAG;AACzC,cAAMY,IACJ,MAAM,QAAQZ,EAAQ,WAAW,IAAIA,EAAQ,cAAc,CAACA,EAAQ,WAAW;AAEjF,QAAAU,EAAE,MAAM,UAAA,GAERE,EAAY,QAAQ,CAACC,GAAYC,MAAU;AACzC,UAAAJ,EAAE,cAAc;AAAA,YACd,YAAAG;AAAA,YACA,OAAAC;AAAA,YACA,SAAS,MAAM;AACb,cAAIA,MAAU,KACZJ,EAAE,SAAS,OAAA;AAAA,YAEf;AAAA,UAAA,CACD;AAAA,QACH,CAAC;AAAA,MACH,WAAW,CAACjB,EAAOP,GAAMc,CAAO,MAC9B,QAAQ,KAAK,wEAAwE,GAEjFM,KACFA,EAAU,MAAS,GAErBI,EAAE,QAAA,GAEET,EAAQ,UAAS;AACnB,cAAMc,IAAYJ,EAAc,EAAC,GAAGX,GAAS,SAASC,EAAQ,SAAS;AACvE,QAAAE,EAAU,UAAUY,GACpBX,EAAe,UAAUJ,GAErBM,KACFA,EAAUS,CAAS;AAAA,MACvB;AAAA;AAAA,EAEJ,GAAG,CAACf,CAAO,CAAC,GAEZgB,EAAoBlB,GAAK,MAAMO,CAAM,GAGnC,gBAAAY,EAAC,OAAA,EAAI,WAAAlB,GAAsB,KAAKE,EAAA,CAAS;AAG7C,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"OpenSeadragonHoverTooltip.d.ts","sourceRoot":"","sources":["../../src/openseadragon/OpenSeadragonHoverTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAI3D,UAAU,wBAAwB,CAAE,CAAC,SAAS,UAAU,GAAG,eAAe;IAExE,UAAU,EAAE,CAAC,CAAC;CAEf;AAED,UAAU,8BAA8B;IAEtC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,OAAO,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,SAAS,CAAC;CAEzD;AAID,eAAO,MAAM,yBAAyB,GAAI,OAAO,8BAA8B,gCAgD9E,CAAA"}
1
+ {"version":3,"file":"OpenSeadragonHoverTooltip.d.ts","sourceRoot":"","sources":["../../src/openseadragon/OpenSeadragonHoverTooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAgC,MAAM,OAAO,CAAC;AAEhE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAI3D,UAAU,wBAAwB,CAAE,CAAC,SAAS,UAAU,GAAG,eAAe;IAExE,UAAU,EAAE,CAAC,CAAC;CAEf;AAED,UAAU,8BAA8B;IAEtC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,OAAO,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,SAAS,CAAC;CAEzD;AAID,eAAO,MAAM,yBAAyB,GAAI,OAAO,8BAA8B,gCAqD9E,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"OpenSeadragonViewer.d.ts","sourceRoot":"","sources":["../../src/openseadragon/OpenSeadragonViewer.tsx"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,eAAe,CAAC;AAG1C,MAAM,WAAW,wBAAwB;IAEvC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC;CAEhC;AAED,eAAO,MAAM,mBAAmB,2HAgC9B,CAAC"}
1
+ {"version":3,"file":"OpenSeadragonViewer.d.ts","sourceRoot":"","sources":["../../src/openseadragon/OpenSeadragonViewer.tsx"],"names":[],"mappings":"AACA,OAAO,aAAa,MAAM,eAAe,CAAC;AAI1C,MAAM,WAAW,wBAAwB;IAEvC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,OAAO,EAAE,aAAa,CAAC,OAAO,CAAC;CAEhC;AAoBD,eAAO,MAAM,mBAAmB,2HA+E9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annotorious/react",
3
- "version": "3.7.7",
3
+ "version": "3.7.9",
4
4
  "description": "Annotorious React bindings",
5
5
  "author": "Rainer Simon",
6
6
  "license": "BSD-3-Clause",
@@ -26,10 +26,10 @@
26
26
  "./annotorious-react.css": "./dist/annotorious-react.css"
27
27
  },
28
28
  "devDependencies": {
29
- "@types/react": "^19.1.12",
30
- "@types/react-dom": "^19.1.9",
29
+ "@types/react": "^19.2.2",
30
+ "@types/react-dom": "^19.2.1",
31
31
  "@vitejs/plugin-react": "^4.7.0",
32
- "typescript": "^5.9.2",
32
+ "typescript": "^5.9.3",
33
33
  "vite": "^5.4.20",
34
34
  "vite-plugin-dts": "^4.5.4",
35
35
  "vite-tsconfig-paths": "^5.1.4"
@@ -45,9 +45,9 @@
45
45
  }
46
46
  },
47
47
  "dependencies": {
48
- "@annotorious/annotorious": "3.7.7",
49
- "@annotorious/core": "3.7.7",
50
- "@annotorious/openseadragon": "3.7.7",
48
+ "@annotorious/annotorious": "3.7.9",
49
+ "@annotorious/core": "3.7.9",
50
+ "@annotorious/openseadragon": "3.7.9",
51
51
  "@floating-ui/react": "^0.27.16",
52
52
  "dequal": "^2.0.3",
53
53
  "zustand": "^5.0.8"