@annotorious/react-manifold 3.0.0-rc.19 → 3.0.0-rc.20

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 (42) hide show
  1. package/dist/AnnotoriousManifoldInstance.d.ts.map +1 -1
  2. package/dist/annotorious-react-manifold.es10.js +7 -599
  3. package/dist/annotorious-react-manifold.es10.js.map +1 -1
  4. package/dist/annotorious-react-manifold.es11.js +16 -2
  5. package/dist/annotorious-react-manifold.es11.js.map +1 -1
  6. package/dist/annotorious-react-manifold.es12.js +2 -2
  7. package/dist/annotorious-react-manifold.es13.js +33 -0
  8. package/dist/annotorious-react-manifold.es13.js.map +1 -0
  9. package/dist/annotorious-react-manifold.es14.js +602 -0
  10. package/dist/annotorious-react-manifold.es14.js.map +1 -0
  11. package/dist/annotorious-react-manifold.es15.js +5 -0
  12. package/dist/annotorious-react-manifold.es15.js.map +1 -0
  13. package/dist/annotorious-react-manifold.es16.js +5 -0
  14. package/dist/annotorious-react-manifold.es16.js.map +1 -0
  15. package/dist/annotorious-react-manifold.es17.js +9 -0
  16. package/dist/annotorious-react-manifold.es17.js.map +1 -0
  17. package/dist/annotorious-react-manifold.es18.js +5 -0
  18. package/dist/annotorious-react-manifold.es18.js.map +1 -0
  19. package/dist/annotorious-react-manifold.es19.js +33 -0
  20. package/dist/annotorious-react-manifold.es19.js.map +1 -0
  21. package/dist/annotorious-react-manifold.es2.js +11 -10
  22. package/dist/annotorious-react-manifold.es2.js.map +1 -1
  23. package/dist/annotorious-react-manifold.es20.js +602 -0
  24. package/dist/annotorious-react-manifold.es20.js.map +1 -0
  25. package/dist/annotorious-react-manifold.es21.js +5 -0
  26. package/dist/annotorious-react-manifold.es21.js.map +1 -0
  27. package/dist/annotorious-react-manifold.es22.js +5 -0
  28. package/dist/annotorious-react-manifold.es22.js.map +1 -0
  29. package/dist/annotorious-react-manifold.es4.js +6 -6
  30. package/dist/annotorious-react-manifold.es6.js +1 -1
  31. package/dist/annotorious-react-manifold.es7.js +3 -3
  32. package/dist/annotorious-react-manifold.es7.js.map +1 -1
  33. package/dist/annotorious-react-manifold.es8.js +46 -2
  34. package/dist/annotorious-react-manifold.es8.js.map +1 -1
  35. package/dist/annotorious-react-manifold.es9.js +14 -30
  36. package/dist/annotorious-react-manifold.es9.js.map +1 -1
  37. package/dist/openseadragon/OpenSeadragonViewerManifold.d.ts +1 -0
  38. package/dist/openseadragon/OpenSeadragonViewerManifold.d.ts.map +1 -1
  39. package/dist/synchronizeInstances.d.ts.map +1 -1
  40. package/package.json +12 -9
  41. package/LICENSE +0 -28
  42. package/README.md +0 -7
@@ -0,0 +1,5 @@
1
+ var r = {};
2
+ export {
3
+ r as __exports
4
+ };
5
+ //# sourceMappingURL=annotorious-react-manifold.es21.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotorious-react-manifold.es21.js","sources":["../../annotorious-react/dist/annotorious-react.es21.js"],"sourcesContent":["var r = {};\nexport {\n r as __exports\n};\n//# sourceMappingURL=annotorious-react.es21.js.map\n"],"names":[],"mappings":"AAAG,IAAC,IAAI,CAAA;"}
@@ -0,0 +1,5 @@
1
+ var e = {};
2
+ export {
3
+ e as __exports
4
+ };
5
+ //# sourceMappingURL=annotorious-react-manifold.es22.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotorious-react-manifold.es22.js","sources":["../../annotorious-react/dist/annotorious-react.es22.js"],"sourcesContent":["var e = {};\nexport {\n e as __exports\n};\n//# sourceMappingURL=annotorious-react.es22.js.map\n"],"names":[],"mappings":"AAAG,IAAC,IAAI,CAAA;"}
@@ -1,15 +1,15 @@
1
1
  import { j as o } from "./annotorious-react-manifold.es7.js";
