triiiceratops 0.4.0 → 0.5.0

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,4 +1,3 @@
1
- import { default as OpenSeadragon } from 'openseadragon';
2
1
  import { TriiiceratopsPlugin, PluginMenuButton, PluginPanel } from '../types/plugin';
3
2
  export declare class ViewerState {
4
3
  manifestId: string | null;
@@ -25,7 +24,7 @@ export declare class ViewerState {
25
24
  y: number;
26
25
  };
27
26
  dragOverSide: "left" | "right" | "bottom" | "top" | null;
28
- constructor(initialManifestId?: string | null, initialPlugins?: TriiiceratopsPlugin[]);
27
+ constructor(initialManifestId?: string | null, initialCanvasId?: string | null, initialPlugins?: TriiiceratopsPlugin[]);
29
28
  get manifest(): any;
30
29
  get canvases(): any;
31
30
  get currentCanvasIndex(): any;
@@ -54,7 +53,7 @@ export declare class ViewerState {
54
53
  /** Plugin-registered panels */
55
54
  pluginPanels: PluginPanel[];
56
55
  /** OpenSeadragon viewer instance (set by OSDViewer) */
57
- osdViewer: OpenSeadragon.Viewer | null;
56
+ osdViewer: any | null;
58
57
  /** Event handlers for inter-plugin communication */
59
58
  private pluginEventHandlers;
60
59
  /**
@@ -72,7 +71,7 @@ export declare class ViewerState {
72
71
  /**
73
72
  * Called by OSDViewer when OpenSeadragon is ready.
74
73
  */
75
- notifyOSDReady(viewer: OpenSeadragon.Viewer): void;
74
+ notifyOSDReady(viewer: any): void;
76
75
  /**
77
76
  * Destroy all plugins (called on viewer unmount).
78
77
  */
@@ -1,140 +1,140 @@
1
1
  var M0 = Object.defineProperty;
2
- var c0 = (e) => {
2
+ var h0 = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var H0 = (e, a, t) => a in e ? M0(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
6
- var J = (e, a, t) => H0(e, typeof a != "symbol" ? a + "" : a, t), C0 = (e, a, t) => a.has(e) || c0("Cannot " + t);
7
- var N = (e, a, t) => (C0(e, a, "read from private field"), t ? t.call(e) : a.get(e)), i0 = (e, a, t) => a.has(e) ? c0("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, t);
8
- import { p as $, h as V0, i as m, j as A0, k as o, u as P, b as l, l as _, s as f, r as n, d as s, e as a0, m as w0, n as Z, o as x, q as Z0, t as v0, v as x0, w as I0, f as y0, X as k0, x as Q, y as F0, z as l0, A as n0, B as h0, C as d0, D as g0, E as L0, c as z0, a as u0, T as T0, g as f0 } from "./chunks/TriiiceratopsViewer-BFoyVNzC.js";
9
- var O0 = m('<path d="M68,102.06V40a12,12,0,0,0-24,0v62.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V169.94a36,36,0,0,0,0-67.88ZM56,148a12,12,0,1,1,12-12A12,12,0,0,1,56,148ZM164,88a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0V54.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V121.94A36.07,36.07,0,0,0,164,88Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,128,100Zm108,68a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0v94.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V201.94A36.07,36.07,0,0,0,236,168Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,200,180Z"></path>'), S0 = m('<path d="M80,136a24,24,0,1,1-24-24A24,24,0,0,1,80,136Zm48-72a24,24,0,1,0,24,24A24,24,0,0,0,128,64Zm72,80a24,24,0,1,0,24,24A24,24,0,0,0,200,144Z" opacity="0.2"></path><path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"></path>', 1), P0 = m('<path d="M84,136a28,28,0,0,1-20,26.83V216a8,8,0,0,1-16,0V162.83a28,28,0,0,1,0-53.66V40a8,8,0,0,1,16,0v69.17A28,28,0,0,1,84,136Zm52-74.83V40a8,8,0,0,0-16,0V61.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V114.83a28,28,0,0,0,0-53.66Zm72,80V40a8,8,0,0,0-16,0V141.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V194.83a28,28,0,0,0,0-53.66Z"></path>'), R0 = m('<path d="M62,106.6V40a6,6,0,0,0-12,0v66.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V165.4a30,30,0,0,0,0-58.8ZM56,154a18,18,0,1,1,18-18A18,18,0,0,1,56,154Zm78-95.4V40a6,6,0,0,0-12,0V58.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V117.4a30,30,0,0,0,0-58.8ZM128,106a18,18,0,1,1,18-18A18,18,0,0,1,128,106Zm102,62a30.05,30.05,0,0,0-24-29.4V40a6,6,0,0,0-12,0v98.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V197.4A30.05,30.05,0,0,0,230,168Zm-30,18a18,18,0,1,1,18-18A18,18,0,0,1,200,186Z"></path>'), D0 = m('<path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"></path>'), E0 = m('<path d="M60,108.29V40a4,4,0,0,0-8,0v68.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V163.71a28,28,0,0,0,0-55.42ZM56,156a20,20,0,1,1,20-20A20,20,0,0,1,56,156Zm76-95.71V40a4,4,0,0,0-8,0V60.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V115.71a28,28,0,0,0,0-55.42ZM128,108a20,20,0,1,1,20-20A20,20,0,0,1,128,108Zm100,60a28,28,0,0,0-24-27.71V40a4,4,0,0,0-8,0V140.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V195.71A28,28,0,0,0,228,168Zm-28,20a20,20,0,1,1,20-20A20,20,0,0,1,200,188Z"></path>'), j0 = m('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
5
+ var I0 = (e, a, t) => a in e ? M0(e, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[a] = t;
6
+ var J = (e, a, t) => I0(e, typeof a != "symbol" ? a + "" : a, t), H0 = (e, a, t) => a.has(e) || h0("Cannot " + t);
7
+ var N = (e, a, t) => (H0(e, a, "read from private field"), t ? t.call(e) : a.get(e)), i0 = (e, a, t) => a.has(e) ? h0("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(e) : a.set(e, t);
8
+ import { p as $, h as V0, i as p, j as A0, k as o, u as P, b as n, l as m, s as f, r as l, d as s, e as a0, m as w0, n as x, o as y, q as Z0, t as d0, v as x0, w as C0, f as y0, X as k0, x as Q, y as F0, z as n0, A as l0, B as g0, C as u0, D as f0, E as L0, c as z0, a as o0, T as S0, g as v0 } from "./chunks/TriiiceratopsViewer-BardJ3c3.js";
9
+ var T0 = p('<path d="M68,102.06V40a12,12,0,0,0-24,0v62.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V169.94a36,36,0,0,0,0-67.88ZM56,148a12,12,0,1,1,12-12A12,12,0,0,1,56,148ZM164,88a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0V54.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V121.94A36.07,36.07,0,0,0,164,88Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,128,100Zm108,68a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0v94.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V201.94A36.07,36.07,0,0,0,236,168Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,200,180Z"></path>'), O0 = p('<path d="M80,136a24,24,0,1,1-24-24A24,24,0,0,1,80,136Zm48-72a24,24,0,1,0,24,24A24,24,0,0,0,128,64Zm72,80a24,24,0,1,0,24,24A24,24,0,0,0,200,144Z" opacity="0.2"></path><path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"></path>', 1), P0 = p('<path d="M84,136a28,28,0,0,1-20,26.83V216a8,8,0,0,1-16,0V162.83a28,28,0,0,1,0-53.66V40a8,8,0,0,1,16,0v69.17A28,28,0,0,1,84,136Zm52-74.83V40a8,8,0,0,0-16,0V61.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V114.83a28,28,0,0,0,0-53.66Zm72,80V40a8,8,0,0,0-16,0V141.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V194.83a28,28,0,0,0,0-53.66Z"></path>'), R0 = p('<path d="M62,106.6V40a6,6,0,0,0-12,0v66.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V165.4a30,30,0,0,0,0-58.8ZM56,154a18,18,0,1,1,18-18A18,18,0,0,1,56,154Zm78-95.4V40a6,6,0,0,0-12,0V58.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V117.4a30,30,0,0,0,0-58.8ZM128,106a18,18,0,1,1,18-18A18,18,0,0,1,128,106Zm102,62a30.05,30.05,0,0,0-24-29.4V40a6,6,0,0,0-12,0v98.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V197.4A30.05,30.05,0,0,0,230,168Zm-30,18a18,18,0,1,1,18-18A18,18,0,0,1,200,186Z"></path>'), D0 = p('<path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"></path>'), E0 = p('<path d="M60,108.29V40a4,4,0,0,0-8,0v68.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V163.71a28,28,0,0,0,0-55.42ZM56,156a20,20,0,1,1,20-20A20,20,0,0,1,56,156Zm76-95.71V40a4,4,0,0,0-8,0V60.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V115.71a28,28,0,0,0,0-55.42ZM128,108a20,20,0,1,1,20-20A20,20,0,0,1,128,108Zm100,60a28,28,0,0,0-24-27.71V40a4,4,0,0,0-8,0V140.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V195.71A28,28,0,0,0,228,168Zm-28,20a20,20,0,1,1,20-20A20,20,0,0,1,200,188Z"></path>'), j0 = p('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
10
10
  function B0(e, a) {
11
11
  $(a, !0);
12
12
  const t = V0();
13
- let v = w0(a, ["$$slots", "$$events", "$$legacy", "children"]), h = P(() => a.weight ?? t.weight ?? "regular"), y = P(() => a.color ?? t.color ?? "currentColor"), k = P(() => a.size ?? t.size ?? "1em"), M = P(() => a.mirrored ?? t.mirrored ?? !1);
14
- function F(r) {
15
- let { weight: i, color: b, size: L, mirrored: z, ...c } = r;
16
- return c;
13
+ let v = w0(a, ["$$slots", "$$events", "$$legacy", "children"]), c = P(() => a.weight ?? t.weight ?? "regular"), k = P(() => a.color ?? t.color ?? "currentColor"), M = P(() => a.size ?? t.size ?? "1em"), F = P(() => a.mirrored ?? t.mirrored ?? !1);
14
+ function _(r) {
15
+ let { weight: i, color: V, size: L, mirrored: z, ...d } = r;
16
+ return d;
17
17
  }
18
- var p = j0();
18
+ var b = j0();
19
19
  A0(
20
- p,
20
+ b,
21
21
  (r, i) => ({
22
22
  xmlns: "http://www.w3.org/2000/svg",
23
23
  role: "img",
24
- width: o(k),
25
- height: o(k),
26
- fill: o(y),
27
- transform: o(M) ? "scale(-1, 1)" : void 0,
24
+ width: o(M),
25
+ height: o(M),
26
+ fill: o(k),
27
+ transform: o(F) ? "scale(-1, 1)" : void 0,
28
28
  viewBox: "0 0 256 256",
29
29
  ...r,
30
30
  ...i
31
31
  }),
32
- [() => F(t), () => F(v)]
32
+ [() => _(t), () => _(v)]
33
33
  );
34
- var S = l(p);
34
+ var O = n(b);
35
35
  {
36
36
  var K = (r) => {
37
- var i = Z(), b = x(i);
38
- Z0(b, () => a.children), s(r, i);
37
+ var i = x(), V = y(i);
38
+ Z0(V, () => a.children), s(r, i);
39
39
  };
40
- _(S, (r) => {
40
+ m(O, (r) => {
41
41
  a.children && r(K);
42
42
  });
43
43
  }
44
- var R = f(S, 2);
44
+ var R = f(O, 2);
45
45
  {
46
46
  var D = (r) => {
47
- var i = O0();
47
+ var i = T0();
48
48
  s(r, i);
49
49
  }, E = (r) => {
50
- var i = Z(), b = x(i);
50
+ var i = x(), V = y(i);
51
51
  {
52
- var L = (c) => {
53
- var H = S0();
54
- v0(), s(c, H);
55
- }, z = (c) => {
56
- var H = Z(), j = x(H);
52
+ var L = (d) => {
53
+ var I = O0();
54
+ d0(), s(d, I);
55
+ }, z = (d) => {
56
+ var I = x(), j = y(I);
57
57
  {
58
58
  var B = (g) => {
59
- var w = P0();
60
- s(g, w);
59
+ var Z = P0();
60
+ s(g, Z);
61
61
  }, q = (g) => {
62
- var w = Z(), G = x(w);
62
+ var Z = x(), G = y(Z);
63
63
  {
64
64
  var U = (u) => {
65
- var C = R0();
66
- s(u, C);
65
+ var H = R0();
66
+ s(u, H);
67
67
  }, X = (u) => {
68
- var C = Z(), d = x(C);
68
+ var H = x(), h = y(H);
69
69
  {
70
- var I = (V) => {
71
- var T = D0();
72
- s(V, T);
73
- }, t0 = (V) => {
74
- var T = Z(), e0 = x(T);
70
+ var C = (A) => {
71
+ var S = D0();
72
+ s(A, S);
73
+ }, t0 = (A) => {
74
+ var S = x(), e0 = y(S);
75
75
  {
76
- var r0 = (A) => {
77
- var O = E0();
78
- s(A, O);
79
- }, s0 = (A) => {
80
- var O = x0();
81
- O.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), s(A, O);
76
+ var r0 = (w) => {
77
+ var T = E0();
78
+ s(w, T);
79
+ }, s0 = (w) => {
80
+ var T = x0();
81
+ T.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), s(w, T);
82
82
  };
83
- _(
83
+ m(
84
84
  e0,
85
- (A) => {
86
- o(h) === "thin" ? A(r0) : A(s0, !1);
85
+ (w) => {
86
+ o(c) === "thin" ? w(r0) : w(s0, !1);
87
87
  },
88
88
  !0
89
89
  );
90
90
  }
91
- s(V, T);
91
+ s(A, S);
92
92
  };
93
- _(
94
- d,
95
- (V) => {
96
- o(h) === "regular" ? V(I) : V(t0, !1);
93
+ m(
94
+ h,
95
+ (A) => {
96
+ o(c) === "regular" ? A(C) : A(t0, !1);
97
97
  },
98
98
  !0
99
99
  );
100
100
  }
101
- s(u, C);
101
+ s(u, H);
102
102
  };
103
- _(
103
+ m(
104
104
  G,
105
105
  (u) => {
106
- o(h) === "light" ? u(U) : u(X, !1);
106
+ o(c) === "light" ? u(U) : u(X, !1);
107
107
  },
108
108
  !0
109
109
  );
110
110
  }
111
- s(g, w);
111
+ s(g, Z);
112
112
  };
113
- _(
113
+ m(
114
114
  j,
115
115
  (g) => {
116
- o(h) === "fill" ? g(B) : g(q, !1);
116
+ o(c) === "fill" ? g(B) : g(q, !1);
117
117
  },
118
118
  !0
119
119
  );
120
120
  }
121
- s(c, H);
121
+ s(d, I);
122
122
  };
123
- _(
124
- b,
125
- (c) => {
126
- o(h) === "duotone" ? c(L) : c(z, !1);
123
+ m(
124
+ V,
125
+ (d) => {
126
+ o(c) === "duotone" ? d(L) : d(z, !1);
127
127
  },
128
128
  !0
129
129
  );
130
130
  }
131
131
  s(r, i);
132
132
  };
133
- _(R, (r) => {
134
- o(h) === "bold" ? r(D) : r(E, !1);
133
+ m(R, (r) => {
134
+ o(c) === "bold" ? r(D) : r(E, !1);
135
135
  });
136
136
  }
137
- n(p), s(e, p), a0();
137
+ l(b), s(e, b), a0();
138
138
  }
139
139
  class U0 {
140
140
  constructor() {
@@ -160,7 +160,7 @@ class U0 {
160
160
  return ((a = this.context) == null ? void 0 : a.getOSDViewer()) ?? null;
161
161
  }
162
162
  }
163
- function o0(e, a) {
163
+ function c0(e, a) {
164
164
  const t = e.drawer.canvas;
165
165
  if (!t) return;
166
166
  const v = [];
@@ -180,176 +180,176 @@ const p0 = {
180
180
  invert: !1,
181
181
  grayscale: !1
182
182
  };
183
- var q0 = m('<path d="M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"></path>'), G0 = m('<path d="M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z" opacity="0.2"></path><path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"></path>', 1), X0 = m('<path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"></path>'), J0 = m('<path d="M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"></path>'), K0 = m('<path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"></path>'), N0 = m('<path d="M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"></path>'), Q0 = m('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
183
+ var q0 = p('<path d="M228,128a100,100,0,0,1-98.66,100H128a99.39,99.39,0,0,1-68.62-27.29,12,12,0,0,1,16.48-17.45,76,76,0,1,0-1.57-109c-.13.13-.25.25-.39.37L54.89,92H72a12,12,0,0,1,0,24H24a12,12,0,0,1-12-12V56a12,12,0,0,1,24,0V76.72L57.48,57.06A100,100,0,0,1,228,128Z"></path>'), G0 = p('<path d="M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z" opacity="0.2"></path><path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"></path>', 1), X0 = p('<path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L60.63,81.29l17,17A8,8,0,0,1,72,112H24a8,8,0,0,1-8-8V56A8,8,0,0,1,29.66,50.3L49.31,70,60.25,60A96,96,0,0,1,224,128Z"></path>'), J0 = p('<path d="M222,128a94,94,0,0,1-92.74,94H128a93.43,93.43,0,0,1-64.5-25.65,6,6,0,1,1,8.24-8.72A82,82,0,1,0,70,70l-.19.19L39.44,98H72a6,6,0,0,1,0,12H24a6,6,0,0,1-6-6V56a6,6,0,0,1,12,0V90.34L61.63,61.4A94,94,0,0,1,222,128Z"></path>'), K0 = p('<path d="M224,128a96,96,0,0,1-94.71,96H128A95.38,95.38,0,0,1,62.1,197.8a8,8,0,0,1,11-11.63A80,80,0,1,0,71.43,71.39a3.07,3.07,0,0,1-.26.25L44.59,96H72a8,8,0,0,1,0,16H24a8,8,0,0,1-8-8V56a8,8,0,0,1,16,0V85.8L60.25,60A96,96,0,0,1,224,128Z"></path>'), N0 = p('<path d="M220,128a92,92,0,0,1-90.77,92H128a91.47,91.47,0,0,1-63.13-25.1,4,4,0,1,1,5.5-5.82A84,84,0,1,0,68.6,68.57l-.13.12L34.3,100H72a4,4,0,0,1,0,8H24a4,4,0,0,1-4-4V56a4,4,0,0,1,8,0V94.89l35-32A92,92,0,0,1,220,128Z"></path>'), Q0 = p('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
184
184
  function W0(e, a) {
185
185
  $(a, !0);
186
186
  const t = V0();
187
- let v = w0(a, ["$$slots", "$$events", "$$legacy", "children"]), h = P(() => a.weight ?? t.weight ?? "regular"), y = P(() => a.color ?? t.color ?? "currentColor"), k = P(() => a.size ?? t.size ?? "1em"), M = P(() => a.mirrored ?? t.mirrored ?? !1);
188
- function F(r) {
189
- let { weight: i, color: b, size: L, mirrored: z, ...c } = r;
190
- return c;
187
+ let v = w0(a, ["$$slots", "$$events", "$$legacy", "children"]), c = P(() => a.weight ?? t.weight ?? "regular"), k = P(() => a.color ?? t.color ?? "currentColor"), M = P(() => a.size ?? t.size ?? "1em"), F = P(() => a.mirrored ?? t.mirrored ?? !1);
188
+ function _(r) {
189
+ let { weight: i, color: V, size: L, mirrored: z, ...d } = r;
190
+ return d;
191
191
  }
192
- var p = Q0();
192
+ var b = Q0();
193
193
  A0(
194
- p,
194
+ b,
195
195
  (r, i) => ({
196
196
  xmlns: "http://www.w3.org/2000/svg",
197
197
  role: "img",
198
- width: o(k),
199
- height: o(k),
200
- fill: o(y),
201
- transform: o(M) ? "scale(-1, 1)" : void 0,
198
+ width: o(M),
199
+ height: o(M),
200
+ fill: o(k),
201
+ transform: o(F) ? "scale(-1, 1)" : void 0,
202
202
  viewBox: "0 0 256 256",
203
203
  ...r,
204
204
  ...i
205
205
  }),
206
- [() => F(t), () => F(v)]
206
+ [() => _(t), () => _(v)]
207
207
  );
208
- var S = l(p);
208
+ var O = n(b);
209
209
  {
210
210
  var K = (r) => {
211
- var i = Z(), b = x(i);
212
- Z0(b, () => a.children), s(r, i);
211
+ var i = x(), V = y(i);
212
+ Z0(V, () => a.children), s(r, i);
213
213
  };
214
- _(S, (r) => {
214
+ m(O, (r) => {
215
215
  a.children && r(K);
216
216
  });
217
217
  }
218
- var R = f(S, 2);
218
+ var R = f(O, 2);
219
219
  {
220
220
  var D = (r) => {
221
221
  var i = q0();
222
222
  s(r, i);
223
223
  }, E = (r) => {
224
- var i = Z(), b = x(i);
224
+ var i = x(), V = y(i);
225
225
  {
226
- var L = (c) => {
227
- var H = G0();
228
- v0(), s(c, H);
229
- }, z = (c) => {
230
- var H = Z(), j = x(H);
226
+ var L = (d) => {
227
+ var I = G0();
228
+ d0(), s(d, I);
229
+ }, z = (d) => {
230
+ var I = x(), j = y(I);
231
231
  {
232
232
  var B = (g) => {
233
- var w = X0();
234
- s(g, w);
233
+ var Z = X0();
234
+ s(g, Z);
235
235
  }, q = (g) => {
236
- var w = Z(), G = x(w);
236
+ var Z = x(), G = y(Z);
237
237
  {
238
238
  var U = (u) => {
239
- var C = J0();
240
- s(u, C);
239
+ var H = J0();
240
+ s(u, H);
241
241
  }, X = (u) => {
242
- var C = Z(), d = x(C);
242
+ var H = x(), h = y(H);
243
243
  {
244
- var I = (V) => {
245
- var T = K0();
246
- s(V, T);
247
- }, t0 = (V) => {
248
- var T = Z(), e0 = x(T);
244
+ var C = (A) => {
245
+ var S = K0();
246
+ s(A, S);
247
+ }, t0 = (A) => {
248
+ var S = x(), e0 = y(S);
249
249
  {
250
- var r0 = (A) => {
251
- var O = N0();
252
- s(A, O);
253
- }, s0 = (A) => {
254
- var O = x0();
255
- O.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), s(A, O);
250
+ var r0 = (w) => {
251
+ var T = N0();
252
+ s(w, T);
253
+ }, s0 = (w) => {
254
+ var T = x0();
255
+ T.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), s(w, T);
256
256
  };
257
- _(
257
+ m(
258
258
  e0,
259
- (A) => {
260
- o(h) === "thin" ? A(r0) : A(s0, !1);
259
+ (w) => {
260
+ o(c) === "thin" ? w(r0) : w(s0, !1);
261
261
  },
262
262
  !0
263
263
  );
264
264
  }
265
- s(V, T);
265
+ s(A, S);
266
266
  };
267
- _(
268
- d,
269
- (V) => {
270
- o(h) === "regular" ? V(I) : V(t0, !1);
267
+ m(
268
+ h,
269
+ (A) => {
270
+ o(c) === "regular" ? A(C) : A(t0, !1);
271
271
  },
272
272
  !0
273
273
  );
274
274
  }
275
- s(u, C);
275
+ s(u, H);
276
276
  };
277
- _(
277
+ m(
278
278
  G,
279
279
  (u) => {
280
- o(h) === "light" ? u(U) : u(X, !1);
280
+ o(c) === "light" ? u(U) : u(X, !1);
281
281
  },
282
282
  !0
283
283
  );
284
284
  }
285
- s(g, w);
285
+ s(g, Z);
286
286
  };
287
- _(
287
+ m(
288
288
  j,
289
289
  (g) => {
290
- o(h) === "fill" ? g(B) : g(q, !1);
290
+ o(c) === "fill" ? g(B) : g(q, !1);
291
291
  },
292
292
  !0
293
293
  );
294
294
  }
295
- s(c, H);
295
+ s(d, I);
296
296
  };
297
- _(
298
- b,
299
- (c) => {
300
- o(h) === "duotone" ? c(L) : c(z, !1);
297
+ m(
298
+ V,
299
+ (d) => {
300
+ o(c) === "duotone" ? d(L) : d(z, !1);
301
301
  },
302
302
  !0
303
303
  );
304
304
  }
305
305
  s(r, i);
306
306
  };
307
- _(R, (r) => {
308
- o(h) === "bold" ? r(D) : r(E, !1);
307
+ m(R, (r) => {
308
+ o(c) === "bold" ? r(D) : r(E, !1);
309
309
  });
310
310
  }
311
- n(p), s(e, p), a0();
311
+ l(b), s(e, b), a0();
312
312
  }
313
313
  var Y0 = y0('<div class="w-72 h-full bg-base-200 border-l border-base-300 shadow-xl flex flex-col"><div class="flex items-center justify-between p-4 border-b border-base-300"><h2 class="text-lg font-semibold">Image Adjustments</h2> <button class="btn btn-sm btn-ghost btn-circle" aria-label="Close panel"><!></button></div> <div class="flex-1 overflow-y-auto p-4 space-y-6"><div class="form-control"><label class="label" for="brightness-slider"><span class="label-text">Brightness</span> <span class="label-text-alt"> </span></label> <input id="brightness-slider" type="range" min="0" max="200" class="range range-sm range-primary"/></div> <div class="form-control"><label class="label" for="contrast-slider"><span class="label-text">Contrast</span> <span class="label-text-alt"> </span></label> <input id="contrast-slider" type="range" min="0" max="200" class="range range-sm range-secondary"/></div> <div class="form-control"><label class="label" for="saturation-slider"><span class="label-text">Saturation</span> <span class="label-text-alt"> </span></label> <input id="saturation-slider" type="range" min="0" max="200" class="range range-sm range-accent"/></div> <div class="divider">Effects</div> <div class="form-control"><label class="label cursor-pointer"><span class="label-text">Invert Colors</span> <input type="checkbox" class="toggle toggle-primary"/></label></div> <div class="form-control"><label class="label cursor-pointer"><span class="label-text">Grayscale</span> <input type="checkbox" class="toggle toggle-secondary"/></label></div></div> <div class="p-4 border-t border-base-300"><button class="btn btn-outline btn-block"><!> Reset to Default</button></div></div>');
314
314
  function $0(e, a) {
315
315
  $(a, !0);
316
- function t(d, I) {
317
- a.onFilterChange({ ...a.filters, [d]: I });
316
+ function t(h, C) {
317
+ a.onFilterChange({ ...a.filters, [h]: C });
318
318
  }
319
- var v = Y0(), h = l(v), y = f(l(h), 2);
320
- y.__click = function(...d) {
321
- var I;
322
- (I = a.onClose) == null || I.apply(this, d);
319
+ var v = Y0(), c = n(v), k = f(n(c), 2);
320
+ k.__click = function(...h) {
321
+ var C;
322
+ (C = a.onClose) == null || C.apply(this, h);
323
323
  };
324
- var k = l(y);
325
- k0(k, { size: 20 }), n(y), n(h);
326
- var M = f(h, 2), F = l(M), p = l(F), S = f(l(p), 2), K = l(S);
327
- n(S), n(p);
328
- var R = f(p, 2);
329
- Q(R), R.__input = (d) => t("brightness", +d.currentTarget.value), n(F);
330
- var D = f(F, 2), E = l(D), r = f(l(E), 2), i = l(r);
331
- n(r), n(E);
332
- var b = f(E, 2);
333
- Q(b), b.__input = (d) => t("contrast", +d.currentTarget.value), n(D);
334
- var L = f(D, 2), z = l(L), c = f(l(z), 2), H = l(c);
335
- n(c), n(z);
324
+ var M = n(k);
325
+ k0(M, { size: 20 }), l(k), l(c);
326
+ var F = f(c, 2), _ = n(F), b = n(_), O = f(n(b), 2), K = n(O);
327
+ l(O), l(b);
328
+ var R = f(b, 2);
329
+ Q(R), R.__input = (h) => t("brightness", +h.currentTarget.value), l(_);
330
+ var D = f(_, 2), E = n(D), r = f(n(E), 2), i = n(r);
331
+ l(r), l(E);
332
+ var V = f(E, 2);
333
+ Q(V), V.__input = (h) => t("contrast", +h.currentTarget.value), l(D);
334
+ var L = f(D, 2), z = n(L), d = f(n(z), 2), I = n(d);
335
+ l(d), l(z);
336
336
  var j = f(z, 2);
337
- Q(j), j.__input = (d) => t("saturation", +d.currentTarget.value), n(L);
338
- var B = f(L, 4), q = l(B), g = f(l(q), 2);
339
- Q(g), g.__change = (d) => t("invert", d.currentTarget.checked), n(q), n(B);
340
- var w = f(B, 2), G = l(w), U = f(l(G), 2);
341
- Q(U), U.__change = (d) => t("grayscale", d.currentTarget.checked), n(G), n(w), n(M);
342
- var X = f(M, 2), u = l(X);
343
- u.__click = function(...d) {
344
- var I;
345
- (I = a.onReset) == null || I.apply(this, d);
337
+ Q(j), j.__input = (h) => t("saturation", +h.currentTarget.value), l(L);
338
+ var B = f(L, 4), q = n(B), g = f(n(q), 2);
339
+ Q(g), g.__change = (h) => t("invert", h.currentTarget.checked), l(q), l(B);
340
+ var Z = f(B, 2), G = n(Z), U = f(n(G), 2);
341
+ Q(U), U.__change = (h) => t("grayscale", h.currentTarget.checked), l(G), l(Z), l(F);
342
+ var X = f(F, 2), u = n(X);
343
+ u.__click = function(...h) {
344
+ var C;
345
+ (C = a.onReset) == null || C.apply(this, h);
346
346
  };
347
- var C = l(u);
348
- W0(C, { size: 20 }), v0(), n(u), n(X), n(v), F0(() => {
349
- l0(K, `${a.filters.brightness ?? ""}%`), n0(R, a.filters.brightness), l0(i, `${a.filters.contrast ?? ""}%`), n0(b, a.filters.contrast), l0(H, `${a.filters.saturation ?? ""}%`), n0(j, a.filters.saturation), h0(g, a.filters.invert), h0(U, a.filters.grayscale);
347
+ var H = n(u);
348
+ W0(H, { size: 20 }), d0(), l(u), l(X), l(v), F0(() => {
349
+ n0(K, `${a.filters.brightness ?? ""}%`), l0(R, a.filters.brightness), n0(i, `${a.filters.contrast ?? ""}%`), l0(V, a.filters.contrast), n0(I, `${a.filters.saturation ?? ""}%`), l0(j, a.filters.saturation), g0(g, a.filters.invert), g0(U, a.filters.grayscale);
350
350
  }), s(e, v), a0();
351
351
  }
352
- I0(["click", "input", "change"]);
352
+ C0(["click", "input", "change"]);
353
353
  var W, Y;
354
354
  class b0 extends U0 {
355
355
  constructor() {
@@ -361,22 +361,22 @@ class b0 extends U0 {
361
361
  this,
362
362
  W,
363
363
  // Reactive state using Svelte 5 runes
364
- d0(!1)
364
+ u0(!1)
365
365
  );
366
- i0(this, Y, d0(L0({ ...p0 })));
366
+ i0(this, Y, u0(L0({ ...p0 })));
367
367
  J(this, "osd", null);
368
368
  }
369
369
  get _panelOpen() {
370
370
  return o(N(this, W));
371
371
  }
372
372
  set _panelOpen(t) {
373
- g0(N(this, W), t, !0);
373
+ f0(N(this, W), t, !0);
374
374
  }
375
375
  get _filters() {
376
376
  return o(N(this, Y));
377
377
  }
378
378
  set _filters(t) {
379
- g0(N(this, Y), t, !0);
379
+ f0(N(this, Y), t, !0);
380
380
  }
381
381
  onRegister(t) {
382
382
  super.onRegister(t), t.registerMenuButton({
@@ -401,8 +401,8 @@ class b0 extends U0 {
401
401
  });
402
402
  }
403
403
  onViewerReady(t) {
404
- this.osd = t, m0(this._filters) && o0(t, this._filters), this.osd.addHandler("open", () => {
405
- this.osd && m0(this._filters) && o0(this.osd, this._filters);
404
+ this.osd = t, m0(this._filters) && c0(t, this._filters), this.osd.addHandler("open", () => {
405
+ this.osd && m0(this._filters) && c0(this.osd, this._filters);
406
406
  });
407
407
  }
408
408
  onDestroy() {
@@ -413,7 +413,7 @@ class b0 extends U0 {
413
413
  this._panelOpen = !this._panelOpen;
414
414
  }
415
415
  setFilters(t) {
416
- this._filters.brightness = t.brightness, this._filters.contrast = t.contrast, this._filters.saturation = t.saturation, this._filters.invert = t.invert, this._filters.grayscale = t.grayscale, this.osd && o0(this.osd, t);
416
+ this._filters.brightness = t.brightness, this._filters.contrast = t.contrast, this._filters.saturation = t.saturation, this._filters.invert = t.invert, this._filters.grayscale = t.grayscale, this.osd && c0(this.osd, t);
417
417
  }
418
418
  resetFilters() {
419
419
  Object.assign(this._filters, p0), this.osd && _0(this.osd);
@@ -426,34 +426,44 @@ W = new WeakMap(), Y = new WeakMap();
426
426
  var aa = y0('<div class="w-full h-full"><!></div>');
427
427
  function ta(e, a) {
428
428
  $(a, !0);
429
- let t = u0(a, "manifestId", 7, ""), v = u0(a, "plugins", 23, () => [new b0()]);
430
- var h = {
429
+ let t = o0(a, "manifestId", 7, ""), v = o0(a, "canvasId", 7, ""), c = o0(a, "plugins", 23, () => [new b0()]);
430
+ var k = {
431
431
  get manifestId() {
432
432
  return t();
433
433
  },
434
- set manifestId(M = "") {
435
- t(M), f0();
434
+ set manifestId(_ = "") {
435
+ t(_), v0();
436
436
  },
437
- get plugins() {
437
+ get canvasId() {
438
438
  return v();
439
439
  },
440
- set plugins(M = [new b0()]) {
441
- v(M), f0();
440
+ set canvasId(_ = "") {
441
+ v(_), v0();
442
+ },
443
+ get plugins() {
444
+ return c();
445
+ },
446
+ set plugins(_ = [new b0()]) {
447
+ c(_), v0();
442
448
  }
443
- }, y = aa(), k = l(y);
444
- return T0(k, {
449
+ }, M = aa(), F = n(M);
450
+ return S0(F, {
445
451
  get manifestId() {
446
452
  return t();
447
453
  },
448
- get plugins() {
454
+ get canvasId() {
449
455
  return v();
456
+ },
457
+ get plugins() {
458
+ return c();
450
459
  }
451
- }), n(y), s(e, y), a0(h);
460
+ }), l(M), s(e, M), a0(k);
452
461
  }
453
462
  customElements.define("triiiceratops-viewer-image", z0(
454
463
  ta,
455
464
  {
456
465
  manifestId: { attribute: "manifest-id", reflect: !0, type: "String" },
466
+ canvasId: { attribute: "canvas-id", reflect: !0, type: "String" },
457
467
  plugins: {}
458
468
  },
459
469
  [],