triiiceratops 0.8.0 → 0.8.2

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,139 +1,369 @@
1
- var W = Object.defineProperty;
2
- var L = (a) => {
3
- throw TypeError(a);
1
+ var e0 = Object.defineProperty;
2
+ var N = (r) => {
3
+ throw TypeError(r);
4
4
  };
5
- var Y = (a, s, t) => s in a ? W(a, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[s] = t;
6
- var c = (a, s, t) => Y(a, typeof s != "symbol" ? s + "" : s, t), Z = (a, s, t) => s.has(a) || L("Cannot " + t);
7
- var d = (a, s, t) => (Z(a, s, "read from private field"), t ? t.call(a) : s.get(a)), j = (a, s, t) => s.has(a) ? L("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(a) : s.set(a, t);
5
+ var a0 = (r, a, t) => a in r ? e0(r, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[a] = t;
6
+ var j = (r, a, t) => a0(r, typeof a != "symbol" ? a + "" : a, t), t0 = (r, a, t) => a.has(r) || N("Cannot " + t);
7
+ var D = (r, a, t) => (t0(r, a, "read from private field"), t ? t.call(r) : a.get(r)), J = (r, a, t) => a.has(r) ? N("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(r) : a.set(r, t);
8
8
  import * as e from "svelte/internal/client";
9
- import ee from "phosphor-svelte/lib/Sliders";
10
- import { B as te, m as se } from "../plugin-DMqSBxJD.js";
11
9
  import "svelte/internal/disclose-version";
12
- import ae from "phosphor-svelte/lib/X";
13
- import ie from "phosphor-svelte/lib/ArrowCounterClockwise";
14
- function A(a, s) {
10
+ import { g as $, X as r0, B as s0, m as i0 } from "../plugin-CHYleMsW.js";
11
+ var l0 = e.from_svg('<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>'), n0 = e.from_svg('<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), o0 = e.from_svg('<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>'), v0 = e.from_svg('<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 = e.from_svg('<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>'), c0 = e.from_svg('<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>'), g0 = e.from_svg('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
12
+ function h0(r, a) {
13
+ e.push(a, !0);
14
+ const t = $();
15
+ let v = e.rest_props(a, ["$$slots", "$$events", "$$legacy", "children"]), l = e.derived(() => a.weight ?? t.weight ?? "regular"), M = e.derived(() => a.color ?? t.color ?? "currentColor"), H = e.derived(() => a.size ?? t.size ?? "1em"), C = e.derived(() => a.mirrored ?? t.mirrored ?? !1);
16
+ function V(s) {
17
+ let { weight: i, color: h, size: A, mirrored: Z, ...n } = s;
18
+ return n;
19
+ }
20
+ var g = g0();
21
+ e.attribute_effect(
22
+ g,
23
+ (s, i) => ({
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ role: "img",
26
+ width: e.get(H),
27
+ height: e.get(H),
28
+ fill: e.get(M),
29
+ transform: e.get(C) ? "scale(-1, 1)" : void 0,
30
+ viewBox: "0 0 256 256",
31
+ ...s,
32
+ ...i
33
+ }),
34
+ [() => V(t), () => V(v)]
35
+ );
36
+ var w = e.child(g);
37
+ {
38
+ var B = (s) => {
39
+ var i = e.comment(), h = e.first_child(i);
40
+ e.snippet(h, () => a.children), e.append(s, i);
41
+ };
42
+ e.if(w, (s) => {
43
+ a.children && s(B);
44
+ });
45
+ }
46
+ var F = e.sibling(w, 2);
47
+ {
48
+ var L = (s) => {
49
+ var i = l0();
50
+ e.append(s, i);
51
+ }, k = (s) => {
52
+ var i = e.comment(), h = e.first_child(i);
53
+ {
54
+ var A = (n) => {
55
+ var u = n0();
56
+ e.next(), e.append(n, u);
57
+ }, Z = (n) => {
58
+ var u = e.comment(), z = e.first_child(u);
59
+ {
60
+ var O = (d) => {
61
+ var _ = o0();
62
+ e.append(d, _);
63
+ }, P = (d) => {
64
+ var _ = e.comment(), R = e.first_child(_);
65
+ {
66
+ var I = (c) => {
67
+ var m = v0();
68
+ e.append(c, m);
69
+ }, T = (c) => {
70
+ var m = e.comment(), o = e.first_child(m);
71
+ {
72
+ var b = (p) => {
73
+ var x = d0();
74
+ e.append(p, x);
75
+ }, U = (p) => {
76
+ var x = e.comment(), G = e.first_child(x);
77
+ {
78
+ var X = (f) => {
79
+ var y = c0();
80
+ e.append(f, y);
81
+ }, q = (f) => {
82
+ var y = e.text();
83
+ y.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), e.append(f, y);
84
+ };
85
+ e.if(
86
+ G,
87
+ (f) => {
88
+ e.get(l) === "thin" ? f(X) : f(q, !1);
89
+ },
90
+ !0
91
+ );
92
+ }
93
+ e.append(p, x);
94
+ };
95
+ e.if(
96
+ o,
97
+ (p) => {
98
+ e.get(l) === "regular" ? p(b) : p(U, !1);
99
+ },
100
+ !0
101
+ );
102
+ }
103
+ e.append(c, m);
104
+ };
105
+ e.if(
106
+ R,
107
+ (c) => {
108
+ e.get(l) === "light" ? c(I) : c(T, !1);
109
+ },
110
+ !0
111
+ );
112
+ }
113
+ e.append(d, _);
114
+ };
115
+ e.if(
116
+ z,
117
+ (d) => {
118
+ e.get(l) === "fill" ? d(O) : d(P, !1);
119
+ },
120
+ !0
121
+ );
122
+ }
123
+ e.append(n, u);
124
+ };
125
+ e.if(
126
+ h,
127
+ (n) => {
128
+ e.get(l) === "duotone" ? n(A) : n(Z, !1);
129
+ },
130
+ !0
131
+ );
132
+ }
133
+ e.append(s, i);
134
+ };
135
+ e.if(F, (s) => {
136
+ e.get(l) === "bold" ? s(L) : s(k, !1);
137
+ });
138
+ }
139
+ e.reset(g), e.append(r, g), e.pop();
140
+ }
141
+ function K(r, a) {
15
142
  var l;
16
- const t = (l = a.drawer) == null ? void 0 : l.canvas;
143
+ const t = (l = r.drawer) == null ? void 0 : l.canvas;
17
144
  if (!t) return;
18
- const r = [];
19
- s.brightness !== 100 && r.push(`brightness(${s.brightness / 100})`), s.contrast !== 100 && r.push(`contrast(${s.contrast / 100})`), s.saturation !== 100 && r.push(`saturate(${s.saturation / 100})`), s.invert && r.push("invert(1)"), s.grayscale && r.push("grayscale(1)"), t.style.filter = r.length > 0 ? r.join(" ") : "none";
145
+ const v = [];
146
+ a.brightness !== 100 && v.push(`brightness(${a.brightness / 100})`), a.contrast !== 100 && v.push(`contrast(${a.contrast / 100})`), a.saturation !== 100 && v.push(`saturate(${a.saturation / 100})`), a.invert && v.push("invert(1)"), a.grayscale && v.push("grayscale(1)"), t.style.filter = v.length > 0 ? v.join(" ") : "none";
20
147
  }
21
- function V(a) {
148
+ function Q(r) {
22
149
  var t;
23
- const s = (t = a.drawer) == null ? void 0 : t.canvas;
24
- s && (s.style.filter = "none");
150
+ const a = (t = r.drawer) == null ? void 0 : t.canvas;
151
+ a && (a.style.filter = "none");
25
152
  }
26
- function G(a) {
27
- return a.brightness !== 100 || a.contrast !== 100 || a.saturation !== 100 || a.invert || a.grayscale;
153
+ function W(r) {
154
+ return r.brightness !== 100 || r.contrast !== 100 || r.saturation !== 100 || r.invert || r.grayscale;
28
155
  }
29
- const H = {
156
+ const Y = {
30
157
  brightness: 100,
31
158
  contrast: 100,
32
159
  saturation: 100,
33
160
  invert: !1,
34
161
  grayscale: !1
35
162
  };
36
- var re = e.from_html('<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>');
37
- function U(a, s) {
38
- e.push(s, !0);
39
- let t = e.prop(s, "filters", 7), r = e.prop(s, "onFilterChange", 7), l = e.prop(s, "onReset", 7), g = e.prop(s, "onClose", 7);
40
- function o(i, n) {
41
- r()({ ...t(), [i]: n });
42
- }
43
- var X = {
44
- get filters() {
45
- return t();
46
- },
47
- set filters(i) {
48
- t(i), e.flush();
49
- },
50
- get onFilterChange() {
51
- return r();
52
- },
53
- set onFilterChange(i) {
54
- r(i), e.flush();
55
- },
56
- get onReset() {
57
- return l();
58
- },
59
- set onReset(i) {
60
- l(i), e.flush();
61
- },
62
- get onClose() {
63
- return g();
64
- },
65
- set onClose(i) {
66
- g(i), e.flush();
67
- }
68
- }, h = re(), b = e.child(h), v = e.sibling(e.child(b), 2);
69
- v.__click = function(...i) {
70
- var n;
71
- (n = g()) == null || n.apply(this, i);
163
+ var p0 = e.from_svg('<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>'), f0 = e.from_svg('<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), _0 = e.from_svg('<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>'), u0 = e.from_svg('<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>'), m0 = e.from_svg('<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>'), b0 = e.from_svg('<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>'), V0 = e.from_svg('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
164
+ function A0(r, a) {
165
+ e.push(a, !0);
166
+ const t = $();
167
+ let v = e.rest_props(a, ["$$slots", "$$events", "$$legacy", "children"]), l = e.derived(() => a.weight ?? t.weight ?? "regular"), M = e.derived(() => a.color ?? t.color ?? "currentColor"), H = e.derived(() => a.size ?? t.size ?? "1em"), C = e.derived(() => a.mirrored ?? t.mirrored ?? !1);
168
+ function V(s) {
169
+ let { weight: i, color: h, size: A, mirrored: Z, ...n } = s;
170
+ return n;
171
+ }
172
+ var g = V0();
173
+ e.attribute_effect(
174
+ g,
175
+ (s, i) => ({
176
+ xmlns: "http://www.w3.org/2000/svg",
177
+ role: "img",
178
+ width: e.get(H),
179
+ height: e.get(H),
180
+ fill: e.get(M),
181
+ transform: e.get(C) ? "scale(-1, 1)" : void 0,
182
+ viewBox: "0 0 256 256",
183
+ ...s,
184
+ ...i
185
+ }),
186
+ [() => V(t), () => V(v)]
187
+ );
188
+ var w = e.child(g);
189
+ {
190
+ var B = (s) => {
191
+ var i = e.comment(), h = e.first_child(i);
192
+ e.snippet(h, () => a.children), e.append(s, i);
193
+ };
194
+ e.if(w, (s) => {
195
+ a.children && s(B);
196
+ });
197
+ }
198
+ var F = e.sibling(w, 2);
199
+ {
200
+ var L = (s) => {
201
+ var i = p0();
202
+ e.append(s, i);
203
+ }, k = (s) => {
204
+ var i = e.comment(), h = e.first_child(i);
205
+ {
206
+ var A = (n) => {
207
+ var u = f0();
208
+ e.next(), e.append(n, u);
209
+ }, Z = (n) => {
210
+ var u = e.comment(), z = e.first_child(u);
211
+ {
212
+ var O = (d) => {
213
+ var _ = _0();
214
+ e.append(d, _);
215
+ }, P = (d) => {
216
+ var _ = e.comment(), R = e.first_child(_);
217
+ {
218
+ var I = (c) => {
219
+ var m = u0();
220
+ e.append(c, m);
221
+ }, T = (c) => {
222
+ var m = e.comment(), o = e.first_child(m);
223
+ {
224
+ var b = (p) => {
225
+ var x = m0();
226
+ e.append(p, x);
227
+ }, U = (p) => {
228
+ var x = e.comment(), G = e.first_child(x);
229
+ {
230
+ var X = (f) => {
231
+ var y = b0();
232
+ e.append(f, y);
233
+ }, q = (f) => {
234
+ var y = e.text();
235
+ y.nodeValue = (console.error('Unsupported icon weight. Choose from "thin", "light", "regular", "bold", "fill", or "duotone".'), ""), e.append(f, y);
236
+ };
237
+ e.if(
238
+ G,
239
+ (f) => {
240
+ e.get(l) === "thin" ? f(X) : f(q, !1);
241
+ },
242
+ !0
243
+ );
244
+ }
245
+ e.append(p, x);
246
+ };
247
+ e.if(
248
+ o,
249
+ (p) => {
250
+ e.get(l) === "regular" ? p(b) : p(U, !1);
251
+ },
252
+ !0
253
+ );
254
+ }
255
+ e.append(c, m);
256
+ };
257
+ e.if(
258
+ R,
259
+ (c) => {
260
+ e.get(l) === "light" ? c(I) : c(T, !1);
261
+ },
262
+ !0
263
+ );
264
+ }
265
+ e.append(d, _);
266
+ };
267
+ e.if(
268
+ z,
269
+ (d) => {
270
+ e.get(l) === "fill" ? d(O) : d(P, !1);
271
+ },
272
+ !0
273
+ );
274
+ }
275
+ e.append(n, u);
276
+ };
277
+ e.if(
278
+ h,
279
+ (n) => {
280
+ e.get(l) === "duotone" ? n(A) : n(Z, !1);
281
+ },
282
+ !0
283
+ );
284
+ }
285
+ e.append(s, i);
286
+ };
287
+ e.if(F, (s) => {
288
+ e.get(l) === "bold" ? s(L) : s(k, !1);
289
+ });
290
+ }
291
+ e.reset(g), e.append(r, g), e.pop();
292
+ }
293
+ var Z0 = e.from_html('<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>');
294
+ function x0(r, a) {
295
+ e.push(a, !0);
296
+ function t(o, b) {
297
+ a.onFilterChange({ ...a.filters, [o]: b });
298
+ }
299
+ var v = Z0(), l = e.child(v), M = e.sibling(e.child(l), 2);
300
+ M.__click = function(...o) {
301
+ var b;
302
+ (b = a.onClose) == null || b.apply(this, o);
72
303
  };
73
- var q = e.child(v);
74
- ae(q, { size: 20 }), e.reset(v), e.reset(b);
75
- var _ = e.sibling(b, 2), f = e.child(_), m = e.child(f), B = e.sibling(e.child(m), 2), J = e.child(B);
76
- e.reset(B), e.reset(m);
77
- var y = e.sibling(m, 2);
78
- e.remove_input_defaults(y), y.__input = (i) => o("brightness", +i.currentTarget.value), e.reset(f);
79
- var x = e.sibling(f, 2), C = e.child(x), D = e.sibling(e.child(C), 2), K = e.child(D);
80
- e.reset(D), e.reset(C);
81
- var F = e.sibling(C, 2);
82
- e.remove_input_defaults(F), F.__input = (i) => o("contrast", +i.currentTarget.value), e.reset(x);
83
- var k = e.sibling(x, 2), R = e.child(k), M = e.sibling(e.child(R), 2), N = e.child(M);
84
- e.reset(M), e.reset(R);
85
- var w = e.sibling(R, 2);
86
- e.remove_input_defaults(w), w.__input = (i) => o("saturation", +i.currentTarget.value), e.reset(k);
87
- var O = e.sibling(k, 4), E = e.child(O), P = e.sibling(e.child(E), 2);
88
- e.remove_input_defaults(P), P.__change = (i) => o("invert", i.currentTarget.checked), e.reset(E), e.reset(O);
89
- var S = e.sibling(O, 2), $ = e.child(S), T = e.sibling(e.child($), 2);
90
- e.remove_input_defaults(T), T.__change = (i) => o("grayscale", i.currentTarget.checked), e.reset($), e.reset(S), e.reset(_);
91
- var z = e.sibling(_, 2), I = e.child(z);
92
- I.__click = function(...i) {
93
- var n;
94
- (n = l()) == null || n.apply(this, i);
304
+ var H = e.child(M);
305
+ r0(H, { size: 20 }), e.reset(M), e.reset(l);
306
+ var C = e.sibling(l, 2), V = e.child(C), g = e.child(V), w = e.sibling(e.child(g), 2), B = e.child(w);
307
+ e.reset(w), e.reset(g);
308
+ var F = e.sibling(g, 2);
309
+ e.remove_input_defaults(F), F.__input = (o) => t("brightness", +o.currentTarget.value), e.reset(V);
310
+ var L = e.sibling(V, 2), k = e.child(L), s = e.sibling(e.child(k), 2), i = e.child(s);
311
+ e.reset(s), e.reset(k);
312
+ var h = e.sibling(k, 2);
313
+ e.remove_input_defaults(h), h.__input = (o) => t("contrast", +o.currentTarget.value), e.reset(L);
314
+ var A = e.sibling(L, 2), Z = e.child(A), n = e.sibling(e.child(Z), 2), u = e.child(n);
315
+ e.reset(n), e.reset(Z);
316
+ var z = e.sibling(Z, 2);
317
+ e.remove_input_defaults(z), z.__input = (o) => t("saturation", +o.currentTarget.value), e.reset(A);
318
+ var O = e.sibling(A, 4), P = e.child(O), d = e.sibling(e.child(P), 2);
319
+ e.remove_input_defaults(d), d.__change = (o) => t("invert", o.currentTarget.checked), e.reset(P), e.reset(O);
320
+ var _ = e.sibling(O, 2), R = e.child(_), I = e.sibling(e.child(R), 2);
321
+ e.remove_input_defaults(I), I.__change = (o) => t("grayscale", o.currentTarget.checked), e.reset(R), e.reset(_), e.reset(C);
322
+ var T = e.sibling(C, 2), c = e.child(T);
323
+ c.__click = function(...o) {
324
+ var b;
325
+ (b = a.onReset) == null || b.apply(this, o);
95
326
  };
96
- var Q = e.child(I);
97
- return ie(Q, { size: 20 }), e.next(), e.reset(I), e.reset(z), e.reset(h), e.template_effect(() => {
98
- e.set_text(J, `${t().brightness ?? ""}%`), e.set_value(y, t().brightness), e.set_text(K, `${t().contrast ?? ""}%`), e.set_value(F, t().contrast), e.set_text(N, `${t().saturation ?? ""}%`), e.set_value(w, t().saturation), e.set_checked(P, t().invert), e.set_checked(T, t().grayscale);
99
- }), e.append(a, h), e.pop(X);
327
+ var m = e.child(c);
328
+ A0(m, { size: 20 }), e.next(), e.reset(c), e.reset(T), e.reset(v), e.template_effect(() => {
329
+ e.set_text(B, `${a.filters.brightness ?? ""}%`), e.set_value(F, a.filters.brightness), e.set_text(i, `${a.filters.contrast ?? ""}%`), e.set_value(h, a.filters.contrast), e.set_text(u, `${a.filters.saturation ?? ""}%`), e.set_value(z, a.filters.saturation), e.set_checked(d, a.filters.invert), e.set_checked(I, a.filters.grayscale);
330
+ }), e.append(r, v), e.pop();
100
331
  }
101
332
  e.delegate(["click", "input", "change"]);
102
- e.create_custom_element(U, { filters: {}, onFilterChange: {}, onReset: {}, onClose: {} }, [], [], !0);
103
- var u, p;
104
- class pe extends te {
333
+ var E, S;
334
+ class H0 extends s0 {
105
335
  constructor() {
106
336
  super(...arguments);
107
- c(this, "id", "image-manipulation");
108
- c(this, "name", "Image Manipulation");
109
- c(this, "version", "1.0.0");
110
- j(
337
+ j(this, "id", "image-manipulation");
338
+ j(this, "name", "Image Manipulation");
339
+ j(this, "version", "1.0.0");
340
+ J(
111
341
  this,
112
- u,
342
+ E,
113
343
  // Reactive state using Svelte 5 runes
114
344
  e.state(!1)
115
345
  );
116
- j(this, p, e.state(e.proxy({ ...H })));
117
- c(this, "osd", null);
346
+ J(this, S, e.state(e.proxy({ ...Y })));
347
+ j(this, "osd", null);
118
348
  }
119
349
  get _panelOpen() {
120
- return e.get(d(this, u));
350
+ return e.get(D(this, E));
121
351
  }
122
352
  set _panelOpen(t) {
123
- e.set(d(this, u), t, !0);
353
+ e.set(D(this, E), t, !0);
124
354
  }
125
355
  get _filters() {
126
- return e.get(d(this, p));
356
+ return e.get(D(this, S));
127
357
  }
128
358
  set _filters(t) {
129
- e.set(d(this, p), t, !0);
359
+ e.set(D(this, S), t, !0);
130
360
  }
131
361
  onRegister(t) {
132
362
  super.onRegister(t), t.registerMenuButton({
133
363
  id: `${this.id}:toggle`,
134
- icon: ee,
364
+ icon: h0,
135
365
  get tooltip() {
136
- return se.image_adjustments();
366
+ return i0.image_adjustments();
137
367
  },
138
368
  onClick: () => this.togglePanel(),
139
369
  isActive: () => this._panelOpen,
@@ -141,41 +371,41 @@ class pe extends te {
141
371
  order: 50
142
372
  }), t.registerPanel({
143
373
  id: `${this.id}:panel`,
144
- component: U,
374
+ component: x0,
145
375
  position: "left",
146
376
  isVisible: () => this._panelOpen,
147
377
  props: {
148
378
  filters: this._filters,
149
- onFilterChange: (r) => this.setFilters(r),
379
+ onFilterChange: (v) => this.setFilters(v),
150
380
  onReset: () => this.resetFilters(),
151
381
  onClose: () => this.togglePanel()
152
382
  }
153
383
  });
154
384
  }
155
385
  onViewerReady(t) {
156
- this.osd = t, G(this._filters) && A(t, this._filters), this.osd.addHandler("open", () => {
157
- this.osd && G(this._filters) && A(this.osd, this._filters);
386
+ this.osd = t, W(this._filters) && K(t, this._filters), this.osd.addHandler("open", () => {
387
+ this.osd && W(this._filters) && K(this.osd, this._filters);
158
388
  });
159
389
  }
160
390
  onDestroy() {
161
- this.osd && V(this.osd), this.osd = null, super.onDestroy();
391
+ this.osd && Q(this.osd), this.osd = null, super.onDestroy();
162
392
  }
163
393
  // Public API
164
394
  togglePanel() {
165
395
  this._panelOpen = !this._panelOpen;
166
396
  }
167
397
  setFilters(t) {
168
- 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 && A(this.osd, t);
398
+ 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 && K(this.osd, t);
169
399
  }
170
400
  resetFilters() {
171
- Object.assign(this._filters, H), this.osd && V(this.osd);
401
+ Object.assign(this._filters, Y), this.osd && Q(this.osd);
172
402
  }
173
403
  getFilters() {
174
404
  return { ...this._filters };
175
405
  }
176
406
  }
177
- u = new WeakMap(), p = new WeakMap();
407
+ E = new WeakMap(), S = new WeakMap();
178
408
  export {
179
- H as DEFAULT_FILTERS,
180
- pe as ImageManipulationPlugin
409
+ Y as DEFAULT_FILTERS,
410
+ H0 as ImageManipulationPlugin
181
411
  };
@@ -5,7 +5,7 @@ var he = (a) => {
5
5
  var Ce = (a, e, t) => e in a ? Ie(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
6
6
  var K = (a, e, t) => Ce(a, typeof e != "symbol" ? e + "" : e, t), Me = (a, e, t) => e.has(a) || he("Cannot " + t);
7
7
  var W = (a, e, t) => (Me(a, e, "read from private field"), t ? t.call(a) : e.get(a)), le = (a, e, t) => e.has(a) ? he("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(a) : e.set(a, t);
8
- import { p as te, v as Ve, w as Z, x as we, i as v, y as A, e as f, g as i, k as O, r as c, m as s, n as ae, z as S, b as C, A as ye, B as ue, C as Ae, D as Ze, E as Se, f as xe, X as He, F as Y, G as Te, H as oe, I as ve, J as fe, s as de, j as ge, K as ke, L as Fe, c as Le, a as X, u as Oe, h as ze, T as Ee, l as Pe, d as Re, o as Be, q as De, t as Q } from "./chunks/TriiiceratopsViewer-CyamQrMe.js";
8
+ import { p as te, v as Ve, w as Z, x as we, i as v, y as A, e as f, g as i, k as O, r as c, m as s, n as ae, z as S, b as C, A as ye, B as ue, C as Ae, D as Ze, E as Se, f as xe, X as He, F as Y, G as Te, H as oe, I as ve, J as fe, s as de, j as ge, K as ke, L as Fe, c as Le, a as X, u as Oe, h as ze, T as Ee, l as Pe, d as Re, o as Be, q as De, t as Q } from "./chunks/TriiiceratopsViewer-BGtsfUPF.js";
9
9
  var je = Z('<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>'), Je = Z('<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), Ue = Z('<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>'), Ne = Z('<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>'), Ge = Z('<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>'), qe = Z('<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>'), Ke = Z('<svg><!><rect width="256" height="256" fill="none"></rect><!></svg>');
10
10
  function Xe(a, e) {
11
11
  te(e, !0);
@@ -1,4 +1,4 @@
1
- import { c as b, p as _, a, u as E, g as s, s as J, f as N, b as O, h as V, d as j, e as k, i as q, T as x, j as B, k as c, r as U, l as z, m as A, n as D, o as F, q as G, t as u } from "./chunks/TriiiceratopsViewer-CyamQrMe.js";
1
+ import { c as b, p as _, a, u as E, g as s, s as J, f as N, b as O, h as V, d as j, e as k, i as q, T as x, j as B, k as c, r as U, l as z, m as A, n as D, o as F, q as G, t as u } from "./chunks/TriiiceratopsViewer-BGtsfUPF.js";
2
2
  var H = N('<!> <div class="w-full h-full"><!></div>', 1);
3
3
  function K(I, t) {
4
4
  _(t, !0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triiiceratops",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",