2
2
  import { useContext as i, useEffect as e } from "react";
3
- import { Annotorious as s, useAnnotator as c } from "@annotorious/react";
4
- import { AnnotoriousManifoldContext as u } from "./annotorious-react-manifold.es5.js";
5
- const m = (n) => {
6
- const t = c(), { connectAnnotator: r } = i(u);
3
+ import { Annotorious as s, useAnnotator as c } from "./annotorious-react-manifold.es8.js";
4
+ import { AnnotoriousManifoldContext as m } from "./annotorious-react-manifold.es5.js";
5
+ const u = (n) => {
6
+ const t = c(), { connectAnnotator: r } = i(m);
7
7
  return e(() => {
8
8
  if (t)
9
9
  return r(n.id, t);
10
10
  }, [t]), /* @__PURE__ */ o.jsx(o.Fragment, { children: n.children });
11
- }, A = (n) => /* @__PURE__ */ o.jsx(s, { children: /* @__PURE__ */ o.jsx(m, { id: n.id, children: n.children }) });
11
+ }, h = (n) => /* @__PURE__ */ o.jsx(s, { children: /* @__PURE__ */ o.jsx(u, { id: n.id, children: n.children }) });
12
12
  export {
13
- A as Annotorious
13
+ h as Annotorious
14
14
  };
15
15
  //# sourceMappingURL=annotorious-react-manifold.es4.js.map
