@annotorious/svelte 3.0.0-rc.6 → 3.0.0-rc.7

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 +1 @@
1
- {"version":3,"file":"annotorious-svelte.es4.js","sources":["../../annotorious-core/src/utils/annotationUtils.ts"],"sourcesContent":["import { v4 as uuidv4 } from 'uuid';\nimport type { Annotation, AnnotationBody, User } from '../model';\n\n/**\n * Returns all users listed as creators or updaters in any parts of this\n * annotation.\n */\nexport const getContributors = (annotation: Annotation): User[] => {\n const { creator, updatedBy } = annotation.target;\n\n const bodyCollaborators = annotation.bodies.reduce((users, body) => (\n [...users, body.creator, body.updatedBy]\n ), [] as User[]);\n\n return [\n creator,\n updatedBy,\n ...bodyCollaborators\n ].filter(u => u); // Remove undefined\n}\n\nexport const createBody = (\n annotation: Annotation, \n payload: { [key: string]: any },\n created?: Date,\n creator?: User\n): AnnotationBody => ({\n id: uuidv4(),\n annotation: annotation.id,\n created: created || new Date(),\n creator,\n ...payload\n});"],"names":["createBody","annotation","payload","created","creator","uuidv4"],"mappings":";AAqBO,MAAMA,IAAa,CACxBC,GACAC,GACAC,GACAC,OACoB;AAAA,EACpB,IAAIC,EAAO;AAAA,EACX,YAAYJ,EAAW;AAAA,EACvB,SAASE,KAAW,oBAAI,KAAK;AAAA,EAC7B,SAAAC;AAAA,EACA,GAAGF;AACL;"}
1
+ {"version":3,"file":"annotorious-svelte.es4.js","sources":["../../annotorious-core/src/utils/annotationUtils.ts"],"sourcesContent":["import { v4 as uuidv4 } from 'uuid';\nimport type { Annotation, AnnotationBody } from '../model/Annotation';\nimport type { User } from '../model/User';\n/**\n * Returns all users listed as creators or updaters in any parts of this\n * annotation.\n */\nexport const getContributors = (annotation: Annotation): User[] => {\n const { creator, updatedBy } = annotation.target;\n\n const bodyCollaborators = annotation.bodies.reduce((users, body) => (\n [...users, body.creator, body.updatedBy]\n ), [] as User[]);\n\n return [\n creator,\n updatedBy,\n ...bodyCollaborators\n ].filter(u => u); // Remove undefined\n}\n\nexport const createBody = (\n annotation: Annotation, \n payload: { [key: string]: any },\n created?: Date,\n creator?: User\n): AnnotationBody => ({\n id: uuidv4(),\n annotation: annotation.id,\n created: created || new Date(),\n creator,\n ...payload\n});"],"names":["createBody","annotation","payload","created","creator","uuidv4"],"mappings":";AAqBO,MAAMA,IAAa,CACxBC,GACAC,GACAC,GACAC,OACoB;AAAA,EACpB,IAAIC,EAAO;AAAA,EACX,YAAYJ,EAAW;AAAA,EACvB,SAASE,KAAW,oBAAI,KAAK;AAAA,EAC7B,SAAAC;AAAA,EACA,GAAGF;AACL;"}
@@ -1,12 +1,12 @@
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";
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 q, update_slot_base as v, get_all_dirty_from_scope as C, get_slot_changes as y, group_outros as D, setContext as m } from "./annotorious-svelte.es8.js";
2
+ import { toSvelteStore as E } from "@annotorious/core";
3
+ import { createOSDAnnotator as N } from "./annotorious-svelte.es9.js";
4
4
  function d(s) {
5
5
  let n;
6
6
  const o = (
7
7
  /*#slots*/
8
8
  s[4].default
9
- ), t = v(
9
+ ), t = q(
10
10
  o,
11
11
  s,
12
12
  /*$$scope*/
@@ -22,7 +22,7 @@ function d(s) {
22
22
  },
23
23
  p(e, i) {
24
24
  t && t.p && (!n || i & /*$$scope*/
25
- 8) && C(
25
+ 8) && v(
26
26
  t,
27
27
  o,
28
28
  e,
@@ -34,7 +34,7 @@ function d(s) {
34
34
  e[3],
35
35
  i,
36
36
  null
37
- ) : q(
37
+ ) : C(
38
38
  /*$$scope*/
39
39
  e[3]
40
40
  ),
@@ -86,7 +86,7 @@ function z(s, n, o) {
86
86
  let { $$slots: t = {}, $$scope: e } = n, { viewer: i } = n, { opts: f = {} } = n, { anno: a = void 0 } = n;
87
87
  const S = (r) => {
88
88
  if (r) {
89
- const u = T(r, f), p = N(u.state.store), _ = {
89
+ const u = N(r, f), p = E(u.state.store), _ = {
90
90
  ...u,
91
91
  state: { ...u.state, store: p }
92
92
  };
@@ -105,8 +105,8 @@ class B extends g {
105
105
  super(), b(this, n, z, j, h, { viewer: 0, opts: 2, anno: 1 });
106
106
  }
107
107
  }
108
- const H = B;
108
+ const I = B;
109
109
  export {
110
- H as default
110
+ I as default
111
111
  };
112
112
  //# sourceMappingURL=annotorious-svelte.es6.js.map
@@ -1,4 +1,4 @@
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";
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
2
  import { draggable as J } from "./annotorious-svelte.es10.js";
3
3
  import b from "openseadragon";
4
4
  import "./annotorious-svelte.es11.js";
@@ -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
- P(r, o, l), R(o, t), a || (d = [
15
+ E(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 && S(o), a = !1, F(d);
54
+ r && P(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), P(t, o, s);
68
+ e && e.m(t, s), E(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 && S(o);
77
+ e && e.d(t), t && P(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
- }, E = () => {
89
+ }, S = () => {
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, E, D, s, a];
115
+ }, [t, d, r, m, S, D, s, a];
116
116
  }
117
117
  class W extends H {
118
118
  constructor(o) {