@annotorious/svelte 3.0.0-rc.3 → 3.0.0-rc.5

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,7 +1,6 @@
1
- import { SvelteComponent as g, init as k, safe_not_equal as b, empty as h, insert as w, transition_in as l, transition_out as c, check_outros as A, detach as O, create_slot as v, update_slot_base as C, get_all_dirty_from_scope as q, get_slot_changes as y, group_outros as D, setContext as m } from "./annotorious-svelte.es8.js";
2
- import { toSvelteStore as E } from "./annotorious-svelte.es9.js";
3
- import "./annotorious-svelte.es10.js";
4
- import { createOSDAnnotator as N } from "./annotorious-svelte.es11.js";
1
+ import { SvelteComponent as g, init as b, safe_not_equal as h, empty as k, insert as w, transition_in as l, transition_out as c, check_outros as A, detach as O, create_slot as v, update_slot_base as C, get_all_dirty_from_scope as q, get_slot_changes as y, group_outros as D, setContext as m } from "./annotorious-svelte.es8.js";
2
+ import { toSvelteStore as N } from "@annotorious/core";
3
+ import { createOSDAnnotator as T } from "./annotorious-svelte.es9.js";
5
4
  function d(s) {
6
5
  let n;
7
6
  const o = (
@@ -60,7 +59,7 @@ function j(s) {
60
59
  );
61
60
  return {
62
61
  c() {
63
- t && t.c(), n = h();
62
+ t && t.c(), n = k();
64
63
  },
65
64
  m(e, i) {
66
65
  t && t.m(e, i), w(e, n, i), o = !0;
@@ -85,11 +84,11 @@ function j(s) {
85
84
  }
86
85
  function z(s, n, o) {
87
86
  let { $$slots: t = {}, $$scope: e } = n, { viewer: i } = n, { opts: f = {} } = n, { anno: a = void 0 } = n;
88
- const p = (r) => {
87
+ const S = (r) => {
89
88
  if (r) {
90
- const u = N(r, f), S = E(u.state.store), _ = {
89
+ const u = T(r, f), p = N(u.state.store), _ = {
91
90
  ...u,
92
- state: { ...u.state, store: S }
91
+ state: { ...u.state, store: p }
93
92
  };
94
93
  m("anno", _), m("viewer", r), o(1, a = _);
95
94
  }
@@ -98,16 +97,16 @@ function z(s, n, o) {
98
97
  "viewer" in r && o(0, i = r.viewer), "opts" in r && o(2, f = r.opts), "anno" in r && o(1, a = r.anno), "$$scope" in r && o(3, e = r.$$scope);
99
98
  }, s.$$.update = () => {
100
99
  s.$$.dirty & /*viewer*/
101
- 1 && p(i);
100
+ 1 && S(i);
102
101
  }, [i, a, f, e, t];
103
102
  }
104
103
  class B extends g {
105
104
  constructor(n) {
106
- super(), k(this, n, z, j, b, { viewer: 0, opts: 2, anno: 1 });
105
+ super(), b(this, n, z, j, h, { viewer: 0, opts: 2, anno: 1 });
107
106
  }
108
107
  }
109
- const J = B;
108
+ const H = B;
110
109
  export {
111
- J as default
110
+ H as default
112
111
  };
113
112
  //# sourceMappingURL=annotorious-svelte.es6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotorious-svelte.es6.js","sources":["../src/osd/OpenSeadragonAnnotator.svelte"],"sourcesContent":["<script lang=\"ts\">\n import { setContext } from 'svelte';\n import { SvelteAnnotator, SvelteAnnotatorState, toSvelteStore } from '@annotorious/core';\n import { createOSDAnnotator, ImageAnnotation } from '@annotorious/openseadragon';\n import type OpenSeadragon from 'openseadragon';\n\n /** props **/\n export let viewer: OpenSeadragon.Viewer;\n export let opts = {};\n export let anno: SvelteAnnotator<ImageAnnotation> = undefined;\n\n $: init(viewer);\n\n const init = (viewer: OpenSeadragon.Viewer) => {\n if (viewer) {\n const annotator = createOSDAnnotator(viewer, opts);\n\n // Wrap the store for Svelte reactivity\n const svelteStore = toSvelteStore(annotator.state.store);\n\n const shim = {\n ...annotator,\n state: {\n ...annotator.state,\n store: svelteStore\n } as SvelteAnnotatorState<ImageAnnotation>\n } as SvelteAnnotator<ImageAnnotation>\n\n setContext('anno', shim);\n setContext('viewer', viewer);\n\n anno = shim;\n }\n }\n</script>\n\n{#if viewer}\n <slot />\n{/if}\n"],"names":["ctx","create_if_block","viewer","$$props","opts","anno","init","annotator","createOSDAnnotator","svelteStore","toSvelteStore","shim","setContext","$$invalidate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoCKA,EAAM,CAAA,KAAAC,EAAAD,CAAA;AAAA;;;;;;;;;;MAANA,EAAM,CAAA;;;;;;;;;;;;;;;;;6CA7BE,QAAAE,EAA4B,IAAAC,KAC5B,MAAAC,IAAI,GAAA,IAAAD,GACJ,EAAA,MAAAE,IAAyC,OAAS,IAAAF;AAIvD,QAAAG,IAAQ,CAAAJ,MAA4B;QACpCA,GAAM;AACF,YAAAK,IAAYC,EAAmBN,GAAQE,CAAI,GAG3CK,IAAcC,EAAcH,EAAU,MAAM,KAAK,GAEjDI,IAAI;AAAA,WACLJ;AAAA,QACH,YACKA,EAAU,OACb,OAAOE,EAAA;AAAA;AAIX,MAAAG,EAAW,QAAQD,CAAI,GACvBC,EAAW,UAAUV,CAAM,GAE3BW,EAAA,GAAAR,IAAOM,CAAI;AAAA;;;;;;SApBZL,EAAKJ,CAAM;AAAA;;;;;;;;"}
1
+ {"version":3,"file":"annotorious-svelte.es6.js","sources":["../src/osd/OpenSeadragonAnnotator.svelte"],"sourcesContent":["<script lang=\"ts\">\n import { setContext } from 'svelte';\n import { SvelteAnnotator, SvelteAnnotatorState, toSvelteStore } from '@annotorious/core';\n import { createOSDAnnotator, ImageAnnotation } from '@annotorious/openseadragon';\n import type OpenSeadragon from 'openseadragon';\n\n /** props **/\n export let viewer: OpenSeadragon.Viewer;\n export let opts = {};\n export let anno: SvelteAnnotator<ImageAnnotation> = undefined;\n\n $: init(viewer);\n\n const init = (viewer: OpenSeadragon.Viewer) => {\n if (viewer) {\n const annotator = createOSDAnnotator(viewer, opts);\n\n // Wrap the store for Svelte reactivity\n const svelteStore = toSvelteStore(annotator.state.store);\n\n const shim = {\n ...annotator,\n state: {\n ...annotator.state,\n store: svelteStore\n } as SvelteAnnotatorState<ImageAnnotation>\n } as SvelteAnnotator<ImageAnnotation>\n\n setContext('anno', shim);\n setContext('viewer', viewer);\n\n anno = shim;\n }\n }\n</script>\n\n{#if viewer}\n <slot />\n{/if}\n"],"names":["ctx","create_if_block","viewer","$$props","opts","anno","init","annotator","createOSDAnnotator","svelteStore","toSvelteStore","shim","setContext","$$invalidate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoCKA,EAAM,CAAA,KAAAC,EAAAD,CAAA;AAAA;;;;;;;;;;MAANA,EAAM,CAAA;;;;;;;;;;;;;;;;;6CA7BE,QAAAE,EAA4B,IAAAC,KAC5B,MAAAC,IAAI,GAAA,IAAAD,GACJ,EAAA,MAAAE,IAAyC,OAAS,IAAAF;AAIvD,QAAAG,IAAQ,CAAAJ,MAA4B;QACpCA,GAAM;AACF,YAAAK,IAAYC,EAAmBN,GAAQE,CAAI,GAG3CK,IAAcC,EAAcH,EAAU,MAAM,KAAK,GAEjDI,IAAI;AAAA,WACLJ;AAAA,QACH,YACKA,EAAU,OACb,OAAOE,EAAA;AAAA;AAIX,MAAAG,EAAW,QAAQD,CAAI,GACvBC,EAAW,UAAUV,CAAM,GAE3BW,EAAA,GAAAR,IAAOM,CAAI;AAAA;;;;;;SApBZL,EAAKJ,CAAM;AAAA;;;;;;;;"}
@@ -1,7 +1,7 @@
1
- import { SvelteComponent as H, init as I, safe_not_equal as T, empty as X, insert as E, noop as v, detach as P, component_subscribe as Y, onMount as q, element as x, text as G, attr as L, append as R, action_destroyer as U, listen as _, set_data as z, is_function as B, run_all as F } from "./annotorious-svelte.es8.js";
2
- import { draggable as J } from "./annotorious-svelte.es12.js";
1
+ import { SvelteComponent as H, init as I, safe_not_equal as T, empty as X, insert as P, noop as v, detach as S, component_subscribe as Y, onMount as q, element as x, text as G, attr as L, append as R, action_destroyer as U, listen as _, set_data as z, is_function as B, run_all as F } from "./annotorious-svelte.es8.js";
2
+ import { draggable as J } from "./annotorious-svelte.es10.js";
3
3
  import b from "openseadragon";
4
- import "./annotorious-svelte.es13.js";
4
+ import "./annotorious-svelte.es11.js";
5
5
  function w(n) {
6
6
  let o, e = (
7
7
  /*$selection*/
@@ -12,7 +12,7 @@ function w(n) {
12
12
  o = x("div"), t = G(e), L(o, "class", "a9s-popup a9s-osd-popup svelte-1xuxeat");
13
13
  },
14
14
  m(r, l) {
15
- E(r, o, l), R(o, t), a || (d = [
15
+ P(r, o, l), R(o, t), a || (d = [
16
16
  U(s = J.call(null, o, {
17
17
  position: { x: (
18
18
  /*left*/
@@ -51,7 +51,7 @@ function w(n) {
51
51
  });
52
52
  },
53
53
  d(r) {
54
- r && P(o), a = !1, F(d);
54
+ r && S(o), a = !1, F(d);
55
55
  }
56
56
  };
57
57
  }
@@ -65,7 +65,7 @@ function K(n) {
65
65
  e && e.c(), o = X();
66
66
  },
67
67
  m(t, s) {
68
- e && e.m(t, s), E(t, o, s);
68
+ e && e.m(t, s), P(t, o, s);
69
69
  },
70
70
  p(t, [s]) {
71
71
  /*$selection*/
@@ -74,7 +74,7 @@ function K(n) {
74
74
  i: v,
75
75
  o: v,
76
76
  d(t) {
77
- e && e.d(t), t && P(o);
77
+ e && e.d(t), t && S(o);
78
78
  }
79
79
  };
80
80
  }
@@ -86,7 +86,7 @@ function Q(n, o, e) {
86
86
  const g = (i) => {
87
87
  var p;
88
88
  return ((p = i.selected) == null ? void 0 : p.length) > 0;
89
- }, S = () => {
89
+ }, E = () => {
90
90
  l = !0, a.setMouseNavEnabled(!1);
91
91
  }, D = () => {
92
92
  a.setMouseNavEnabled(!0);
@@ -112,7 +112,7 @@ function Q(n, o, e) {
112
112
  }, n.$$.update = () => {
113
113
  n.$$.dirty & /*$selection*/
114
114
  1 && N();
115
- }, [t, d, r, m, S, D, s, a];
115
+ }, [t, d, r, m, E, D, s, a];
116
116
  }
117
117
  class W extends H {
118
118
  constructor(o) {