@@ -1,4 +1,4 @@
1
- import { Origin as c } from "@annotorious/react";
1
+ import { Origin as c } from "./annotorious-react-manifold.es9.js";
2
2
  const B = (r) => {
3
3
  const e = (t) => Array.from(r.entries()).reduce((o, [n, s]) => {
4
4
  if (o)
@@ -1,6 +1,6 @@
1
- import { __module as e } from "./annotorious-react-manifold.es8.js";
2
- import { __require as r } from "./annotorious-react-manifold.es9.js";
3
- import { __require as o } from "./annotorious-react-manifold.es10.js";
1
+ import { __module as e } from "./annotorious-react-manifold.es12.js";
2
+ import { __require as r } from "./annotorious-react-manifold.es13.js";
3
+ import { __require as o } from "./annotorious-react-manifold.es14.js";
4
4
  process.env.NODE_ENV === "production" ? e.exports = r() : e.exports = o();
5
5
  var m = e.exports;
6
6
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-react-manifold.es7.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
+ {"version":3,"file":"annotorious-react-manifold.es7.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,5 +1,49 @@
1
- var e = { exports: {} };
1
+ import { j as S } from "./annotorious-react-manifold.es17.js";
2
+ import { createContext as B, forwardRef as F, useState as i, useImperativeHandle as H, useEffect as I, useContext as P } from "react";
3
+ const p = B({
4
+ anno: void 0,
5
+ setAnno: void 0,
6
+ annotations: [],
7
+ selection: { selected: [] }
8
+ }), $ = F((a, m) => {
9
+ const [t, f] = i(null), [A, r] = i([]), [g, l] = i({ selected: [] });
10
+ return H(m, () => t), I(() => {
11
+ if (t) {
12
+ const { selection: h, store: e } = t.state;
13
+ e.all().length > 0 && r(e.all());
14
+ const d = () => r(() => e.all());
15
+ e.observe(d);
16
+ let o;
17
+ const x = h.subscribe(({ selected: c, pointerEvent: j }) => {
18
+ o && e.unobserve(o);
19
+ const C = (c || []).map(({ id: n, editable: s }) => ({ annotation: e.getAnnotation(n), editable: s }));
20
+ l({ selected: C, pointerEvent: j }), o = (n) => {
21
+ const { updated: s } = n.changes;
22
+ l(({ selected: E }) => ({
23
+ selected: E.map(({ annotation: u, editable: b }) => {
24
+ const v = s.find((w) => w.oldValue.id === u.id);
25
+ return v ? { annotation: v.newValue, editable: b } : { annotation: u, editable: b };
26
+ })
27
+ }));
28
+ }, e.observe(o, { annotations: c.map(({ id: n }) => n) });
29
+ });
30
+ return () => {
31
+ e.unobserve(d), x();
32
+ };
33
+ }
34
+ }, [t]), /* @__PURE__ */ S.jsx(p.Provider, { value: {
35
+ anno: t,
36
+ setAnno: f,
37
+ annotations: A,
38
+ selection: g
39
+ }, children: a.children });
40
+ }), k = () => {
41
+ const { anno: a } = P(p);
42
+ return a;
43
+ };
2
44
  export {
3
- e as __module
45
+ $ as Annotorious,
46
+ p as AnnotoriousContext,
47
+ k as useAnnotator
4
48
  };
5
49
  //# sourceMappingURL=annotorious-react-manifold.es8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-react-manifold.es8.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"annotorious-react-manifold.es8.js","sources":["../../annotorious-react/dist/annotorious-react.es2.js"],"sourcesContent":["import { j as I } from \"./annotorious-react.es13.js\";\nimport { createContext as O, forwardRef as R, useState as f, useImperativeHandle as U, useEffect as h, useContext as c } from \"react\";\nimport { useDebounce as C } from \"./annotorious-react.es14.js\";\nconst o = O({\n anno: void 0,\n setAnno: void 0,\n annotations: [],\n selection: { selected: [] }\n}), B = R((t, s) => {\n const [n, a] = f(null), [p, r] = f([]), [m, u] = f({ selected: [] });\n return U(s, () => n), h(() => {\n if (n) {\n const { selection: A, store: e } = n.state;\n e.all().length > 0 && r(e.all());\n const v = () => r(() => e.all());\n e.observe(v);\n let i;\n const b = A.subscribe(({ selected: l, pointerEvent: w }) => {\n i && e.unobserve(i);\n const j = (l || []).map(({ id: d, editable: S }) => ({ annotation: e.getAnnotation(d), editable: S }));\n u({ selected: j, pointerEvent: w }), i = (d) => {\n const { updated: S } = d.changes;\n u(({ selected: D }) => ({\n selected: D.map(({ annotation: V, editable: x }) => {\n const g = S.find((E) => E.oldValue.id === V.id);\n return g ? { annotation: g.newValue, editable: x } : { annotation: V, editable: x };\n })\n }));\n }, e.observe(i, { annotations: l.map(({ id: d }) => d) });\n });\n return () => {\n e.unobserve(v), b();\n };\n }\n }, [n]), /* @__PURE__ */ I.jsx(o.Provider, { value: {\n anno: n,\n setAnno: a,\n annotations: p,\n selection: m\n }, children: t.children });\n}), F = () => {\n const { anno: t } = c(o);\n return t;\n}, G = () => {\n const { anno: t } = c(o);\n return t == null ? void 0 : t.state.store;\n}, H = () => {\n const { annotations: t } = c(o);\n return t;\n}, P = (t) => {\n const { annotations: s } = c(o);\n return C(s, t);\n}, J = (t) => t ? P(t) : H(), K = () => {\n const { selection: t } = c(o);\n return t;\n}, L = () => {\n const { anno: t } = c(o);\n return t == null ? void 0 : t.getUser();\n}, _ = () => {\n const { anno: t } = c(o), [s, n] = f([]);\n return h(() => {\n if (t) {\n const { store: a, viewport: p } = t.state;\n if (!p)\n return;\n let r;\n const m = p.subscribe((u) => {\n r && a.unobserve(r);\n const A = u.map((e) => a.getAnnotation(e));\n n(A), r = (e) => {\n const { updated: v } = e.changes;\n n((i) => i.map((b) => {\n const l = v.find((w) => w.oldValue.id === b.id);\n return l ? l.newValue : b;\n }));\n }, a.observe(r, { annotations: u });\n });\n return () => {\n m();\n };\n }\n }, [t]), s;\n}, k = (t) => {\n const s = _();\n return C(s, t);\n}, M = (t) => t ? k(t) : _();\nexport {\n B as Annotorious,\n o as AnnotoriousContext,\n G as useAnnotationStore,\n J as useAnnotations,\n F as useAnnotator,\n L as useAnnotatorUser,\n K as useSelection,\n M as useViewportState\n};\n//# sourceMappingURL=annotorious-react.es2.js.map\n"],"names":["o","O","B","R","t","s","n","a","f","p","m","u","U","h","A","v","i","b","l","w","j","d","S","D","V","x","g","E","I","F","c"],"mappings":";;AAGK,MAACA,IAAIC,EAAE;AAAA,EACV,MAAM;AAAA,EACN,SAAS;AAAA,EACT,aAAa,CAAE;AAAA,EACf,WAAW,EAAE,UAAU,GAAI;AAC7B,CAAC,GAAGC,IAAIC,EAAE,CAACC,GAAGC,MAAM;AAClB,QAAM,CAACC,GAAGC,CAAC,IAAIC,EAAE,IAAI,GAAG,CAACC,GAAG,CAAC,IAAID,EAAE,EAAE,GAAG,CAACE,GAAGC,CAAC,IAAIH,EAAE,EAAE,UAAU,CAAE,EAAA,CAAE;AACnE,SAAOI,EAAEP,GAAG,MAAMC,CAAC,GAAGO,EAAE,MAAM;AAC5B,QAAIP,GAAG;AACL,YAAM,EAAE,WAAWQ,GAAG,OAAO,EAAG,IAAGR,EAAE;AACrC,QAAE,IAAK,EAAC,SAAS,KAAK,EAAE,EAAE,IAAG,CAAE;AAC/B,YAAMS,IAAI,MAAM,EAAE,MAAM,EAAE,IAAK,CAAA;AAC/B,QAAE,QAAQA,CAAC;AACX,UAAIC;AACJ,YAAMC,IAAIH,EAAE,UAAU,CAAC,EAAE,UAAUI,GAAG,cAAcC,QAAQ;AAC1D,QAAAH,KAAK,EAAE,UAAUA,CAAC;AAClB,cAAMI,KAAKF,KAAK,CAAE,GAAE,IAAI,CAAC,EAAE,IAAIG,GAAG,UAAUC,EAAC,OAAQ,EAAE,YAAY,EAAE,cAAcD,CAAC,GAAG,UAAUC,EAAG,EAAC;AACrG,QAAAX,EAAE,EAAE,UAAUS,GAAG,cAAcD,GAAG,GAAGH,IAAI,CAACK,MAAM;AAC9C,gBAAM,EAAE,SAASC,MAAMD,EAAE;AACzB,UAAAV,EAAE,CAAC,EAAE,UAAUY,SAAS;AAAA,YACtB,UAAUA,EAAE,IAAI,CAAC,EAAE,YAAYC,GAAG,UAAUC,QAAQ;AAClD,oBAAMC,IAAIJ,EAAE,KAAK,CAACK,MAAMA,EAAE,SAAS,OAAOH,EAAE,EAAE;AAC9C,qBAAOE,IAAI,EAAE,YAAYA,EAAE,UAAU,UAAUD,EAAG,IAAG,EAAE,YAAYD,GAAG,UAAUC,EAAC;AAAA,YAC/F,CAAa;AAAA,UACF,EAAC;AAAA,QACH,GAAE,EAAE,QAAQT,GAAG,EAAE,aAAaE,EAAE,IAAI,CAAC,EAAE,IAAIG,EAAG,MAAKA,CAAC,EAAG,CAAA;AAAA,MAChE,CAAO;AACD,aAAO,MAAM;AACX,UAAE,UAAUN,CAAC,GAAGE,EAAC;AAAA,MACzB;AAAA,IACK;AAAA,EACL,GAAK,CAACX,CAAC,CAAC,GAAmBsB,gBAAAA,EAAE,IAAI5B,EAAE,UAAU,EAAE,OAAO;AAAA,IAClD,MAAMM;AAAA,IACN,SAASC;AAAA,IACT,aAAaE;AAAA,IACb,WAAWC;AAAAA,EACZ,GAAE,UAAUN,EAAE,SAAQ,CAAE;AAC3B,CAAC,GAAGyB,IAAI,MAAM;AACZ,QAAM,EAAE,MAAMzB,EAAG,IAAG0B,EAAE9B,CAAC;AACvB,SAAOI;AACT;"}
@@ -1,33 +1,17 @@
1
- import { __exports as t } from "./annotorious-react-manifold.es11.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
- }
1
+ const e = [];
2
+ for (let r = 0; r < 256; ++r)
3
+ e.push((r + 256).toString(16).slice(1));
4
+ typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
5
+ var n = /* @__PURE__ */ ((r) => (r.LOCAL = "LOCAL", r.REMOTE = "REMOTE", r))(n || {});
6
+ const c = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
7
+ let p = (r = 21) => {
8
+ let o = "", t = crypto.getRandomValues(new Uint8Array(r));
9
+ for (; r--; )
10
+ o += c[t[r] & 63];
11
+ return o;
12
+ };
13
+ p();
30
14
  export {
31
- v as __require
15
+ n as Origin
32
16
  };
33
17
  //# sourceMappingURL=annotorious-react-manifold.es9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-react-manifold.es9.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]}
1
+ {"version":3,"file":"annotorious-react-manifold.es9.js","sources":["../../annotorious-react/dist/annotorious-react.es8.js"],"sourcesContent":["var f = /* @__PURE__ */ ((t) => (t.EDIT = \"EDIT\", t.SELECT = \"SELECT\", t.NONE = \"NONE\", t))(f || {});\nlet c;\nconst p = new Uint8Array(16);\nfunction y() {\n if (!c && (c = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !c))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return c(p);\n}\nconst o = [];\nfor (let t = 0; t < 256; ++t)\n o.push((t + 256).toString(16).slice(1));\nfunction g(t, r = 0) {\n return o[t[r + 0]] + o[t[r + 1]] + o[t[r + 2]] + o[t[r + 3]] + \"-\" + o[t[r + 4]] + o[t[r + 5]] + \"-\" + o[t[r + 6]] + o[t[r + 7]] + \"-\" + o[t[r + 8]] + o[t[r + 9]] + \"-\" + o[t[r + 10]] + o[t[r + 11]] + o[t[r + 12]] + o[t[r + 13]] + o[t[r + 14]] + o[t[r + 15]];\n}\nconst m = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), i = {\n randomUUID: m\n};\nfunction E(t, r, e) {\n if (i.randomUUID && !r && !t)\n return i.randomUUID();\n t = t || {};\n const n = t.random || (t.rng || y)();\n if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, r) {\n e = e || 0;\n for (let a = 0; a < 16; ++a)\n r[e + a] = n[a];\n return r;\n }\n return g(n);\n}\nconst A = (t, r, e, n) => ({\n id: E(),\n annotation: t.id,\n created: e || /* @__PURE__ */ new Date(),\n creator: n,\n ...r\n});\nvar U = /* @__PURE__ */ ((t) => (t.LOCAL = \"LOCAL\", t.REMOTE = \"REMOTE\", t))(U || {});\nconst h = \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";\nlet D = (t) => crypto.getRandomValues(new Uint8Array(t)), C = (t, r, e) => {\n let n = (2 << Math.log(t.length - 1) / Math.LN2) - 1, a = -~(1.6 * n * r / t.length);\n return (l = r) => {\n let s = \"\";\n for (; ; ) {\n let d = e(a), u = a;\n for (; u--; )\n if (s += t[d[u] & n] || \"\", s.length === l)\n return s;\n }\n };\n}, O = (t, r = 21) => C(t, r, D), R = (t = 21) => {\n let r = \"\", e = crypto.getRandomValues(new Uint8Array(t));\n for (; t--; )\n r += h[e[t] & 63];\n return r;\n};\nconst I = () => ({ isGuest: !0, id: O(\"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_\", 20)() }), w = [\n \"#ff7c00\",\n // orange\n \"#1ac938\",\n // green\n \"#e8000b\",\n // red\n \"#8b2be2\",\n // purple\n \"#9f4800\",\n // brown\n \"#f14cc1\",\n // pink\n \"#ffc400\",\n // khaki\n \"#00d7ff\",\n // cyan\n \"#023eff\"\n // blue\n], L = () => {\n const t = [...w];\n return { assignRandomColor: () => {\n const r = Math.floor(Math.random() * t.length), e = t[r];\n return t.splice(r, 1), e;\n }, releaseColor: (r) => t.push(r) };\n};\nR();\nexport {\n U as Origin,\n f as PointerSelectAction,\n I as createAnonymousGuest,\n A as createBody,\n L as defaultColorProvider\n};\n//# sourceMappingURL=annotorious-react.es8.js.map\n"],"names":["o","t","U","h","R","r","e"],"mappings":"AAQA,MAAMA,IAAI,CAAA;AACV,SAASC,IAAI,GAAGA,IAAI,KAAK,EAAEA;AACzB,EAAAD,EAAE,MAAMC,IAAI,KAAK,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;AAI9B,OAAO,SAAS,OAAO,OAAO,cAAc,OAAO,WAAW,KAAK,MAAM;AAuBhF,IAACC,IAAqB,kBAACD,OAAOA,EAAE,QAAQ,SAASA,EAAE,SAAS,UAAUA,IAAIC,KAAK,CAAA,CAAE;AACpF,MAAMC,IAAI;AACP,IAW+BC,IAAI,CAACH,IAAI,OAAO;AAChD,MAAII,IAAI,IAAIC,IAAI,OAAO,gBAAgB,IAAI,WAAWL,CAAC,CAAC;AACxD,SAAOA;AACL,IAAAI,KAAKF,EAAEG,EAAEL,CAAC,IAAI,EAAE;AAClB,SAAOI;AACT;AA2BAD,EAAG;"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="openseadragon" />
1
2
  import { ReactNode } from 'react';
2
3
  import { Viewer } from '@annotorious/react';
3
4
  interface OSDViewerContextValue {
@@ -1 +1 @@
1
- {"version":3,"file":"OpenSeadragonViewerManifold.d.ts","sourceRoot":"","sources":["../../src/openseadragon/OpenSeadragonViewerManifold.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,UAAU,qBAAqB;IAE7B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE7B,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;CAEtE;AAED,eAAO,MAAM,gBAAgB,gDAM3B,CAAC;AAEH,eAAO,MAAM,iBAAiB,UAAW;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAU/D,CAAA;AAED,eAAO,MAAM,UAAU,2BAGtB,CAAA"}
1
+ {"version":3,"file":"OpenSeadragonViewerManifold.d.ts","sourceRoot":"","sources":["../../src/openseadragon/OpenSeadragonViewerManifold.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAuC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAE5C,UAAU,qBAAqB;IAE7B,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE7B,UAAU,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;CAEtE;AAED,eAAO,MAAM,gBAAgB,gDAM3B,CAAC;AAEH,eAAO,MAAM,iBAAiB,UAAW;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAU/D,CAAA;AAED,eAAO,MAAM,UAAU,2BAGtB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"synchronizeInstances.d.ts","sourceRoot":"","sources":["../src/synchronizeInstances.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE3D,eAAO,MAAM,oBAAoB,0GAQhC,CAAA"}
1
+ {"version":3,"file":"synchronizeInstances.d.ts","sourceRoot":"","sources":["../src/synchronizeInstances.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE3D,eAAO,MAAM,oBAAoB,iFACpB,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,QAO7B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annotorious/react-manifold",
3
- "version": "3.0.0-rc.19",
3
+ "version": "3.0.0-rc.20",
4
4
  "description": "A utility to manage multiple parallel Annotorious instances more efficiently",
5
5
  "author": "Rainer Simon",
6
6
  "license": "BSD-3-Clause",
@@ -26,21 +26,24 @@
26
26
  },
27
27
  "scripts": {
28
28
  "start": "vite",
29
- "build": "tsc && vite build"
29
+ "build": "tsc && vite build",
30
+ "test": "echo 'Skipping tests in @annotorious/annotorious-react-manifold package'"
30
31
  },
31
32
  "devDependencies": {
32
- "@types/react": "^18.2.48",
33
- "@types/react-dom": "^18.2.18",
33
+ "@types/react": "^18.2.67",
34
+ "@types/react-dom": "^18.2.22",
34
35
  "@vitejs/plugin-react": "^4.2.1",
35
36
  "typescript": "^5.3.3",
36
- "vite": "^5.0.12",
37
- "vite-plugin-dts": "^3.7.2",
38
- "vite-tsconfig-paths": "^4.3.1"
37
+ "vite": "^5.2.2",
38
+ "vite-plugin-dts": "^3.7.3",
39
+ "vite-tsconfig-paths": "^4.3.2"
39
40
  },
40
41
  "peerDependencies": {
41
- "@annotorious/react": "^3.0.0-rc.19",
42
- "openseadragon": "4.1.0",
42
+ "openseadragon": "^3.0.0 || ^4.0.0",
43
43
  "react": "16.8.0 || >=17.x || >=18.x",
44
44
  "react-dom": "16.8.0 || >=17.x || >=18.x"
45
+ },
46
+ "dependencies": {
47
+ "@annotorious/react": "*"
45
48
  }
46
49
  }
package/LICENSE DELETED
@@ -1,28 +0,0 @@
1
- BSD 3-Clause License
2
-
3
- Copyright (c) 2023, Annotorious
4
-
5
- Redistribution and use in source and binary forms, with or without
6
- modification, are permitted provided that the following conditions are met:
7
-
8
- 1. Redistributions of source code must retain the above copyright notice, this
9
- list of conditions and the following disclaimer.
10
-
11
- 2. Redistributions in binary form must reproduce the above copyright notice,
12
- this list of conditions and the following disclaimer in the documentation
13
- and/or other materials provided with the distribution.
14
-
15
- 3. Neither the name of the copyright holder nor the names of its
16
- contributors may be used to endorse or promote products derived from
17
- this software without specific prior written permission.
18
-
19
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/README.md DELETED
@@ -1,7 +0,0 @@
1
- # Annotorious React Manifold
2
-
3
- A utility to manage multiple parallel Annotorious instances more efficiently.
4
-
5
- - Listen to annotation lifecycle events across all instances with just one listener.
6
- - Find, retrieve and manipulate annotations across instances easily.
7
- - Add multiple Annotorious instances with the same image, and let the Manifold handle live state sync.