triiiceratops 0.5.0 → 0.6.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.
- package/dist/chunks/TriiiceratopsViewer-CuHkgof3.js +22309 -0
- package/dist/index.js +1407 -1302
- package/dist/plugin-COh2S4OT.js +236 -0
- package/dist/plugins/image-manipulation.js +51 -47
- package/dist/src/lib/index.d.ts +4 -0
- package/dist/src/lib/paraglide/messages/de.d.ts +10 -0
- package/dist/src/lib/paraglide/messages/en.d.ts +10 -0
- package/dist/src/lib/paraglide/messages.d.ts +30 -0
- package/dist/src/lib/plugins/image-manipulation/filters.d.ts +1 -1
- package/dist/src/lib/theme/colorUtils.d.ts +36 -0
- package/dist/src/lib/theme/index.d.ts +51 -0
- package/dist/src/lib/theme/themeManager.d.ts +39 -0
- package/dist/src/lib/theme/types.d.ts +73 -0
- package/dist/triiiceratops-element-image.js +315 -276
- package/dist/triiiceratops-element.js +54 -19
- package/dist/{triiiceratops-element.css → triiiceratops.css} +1 -1
- package/package.json +8 -3
- package/dist/chunks/TriiiceratopsViewer-BardJ3c3.js +0 -22029
- package/dist/plugin-DqOSV8lm.js +0 -30
|
@@ -1,147 +1,147 @@
|
|
|
1
|
-
var
|
|
2
|
-
var h0 = (
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var C0 = Object.defineProperty;
|
|
2
|
+
var h0 = (t) => {
|
|
3
|
+
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var I0 = (e, a
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import { p as
|
|
9
|
-
var
|
|
10
|
-
function
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
let
|
|
14
|
-
function
|
|
15
|
-
let { weight:
|
|
16
|
-
return
|
|
5
|
+
var I0 = (t, e, a) => e in t ? C0(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
|
|
6
|
+
var X = (t, e, a) => I0(t, typeof e != "symbol" ? e + "" : e, a), M0 = (t, e, a) => e.has(t) || h0("Cannot " + a);
|
|
7
|
+
var K = (t, e, a) => (M0(t, e, "read from private field"), a ? a.call(t) : e.get(t)), l0 = (t, e, a) => e.has(t) ? h0("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, a);
|
|
8
|
+
import { p as a0, n as V0, o as A, q as A0, g as i, u as S, e as o, t as V, d as u, r as v, i as s, j as t0, v as w0, w as I, b as x, x as y0, y as d0, z as Z0, A as H0, f as x0, X as k0, B as Q, C as F0, D as o0, E as v0, F as g0, G as u0, H as f0, I as T0, J as L0, c as S0, a as W, h as z0, T as O0, s as P0, k as R0, l as B0, m as Y } from "./chunks/TriiiceratopsViewer-CuHkgof3.js";
|
|
9
|
+
var D0 = A('<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>'), E0 = A('<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), j0 = A('<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>'), U0 = A('<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>'), G0 = A('<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>'), J0 = A('<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>'), q0 = A('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
|
|
10
|
+
function N0(t, e) {
|
|
11
|
+
a0(e, !0);
|
|
12
|
+
const a = V0();
|
|
13
|
+
let c = w0(e, ["$$slots", "$$events", "$$legacy", "children"]), n = S(() => e.weight ?? a.weight ?? "regular"), b = S(() => e.color ?? a.color ?? "currentColor"), _ = S(() => e.size ?? a.size ?? "1em"), z = S(() => e.mirrored ?? a.mirrored ?? !1);
|
|
14
|
+
function M(r) {
|
|
15
|
+
let { weight: l, color: w, size: P, mirrored: R, ...h } = r;
|
|
16
|
+
return h;
|
|
17
17
|
}
|
|
18
|
-
var
|
|
18
|
+
var p = q0();
|
|
19
19
|
A0(
|
|
20
|
-
|
|
21
|
-
(r,
|
|
20
|
+
p,
|
|
21
|
+
(r, l) => ({
|
|
22
22
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23
23
|
role: "img",
|
|
24
|
-
width:
|
|
25
|
-
height:
|
|
26
|
-
fill:
|
|
27
|
-
transform:
|
|
24
|
+
width: i(_),
|
|
25
|
+
height: i(_),
|
|
26
|
+
fill: i(b),
|
|
27
|
+
transform: i(z) ? "scale(-1, 1)" : void 0,
|
|
28
28
|
viewBox: "0 0 256 256",
|
|
29
29
|
...r,
|
|
30
|
-
...
|
|
30
|
+
...l
|
|
31
31
|
}),
|
|
32
|
-
[() =>
|
|
32
|
+
[() => M(a), () => M(c)]
|
|
33
33
|
);
|
|
34
|
-
var
|
|
34
|
+
var H = o(p);
|
|
35
35
|
{
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
|
|
36
|
+
var E = (r) => {
|
|
37
|
+
var l = I(), w = x(l);
|
|
38
|
+
y0(w, () => e.children), s(r, l);
|
|
39
39
|
};
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
V(H, (r) => {
|
|
41
|
+
e.children && r(E);
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
-
var
|
|
44
|
+
var L = u(H, 2);
|
|
45
45
|
{
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
s(r,
|
|
49
|
-
},
|
|
50
|
-
var
|
|
46
|
+
var O = (r) => {
|
|
47
|
+
var l = D0();
|
|
48
|
+
s(r, l);
|
|
49
|
+
}, d = (r) => {
|
|
50
|
+
var l = I(), w = x(l);
|
|
51
51
|
{
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
d0(), s(
|
|
55
|
-
},
|
|
56
|
-
var
|
|
52
|
+
var P = (h) => {
|
|
53
|
+
var k = E0();
|
|
54
|
+
d0(), s(h, k);
|
|
55
|
+
}, R = (h) => {
|
|
56
|
+
var k = I(), j = x(k);
|
|
57
57
|
{
|
|
58
|
-
var
|
|
59
|
-
var
|
|
60
|
-
s(
|
|
61
|
-
},
|
|
62
|
-
var
|
|
58
|
+
var U = (f) => {
|
|
59
|
+
var C = j0();
|
|
60
|
+
s(f, C);
|
|
61
|
+
}, J = (f) => {
|
|
62
|
+
var C = I(), q = x(C);
|
|
63
63
|
{
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
s(
|
|
67
|
-
},
|
|
68
|
-
var
|
|
64
|
+
var G = (m) => {
|
|
65
|
+
var F = U0();
|
|
66
|
+
s(m, F);
|
|
67
|
+
}, N = (m) => {
|
|
68
|
+
var F = I(), g = x(F);
|
|
69
69
|
{
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
s(
|
|
73
|
-
},
|
|
74
|
-
var
|
|
70
|
+
var T = (y) => {
|
|
71
|
+
var B = G0();
|
|
72
|
+
s(y, B);
|
|
73
|
+
}, r0 = (y) => {
|
|
74
|
+
var B = I(), s0 = x(B);
|
|
75
75
|
{
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
s(
|
|
79
|
-
},
|
|
80
|
-
var
|
|
81
|
-
|
|
76
|
+
var n0 = (Z) => {
|
|
77
|
+
var D = J0();
|
|
78
|
+
s(Z, D);
|
|
79
|
+
}, i0 = (Z) => {
|
|
80
|
+
var D = Z0();
|
|
81
|
+
D.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), s(Z, D);
|
|
82
82
|
};
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
(
|
|
86
|
-
|
|
83
|
+
V(
|
|
84
|
+
s0,
|
|
85
|
+
(Z) => {
|
|
86
|
+
i(n) === "thin" ? Z(n0) : Z(i0, !1);
|
|
87
87
|
},
|
|
88
88
|
!0
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
|
-
s(
|
|
91
|
+
s(y, B);
|
|
92
92
|
};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
(
|
|
96
|
-
|
|
93
|
+
V(
|
|
94
|
+
g,
|
|
95
|
+
(y) => {
|
|
96
|
+
i(n) === "regular" ? y(T) : y(r0, !1);
|
|
97
97
|
},
|
|
98
98
|
!0
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
|
-
s(
|
|
101
|
+
s(m, F);
|
|
102
102
|
};
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
(
|
|
106
|
-
|
|
103
|
+
V(
|
|
104
|
+
q,
|
|
105
|
+
(m) => {
|
|
106
|
+
i(n) === "light" ? m(G) : m(N, !1);
|
|
107
107
|
},
|
|
108
108
|
!0
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
|
-
s(
|
|
111
|
+
s(f, C);
|
|
112
112
|
};
|
|
113
|
-
|
|
113
|
+
V(
|
|
114
114
|
j,
|
|
115
|
-
(
|
|
116
|
-
|
|
115
|
+
(f) => {
|
|
116
|
+
i(n) === "fill" ? f(U) : f(J, !1);
|
|
117
117
|
},
|
|
118
118
|
!0
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
|
-
s(
|
|
121
|
+
s(h, k);
|
|
122
122
|
};
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
(
|
|
126
|
-
|
|
123
|
+
V(
|
|
124
|
+
w,
|
|
125
|
+
(h) => {
|
|
126
|
+
i(n) === "duotone" ? h(P) : h(R, !1);
|
|
127
127
|
},
|
|
128
128
|
!0
|
|
129
129
|
);
|
|
130
130
|
}
|
|
131
|
-
s(r,
|
|
131
|
+
s(r, l);
|
|
132
132
|
};
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
V(L, (r) => {
|
|
134
|
+
i(n) === "bold" ? r(O) : r(d, !1);
|
|
135
135
|
});
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
v(p), s(t, p), t0();
|
|
138
138
|
}
|
|
139
|
-
class
|
|
139
|
+
class X0 {
|
|
140
140
|
constructor() {
|
|
141
|
-
|
|
141
|
+
X(this, "context", null);
|
|
142
142
|
}
|
|
143
|
-
onRegister(
|
|
144
|
-
this.context =
|
|
143
|
+
onRegister(e) {
|
|
144
|
+
this.context = e;
|
|
145
145
|
}
|
|
146
146
|
onDestroy() {
|
|
147
147
|
this.context = null;
|
|
@@ -156,22 +156,24 @@ class U0 {
|
|
|
156
156
|
}
|
|
157
157
|
/** Convenience getter for OSD viewer */
|
|
158
158
|
get osdViewer() {
|
|
159
|
-
var
|
|
160
|
-
return ((
|
|
159
|
+
var e;
|
|
160
|
+
return ((e = this.context) == null ? void 0 : e.getOSDViewer()) ?? null;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
function c0(
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
163
|
+
function c0(t, e) {
|
|
164
|
+
var n;
|
|
165
|
+
const a = (n = t.drawer) == null ? void 0 : n.canvas;
|
|
166
|
+
if (!a) return;
|
|
167
|
+
const c = [];
|
|
168
|
+
e.brightness !== 100 && c.push(`brightness(${e.brightness / 100})`), e.contrast !== 100 && c.push(`contrast(${e.contrast / 100})`), e.saturation !== 100 && c.push(`saturate(${e.saturation / 100})`), e.invert && c.push("invert(1)"), e.grayscale && c.push("grayscale(1)"), a.style.filter = c.length > 0 ? c.join(" ") : "none";
|
|
168
169
|
}
|
|
169
|
-
function
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
function m0(t) {
|
|
171
|
+
var a;
|
|
172
|
+
const e = (a = t.drawer) == null ? void 0 : a.canvas;
|
|
173
|
+
e && (e.style.filter = "none");
|
|
172
174
|
}
|
|
173
|
-
function
|
|
174
|
-
return
|
|
175
|
+
function _0(t) {
|
|
176
|
+
return t.brightness !== 100 || t.contrast !== 100 || t.saturation !== 100 || t.invert || t.grayscale;
|
|
175
177
|
}
|
|
176
178
|
const p0 = {
|
|
177
179
|
brightness: 100,
|
|
@@ -180,293 +182,330 @@ const p0 = {
|
|
|
180
182
|
invert: !1,
|
|
181
183
|
grayscale: !1
|
|
182
184
|
};
|
|
183
|
-
var
|
|
184
|
-
function
|
|
185
|
-
|
|
186
|
-
const
|
|
187
|
-
let
|
|
188
|
-
function
|
|
189
|
-
let { weight:
|
|
190
|
-
return
|
|
185
|
+
var K0 = A('<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>'), Q0 = A('<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), W0 = A('<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>'), Y0 = A('<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>'), $0 = A('<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>'), ee = A('<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>'), ae = A('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
|
|
186
|
+
function te(t, e) {
|
|
187
|
+
a0(e, !0);
|
|
188
|
+
const a = V0();
|
|
189
|
+
let c = w0(e, ["$$slots", "$$events", "$$legacy", "children"]), n = S(() => e.weight ?? a.weight ?? "regular"), b = S(() => e.color ?? a.color ?? "currentColor"), _ = S(() => e.size ?? a.size ?? "1em"), z = S(() => e.mirrored ?? a.mirrored ?? !1);
|
|
190
|
+
function M(r) {
|
|
191
|
+
let { weight: l, color: w, size: P, mirrored: R, ...h } = r;
|
|
192
|
+
return h;
|
|
191
193
|
}
|
|
192
|
-
var
|
|
194
|
+
var p = ae();
|
|
193
195
|
A0(
|
|
194
|
-
|
|
195
|
-
(r,
|
|
196
|
+
p,
|
|
197
|
+
(r, l) => ({
|
|
196
198
|
xmlns: "http://www.w3.org/2000/svg",
|
|
197
199
|
role: "img",
|
|
198
|
-
width:
|
|
199
|
-
height:
|
|
200
|
-
fill:
|
|
201
|
-
transform:
|
|
200
|
+
width: i(_),
|
|
201
|
+
height: i(_),
|
|
202
|
+
fill: i(b),
|
|
203
|
+
transform: i(z) ? "scale(-1, 1)" : void 0,
|
|
202
204
|
viewBox: "0 0 256 256",
|
|
203
205
|
...r,
|
|
204
|
-
...
|
|
206
|
+
...l
|
|
205
207
|
}),
|
|
206
|
-
[() =>
|
|
208
|
+
[() => M(a), () => M(c)]
|
|
207
209
|
);
|
|
208
|
-
var
|
|
210
|
+
var H = o(p);
|
|
209
211
|
{
|
|
210
|
-
var
|
|
211
|
-
var
|
|
212
|
-
|
|
212
|
+
var E = (r) => {
|
|
213
|
+
var l = I(), w = x(l);
|
|
214
|
+
y0(w, () => e.children), s(r, l);
|
|
213
215
|
};
|
|
214
|
-
|
|
215
|
-
|
|
216
|
+
V(H, (r) => {
|
|
217
|
+
e.children && r(E);
|
|
216
218
|
});
|
|
217
219
|
}
|
|
218
|
-
var
|
|
220
|
+
var L = u(H, 2);
|
|
219
221
|
{
|
|
220
|
-
var
|
|
221
|
-
var
|
|
222
|
-
s(r,
|
|
223
|
-
},
|
|
224
|
-
var
|
|
222
|
+
var O = (r) => {
|
|
223
|
+
var l = K0();
|
|
224
|
+
s(r, l);
|
|
225
|
+
}, d = (r) => {
|
|
226
|
+
var l = I(), w = x(l);
|
|
225
227
|
{
|
|
226
|
-
var
|
|
227
|
-
var
|
|
228
|
-
d0(), s(
|
|
229
|
-
},
|
|
230
|
-
var
|
|
228
|
+
var P = (h) => {
|
|
229
|
+
var k = Q0();
|
|
230
|
+
d0(), s(h, k);
|
|
231
|
+
}, R = (h) => {
|
|
232
|
+
var k = I(), j = x(k);
|
|
231
233
|
{
|
|
232
|
-
var
|
|
233
|
-
var
|
|
234
|
-
s(
|
|
235
|
-
},
|
|
236
|
-
var
|
|
234
|
+
var U = (f) => {
|
|
235
|
+
var C = W0();
|
|
236
|
+
s(f, C);
|
|
237
|
+
}, J = (f) => {
|
|
238
|
+
var C = I(), q = x(C);
|
|
237
239
|
{
|
|
238
|
-
var
|
|
239
|
-
var
|
|
240
|
-
s(
|
|
241
|
-
},
|
|
242
|
-
var
|
|
240
|
+
var G = (m) => {
|
|
241
|
+
var F = Y0();
|
|
242
|
+
s(m, F);
|
|
243
|
+
}, N = (m) => {
|
|
244
|
+
var F = I(), g = x(F);
|
|
243
245
|
{
|
|
244
|
-
var
|
|
245
|
-
var
|
|
246
|
-
s(
|
|
247
|
-
},
|
|
248
|
-
var
|
|
246
|
+
var T = (y) => {
|
|
247
|
+
var B = $0();
|
|
248
|
+
s(y, B);
|
|
249
|
+
}, r0 = (y) => {
|
|
250
|
+
var B = I(), s0 = x(B);
|
|
249
251
|
{
|
|
250
|
-
var
|
|
251
|
-
var
|
|
252
|
-
s(
|
|
253
|
-
},
|
|
254
|
-
var
|
|
255
|
-
|
|
252
|
+
var n0 = (Z) => {
|
|
253
|
+
var D = ee();
|
|
254
|
+
s(Z, D);
|
|
255
|
+
}, i0 = (Z) => {
|
|
256
|
+
var D = Z0();
|
|
257
|
+
D.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), s(Z, D);
|
|
256
258
|
};
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
(
|
|
260
|
-
|
|
259
|
+
V(
|
|
260
|
+
s0,
|
|
261
|
+
(Z) => {
|
|
262
|
+
i(n) === "thin" ? Z(n0) : Z(i0, !1);
|
|
261
263
|
},
|
|
262
264
|
!0
|
|
263
265
|
);
|
|
264
266
|
}
|
|
265
|
-
s(
|
|
267
|
+
s(y, B);
|
|
266
268
|
};
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
(
|
|
270
|
-
|
|
269
|
+
V(
|
|
270
|
+
g,
|
|
271
|
+
(y) => {
|
|
272
|
+
i(n) === "regular" ? y(T) : y(r0, !1);
|
|
271
273
|
},
|
|
272
274
|
!0
|
|
273
275
|
);
|
|
274
276
|
}
|
|
275
|
-
s(
|
|
277
|
+
s(m, F);
|
|
276
278
|
};
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
(
|
|
280
|
-
|
|
279
|
+
V(
|
|
280
|
+
q,
|
|
281
|
+
(m) => {
|
|
282
|
+
i(n) === "light" ? m(G) : m(N, !1);
|
|
281
283
|
},
|
|
282
284
|
!0
|
|
283
285
|
);
|
|
284
286
|
}
|
|
285
|
-
s(
|
|
287
|
+
s(f, C);
|
|
286
288
|
};
|
|
287
|
-
|
|
289
|
+
V(
|
|
288
290
|
j,
|
|
289
|
-
(
|
|
290
|
-
|
|
291
|
+
(f) => {
|
|
292
|
+
i(n) === "fill" ? f(U) : f(J, !1);
|
|
291
293
|
},
|
|
292
294
|
!0
|
|
293
295
|
);
|
|
294
296
|
}
|
|
295
|
-
s(
|
|
297
|
+
s(h, k);
|
|
296
298
|
};
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
(
|
|
300
|
-
|
|
299
|
+
V(
|
|
300
|
+
w,
|
|
301
|
+
(h) => {
|
|
302
|
+
i(n) === "duotone" ? h(P) : h(R, !1);
|
|
301
303
|
},
|
|
302
304
|
!0
|
|
303
305
|
);
|
|
304
306
|
}
|
|
305
|
-
s(r,
|
|
307
|
+
s(r, l);
|
|
306
308
|
};
|
|
307
|
-
|
|
308
|
-
|
|
309
|
+
V(L, (r) => {
|
|
310
|
+
i(n) === "bold" ? r(O) : r(d, !1);
|
|
309
311
|
});
|
|
310
312
|
}
|
|
311
|
-
|
|
313
|
+
v(p), s(t, p), t0();
|
|
312
314
|
}
|
|
313
|
-
var
|
|
314
|
-
function
|
|
315
|
-
|
|
316
|
-
function
|
|
317
|
-
|
|
315
|
+
var re = x0('<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>');
|
|
316
|
+
function se(t, e) {
|
|
317
|
+
a0(e, !0);
|
|
318
|
+
function a(g, T) {
|
|
319
|
+
e.onFilterChange({ ...e.filters, [g]: T });
|
|
318
320
|
}
|
|
319
|
-
var
|
|
320
|
-
|
|
321
|
-
var
|
|
322
|
-
(
|
|
321
|
+
var c = re(), n = o(c), b = u(o(n), 2);
|
|
322
|
+
b.__click = function(...g) {
|
|
323
|
+
var T;
|
|
324
|
+
(T = e.onClose) == null || T.apply(this, g);
|
|
323
325
|
};
|
|
324
|
-
var
|
|
325
|
-
k0(
|
|
326
|
-
var
|
|
327
|
-
|
|
328
|
-
var
|
|
329
|
-
Q(
|
|
330
|
-
var
|
|
331
|
-
|
|
332
|
-
var
|
|
333
|
-
Q(
|
|
334
|
-
var
|
|
335
|
-
|
|
336
|
-
var j =
|
|
337
|
-
Q(j), j.__input = (
|
|
338
|
-
var
|
|
339
|
-
Q(
|
|
340
|
-
var
|
|
341
|
-
Q(
|
|
342
|
-
var
|
|
343
|
-
|
|
344
|
-
var
|
|
345
|
-
(
|
|
326
|
+
var _ = o(b);
|
|
327
|
+
k0(_, { size: 20 }), v(b), v(n);
|
|
328
|
+
var z = u(n, 2), M = o(z), p = o(M), H = u(o(p), 2), E = o(H);
|
|
329
|
+
v(H), v(p);
|
|
330
|
+
var L = u(p, 2);
|
|
331
|
+
Q(L), L.__input = (g) => a("brightness", +g.currentTarget.value), v(M);
|
|
332
|
+
var O = u(M, 2), d = o(O), r = u(o(d), 2), l = o(r);
|
|
333
|
+
v(r), v(d);
|
|
334
|
+
var w = u(d, 2);
|
|
335
|
+
Q(w), w.__input = (g) => a("contrast", +g.currentTarget.value), v(O);
|
|
336
|
+
var P = u(O, 2), R = o(P), h = u(o(R), 2), k = o(h);
|
|
337
|
+
v(h), v(R);
|
|
338
|
+
var j = u(R, 2);
|
|
339
|
+
Q(j), j.__input = (g) => a("saturation", +g.currentTarget.value), v(P);
|
|
340
|
+
var U = u(P, 4), J = o(U), f = u(o(J), 2);
|
|
341
|
+
Q(f), f.__change = (g) => a("invert", g.currentTarget.checked), v(J), v(U);
|
|
342
|
+
var C = u(U, 2), q = o(C), G = u(o(q), 2);
|
|
343
|
+
Q(G), G.__change = (g) => a("grayscale", g.currentTarget.checked), v(q), v(C), v(z);
|
|
344
|
+
var N = u(z, 2), m = o(N);
|
|
345
|
+
m.__click = function(...g) {
|
|
346
|
+
var T;
|
|
347
|
+
(T = e.onReset) == null || T.apply(this, g);
|
|
346
348
|
};
|
|
347
|
-
var
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}), s(
|
|
349
|
+
var F = o(m);
|
|
350
|
+
te(F, { size: 20 }), d0(), v(m), v(N), v(c), F0(() => {
|
|
351
|
+
o0(E, `${e.filters.brightness ?? ""}%`), v0(L, e.filters.brightness), o0(l, `${e.filters.contrast ?? ""}%`), v0(w, e.filters.contrast), o0(k, `${e.filters.saturation ?? ""}%`), v0(j, e.filters.saturation), g0(f, e.filters.invert), g0(G, e.filters.grayscale);
|
|
352
|
+
}), s(t, c), t0();
|
|
351
353
|
}
|
|
352
|
-
|
|
353
|
-
var
|
|
354
|
-
class b0 extends
|
|
354
|
+
H0(["click", "input", "change"]);
|
|
355
|
+
var $, e0;
|
|
356
|
+
class b0 extends X0 {
|
|
355
357
|
constructor() {
|
|
356
358
|
super(...arguments);
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
359
|
+
X(this, "id", "image-manipulation");
|
|
360
|
+
X(this, "name", "Image Manipulation");
|
|
361
|
+
X(this, "version", "1.0.0");
|
|
362
|
+
l0(
|
|
361
363
|
this,
|
|
362
|
-
|
|
364
|
+
$,
|
|
363
365
|
// Reactive state using Svelte 5 runes
|
|
364
366
|
u0(!1)
|
|
365
367
|
);
|
|
366
|
-
|
|
367
|
-
|
|
368
|
+
l0(this, e0, u0(T0({ ...p0 })));
|
|
369
|
+
X(this, "osd", null);
|
|
368
370
|
}
|
|
369
371
|
get _panelOpen() {
|
|
370
|
-
return
|
|
372
|
+
return i(K(this, $));
|
|
371
373
|
}
|
|
372
|
-
set _panelOpen(
|
|
373
|
-
f0(
|
|
374
|
+
set _panelOpen(a) {
|
|
375
|
+
f0(K(this, $), a, !0);
|
|
374
376
|
}
|
|
375
377
|
get _filters() {
|
|
376
|
-
return
|
|
378
|
+
return i(K(this, e0));
|
|
377
379
|
}
|
|
378
|
-
set _filters(
|
|
379
|
-
f0(
|
|
380
|
+
set _filters(a) {
|
|
381
|
+
f0(K(this, e0), a, !0);
|
|
380
382
|
}
|
|
381
|
-
onRegister(
|
|
382
|
-
super.onRegister(
|
|
383
|
+
onRegister(a) {
|
|
384
|
+
super.onRegister(a), a.registerMenuButton({
|
|
383
385
|
id: `${this.id}:toggle`,
|
|
384
|
-
icon:
|
|
385
|
-
tooltip
|
|
386
|
+
icon: N0,
|
|
387
|
+
get tooltip() {
|
|
388
|
+
return L0.image_adjustments();
|
|
389
|
+
},
|
|
386
390
|
onClick: () => this.togglePanel(),
|
|
387
391
|
isActive: () => this._panelOpen,
|
|
388
392
|
activeClass: "btn-secondary",
|
|
389
393
|
order: 50
|
|
390
|
-
}),
|
|
394
|
+
}), a.registerPanel({
|
|
391
395
|
id: `${this.id}:panel`,
|
|
392
|
-
component:
|
|
396
|
+
component: se,
|
|
393
397
|
position: "left",
|
|
394
398
|
isVisible: () => this._panelOpen,
|
|
395
399
|
props: {
|
|
396
400
|
filters: this._filters,
|
|
397
|
-
onFilterChange: (
|
|
401
|
+
onFilterChange: (c) => this.setFilters(c),
|
|
398
402
|
onReset: () => this.resetFilters(),
|
|
399
403
|
onClose: () => this.togglePanel()
|
|
400
404
|
}
|
|
401
405
|
});
|
|
402
406
|
}
|
|
403
|
-
onViewerReady(
|
|
404
|
-
this.osd =
|
|
405
|
-
this.osd &&
|
|
407
|
+
onViewerReady(a) {
|
|
408
|
+
this.osd = a, _0(this._filters) && c0(a, this._filters), this.osd.addHandler("open", () => {
|
|
409
|
+
this.osd && _0(this._filters) && c0(this.osd, this._filters);
|
|
406
410
|
});
|
|
407
411
|
}
|
|
408
412
|
onDestroy() {
|
|
409
|
-
this.osd &&
|
|
413
|
+
this.osd && m0(this.osd), this.osd = null, super.onDestroy();
|
|
410
414
|
}
|
|
411
415
|
// Public API
|
|
412
416
|
togglePanel() {
|
|
413
417
|
this._panelOpen = !this._panelOpen;
|
|
414
418
|
}
|
|
415
|
-
setFilters(
|
|
416
|
-
this._filters.brightness =
|
|
419
|
+
setFilters(a) {
|
|
420
|
+
this._filters.brightness = a.brightness, this._filters.contrast = a.contrast, this._filters.saturation = a.saturation, this._filters.invert = a.invert, this._filters.grayscale = a.grayscale, this.osd && c0(this.osd, a);
|
|
417
421
|
}
|
|
418
422
|
resetFilters() {
|
|
419
|
-
Object.assign(this._filters, p0), this.osd &&
|
|
423
|
+
Object.assign(this._filters, p0), this.osd && m0(this.osd);
|
|
420
424
|
}
|
|
421
425
|
getFilters() {
|
|
422
426
|
return { ...this._filters };
|
|
423
427
|
}
|
|
424
428
|
}
|
|
425
|
-
|
|
426
|
-
var
|
|
427
|
-
function
|
|
428
|
-
|
|
429
|
-
let
|
|
430
|
-
|
|
429
|
+
$ = new WeakMap(), e0 = new WeakMap();
|
|
430
|
+
var ne = x0('<!> <div class="w-full h-full"><!></div>', 1);
|
|
431
|
+
function ie(t, e) {
|
|
432
|
+
a0(e, !0);
|
|
433
|
+
let a = W(e, "manifestId", 7, ""), c = W(e, "canvasId", 7, ""), n = W(e, "plugins", 23, () => [new b0()]), b = W(e, "theme", 7, void 0), _ = W(e, "themeConfig", 7, void 0), z = S(() => {
|
|
434
|
+
if (b()) {
|
|
435
|
+
if (B0(b())) return b();
|
|
436
|
+
console.warn(`Invalid theme "${b()}". Using system preference fallback.`);
|
|
437
|
+
}
|
|
438
|
+
}), M = S(() => {
|
|
439
|
+
if (_()) {
|
|
440
|
+
if (typeof _() == "string") {
|
|
441
|
+
const d = R0(_());
|
|
442
|
+
return d || console.warn(`Invalid theme-config JSON: "${_()}". Ignoring.`), d ?? void 0;
|
|
443
|
+
}
|
|
444
|
+
return _();
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
var p = {
|
|
431
448
|
get manifestId() {
|
|
432
|
-
return
|
|
449
|
+
return a();
|
|
433
450
|
},
|
|
434
|
-
set manifestId(
|
|
435
|
-
|
|
451
|
+
set manifestId(d = "") {
|
|
452
|
+
a(d), Y();
|
|
436
453
|
},
|
|
437
454
|
get canvasId() {
|
|
438
|
-
return
|
|
455
|
+
return c();
|
|
439
456
|
},
|
|
440
|
-
set canvasId(
|
|
441
|
-
|
|
457
|
+
set canvasId(d = "") {
|
|
458
|
+
c(d), Y();
|
|
442
459
|
},
|
|
443
460
|
get plugins() {
|
|
444
|
-
return
|
|
461
|
+
return n();
|
|
462
|
+
},
|
|
463
|
+
set plugins(d = [new b0()]) {
|
|
464
|
+
n(d), Y();
|
|
445
465
|
},
|
|
446
|
-
|
|
447
|
-
|
|
466
|
+
get theme() {
|
|
467
|
+
return b();
|
|
468
|
+
},
|
|
469
|
+
set theme(d = void 0) {
|
|
470
|
+
b(d), Y();
|
|
471
|
+
},
|
|
472
|
+
get themeConfig() {
|
|
473
|
+
return _();
|
|
474
|
+
},
|
|
475
|
+
set themeConfig(d = void 0) {
|
|
476
|
+
_(d), Y();
|
|
448
477
|
}
|
|
449
|
-
},
|
|
450
|
-
|
|
478
|
+
}, H = ne(), E = x(H);
|
|
479
|
+
z0(E, () => `<style>${P0}</style>`);
|
|
480
|
+
var L = u(E, 2), O = o(L);
|
|
481
|
+
return O0(O, {
|
|
451
482
|
get manifestId() {
|
|
452
|
-
return
|
|
483
|
+
return a();
|
|
453
484
|
},
|
|
454
485
|
get canvasId() {
|
|
455
|
-
return
|
|
486
|
+
return c();
|
|
456
487
|
},
|
|
457
488
|
get plugins() {
|
|
458
|
-
return
|
|
489
|
+
return n();
|
|
490
|
+
},
|
|
491
|
+
get theme() {
|
|
492
|
+
return i(z);
|
|
493
|
+
},
|
|
494
|
+
get themeConfig() {
|
|
495
|
+
return i(M);
|
|
459
496
|
}
|
|
460
|
-
}),
|
|
497
|
+
}), v(L), s(t, H), t0(p);
|
|
461
498
|
}
|
|
462
|
-
customElements.define("triiiceratops-viewer-image",
|
|
463
|
-
|
|
499
|
+
customElements.define("triiiceratops-viewer-image", S0(
|
|
500
|
+
ie,
|
|
464
501
|
{
|
|
465
502
|
manifestId: { attribute: "manifest-id", reflect: !0, type: "String" },
|
|
466
503
|
canvasId: { attribute: "canvas-id", reflect: !0, type: "String" },
|
|
504
|
+
theme: { attribute: "theme", reflect: !0, type: "String" },
|
|
505
|
+
themeConfig: { attribute: "theme-config", type: "String" },
|
|
467
506
|
plugins: {}
|
|
468
507
|
},
|
|
469
508
|
[],
|
|
470
509
|
[],
|
|
471
|
-
!
|
|
510
|
+
!0
|
|
472
511
|
));
|