relly-ui 1.0.0 → 1.0.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.
- package/dist/index.d.ts +7 -0
- package/dist/relly-ui.es.js +552 -495
- package/dist/relly-ui.es.js.map +1 -1
- package/dist/relly-ui.iife.js +12 -12
- package/dist/relly-ui.iife.js.map +1 -1
- package/dist/relly-ui.umd.js +12 -12
- package/dist/relly-ui.umd.js.map +1 -1
- package/package.json +2 -1
package/dist/relly-ui.es.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
var pe = Object.defineProperty;
|
|
2
2
|
var ue = (y, i, e) => i in y ? pe(y, i, { enumerable: !0, configurable: !0, writable: !0, value: e }) : y[i] = e;
|
|
3
|
-
var
|
|
3
|
+
var l = (y, i, e) => ue(y, typeof i != "symbol" ? i + "" : i, e);
|
|
4
4
|
class C {
|
|
5
5
|
constructor(i, e, t, n, s) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
l(this, "element");
|
|
7
|
+
l(this, "labelEl");
|
|
8
|
+
l(this, "controlEl");
|
|
9
|
+
l(this, "label");
|
|
10
|
+
l(this, "tooltipText");
|
|
11
|
+
l(this, "tooltipEl");
|
|
12
|
+
l(this, "conditionPredicate");
|
|
13
|
+
l(this, "targetObject");
|
|
14
|
+
l(this, "property");
|
|
15
|
+
l(this, "initialValue");
|
|
16
|
+
l(this, "prevValue");
|
|
17
|
+
l(this, "onChangeCallback");
|
|
18
|
+
l(this, "isListening", !1);
|
|
19
|
+
l(this, "contextMenuItems");
|
|
20
|
+
l(this, "disabled", !1);
|
|
21
21
|
if (this.bindingEngine = n, this.presetManager = s, this.label = i, this.targetObject = e, this.property = t, this.targetObject && this.property) {
|
|
22
22
|
this.prevValue = this.targetObject[this.property];
|
|
23
23
|
try {
|
|
@@ -102,12 +102,12 @@ class C {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
class L extends C {
|
|
105
|
-
constructor(e, t, n, s, r,
|
|
105
|
+
constructor(e, t, n, s, r, a) {
|
|
106
106
|
super(e, t, n, s, r);
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
this.soundEngine =
|
|
107
|
+
l(this, "wrapperEl");
|
|
108
|
+
l(this, "boxEl");
|
|
109
|
+
l(this, "soundEngine");
|
|
110
|
+
this.soundEngine = a, this.wrapperEl = document.createElement("div"), this.wrapperEl.className = "relly-checkbox-wrapper", this.wrapperEl.setAttribute("role", "checkbox"), this.wrapperEl.setAttribute("tabindex", "0"), this.boxEl = document.createElement("div"), this.boxEl.className = "relly-checkbox-box", this.boxEl.innerHTML = `
|
|
111
111
|
<svg class="relly-checkbox-icon" viewBox="0 0 12 10">
|
|
112
112
|
<polyline points="1.5 5 4.5 8.5 10.5 1.5"></polyline>
|
|
113
113
|
</svg>
|
|
@@ -134,17 +134,17 @@ class L extends C {
|
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
136
|
class V extends C {
|
|
137
|
-
constructor(e, t, n, s, r,
|
|
137
|
+
constructor(e, t, n, s, r, a) {
|
|
138
138
|
super(e, t, n, s, r);
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
this.soundEngine =
|
|
139
|
+
l(this, "containerEl");
|
|
140
|
+
l(this, "rangeInput");
|
|
141
|
+
l(this, "numberInput");
|
|
142
|
+
l(this, "soundEngine");
|
|
143
|
+
l(this, "lastSoundTime", 0);
|
|
144
|
+
l(this, "min", 0);
|
|
145
|
+
l(this, "max", 100);
|
|
146
|
+
l(this, "step", 1);
|
|
147
|
+
this.soundEngine = a, this.containerEl = document.createElement("div"), this.containerEl.className = "relly-slider-container", this.rangeInput = document.createElement("input"), this.rangeInput.type = "range", this.rangeInput.className = "relly-slider-range", this.numberInput = document.createElement("input"), this.numberInput.type = "number", this.numberInput.className = "relly-slider-number", this.numberInput.title = "Drag horizontally to scrub value, or type directly", this.containerEl.appendChild(this.rangeInput), this.containerEl.appendChild(this.numberInput), this.controlEl.appendChild(this.containerEl), this.applyConstraints(), this.rangeInput.addEventListener("input", () => {
|
|
148
148
|
const o = parseFloat(this.rangeInput.value);
|
|
149
149
|
this.triggerSound(), this.setValue(o);
|
|
150
150
|
}), this.numberInput.addEventListener("change", () => {
|
|
@@ -154,20 +154,20 @@ class V extends C {
|
|
|
154
154
|
}
|
|
155
155
|
setupJogScrubbing() {
|
|
156
156
|
let e = !1, t = 0, n = 0;
|
|
157
|
-
const s = (
|
|
158
|
-
const o =
|
|
157
|
+
const s = (a) => {
|
|
158
|
+
const o = a.clientX - t;
|
|
159
159
|
if (!e && Math.abs(o) > 3 && (e = !0, typeof document < "u" && document.body.classList.add("relly-jog-scrubbing")), e) {
|
|
160
|
-
const h =
|
|
161
|
-
let p = n +
|
|
160
|
+
const h = a.shiftKey ? 10 : a.altKey ? 0.1 : 1, c = this.step * h, m = o * c;
|
|
161
|
+
let p = n + m;
|
|
162
162
|
p = Math.max(this.min, Math.min(this.max, p));
|
|
163
|
-
const d = (
|
|
164
|
-
p = parseFloat(p.toFixed(Math.
|
|
163
|
+
const d = (c.toString().split(".")[1] || "").length, f = 1 / c;
|
|
164
|
+
p = Math.round(p * f) / f, p = parseFloat(p.toFixed(Math.min(d, 4))), this.triggerSound(), this.setValue(p), a.preventDefault();
|
|
165
165
|
}
|
|
166
166
|
}, r = () => {
|
|
167
167
|
e && typeof document < "u" && document.body.classList.remove("relly-jog-scrubbing"), typeof window < "u" && (window.removeEventListener("mousemove", s), window.removeEventListener("mouseup", r));
|
|
168
168
|
};
|
|
169
|
-
this.numberInput.addEventListener("mousedown", (
|
|
170
|
-
t =
|
|
169
|
+
this.numberInput.addEventListener("mousedown", (a) => {
|
|
170
|
+
t = a.clientX, n = parseFloat(this.numberInput.value) || 0, e = !1, typeof window < "u" && (window.addEventListener("mousemove", s), window.addEventListener("mouseup", r));
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
triggerSound() {
|
|
@@ -199,9 +199,9 @@ class V extends C {
|
|
|
199
199
|
class A extends C {
|
|
200
200
|
constructor(e, t, n) {
|
|
201
201
|
super(e);
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
l(this, "buttonEl");
|
|
203
|
+
l(this, "clickHandler");
|
|
204
|
+
l(this, "soundEngine");
|
|
205
205
|
this.soundEngine = n, this.labelEl.style.display = "none", this.controlEl.style.flex = "1", this.buttonEl = document.createElement("button"), this.buttonEl.className = "relly-btn", this.buttonEl.textContent = e, this.controlEl.appendChild(this.buttonEl), t && this.onClick(t), this.buttonEl.addEventListener("click", (s) => {
|
|
206
206
|
var r;
|
|
207
207
|
(r = this.soundEngine) == null || r.playClick(), this.clickHandler && this.clickHandler(s);
|
|
@@ -221,10 +221,10 @@ class A extends C {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
class z extends C {
|
|
224
|
-
constructor(e, t, n, s, r,
|
|
225
|
-
super(e, t, n, r,
|
|
226
|
-
|
|
227
|
-
|
|
224
|
+
constructor(e, t, n, s, r, a) {
|
|
225
|
+
super(e, t, n, r, a);
|
|
226
|
+
l(this, "selectEl");
|
|
227
|
+
l(this, "optionsMap", /* @__PURE__ */ new Map());
|
|
228
228
|
this.selectEl = document.createElement("select"), this.selectEl.className = "relly-select-input", this.controlEl.appendChild(this.selectEl), s && this.setOptions(s), this.selectEl.addEventListener("change", () => {
|
|
229
229
|
const o = this.selectEl.value, h = this.optionsMap.has(o) ? this.optionsMap.get(o) : o;
|
|
230
230
|
this.setValue(h);
|
|
@@ -258,8 +258,8 @@ class z extends C {
|
|
|
258
258
|
class B extends C {
|
|
259
259
|
constructor(e, t, n, s) {
|
|
260
260
|
super(e, t, n, s);
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
l(this, "valueBadge");
|
|
262
|
+
l(this, "formatter", (e) => String(e ?? ""));
|
|
263
263
|
this.valueBadge = document.createElement("span"), this.valueBadge.className = "relly-dynamic-value", this.controlEl.appendChild(this.valueBadge), this.update();
|
|
264
264
|
}
|
|
265
265
|
setFormat(e) {
|
|
@@ -273,49 +273,49 @@ class B extends C {
|
|
|
273
273
|
class N extends C {
|
|
274
274
|
constructor(e, t, n, s, r) {
|
|
275
275
|
super(e, t, n, s);
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
276
|
+
l(this, "canvasContainer");
|
|
277
|
+
l(this, "canvas");
|
|
278
|
+
l(this, "ctx", null);
|
|
279
|
+
l(this, "statsEl");
|
|
280
|
+
l(this, "graphTooltipEl");
|
|
281
|
+
l(this, "legendEl");
|
|
282
|
+
l(this, "primarySeries");
|
|
283
|
+
l(this, "seriesList", []);
|
|
284
|
+
l(this, "seriesMap", /* @__PURE__ */ new Map());
|
|
285
|
+
l(this, "bufferSize", 60);
|
|
286
|
+
l(this, "min", 0);
|
|
287
|
+
l(this, "max", 100);
|
|
288
|
+
l(this, "autoRange", !0);
|
|
289
|
+
l(this, "smoothCurves", !0);
|
|
290
|
+
l(this, "isPaused", !1);
|
|
291
|
+
l(this, "formatter", (e) => typeof e == "number" && !isNaN(e) ? e.toFixed(1) : "0");
|
|
292
|
+
l(this, "cssWidth", 280);
|
|
293
|
+
l(this, "cssHeight", 90);
|
|
294
|
+
l(this, "sampleInterval", 50);
|
|
295
|
+
l(this, "lastSampleTime", 0);
|
|
296
|
+
l(this, "hoverIndex", null);
|
|
297
|
+
l(this, "resizeObserver", null);
|
|
298
|
+
l(this, "mediaQueryList", null);
|
|
299
|
+
l(this, "soundEngine");
|
|
300
|
+
l(this, "onResolutionChange", () => {
|
|
301
301
|
this.updateDPRListener(), this.resizeCanvas(), this.draw();
|
|
302
302
|
});
|
|
303
|
-
|
|
303
|
+
l(this, "onMouseMove", (e) => {
|
|
304
304
|
const t = this.canvas.getBoundingClientRect(), n = e.clientX - t.left, s = this.cssWidth;
|
|
305
305
|
if (s <= 0) return;
|
|
306
|
-
const r = s / Math.max(1, this.bufferSize - 1),
|
|
306
|
+
const r = s / Math.max(1, this.bufferSize - 1), a = Math.round(n / r), o = Math.max(0, Math.min(this.bufferSize - 1, a));
|
|
307
307
|
o !== this.hoverIndex && (this.hoverIndex = o, this.updateTooltip(n), this.draw());
|
|
308
308
|
});
|
|
309
|
-
|
|
309
|
+
l(this, "onMouseLeave", () => {
|
|
310
310
|
this.hoverIndex = null, this.graphTooltipEl.classList.remove("relly-tooltip-show"), this.draw();
|
|
311
311
|
});
|
|
312
|
-
|
|
312
|
+
l(this, "onCanvasClick", () => {
|
|
313
313
|
var e;
|
|
314
314
|
(e = this.soundEngine) == null || e.playClick(), this.isPaused = !this.isPaused, this.isPaused ? this.canvasContainer.classList.add("relly-graph-paused") : this.canvasContainer.classList.remove("relly-graph-paused"), this.updateStats(), this.draw();
|
|
315
315
|
});
|
|
316
316
|
this.soundEngine = r, this.element.className = "relly-graph-row", this.element.innerHTML = "";
|
|
317
|
-
const
|
|
318
|
-
|
|
317
|
+
const a = document.createElement("div");
|
|
318
|
+
a.className = "relly-graph-header", this.labelEl = document.createElement("span"), this.labelEl.className = "relly-graph-label", this.labelEl.textContent = e, this.statsEl = document.createElement("div"), this.statsEl.className = "relly-graph-stats", this.statsEl.innerHTML = '<span class="relly-graph-val">0</span>', a.appendChild(this.labelEl), a.appendChild(this.statsEl), this.element.appendChild(a), this.legendEl = document.createElement("div"), this.legendEl.className = "relly-graph-legend", this.element.appendChild(this.legendEl), this.canvasContainer = document.createElement("div"), this.canvasContainer.className = "relly-graph-canvas-container", this.canvasContainer.title = "Click to pause/freeze data stream for inspection", this.canvas = document.createElement("canvas"), this.canvas.className = "relly-graph-canvas", this.canvasContainer.appendChild(this.canvas), this.graphTooltipEl = document.createElement("div"), this.graphTooltipEl.className = "relly-graph-tooltip", this.canvasContainer.appendChild(this.graphTooltipEl), this.element.appendChild(this.canvasContainer), this.ctx = this.canvas.getContext("2d"), this.primarySeries = {
|
|
319
319
|
id: "default",
|
|
320
320
|
label: e,
|
|
321
321
|
color: "#38bdf8",
|
|
@@ -346,7 +346,7 @@ class N extends C {
|
|
|
346
346
|
if (this.hoverIndex === null) return;
|
|
347
347
|
let t = "";
|
|
348
348
|
for (const r of this.seriesList) {
|
|
349
|
-
const
|
|
349
|
+
const a = this.bufferSize - r.buffer.length, o = this.hoverIndex - a;
|
|
350
350
|
if (o >= 0 && o < r.buffer.length) {
|
|
351
351
|
const h = r.buffer[o];
|
|
352
352
|
t += `<div><span style="display:inline-block;width:6px;height:6px;border-radius:50%;background:${r.color};margin-right:4px;"></span>${r.label}: <b>${this.formatter(h)}</b></div>`;
|
|
@@ -382,7 +382,7 @@ class N extends C {
|
|
|
382
382
|
checkDirty() {
|
|
383
383
|
if (this.checkVisibility(), !this.targetObject || !this.property || this.isPaused) return;
|
|
384
384
|
const e = this.targetObject[this.property], t = typeof performance < "u" ? performance.now() : Date.now();
|
|
385
|
-
|
|
385
|
+
t - this.lastSampleTime >= this.sampleInterval && (this.lastSampleTime = t, this.prevValue = e, this.update(), this.triggerChange(e, this.prevValue));
|
|
386
386
|
}
|
|
387
387
|
setSmooth(e) {
|
|
388
388
|
return this.smoothCurves = e, this.draw(), this;
|
|
@@ -447,13 +447,19 @@ class N extends C {
|
|
|
447
447
|
if (this.isPaused) return this;
|
|
448
448
|
if (typeof t != "number" || isNaN(t) || !isFinite(t)) return this;
|
|
449
449
|
const n = this.seriesMap.get(e);
|
|
450
|
-
return n ? (n.buffer.push(t), n.buffer.length > this.bufferSize && n.buffer.shift(), this) : (this.addSeries(e, { color: "#ec4899", label: e }), this.pushSeries(e, t));
|
|
450
|
+
return n ? (n.buffer.push(t), n.buffer.length > this.bufferSize && n.buffer.shift(), this.updateStats(), this.draw(), this) : (this.addSeries(e, { color: "#ec4899", label: e }), this.pushSeries(e, t));
|
|
451
|
+
}
|
|
452
|
+
getLatestValue() {
|
|
453
|
+
if (this.primarySeries.buffer.length > 0)
|
|
454
|
+
return this.primarySeries.buffer[this.primarySeries.buffer.length - 1];
|
|
455
|
+
const e = this.getValue();
|
|
456
|
+
return typeof e == "number" && !isNaN(e) ? e : 0;
|
|
451
457
|
}
|
|
452
458
|
updateStats() {
|
|
453
459
|
const e = this.primarySeries.buffer.length > 0 ? this.primarySeries.buffer[this.primarySeries.buffer.length - 1] : 0;
|
|
454
460
|
let t = this.min, n = this.max, s = [];
|
|
455
|
-
for (const
|
|
456
|
-
s = s.concat(
|
|
461
|
+
for (const a of this.seriesList)
|
|
462
|
+
s = s.concat(a.buffer);
|
|
457
463
|
s.length > 0 && (t = Math.min(...s), n = Math.max(...s));
|
|
458
464
|
const r = this.isPaused ? '<span class="relly-graph-badge relly-graph-badge--paused">PAUSED</span>' : "";
|
|
459
465
|
this.statsEl.innerHTML = `
|
|
@@ -475,57 +481,57 @@ class N extends C {
|
|
|
475
481
|
const e = this.ctx, t = this.cssWidth, n = this.cssHeight;
|
|
476
482
|
e.clearRect(0, 0, t, n), e.save(), e.setLineDash([2, 4]), e.strokeStyle = "rgba(255, 255, 255, 0.08)", e.lineWidth = 1;
|
|
477
483
|
for (let d of [0.25, 0.5, 0.75]) {
|
|
478
|
-
const
|
|
479
|
-
e.beginPath(), e.moveTo(0,
|
|
484
|
+
const f = Math.round(n * d);
|
|
485
|
+
e.beginPath(), e.moveTo(0, f), e.lineTo(t, f), e.stroke();
|
|
480
486
|
}
|
|
481
487
|
e.restore();
|
|
482
488
|
let s = [];
|
|
483
489
|
for (const d of this.seriesList)
|
|
484
490
|
s = s.concat(d.buffer);
|
|
485
491
|
if (s.length === 0) return;
|
|
486
|
-
const r = Math.min(...s),
|
|
487
|
-
let o = this.autoRange ? r : this.min, h = this.autoRange ?
|
|
488
|
-
|
|
492
|
+
const r = Math.min(...s), a = Math.max(...s);
|
|
493
|
+
let o = this.autoRange ? r : this.min, h = this.autoRange ? a : this.max;
|
|
494
|
+
a > h && (h = a), r < o && (o = r), o === h && (o -= 1, h += 1);
|
|
489
495
|
const c = (h - o) * 0.16 || 1;
|
|
490
496
|
o -= c, h += c;
|
|
491
|
-
const
|
|
497
|
+
const m = h - o || 1, p = t / Math.max(1, this.bufferSize - 1);
|
|
492
498
|
for (const d of this.seriesList) {
|
|
493
499
|
if (d.buffer.length === 0) continue;
|
|
494
|
-
const
|
|
495
|
-
for (let
|
|
496
|
-
const
|
|
497
|
-
|
|
500
|
+
const f = d.buffer.length === 1 ? [d.buffer[0], d.buffer[0]] : d.buffer, x = this.bufferSize - f.length, u = [];
|
|
501
|
+
for (let g = 0; g < f.length; g++) {
|
|
502
|
+
const b = (x + g) * p, w = Math.max(0, Math.min(1, (f[g] - o) / m)), M = Math.max(4, Math.min(n - 4, n - 6 - w * (n - 12)));
|
|
503
|
+
u.push({ x: b, y: M });
|
|
498
504
|
}
|
|
499
|
-
if (e.beginPath(), e.moveTo(
|
|
500
|
-
for (let
|
|
501
|
-
const
|
|
502
|
-
e.bezierCurveTo(M,
|
|
505
|
+
if (e.beginPath(), e.moveTo(u[0].x, n), e.lineTo(u[0].x, u[0].y), this.smoothCurves && u.length > 2)
|
|
506
|
+
for (let g = 0; g < u.length - 1; g++) {
|
|
507
|
+
const b = u[g], w = u[g + 1], M = (b.x + w.x) / 2;
|
|
508
|
+
e.bezierCurveTo(M, b.y, M, w.y, w.x, w.y);
|
|
503
509
|
}
|
|
504
510
|
else
|
|
505
|
-
for (let
|
|
506
|
-
e.lineTo(
|
|
507
|
-
e.lineTo(
|
|
511
|
+
for (let g = 1; g < u.length; g++)
|
|
512
|
+
e.lineTo(u[g].x, u[g].y);
|
|
513
|
+
e.lineTo(u[u.length - 1].x, n), e.closePath();
|
|
508
514
|
const v = e.createLinearGradient(0, 0, 0, n);
|
|
509
|
-
if (v.addColorStop(0, d.fillColor || `${d.color}40`), v.addColorStop(1, "rgba(0, 0, 0, 0)"), e.fillStyle = v, e.fill(), e.beginPath(), e.moveTo(
|
|
510
|
-
for (let
|
|
511
|
-
const
|
|
512
|
-
e.bezierCurveTo(M,
|
|
515
|
+
if (v.addColorStop(0, d.fillColor || `${d.color}40`), v.addColorStop(1, "rgba(0, 0, 0, 0)"), e.fillStyle = v, e.fill(), e.beginPath(), e.moveTo(u[0].x, u[0].y), this.smoothCurves && u.length > 2)
|
|
516
|
+
for (let g = 0; g < u.length - 1; g++) {
|
|
517
|
+
const b = u[g], w = u[g + 1], M = (b.x + w.x) / 2;
|
|
518
|
+
e.bezierCurveTo(M, b.y, M, w.y, w.x, w.y);
|
|
513
519
|
}
|
|
514
520
|
else
|
|
515
|
-
for (let
|
|
516
|
-
e.lineTo(
|
|
521
|
+
for (let g = 1; g < u.length; g++)
|
|
522
|
+
e.lineTo(u[g].x, u[g].y);
|
|
517
523
|
e.save(), e.strokeStyle = d.color, e.lineWidth = 2, e.shadowColor = d.color, e.shadowBlur = 5, e.stroke(), e.restore();
|
|
518
|
-
const E =
|
|
524
|
+
const E = u[u.length - 1];
|
|
519
525
|
E && (e.beginPath(), e.arc(E.x, E.y, 4, 0, Math.PI * 2), e.fillStyle = d.color, e.globalAlpha = 0.35, e.fill(), e.globalAlpha = 1, e.beginPath(), e.arc(E.x, E.y, 2, 0, Math.PI * 2), e.fillStyle = "#ffffff", e.fill());
|
|
520
526
|
}
|
|
521
527
|
if (this.hoverIndex !== null) {
|
|
522
528
|
const d = Math.round(this.hoverIndex * p);
|
|
523
529
|
e.save(), e.setLineDash([3, 3]), e.strokeStyle = "rgba(255, 255, 255, 0.45)", e.lineWidth = 1, e.beginPath(), e.moveTo(d, 0), e.lineTo(d, n), e.stroke(), e.restore();
|
|
524
|
-
for (const
|
|
525
|
-
const
|
|
526
|
-
if (
|
|
527
|
-
const v =
|
|
528
|
-
e.beginPath(), e.arc(d,
|
|
530
|
+
for (const f of this.seriesList) {
|
|
531
|
+
const x = this.bufferSize - f.buffer.length, u = this.hoverIndex - x;
|
|
532
|
+
if (u >= 0 && u < f.buffer.length) {
|
|
533
|
+
const v = f.buffer[u], E = Math.max(0, Math.min(1, (v - o) / m)), g = Math.max(4, Math.min(n - 4, n - 6 - E * (n - 12)));
|
|
534
|
+
e.beginPath(), e.arc(d, g, 4.5, 0, Math.PI * 2), e.fillStyle = f.color, e.fill(), e.beginPath(), e.arc(d, g, 2, 0, Math.PI * 2), e.fillStyle = "#ffffff", e.fill();
|
|
529
535
|
}
|
|
530
536
|
}
|
|
531
537
|
}
|
|
@@ -535,18 +541,18 @@ class N extends C {
|
|
|
535
541
|
}
|
|
536
542
|
}
|
|
537
543
|
class R extends C {
|
|
538
|
-
constructor(e, t, n, s, r,
|
|
544
|
+
constructor(e, t, n, s, r, a) {
|
|
539
545
|
super(e, t, n, s, r);
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
this.soundEngine =
|
|
546
|
+
l(this, "wrapperEl");
|
|
547
|
+
l(this, "previewEl");
|
|
548
|
+
l(this, "hexTextEl");
|
|
549
|
+
l(this, "nativeColorInput");
|
|
550
|
+
l(this, "eyeDropperBtn");
|
|
551
|
+
l(this, "swatchesContainer");
|
|
552
|
+
l(this, "swatches", []);
|
|
553
|
+
l(this, "swatchButtons", /* @__PURE__ */ new Map());
|
|
554
|
+
l(this, "soundEngine");
|
|
555
|
+
this.soundEngine = a, this.wrapperEl = document.createElement("div"), this.wrapperEl.className = "relly-color-wrapper", this.previewEl = document.createElement("div"), this.previewEl.className = "relly-color-preview", this.previewEl.title = "Click to open color palette", this.hexTextEl = document.createElement("span"), this.hexTextEl.className = "relly-color-text", this.nativeColorInput = document.createElement("input"), this.nativeColorInput.type = "color", this.nativeColorInput.className = "relly-color-native", this.wrapperEl.appendChild(this.previewEl), this.wrapperEl.appendChild(this.hexTextEl), this.wrapperEl.appendChild(this.nativeColorInput), typeof window < "u" && "EyeDropper" in window && (this.eyeDropperBtn = document.createElement("button"), this.eyeDropperBtn.type = "button", this.eyeDropperBtn.className = "relly-eyedropper-btn", this.eyeDropperBtn.title = "Pick color from screen", this.eyeDropperBtn.innerHTML = `
|
|
550
556
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
551
557
|
<path d="m14 7 3 3m-1-5a2.83 2.83 0 0 1 4 4L7 22H3v-4L16 5Z"></path>
|
|
552
558
|
</svg>
|
|
@@ -558,6 +564,8 @@ class R extends C {
|
|
|
558
564
|
}
|
|
559
565
|
}), this.wrapperEl.appendChild(this.eyeDropperBtn)), this.controlEl.appendChild(this.wrapperEl), this.previewEl.addEventListener("click", () => {
|
|
560
566
|
this.nativeColorInput.click();
|
|
567
|
+
}), this.hexTextEl.addEventListener("click", () => {
|
|
568
|
+
this.nativeColorInput.click();
|
|
561
569
|
}), this.nativeColorInput.addEventListener("input", () => {
|
|
562
570
|
const o = this.nativeColorInput.value;
|
|
563
571
|
this.setValue(o);
|
|
@@ -593,45 +601,45 @@ class R extends C {
|
|
|
593
601
|
class P extends C {
|
|
594
602
|
constructor(e, t, n, s, r) {
|
|
595
603
|
super(e, t, n, s, r);
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
604
|
+
l(this, "containerEl");
|
|
605
|
+
l(this, "xInput");
|
|
606
|
+
l(this, "yInput");
|
|
607
|
+
l(this, "min");
|
|
608
|
+
l(this, "max");
|
|
609
|
+
l(this, "step", 0.1);
|
|
602
610
|
this.containerEl = document.createElement("div"), this.containerEl.className = "relly-point2d-container";
|
|
603
|
-
const
|
|
604
|
-
|
|
611
|
+
const a = document.createElement("div");
|
|
612
|
+
a.className = "relly-point2d-item";
|
|
605
613
|
const o = document.createElement("span");
|
|
606
|
-
o.className = "relly-point2d-tag", o.textContent = "X", this.xInput = document.createElement("input"), this.xInput.type = "number", this.xInput.className = "relly-point2d-input", this.xInput.step = String(this.step),
|
|
614
|
+
o.className = "relly-point2d-tag", o.textContent = "X", this.xInput = document.createElement("input"), this.xInput.type = "number", this.xInput.className = "relly-point2d-input", this.xInput.step = String(this.step), a.appendChild(o), a.appendChild(this.xInput);
|
|
607
615
|
const h = document.createElement("div");
|
|
608
616
|
h.className = "relly-point2d-item";
|
|
609
617
|
const c = document.createElement("span");
|
|
610
|
-
c.className = "relly-point2d-tag", c.textContent = "Y", this.yInput = document.createElement("input"), this.yInput.type = "number", this.yInput.className = "relly-point2d-input", this.yInput.step = String(this.step), h.appendChild(c), h.appendChild(this.yInput), this.containerEl.appendChild(
|
|
618
|
+
c.className = "relly-point2d-tag", c.textContent = "Y", this.yInput = document.createElement("input"), this.yInput.type = "number", this.yInput.className = "relly-point2d-input", this.yInput.step = String(this.step), h.appendChild(c), h.appendChild(this.yInput), this.containerEl.appendChild(a), this.containerEl.appendChild(h), this.controlEl.appendChild(this.containerEl), this.xInput.addEventListener("change", () => this.handleInputChange()), this.yInput.addEventListener("change", () => this.handleInputChange()), this.setupInputScrubbing(this.xInput, "x"), this.setupInputScrubbing(this.yInput, "y"), this.update();
|
|
611
619
|
}
|
|
612
620
|
setupInputScrubbing(e, t) {
|
|
613
621
|
let n = !1, s = 0, r = 0;
|
|
614
|
-
const
|
|
622
|
+
const a = (h) => {
|
|
615
623
|
const c = h.clientX - s;
|
|
616
624
|
if (!n && Math.abs(c) > 3 && (n = !0, typeof document < "u" && document.body.classList.add("relly-jog-scrubbing")), n) {
|
|
617
|
-
const
|
|
625
|
+
const m = h.shiftKey ? 10 : h.altKey ? 0.1 : 1, p = this.step * m;
|
|
618
626
|
let d = r + c * p;
|
|
619
627
|
this.min !== void 0 && (d = Math.max(this.min, d)), this.max !== void 0 && (d = Math.min(this.max, d));
|
|
620
|
-
const
|
|
621
|
-
d = parseFloat(d.toFixed(Math.
|
|
622
|
-
const
|
|
623
|
-
if (Array.isArray(
|
|
624
|
-
const
|
|
625
|
-
|
|
628
|
+
const f = (p.toString().split(".")[1] || "").length, x = 1 / p;
|
|
629
|
+
d = Math.round(d * x) / x, d = parseFloat(d.toFixed(Math.min(f, 4)));
|
|
630
|
+
const u = this.getValue();
|
|
631
|
+
if (Array.isArray(u)) {
|
|
632
|
+
const v = [u[0], u[1]];
|
|
633
|
+
v[t === "x" ? 0 : 1] = d, this.setValue(v);
|
|
626
634
|
} else
|
|
627
|
-
this.setValue({ ...
|
|
635
|
+
this.setValue({ ...u, [t]: d });
|
|
628
636
|
h.preventDefault();
|
|
629
637
|
}
|
|
630
638
|
}, o = () => {
|
|
631
|
-
n && typeof document < "u" && document.body.classList.remove("relly-jog-scrubbing"), typeof window < "u" && (window.removeEventListener("mousemove",
|
|
639
|
+
n && typeof document < "u" && document.body.classList.remove("relly-jog-scrubbing"), typeof window < "u" && (window.removeEventListener("mousemove", a), window.removeEventListener("mouseup", o));
|
|
632
640
|
};
|
|
633
641
|
e.addEventListener("mousedown", (h) => {
|
|
634
|
-
s = h.clientX, r = parseFloat(e.value) || 0, n = !1, typeof window < "u" && (window.addEventListener("mousemove",
|
|
642
|
+
s = h.clientX, r = parseFloat(e.value) || 0, n = !1, typeof window < "u" && (window.addEventListener("mousemove", a), window.addEventListener("mouseup", o));
|
|
635
643
|
});
|
|
636
644
|
}
|
|
637
645
|
setMin(e) {
|
|
@@ -666,54 +674,54 @@ class P extends C {
|
|
|
666
674
|
class D extends C {
|
|
667
675
|
constructor(e, t, n, s, r) {
|
|
668
676
|
super(e, t, n, s, r);
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
677
|
+
l(this, "containerEl");
|
|
678
|
+
l(this, "xInput");
|
|
679
|
+
l(this, "yInput");
|
|
680
|
+
l(this, "zInput");
|
|
681
|
+
l(this, "min");
|
|
682
|
+
l(this, "max");
|
|
683
|
+
l(this, "step", 0.1);
|
|
676
684
|
this.containerEl = document.createElement("div"), this.containerEl.className = "relly-point3d-container";
|
|
677
|
-
const
|
|
678
|
-
|
|
685
|
+
const a = document.createElement("div");
|
|
686
|
+
a.className = "relly-point3d-item";
|
|
679
687
|
const o = document.createElement("span");
|
|
680
|
-
o.className = "relly-point3d-tag relly-point3d-tag--x", o.textContent = "X", this.xInput = document.createElement("input"), this.xInput.type = "number", this.xInput.className = "relly-point3d-input", this.xInput.step = String(this.step),
|
|
688
|
+
o.className = "relly-point3d-tag relly-point3d-tag--x", o.textContent = "X", this.xInput = document.createElement("input"), this.xInput.type = "number", this.xInput.className = "relly-point3d-input", this.xInput.step = String(this.step), a.appendChild(o), a.appendChild(this.xInput);
|
|
681
689
|
const h = document.createElement("div");
|
|
682
690
|
h.className = "relly-point3d-item";
|
|
683
691
|
const c = document.createElement("span");
|
|
684
692
|
c.className = "relly-point3d-tag relly-point3d-tag--y", c.textContent = "Y", this.yInput = document.createElement("input"), this.yInput.type = "number", this.yInput.className = "relly-point3d-input", this.yInput.step = String(this.step), h.appendChild(c), h.appendChild(this.yInput);
|
|
685
|
-
const
|
|
686
|
-
|
|
693
|
+
const m = document.createElement("div");
|
|
694
|
+
m.className = "relly-point3d-item";
|
|
687
695
|
const p = document.createElement("span");
|
|
688
|
-
p.className = "relly-point3d-tag relly-point3d-tag--z", p.textContent = "Z", this.zInput = document.createElement("input"), this.zInput.type = "number", this.zInput.className = "relly-point3d-input", this.zInput.step = String(this.step),
|
|
696
|
+
p.className = "relly-point3d-tag relly-point3d-tag--z", p.textContent = "Z", this.zInput = document.createElement("input"), this.zInput.type = "number", this.zInput.className = "relly-point3d-input", this.zInput.step = String(this.step), m.appendChild(p), m.appendChild(this.zInput), this.containerEl.appendChild(a), this.containerEl.appendChild(h), this.containerEl.appendChild(m), this.controlEl.appendChild(this.containerEl), this.xInput.addEventListener("change", () => this.handleInputChange()), this.yInput.addEventListener("change", () => this.handleInputChange()), this.zInput.addEventListener("change", () => this.handleInputChange()), this.setupInputScrubbing(this.xInput, "x"), this.setupInputScrubbing(this.yInput, "y"), this.setupInputScrubbing(this.zInput, "z"), this.update();
|
|
689
697
|
}
|
|
690
698
|
setupInputScrubbing(e, t) {
|
|
691
699
|
let n = !1, s = 0, r = 0;
|
|
692
|
-
const
|
|
700
|
+
const a = (h) => {
|
|
693
701
|
const c = h.clientX - s;
|
|
694
702
|
if (!n && Math.abs(c) > 3 && (n = !0, typeof document < "u" && document.body.classList.add("relly-jog-scrubbing")), n) {
|
|
695
|
-
const
|
|
703
|
+
const m = h.shiftKey ? 10 : h.altKey ? 0.1 : 1, p = this.step * m;
|
|
696
704
|
let d = r + c * p;
|
|
697
705
|
this.min !== void 0 && (d = Math.max(this.min, d)), this.max !== void 0 && (d = Math.min(this.max, d));
|
|
698
|
-
const
|
|
699
|
-
d = parseFloat(d.toFixed(Math.
|
|
700
|
-
const
|
|
701
|
-
if (Array.isArray(
|
|
702
|
-
const
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
],
|
|
707
|
-
|
|
706
|
+
const f = (p.toString().split(".")[1] || "").length, x = 1 / p;
|
|
707
|
+
d = Math.round(d * x) / x, d = parseFloat(d.toFixed(Math.min(f, 4)));
|
|
708
|
+
const u = this.getValue();
|
|
709
|
+
if (Array.isArray(u)) {
|
|
710
|
+
const v = [
|
|
711
|
+
u[0] ?? 0,
|
|
712
|
+
u[1] ?? 0,
|
|
713
|
+
u[2] ?? 0
|
|
714
|
+
], E = t === "x" ? 0 : t === "y" ? 1 : 2;
|
|
715
|
+
v[E] = d, this.setValue(v);
|
|
708
716
|
} else
|
|
709
|
-
this.setValue({ ...
|
|
717
|
+
this.setValue({ ...u, [t]: d });
|
|
710
718
|
h.preventDefault();
|
|
711
719
|
}
|
|
712
720
|
}, o = () => {
|
|
713
|
-
window.removeEventListener("mousemove",
|
|
721
|
+
window.removeEventListener("mousemove", a), window.removeEventListener("mouseup", o), n && (n = !1, typeof document < "u" && document.body.classList.remove("relly-jog-scrubbing"));
|
|
714
722
|
};
|
|
715
723
|
e.addEventListener("mousedown", (h) => {
|
|
716
|
-
h.button === 0 && (s = h.clientX, r = parseFloat(e.value) || 0, window.addEventListener("mousemove",
|
|
724
|
+
h.button === 0 && (s = h.clientX, r = parseFloat(e.value) || 0, window.addEventListener("mousemove", a), window.addEventListener("mouseup", o));
|
|
717
725
|
});
|
|
718
726
|
}
|
|
719
727
|
handleInputChange() {
|
|
@@ -742,21 +750,21 @@ class D extends C {
|
|
|
742
750
|
}
|
|
743
751
|
}
|
|
744
752
|
class H extends C {
|
|
745
|
-
constructor(e, t, n, s, r,
|
|
753
|
+
constructor(e, t, n, s, r, a) {
|
|
746
754
|
super(e, t, n, s, r);
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
this.soundEngine =
|
|
755
|
+
l(this, "wrapperEl");
|
|
756
|
+
l(this, "trackEl");
|
|
757
|
+
l(this, "barEl");
|
|
758
|
+
l(this, "thumbMin");
|
|
759
|
+
l(this, "thumbMax");
|
|
760
|
+
l(this, "inputMin");
|
|
761
|
+
l(this, "inputMax");
|
|
762
|
+
l(this, "min", 0);
|
|
763
|
+
l(this, "max", 100);
|
|
764
|
+
l(this, "step", 1);
|
|
765
|
+
l(this, "soundEngine");
|
|
766
|
+
l(this, "formatter", (e, t) => `[${e.toFixed(1)}, ${t.toFixed(1)}]`);
|
|
767
|
+
this.soundEngine = a, this.wrapperEl = document.createElement("div"), this.wrapperEl.className = "relly-range-wrapper", this.inputMin = document.createElement("input"), this.inputMin.type = "number", this.inputMin.className = "relly-range-input relly-range-input--min", this.trackEl = document.createElement("div"), this.trackEl.className = "relly-range-track", this.barEl = document.createElement("div"), this.barEl.className = "relly-range-bar", this.thumbMin = document.createElement("div"), this.thumbMin.className = "relly-range-thumb relly-range-thumb--min", this.thumbMin.title = "Drag min", this.thumbMax = document.createElement("div"), this.thumbMax.className = "relly-range-thumb relly-range-thumb--max", this.thumbMax.title = "Drag max", this.trackEl.appendChild(this.barEl), this.trackEl.appendChild(this.thumbMin), this.trackEl.appendChild(this.thumbMax), this.inputMax = document.createElement("input"), this.inputMax.type = "number", this.inputMax.className = "relly-range-input relly-range-input--max", this.wrapperEl.appendChild(this.inputMin), this.wrapperEl.appendChild(this.trackEl), this.wrapperEl.appendChild(this.inputMax), this.controlEl.appendChild(this.wrapperEl), this.setupListeners(), this.update();
|
|
760
768
|
}
|
|
761
769
|
setupListeners() {
|
|
762
770
|
this.inputMin.addEventListener("change", () => {
|
|
@@ -769,22 +777,22 @@ class H extends C {
|
|
|
769
777
|
}
|
|
770
778
|
setupThumbDrag(e, t) {
|
|
771
779
|
let n = !1;
|
|
772
|
-
const s = (
|
|
773
|
-
var
|
|
780
|
+
const s = (a) => {
|
|
781
|
+
var f, x;
|
|
774
782
|
if (!n) return;
|
|
775
|
-
const o = this.trackEl.getBoundingClientRect(), h = Math.max(0, Math.min(1, (
|
|
783
|
+
const o = this.trackEl.getBoundingClientRect(), h = Math.max(0, Math.min(1, (a.clientX - o.left) / o.width)), c = this.min + h * (this.max - this.min), m = this.applyStep(c), [p, d] = this.getCurrentRange();
|
|
776
784
|
if (t === "min") {
|
|
777
|
-
const
|
|
778
|
-
|
|
785
|
+
const u = Math.min(m, d);
|
|
786
|
+
u !== p && ((f = this.soundEngine) == null || f.playTick(), this.setRangeValue(u, d));
|
|
779
787
|
} else {
|
|
780
|
-
const
|
|
781
|
-
|
|
788
|
+
const u = Math.max(m, p);
|
|
789
|
+
u !== d && ((x = this.soundEngine) == null || x.playTick(), this.setRangeValue(p, u));
|
|
782
790
|
}
|
|
783
791
|
}, r = () => {
|
|
784
792
|
n && (n = !1, window.removeEventListener("mousemove", s), window.removeEventListener("mouseup", r));
|
|
785
793
|
};
|
|
786
|
-
e.addEventListener("mousedown", (
|
|
787
|
-
|
|
794
|
+
e.addEventListener("mousedown", (a) => {
|
|
795
|
+
a.button === 0 && (a.preventDefault(), a.stopPropagation(), n = !0, window.addEventListener("mousemove", s), window.addEventListener("mouseup", r));
|
|
788
796
|
});
|
|
789
797
|
}
|
|
790
798
|
setupBarDrag() {
|
|
@@ -792,19 +800,19 @@ class H extends C {
|
|
|
792
800
|
const r = (o) => {
|
|
793
801
|
var v;
|
|
794
802
|
if (!e) return;
|
|
795
|
-
const h = this.trackEl.getBoundingClientRect(),
|
|
796
|
-
let d = Math.max(this.min, Math.min(this.max - p, n +
|
|
803
|
+
const h = this.trackEl.getBoundingClientRect(), m = (o.clientX - t) / h.width * (this.max - this.min), p = s - n;
|
|
804
|
+
let d = Math.max(this.min, Math.min(this.max - p, n + m));
|
|
797
805
|
d = this.applyStep(d);
|
|
798
|
-
const
|
|
799
|
-
(d !==
|
|
800
|
-
},
|
|
801
|
-
e && (e = !1, window.removeEventListener("mousemove", r), window.removeEventListener("mouseup",
|
|
806
|
+
const f = this.applyStep(d + p), [x, u] = this.getCurrentRange();
|
|
807
|
+
(d !== x || f !== u) && ((v = this.soundEngine) == null || v.playTick(), this.setRangeValue(d, f));
|
|
808
|
+
}, a = () => {
|
|
809
|
+
e && (e = !1, window.removeEventListener("mousemove", r), window.removeEventListener("mouseup", a));
|
|
802
810
|
};
|
|
803
811
|
this.barEl.addEventListener("mousedown", (o) => {
|
|
804
812
|
if (o.button !== 0) return;
|
|
805
813
|
o.preventDefault(), o.stopPropagation(), e = !0, t = o.clientX;
|
|
806
814
|
const [h, c] = this.getCurrentRange();
|
|
807
|
-
n = h, s = c, window.addEventListener("mousemove", r), window.addEventListener("mouseup",
|
|
815
|
+
n = h, s = c, window.addEventListener("mousemove", r), window.addEventListener("mouseup", a);
|
|
808
816
|
});
|
|
809
817
|
}
|
|
810
818
|
applyStep(e) {
|
|
@@ -845,13 +853,13 @@ class H extends C {
|
|
|
845
853
|
}
|
|
846
854
|
}
|
|
847
855
|
class j extends C {
|
|
848
|
-
constructor(e, t, n, s = [], r,
|
|
849
|
-
super(e, t, n, r,
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
856
|
+
constructor(e, t, n, s = [], r, a, o) {
|
|
857
|
+
super(e, t, n, r, a);
|
|
858
|
+
l(this, "containerEl");
|
|
859
|
+
l(this, "gliderEl");
|
|
860
|
+
l(this, "buttons", /* @__PURE__ */ new Map());
|
|
861
|
+
l(this, "optionsMap", /* @__PURE__ */ new Map());
|
|
862
|
+
l(this, "soundEngine");
|
|
855
863
|
this.soundEngine = o, this.containerEl = document.createElement("div"), this.containerEl.className = "relly-segmented-container", this.gliderEl = document.createElement("div"), this.gliderEl.className = "relly-segmented-glider", this.containerEl.appendChild(this.gliderEl), this.controlEl.appendChild(this.containerEl), this.setOptions(s);
|
|
856
864
|
}
|
|
857
865
|
setOptions(e) {
|
|
@@ -894,13 +902,13 @@ class j extends C {
|
|
|
894
902
|
class F extends C {
|
|
895
903
|
constructor(e, t, n, s) {
|
|
896
904
|
super(e, t, n, s);
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
905
|
+
l(this, "wrapperEl");
|
|
906
|
+
l(this, "ledEl");
|
|
907
|
+
l(this, "badgeEl");
|
|
908
|
+
l(this, "detailEl");
|
|
909
|
+
l(this, "currentStatus", "online");
|
|
910
|
+
l(this, "customBadge");
|
|
911
|
+
l(this, "customDetail");
|
|
904
912
|
this.wrapperEl = document.createElement("div"), this.wrapperEl.className = "relly-status-wrapper", this.ledEl = document.createElement("div"), this.ledEl.className = "relly-status-led relly-status-led--online", this.ledEl.innerHTML = `
|
|
905
913
|
<span class="relly-status-pulse-ring"></span>
|
|
906
914
|
<span class="relly-status-led-core"></span>
|
|
@@ -928,8 +936,8 @@ class F extends C {
|
|
|
928
936
|
}
|
|
929
937
|
class T {
|
|
930
938
|
constructor(i, e, t, n) {
|
|
931
|
-
|
|
932
|
-
|
|
939
|
+
l(this, "children", []);
|
|
940
|
+
l(this, "accordion", !1);
|
|
933
941
|
this.contentEl = i, this.bindingEngine = e, this.presetManager = t, this.soundEngine = n;
|
|
934
942
|
}
|
|
935
943
|
setAccordion(i) {
|
|
@@ -945,7 +953,7 @@ class T {
|
|
|
945
953
|
}
|
|
946
954
|
addCheckbox(i, e) {
|
|
947
955
|
if (typeof i == "object" && i !== null && e === void 0 && "object" in i && "property" in i) {
|
|
948
|
-
const s = i, r = s.label || s.property.charAt(0).toUpperCase() + s.property.slice(1),
|
|
956
|
+
const s = i, r = s.label || s.property.charAt(0).toUpperCase() + s.property.slice(1), a = new L(
|
|
949
957
|
r,
|
|
950
958
|
s.object,
|
|
951
959
|
s.property,
|
|
@@ -953,7 +961,7 @@ class T {
|
|
|
953
961
|
this.presetManager,
|
|
954
962
|
this.soundEngine
|
|
955
963
|
);
|
|
956
|
-
return s.tooltip &&
|
|
964
|
+
return s.tooltip && a.setTooltip(s.tooltip), (s.onChange || s.onToggle) && a.onChange(s.onChange || s.onToggle), s.listen && a.listen(), s.showIf && a.showIf(s.showIf), this.contentEl.appendChild(a.element), this.children.push(a), a;
|
|
957
965
|
}
|
|
958
966
|
const t = e ? e.charAt(0).toUpperCase() + e.slice(1) : "", n = new L(
|
|
959
967
|
t,
|
|
@@ -970,7 +978,7 @@ class T {
|
|
|
970
978
|
}
|
|
971
979
|
addSlider(i, e) {
|
|
972
980
|
if (typeof i == "object" && i !== null && e === void 0 && "object" in i && "property" in i) {
|
|
973
|
-
const s = i, r = s.label || s.property.charAt(0).toUpperCase() + s.property.slice(1),
|
|
981
|
+
const s = i, r = s.label || s.property.charAt(0).toUpperCase() + s.property.slice(1), a = new V(
|
|
974
982
|
r,
|
|
975
983
|
s.object,
|
|
976
984
|
s.property,
|
|
@@ -978,7 +986,7 @@ class T {
|
|
|
978
986
|
this.presetManager,
|
|
979
987
|
this.soundEngine
|
|
980
988
|
);
|
|
981
|
-
return s.min !== void 0 &&
|
|
989
|
+
return s.min !== void 0 && a.setMin(s.min), s.max !== void 0 && a.setMax(s.max), s.step !== void 0 && a.setStep(s.step), s.tooltip && a.setTooltip(s.tooltip), s.onChange && a.onChange(s.onChange), s.listen && a.listen(), s.showIf && a.showIf(s.showIf), this.contentEl.appendChild(a.element), this.children.push(a), a;
|
|
982
990
|
}
|
|
983
991
|
const t = e ? e.charAt(0).toUpperCase() + e.slice(1) : "", n = new V(
|
|
984
992
|
t,
|
|
@@ -1006,7 +1014,7 @@ class T {
|
|
|
1006
1014
|
}
|
|
1007
1015
|
addSelect(i, e, t) {
|
|
1008
1016
|
if (typeof i == "object" && i !== null && e === void 0 && "object" in i && "property" in i) {
|
|
1009
|
-
const r = i,
|
|
1017
|
+
const r = i, a = r.label || r.property.charAt(0).toUpperCase() + r.property.slice(1), o = new z(a, r.object, r.property, r.options, this.bindingEngine, this.presetManager);
|
|
1010
1018
|
return r.tooltip && o.setTooltip(r.tooltip), r.onChange && o.onChange(r.onChange), r.listen && o.listen(), r.showIf && o.showIf(r.showIf), this.contentEl.appendChild(o.element), this.children.push(o), o;
|
|
1011
1019
|
}
|
|
1012
1020
|
const n = e ? e.charAt(0).toUpperCase() + e.slice(1) : "", s = new z(
|
|
@@ -1024,8 +1032,8 @@ class T {
|
|
|
1024
1032
|
}
|
|
1025
1033
|
addDynamicLabel(i, e) {
|
|
1026
1034
|
if (typeof i == "object" && i !== null && e === void 0 && "object" in i && "property" in i) {
|
|
1027
|
-
const s = i, r = s.label || s.property.charAt(0).toUpperCase() + s.property.slice(1),
|
|
1028
|
-
return s.format &&
|
|
1035
|
+
const s = i, r = s.label || s.property.charAt(0).toUpperCase() + s.property.slice(1), a = new B(r, s.object, s.property, this.bindingEngine);
|
|
1036
|
+
return s.format && a.setFormat(s.format), s.tooltip && a.setTooltip(s.tooltip), s.showIf && a.showIf(s.showIf), this.contentEl.appendChild(a.element), this.children.push(a), a;
|
|
1029
1037
|
}
|
|
1030
1038
|
const t = e ? e.charAt(0).toUpperCase() + e.slice(1) : "", n = new B(t, i, e, this.bindingEngine);
|
|
1031
1039
|
return this.contentEl.appendChild(n.element), this.children.push(n), n;
|
|
@@ -1035,8 +1043,8 @@ class T {
|
|
|
1035
1043
|
}
|
|
1036
1044
|
addGraph(i, e) {
|
|
1037
1045
|
if (typeof i == "object" && i !== null && e === void 0 && "object" in i && "property" in i) {
|
|
1038
|
-
const s = i, r = s.label || s.property.charAt(0).toUpperCase() + s.property.slice(1),
|
|
1039
|
-
return s.range &&
|
|
1046
|
+
const s = i, r = s.label || s.property.charAt(0).toUpperCase() + s.property.slice(1), a = new N(r, s.object, s.property, this.bindingEngine, this.soundEngine);
|
|
1047
|
+
return s.range && a.setRange(s.range[0], s.range[1]), s.color && a.setColor(s.color, s.fillColor), s.bufferSize && a.setBufferSize(s.bufferSize), s.smooth !== void 0 && a.setSmooth(s.smooth), s.height && a.setHeight(s.height), s.format && a.setFormat(s.format), s.tooltip && a.setTooltip(s.tooltip), s.showIf && a.showIf(s.showIf), this.contentEl.appendChild(a.element), this.children.push(a), a;
|
|
1040
1048
|
}
|
|
1041
1049
|
const t = e ? e.charAt(0).toUpperCase() + e.slice(1) : "", n = new N(t, i, e, this.bindingEngine, this.soundEngine);
|
|
1042
1050
|
return this.contentEl.appendChild(n.element), this.children.push(n), n;
|
|
@@ -1051,10 +1059,10 @@ class T {
|
|
|
1051
1059
|
t++, h >= n + 1e3 && (e.fps = Math.round(t * 1e3 / (h - n)), t = 0, n = h), s = requestAnimationFrame(r);
|
|
1052
1060
|
};
|
|
1053
1061
|
typeof requestAnimationFrame < "u" && (s = requestAnimationFrame(r));
|
|
1054
|
-
const
|
|
1055
|
-
return
|
|
1062
|
+
const a = this.addGraph(e, "fps").setLabel(i).setRange(0, 120).setColor("#22c55e", "rgba(34, 197, 94, 0.25)").setFormat((h) => `${Math.round(h)} FPS`), o = a.destroy.bind(a);
|
|
1063
|
+
return a.destroy = () => {
|
|
1056
1064
|
typeof cancelAnimationFrame < "u" && s && cancelAnimationFrame(s), o();
|
|
1057
|
-
},
|
|
1065
|
+
}, a;
|
|
1058
1066
|
}
|
|
1059
1067
|
createFPSGraph(i = "FPS") {
|
|
1060
1068
|
return this.addFPSGraph(i);
|
|
@@ -1064,13 +1072,13 @@ class T {
|
|
|
1064
1072
|
let t;
|
|
1065
1073
|
const n = () => {
|
|
1066
1074
|
if (typeof performance < "u" && performance.memory) {
|
|
1067
|
-
const
|
|
1068
|
-
e.mem = Number(
|
|
1075
|
+
const a = performance.memory.usedJSHeapSize / 1048576;
|
|
1076
|
+
e.mem = Number(a.toFixed(1));
|
|
1069
1077
|
} else
|
|
1070
1078
|
e.mem = Number((Math.sin(Date.now() / 2500) * 8 + 48).toFixed(1));
|
|
1071
1079
|
};
|
|
1072
1080
|
n(), typeof setInterval < "u" && (t = setInterval(n, 1e3));
|
|
1073
|
-
const s = this.addGraph(e, "mem").setLabel(i).setAutoRange(!0).setColor("#a855f7", "rgba(168, 85, 247, 0.25)").setFormat((
|
|
1081
|
+
const s = this.addGraph(e, "mem").setLabel(i).setAutoRange(!0).setColor("#a855f7", "rgba(168, 85, 247, 0.25)").setFormat((a) => `${a.toFixed(1)} MB`), r = s.destroy.bind(s);
|
|
1074
1082
|
return s.destroy = () => {
|
|
1075
1083
|
t && clearInterval(t), r();
|
|
1076
1084
|
}, s;
|
|
@@ -1080,7 +1088,7 @@ class T {
|
|
|
1080
1088
|
}
|
|
1081
1089
|
addColor(i, e) {
|
|
1082
1090
|
if (typeof i == "object" && i !== null && e === void 0 && "object" in i && "property" in i) {
|
|
1083
|
-
const s = i, r = s.label || s.property.charAt(0).toUpperCase() + s.property.slice(1),
|
|
1091
|
+
const s = i, r = s.label || s.property.charAt(0).toUpperCase() + s.property.slice(1), a = new R(
|
|
1084
1092
|
r,
|
|
1085
1093
|
s.object,
|
|
1086
1094
|
s.property,
|
|
@@ -1088,7 +1096,7 @@ class T {
|
|
|
1088
1096
|
this.presetManager,
|
|
1089
1097
|
this.soundEngine
|
|
1090
1098
|
);
|
|
1091
|
-
return s.tooltip &&
|
|
1099
|
+
return s.tooltip && a.setTooltip(s.tooltip), s.swatches && a.setSwatches(s.swatches), s.onChange && a.onChange(s.onChange), s.listen && a.listen(), s.showIf && a.showIf(s.showIf), this.contentEl.appendChild(a.element), this.children.push(a), a;
|
|
1092
1100
|
}
|
|
1093
1101
|
const t = e ? e.charAt(0).toUpperCase() + e.slice(1) : "", n = new R(
|
|
1094
1102
|
t,
|
|
@@ -1105,7 +1113,7 @@ class T {
|
|
|
1105
1113
|
}
|
|
1106
1114
|
addPoint2D(i, e, t) {
|
|
1107
1115
|
if (typeof i == "object" && i !== null && e === void 0 && "object" in i && "property" in i) {
|
|
1108
|
-
const r = i,
|
|
1116
|
+
const r = i, a = r.label || r.property.charAt(0).toUpperCase() + r.property.slice(1), o = new P(a, r.object, r.property, this.bindingEngine, this.presetManager);
|
|
1109
1117
|
return r.min !== void 0 && o.setMin(r.min), r.max !== void 0 && o.setMax(r.max), r.step !== void 0 && o.setStep(r.step), r.tooltip && o.setTooltip(r.tooltip), r.onChange && o.onChange(r.onChange), r.listen && o.listen(), r.showIf && o.showIf(r.showIf), this.contentEl.appendChild(o.element), this.children.push(o), o;
|
|
1110
1118
|
}
|
|
1111
1119
|
const n = e ? e.charAt(0).toUpperCase() + e.slice(1) : "", s = new P(n, i, e, this.bindingEngine, this.presetManager);
|
|
@@ -1116,7 +1124,7 @@ class T {
|
|
|
1116
1124
|
}
|
|
1117
1125
|
addPoint3D(i, e, t) {
|
|
1118
1126
|
if (typeof i == "object" && i !== null && e === void 0 && "object" in i && "property" in i) {
|
|
1119
|
-
const r = i,
|
|
1127
|
+
const r = i, a = r.label || r.property.charAt(0).toUpperCase() + r.property.slice(1), o = new D(a, r.object, r.property, this.bindingEngine, this.presetManager);
|
|
1120
1128
|
return r.min !== void 0 && o.setMin(r.min), r.max !== void 0 && o.setMax(r.max), r.step !== void 0 && o.setStep(r.step), r.tooltip && o.setTooltip(r.tooltip), r.contextMenu && o.setContextMenu(r.contextMenu), r.onChange && o.onChange(r.onChange), r.listen && o.listen(), r.showIf && o.showIf(r.showIf), this.contentEl.appendChild(o.element), this.children.push(o), o;
|
|
1121
1129
|
}
|
|
1122
1130
|
const n = e ? e.charAt(0).toUpperCase() + e.slice(1) : "", s = new D(n, i, e, this.bindingEngine, this.presetManager);
|
|
@@ -1133,8 +1141,8 @@ class T {
|
|
|
1133
1141
|
}
|
|
1134
1142
|
addRange(i, e, t) {
|
|
1135
1143
|
if (typeof i == "object" && i !== null && e === void 0 && "object" in i && "property" in i) {
|
|
1136
|
-
const r = i,
|
|
1137
|
-
|
|
1144
|
+
const r = i, a = r.label || r.property.charAt(0).toUpperCase() + r.property.slice(1), o = new H(
|
|
1145
|
+
a,
|
|
1138
1146
|
r.object,
|
|
1139
1147
|
r.property,
|
|
1140
1148
|
this.bindingEngine,
|
|
@@ -1158,8 +1166,8 @@ class T {
|
|
|
1158
1166
|
}
|
|
1159
1167
|
addSegmented(i, e, t) {
|
|
1160
1168
|
if (typeof i == "object" && i !== null && e === void 0 && "object" in i && "property" in i) {
|
|
1161
|
-
const r = i,
|
|
1162
|
-
|
|
1169
|
+
const r = i, a = r.label || r.property.charAt(0).toUpperCase() + r.property.slice(1), o = new j(
|
|
1170
|
+
a,
|
|
1163
1171
|
r.object,
|
|
1164
1172
|
r.property,
|
|
1165
1173
|
r.options || [],
|
|
@@ -1185,17 +1193,17 @@ class T {
|
|
|
1185
1193
|
}
|
|
1186
1194
|
addStatus(i, e, t = "online", n, s) {
|
|
1187
1195
|
if (typeof i == "object" && i !== null && e === void 0 && "object" in i && "property" in i) {
|
|
1188
|
-
const c = i,
|
|
1189
|
-
|
|
1196
|
+
const c = i, m = c.label || c.property.charAt(0).toUpperCase() + c.property.slice(1), p = new F(
|
|
1197
|
+
m,
|
|
1190
1198
|
c.object,
|
|
1191
1199
|
c.property,
|
|
1192
1200
|
this.bindingEngine
|
|
1193
1201
|
);
|
|
1194
1202
|
return c.status && p.setStatus(c.status, c.badge, c.detail), c.badge && p.setBadge(c.badge), c.detail && p.setDetail(c.detail), c.tooltip && p.setTooltip(c.tooltip), c.contextMenu && p.setContextMenu(c.contextMenu), c.listen && p.listen(), c.showIf && p.showIf(c.showIf), this.contentEl.appendChild(p.element), this.children.push(p), p;
|
|
1195
1203
|
}
|
|
1196
|
-
const r = e ? e.charAt(0).toUpperCase() + e.slice(1) : typeof i == "string" ? i : "Status",
|
|
1204
|
+
const r = e ? e.charAt(0).toUpperCase() + e.slice(1) : typeof i == "string" ? i : "Status", a = typeof i == "string" ? void 0 : i, o = typeof i == "string" ? void 0 : e, h = new F(
|
|
1197
1205
|
r,
|
|
1198
|
-
|
|
1206
|
+
a,
|
|
1199
1207
|
o,
|
|
1200
1208
|
this.bindingEngine
|
|
1201
1209
|
);
|
|
@@ -1205,7 +1213,7 @@ class T {
|
|
|
1205
1213
|
return this.addStatus(i, e, t, n, s);
|
|
1206
1214
|
}
|
|
1207
1215
|
addRow() {
|
|
1208
|
-
const i = new
|
|
1216
|
+
const i = new G(this.bindingEngine, this.presetManager, this.soundEngine);
|
|
1209
1217
|
return this.contentEl.appendChild(i.element), this.children.push(i), i;
|
|
1210
1218
|
}
|
|
1211
1219
|
createRow() {
|
|
@@ -1299,13 +1307,13 @@ class T {
|
|
|
1299
1307
|
this.children = [];
|
|
1300
1308
|
}
|
|
1301
1309
|
}
|
|
1302
|
-
class
|
|
1310
|
+
class G extends T {
|
|
1303
1311
|
constructor(e, t, n) {
|
|
1304
1312
|
const s = document.createElement("div");
|
|
1305
1313
|
s.className = "relly-multi-row";
|
|
1306
1314
|
super(s, e, t, n);
|
|
1307
|
-
|
|
1308
|
-
|
|
1315
|
+
l(this, "element");
|
|
1316
|
+
l(this, "disabled", !1);
|
|
1309
1317
|
this.element = s;
|
|
1310
1318
|
}
|
|
1311
1319
|
setDisabled(e) {
|
|
@@ -1320,17 +1328,17 @@ class K extends T {
|
|
|
1320
1328
|
}
|
|
1321
1329
|
class q extends T {
|
|
1322
1330
|
constructor(e, t, n, s = !1, r) {
|
|
1323
|
-
const
|
|
1324
|
-
|
|
1325
|
-
super(
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1331
|
+
const a = document.createElement("div");
|
|
1332
|
+
a.className = "relly-section-content";
|
|
1333
|
+
super(a, t, n, r);
|
|
1334
|
+
l(this, "element");
|
|
1335
|
+
l(this, "headerEl");
|
|
1336
|
+
l(this, "titleEl");
|
|
1337
|
+
l(this, "arrowEl");
|
|
1338
|
+
l(this, "isCollapsed", !1);
|
|
1339
|
+
l(this, "conditionPredicate");
|
|
1340
|
+
l(this, "parentContainer");
|
|
1341
|
+
l(this, "disabled", !1);
|
|
1334
1342
|
this.label = e, this.element = document.createElement("div"), this.element.className = "relly-section", this.headerEl = document.createElement("div"), this.headerEl.className = "relly-section-header";
|
|
1335
1343
|
const o = document.createElement("div");
|
|
1336
1344
|
o.className = "relly-section-title-wrap", this.arrowEl = document.createElement("span"), this.arrowEl.innerHTML = `
|
|
@@ -1378,12 +1386,12 @@ class q extends T {
|
|
|
1378
1386
|
this.conditionPredicate && this.bindingEngine.unregister(this), this.destroyChildren(), this.element.remove();
|
|
1379
1387
|
}
|
|
1380
1388
|
}
|
|
1381
|
-
class
|
|
1389
|
+
class W {
|
|
1382
1390
|
constructor() {
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1391
|
+
l(this, "listeners", /* @__PURE__ */ new Set());
|
|
1392
|
+
l(this, "rafId", null);
|
|
1393
|
+
l(this, "isRunning", !1);
|
|
1394
|
+
l(this, "isPaused", !1);
|
|
1387
1395
|
}
|
|
1388
1396
|
register(i) {
|
|
1389
1397
|
this.listeners.add(i), !this.isRunning && !this.isPaused && this.start();
|
|
@@ -1416,11 +1424,11 @@ class G {
|
|
|
1416
1424
|
this.stop(), this.listeners.clear();
|
|
1417
1425
|
}
|
|
1418
1426
|
}
|
|
1419
|
-
class
|
|
1427
|
+
class X {
|
|
1420
1428
|
constructor() {
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1429
|
+
l(this, "components", /* @__PURE__ */ new Set());
|
|
1430
|
+
l(this, "pendingValues", {});
|
|
1431
|
+
l(this, "changeCallback");
|
|
1424
1432
|
}
|
|
1425
1433
|
setOnChange(i) {
|
|
1426
1434
|
this.changeCallback = i;
|
|
@@ -1497,7 +1505,7 @@ const U = {
|
|
|
1497
1505
|
font: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',
|
|
1498
1506
|
fontSize: "11px",
|
|
1499
1507
|
rowHeight: "26px"
|
|
1500
|
-
},
|
|
1508
|
+
}, J = {
|
|
1501
1509
|
bg: "#ffffff",
|
|
1502
1510
|
fg: "#374151",
|
|
1503
1511
|
headerBg: "#f3f4f6",
|
|
@@ -1511,7 +1519,7 @@ const U = {
|
|
|
1511
1519
|
font: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',
|
|
1512
1520
|
fontSize: "11px",
|
|
1513
1521
|
rowHeight: "26px"
|
|
1514
|
-
},
|
|
1522
|
+
}, Y = {
|
|
1515
1523
|
bg: "#0f051d",
|
|
1516
1524
|
fg: "#e0f2fe",
|
|
1517
1525
|
headerBg: "#180a33",
|
|
@@ -1525,7 +1533,7 @@ const U = {
|
|
|
1525
1533
|
font: '"JetBrains Mono", Consolas, monospace',
|
|
1526
1534
|
fontSize: "11px",
|
|
1527
1535
|
rowHeight: "26px"
|
|
1528
|
-
},
|
|
1536
|
+
}, _ = {
|
|
1529
1537
|
bg: "#2e3440",
|
|
1530
1538
|
fg: "#d8dee9",
|
|
1531
1539
|
headerBg: "#242933",
|
|
@@ -1539,7 +1547,7 @@ const U = {
|
|
|
1539
1547
|
font: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
1540
1548
|
fontSize: "11px",
|
|
1541
1549
|
rowHeight: "26px"
|
|
1542
|
-
},
|
|
1550
|
+
}, Q = {
|
|
1543
1551
|
bg: "#282a36",
|
|
1544
1552
|
fg: "#f8f8f2",
|
|
1545
1553
|
headerBg: "#1e1f29",
|
|
@@ -1553,7 +1561,7 @@ const U = {
|
|
|
1553
1561
|
font: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
1554
1562
|
fontSize: "11px",
|
|
1555
1563
|
rowHeight: "26px"
|
|
1556
|
-
},
|
|
1564
|
+
}, Z = {
|
|
1557
1565
|
bg: "#1a1b26",
|
|
1558
1566
|
fg: "#a9b1d6",
|
|
1559
1567
|
headerBg: "#16161e",
|
|
@@ -1567,7 +1575,7 @@ const U = {
|
|
|
1567
1575
|
font: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
1568
1576
|
fontSize: "11px",
|
|
1569
1577
|
rowHeight: "26px"
|
|
1570
|
-
},
|
|
1578
|
+
}, O = {
|
|
1571
1579
|
bg: "#0a0f0d",
|
|
1572
1580
|
fg: "#00ff66",
|
|
1573
1581
|
headerBg: "#050a08",
|
|
@@ -1581,7 +1589,7 @@ const U = {
|
|
|
1581
1589
|
font: '"JetBrains Mono", Consolas, monospace',
|
|
1582
1590
|
fontSize: "11px",
|
|
1583
1591
|
rowHeight: "26px"
|
|
1584
|
-
},
|
|
1592
|
+
}, ee = {
|
|
1585
1593
|
bg: "#241b2f",
|
|
1586
1594
|
fg: "#f8f8f2",
|
|
1587
1595
|
headerBg: "#191322",
|
|
@@ -1596,14 +1604,14 @@ const U = {
|
|
|
1596
1604
|
fontSize: "11px",
|
|
1597
1605
|
rowHeight: "26px"
|
|
1598
1606
|
};
|
|
1599
|
-
class
|
|
1607
|
+
class te {
|
|
1600
1608
|
constructor(i, e) {
|
|
1601
|
-
|
|
1602
|
-
|
|
1609
|
+
l(this, "currentTheme");
|
|
1610
|
+
l(this, "currentThemeName");
|
|
1603
1611
|
this.panelElement = i, this.currentTheme = { ...U }, this.currentThemeName = "dark", e ? this.applyTheme(e) : this.applyToDOM(this.currentTheme);
|
|
1604
1612
|
}
|
|
1605
1613
|
applyTheme(i) {
|
|
1606
|
-
typeof i == "string" && (this.currentThemeName = i), i === "light" ? this.currentTheme = { ...
|
|
1614
|
+
typeof i == "string" && (this.currentThemeName = i), i === "light" ? this.currentTheme = { ...J } : i === "dark" ? this.currentTheme = { ...U } : i === "cyberpunk" ? this.currentTheme = { ...Y } : i === "nord" ? this.currentTheme = { ..._ } : i === "dracula" ? this.currentTheme = { ...Q } : i === "tokyo-night" ? this.currentTheme = { ...Z } : i === "matrix" ? this.currentTheme = { ...O } : i === "synthwave" ? this.currentTheme = { ...ee } : typeof i == "object" && (this.currentTheme = { ...this.currentTheme, ...i }, this.currentThemeName = "custom"), this.applyToDOM(this.currentTheme);
|
|
1607
1615
|
}
|
|
1608
1616
|
getCurrentThemeName() {
|
|
1609
1617
|
return this.currentThemeName;
|
|
@@ -1616,27 +1624,27 @@ class ee {
|
|
|
1616
1624
|
return { ...this.currentTheme };
|
|
1617
1625
|
}
|
|
1618
1626
|
}
|
|
1619
|
-
class
|
|
1627
|
+
class ie {
|
|
1620
1628
|
constructor(i, e, t) {
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1629
|
+
l(this, "isDragging", !1);
|
|
1630
|
+
l(this, "startX", 0);
|
|
1631
|
+
l(this, "startY", 0);
|
|
1632
|
+
l(this, "initialLeft", 0);
|
|
1633
|
+
l(this, "initialTop", 0);
|
|
1634
|
+
l(this, "wasSnapped", !1);
|
|
1635
|
+
l(this, "snapThreshold", 18);
|
|
1636
|
+
l(this, "magneticSnap", !0);
|
|
1637
|
+
l(this, "onMouseDownBound");
|
|
1638
|
+
l(this, "onMouseMoveBound");
|
|
1639
|
+
l(this, "onMouseUpBound");
|
|
1640
|
+
l(this, "onResizeBound");
|
|
1633
1641
|
this.handle = i, this.panel = e, this.soundEngine = t, this.onMouseDownBound = this.onMouseDown.bind(this), this.onMouseMoveBound = this.onMouseMove.bind(this), this.onMouseUpBound = this.onMouseUp.bind(this), this.onResizeBound = this.onResize.bind(this), this.handle.addEventListener("mousedown", this.onMouseDownBound), typeof window < "u" && window.addEventListener("resize", this.onResizeBound);
|
|
1634
1642
|
}
|
|
1635
1643
|
clampToViewport() {
|
|
1636
1644
|
if (typeof window > "u") return;
|
|
1637
1645
|
const i = this.panel.getBoundingClientRect(), e = i.width, t = i.height, n = Math.max(0, window.innerWidth - e), s = Math.max(0, window.innerHeight - t);
|
|
1638
|
-
let r = i.left,
|
|
1639
|
-
r > n && (r = n), r < 0 && (r = 0),
|
|
1646
|
+
let r = i.left, a = i.top;
|
|
1647
|
+
r > n && (r = n), r < 0 && (r = 0), a > s && (a = s), a < 0 && (a = 0), this.panel.style.left = `${Math.round(r)}px`, this.panel.style.top = `${Math.round(a)}px`, this.panel.style.right = "auto", this.panel.style.bottom = "auto";
|
|
1640
1648
|
}
|
|
1641
1649
|
onResize() {
|
|
1642
1650
|
this.clampToViewport();
|
|
@@ -1652,9 +1660,9 @@ class te {
|
|
|
1652
1660
|
if (!this.isDragging) return;
|
|
1653
1661
|
const e = i.clientX - this.startX, t = i.clientY - this.startY;
|
|
1654
1662
|
let n = this.initialLeft + e, s = this.initialTop + t;
|
|
1655
|
-
const r = this.panel.getBoundingClientRect(),
|
|
1656
|
-
let
|
|
1657
|
-
this.magneticSnap && (Math.abs(n) < this.snapThreshold ? (n = 0,
|
|
1663
|
+
const r = this.panel.getBoundingClientRect(), a = r.width, o = r.height, h = Math.max(0, window.innerWidth - a), c = Math.max(0, window.innerHeight - o);
|
|
1664
|
+
let m = !1;
|
|
1665
|
+
this.magneticSnap && (Math.abs(n) < this.snapThreshold ? (n = 0, m = !0) : Math.abs(n - h) < this.snapThreshold && (n = h, m = !0), Math.abs(s) < this.snapThreshold ? (s = 0, m = !0) : Math.abs(s - c) < this.snapThreshold && (s = c, m = !0), m && !this.wasSnapped && ((p = this.soundEngine) == null || p.playSnap()), this.wasSnapped = m), n = Math.max(0, Math.min(n, h)), s = Math.max(0, Math.min(s, c)), this.panel.style.left = `${n}px`, this.panel.style.top = `${s}px`;
|
|
1658
1666
|
}
|
|
1659
1667
|
onMouseUp() {
|
|
1660
1668
|
this.isDragging = !1, this.wasSnapped = !1, window.removeEventListener("mousemove", this.onMouseMoveBound), window.removeEventListener("mouseup", this.onMouseUpBound);
|
|
@@ -1663,18 +1671,18 @@ class te {
|
|
|
1663
1671
|
this.handle.removeEventListener("mousedown", this.onMouseDownBound), typeof window < "u" && (window.removeEventListener("mousemove", this.onMouseMoveBound), window.removeEventListener("mouseup", this.onMouseUpBound), window.removeEventListener("resize", this.onResizeBound));
|
|
1664
1672
|
}
|
|
1665
1673
|
}
|
|
1666
|
-
class
|
|
1674
|
+
class ne {
|
|
1667
1675
|
constructor(i, e = 240, t = 120) {
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1676
|
+
l(this, "handleEl");
|
|
1677
|
+
l(this, "isResizing", !1);
|
|
1678
|
+
l(this, "startX", 0);
|
|
1679
|
+
l(this, "startY", 0);
|
|
1680
|
+
l(this, "initialWidth", 0);
|
|
1681
|
+
l(this, "initialHeight", 0);
|
|
1682
|
+
l(this, "onMouseDownBound");
|
|
1683
|
+
l(this, "onMouseMoveBound");
|
|
1684
|
+
l(this, "onMouseUpBound");
|
|
1685
|
+
l(this, "onResizeBound");
|
|
1678
1686
|
this.panel = i, this.minWidth = e, this.minHeight = t, this.handleEl = document.createElement("div"), this.handleEl.className = "relly-resize-handle", this.handleEl.title = "Drag to resize panel", this.handleEl.innerHTML = `
|
|
1679
1687
|
<svg viewBox="0 0 10 10">
|
|
1680
1688
|
<line x1="8" y1="2" x2="2" y2="8"></line>
|
|
@@ -1700,11 +1708,11 @@ class ie {
|
|
|
1700
1708
|
}
|
|
1701
1709
|
onMouseMove(i) {
|
|
1702
1710
|
if (!this.isResizing) return;
|
|
1703
|
-
const e = i.clientX - this.startX, t = i.clientY - this.startY, n = this.panel.getBoundingClientRect(), s = Math.max(this.minWidth, window.innerWidth - n.left - 8), r = Math.max(this.minHeight, window.innerHeight - n.top - 8),
|
|
1711
|
+
const e = i.clientX - this.startX, t = i.clientY - this.startY, n = this.panel.getBoundingClientRect(), s = Math.max(this.minWidth, window.innerWidth - n.left - 8), r = Math.max(this.minHeight, window.innerHeight - n.top - 8), a = Math.max(this.minWidth, Math.min(s, this.initialWidth + e)), o = Math.max(
|
|
1704
1712
|
this.minHeight,
|
|
1705
1713
|
Math.min(r, this.initialHeight + t)
|
|
1706
1714
|
);
|
|
1707
|
-
this.panel.style.width = `${Math.round(
|
|
1715
|
+
this.panel.style.width = `${Math.round(a)}px`, this.panel.style.height = `${Math.round(o)}px`;
|
|
1708
1716
|
const h = this.panel.querySelector(".relly-body");
|
|
1709
1717
|
h && (h.style.maxHeight = "none", h.style.flex = "1");
|
|
1710
1718
|
}
|
|
@@ -1715,10 +1723,10 @@ class ie {
|
|
|
1715
1723
|
this.handleEl.removeEventListener("mousedown", this.onMouseDownBound), typeof window < "u" && (window.removeEventListener("mousemove", this.onMouseMoveBound), window.removeEventListener("mouseup", this.onMouseUpBound), window.removeEventListener("resize", this.onResizeBound)), this.handleEl.remove();
|
|
1716
1724
|
}
|
|
1717
1725
|
}
|
|
1718
|
-
class
|
|
1726
|
+
class $ {
|
|
1719
1727
|
constructor(i, e) {
|
|
1720
|
-
|
|
1721
|
-
this.hotkey = i, this.onToggle = e, this.onKeyDownBound = this.onKeyDown.bind(this),
|
|
1728
|
+
l(this, "onKeyDownBound");
|
|
1729
|
+
this.hotkey = i, this.onToggle = e, this.onKeyDownBound = this.onKeyDown.bind(this), typeof window < "u" && window.addEventListener("keydown", this.onKeyDownBound);
|
|
1722
1730
|
}
|
|
1723
1731
|
onKeyDown(i) {
|
|
1724
1732
|
var n;
|
|
@@ -1744,11 +1752,11 @@ class ne {
|
|
|
1744
1752
|
}
|
|
1745
1753
|
class se {
|
|
1746
1754
|
constructor(i, e = {}) {
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1755
|
+
l(this, "element");
|
|
1756
|
+
l(this, "inputEl");
|
|
1757
|
+
l(this, "clearBtn");
|
|
1758
|
+
l(this, "ignoreCase");
|
|
1759
|
+
l(this, "onGlobalKeyDownBound");
|
|
1752
1760
|
this.bodyEl = i, this.ignoreCase = e.ignoreCase !== !1, this.element = document.createElement("div"), this.element.className = "relly-search-bar", this.inputEl = document.createElement("input"), this.inputEl.type = "text", this.inputEl.className = "relly-search-input", this.inputEl.placeholder = e.placeholder || 'Filter settings... (Press "/" to focus)', this.clearBtn = document.createElement("button"), this.clearBtn.className = "relly-search-clear", this.clearBtn.textContent = "✕", this.clearBtn.title = "Clear search", this.clearBtn.style.display = "none", this.element.appendChild(this.inputEl), this.element.appendChild(this.clearBtn), this.inputEl.addEventListener("input", () => {
|
|
1753
1761
|
this.filter(this.inputEl.value);
|
|
1754
1762
|
}), this.inputEl.addEventListener("keydown", (t) => {
|
|
@@ -1767,8 +1775,8 @@ class se {
|
|
|
1767
1775
|
const t = typeof i.composedPath == "function" ? i.composedPath() : [];
|
|
1768
1776
|
for (const r of t)
|
|
1769
1777
|
if (r instanceof HTMLElement) {
|
|
1770
|
-
const
|
|
1771
|
-
if (
|
|
1778
|
+
const a = r.tagName;
|
|
1779
|
+
if (a === "INPUT" || a === "TEXTAREA" || a === "SELECT" || r.isContentEditable || r.classList.contains("relly-search-input"))
|
|
1772
1780
|
return;
|
|
1773
1781
|
}
|
|
1774
1782
|
let n = document.activeElement;
|
|
@@ -1784,6 +1792,7 @@ class se {
|
|
|
1784
1792
|
return this.inputEl;
|
|
1785
1793
|
}
|
|
1786
1794
|
filter(i) {
|
|
1795
|
+
var o;
|
|
1787
1796
|
const e = i.trim();
|
|
1788
1797
|
if (!e) {
|
|
1789
1798
|
this.clearBtn.style.display = "none", this.resetFilter();
|
|
@@ -1791,22 +1800,38 @@ class se {
|
|
|
1791
1800
|
}
|
|
1792
1801
|
this.clearBtn.style.display = "block";
|
|
1793
1802
|
const t = this.ignoreCase ? e.toLowerCase() : e;
|
|
1794
|
-
this.bodyEl.querySelectorAll(".relly-row, .relly-graph-row").forEach((
|
|
1795
|
-
const
|
|
1796
|
-
if ((this.ignoreCase ?
|
|
1797
|
-
|
|
1798
|
-
const
|
|
1799
|
-
|
|
1803
|
+
this.bodyEl.querySelectorAll(".relly-row, .relly-graph-row").forEach((h) => {
|
|
1804
|
+
const c = h.querySelector(".relly-row-label, .relly-graph-header span"), m = (c == null ? void 0 : c.textContent) || "";
|
|
1805
|
+
if ((this.ignoreCase ? m.toLowerCase() : m).includes(t)) {
|
|
1806
|
+
h.classList.remove("relly-search-hidden");
|
|
1807
|
+
const f = h.closest(".relly-section");
|
|
1808
|
+
f && (f.classList.remove("relly-section--collapsed"), f.classList.remove("relly-search-hidden"));
|
|
1800
1809
|
} else
|
|
1801
|
-
|
|
1802
|
-
}), this.bodyEl.querySelectorAll(".relly-section").forEach((
|
|
1803
|
-
const
|
|
1804
|
-
(this.ignoreCase ?
|
|
1805
|
-
|
|
1806
|
-
})) :
|
|
1810
|
+
h.classList.add("relly-search-hidden");
|
|
1811
|
+
}), this.bodyEl.querySelectorAll(".relly-section").forEach((h) => {
|
|
1812
|
+
const c = h.querySelector(".relly-section-title-wrap span:last-child"), m = (c == null ? void 0 : c.textContent) || "";
|
|
1813
|
+
(this.ignoreCase ? m.toLowerCase() : m).includes(t) ? (h.classList.remove("relly-search-hidden"), h.classList.remove("relly-section--collapsed"), h.querySelectorAll(".relly-row, .relly-graph-row").forEach((d) => {
|
|
1814
|
+
d.classList.remove("relly-search-hidden");
|
|
1815
|
+
})) : h.querySelectorAll(
|
|
1807
1816
|
".relly-row:not(.relly-search-hidden), .relly-graph-row:not(.relly-search-hidden)"
|
|
1808
|
-
).length === 0 &&
|
|
1817
|
+
).length === 0 && h.classList.add("relly-search-hidden");
|
|
1809
1818
|
});
|
|
1819
|
+
const r = this.bodyEl.querySelector('.relly-tab-content:not([style*="display: none"])'), a = r == null ? void 0 : r.querySelectorAll(
|
|
1820
|
+
".relly-row:not(.relly-search-hidden), .relly-graph-row:not(.relly-search-hidden)"
|
|
1821
|
+
);
|
|
1822
|
+
if (!a || a.length === 0) {
|
|
1823
|
+
const h = Array.from(this.bodyEl.querySelectorAll(".relly-tab-content"));
|
|
1824
|
+
for (let c = 0; c < h.length; c++)
|
|
1825
|
+
if (h[c].querySelectorAll(
|
|
1826
|
+
".relly-row:not(.relly-search-hidden), .relly-graph-row:not(.relly-search-hidden)"
|
|
1827
|
+
).length > 0) {
|
|
1828
|
+
const p = (o = this.bodyEl.parentElement) == null ? void 0 : o.querySelectorAll(".relly-tab-btn");
|
|
1829
|
+
if (p && p[c]) {
|
|
1830
|
+
p[c].click();
|
|
1831
|
+
break;
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1810
1835
|
}
|
|
1811
1836
|
clear() {
|
|
1812
1837
|
this.inputEl.value = "", this.clearBtn.style.display = "none", this.resetFilter();
|
|
@@ -1822,10 +1847,10 @@ class se {
|
|
|
1822
1847
|
}
|
|
1823
1848
|
class re {
|
|
1824
1849
|
constructor(i = !0, e = "synth") {
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1850
|
+
l(this, "ctx", null);
|
|
1851
|
+
l(this, "enabled", !0);
|
|
1852
|
+
l(this, "volume", 1);
|
|
1853
|
+
l(this, "soundPack", "synth");
|
|
1829
1854
|
this.enabled = i, this.soundPack = e;
|
|
1830
1855
|
}
|
|
1831
1856
|
setEnabled(i) {
|
|
@@ -1871,16 +1896,16 @@ class re {
|
|
|
1871
1896
|
const t = e.currentTime, n = e.createOscillator(), s = e.createGain();
|
|
1872
1897
|
if (this.soundPack === "mechanical") {
|
|
1873
1898
|
n.type = "triangle";
|
|
1874
|
-
const r = i ? 2800 : 1800,
|
|
1875
|
-
n.frequency.setValueAtTime(r, t), n.frequency.exponentialRampToValueAtTime(
|
|
1899
|
+
const r = i ? 2800 : 1800, a = i ? 900 : 400;
|
|
1900
|
+
n.frequency.setValueAtTime(r, t), n.frequency.exponentialRampToValueAtTime(a, t + 0.018), s.gain.setValueAtTime(0.055 * this.volume, t), s.gain.exponentialRampToValueAtTime(1e-4, t + 0.018), n.connect(s), s.connect(e.destination), n.start(t), n.stop(t + 0.02);
|
|
1876
1901
|
} else if (this.soundPack === "bubble") {
|
|
1877
1902
|
n.type = "sine";
|
|
1878
|
-
const r = i ? 380 : 900,
|
|
1879
|
-
n.frequency.setValueAtTime(r, t), n.frequency.exponentialRampToValueAtTime(
|
|
1903
|
+
const r = i ? 380 : 900, a = i ? 1100 : 280;
|
|
1904
|
+
n.frequency.setValueAtTime(r, t), n.frequency.exponentialRampToValueAtTime(a, t + 0.028), s.gain.setValueAtTime(0.045 * this.volume, t), s.gain.exponentialRampToValueAtTime(1e-4, t + 0.028), n.connect(s), s.connect(e.destination), n.start(t), n.stop(t + 0.03);
|
|
1880
1905
|
} else if (this.soundPack === "arcade") {
|
|
1881
1906
|
n.type = "square";
|
|
1882
|
-
const r = i ? 523.25 : 659.25,
|
|
1883
|
-
n.frequency.setValueAtTime(r, t), n.frequency.setValueAtTime(
|
|
1907
|
+
const r = i ? 523.25 : 659.25, a = i ? 783.99 : 392;
|
|
1908
|
+
n.frequency.setValueAtTime(r, t), n.frequency.setValueAtTime(a, t + 0.015), s.gain.setValueAtTime(0.025 * this.volume, t), s.gain.exponentialRampToValueAtTime(1e-4, t + 0.03), n.connect(s), s.connect(e.destination), n.start(t), n.stop(t + 0.032);
|
|
1884
1909
|
} else {
|
|
1885
1910
|
n.type = "triangle";
|
|
1886
1911
|
const r = i ? 650 : 450;
|
|
@@ -1926,8 +1951,8 @@ class re {
|
|
|
1926
1951
|
try {
|
|
1927
1952
|
const t = e.currentTime, n = e.createOscillator(), s = e.createGain();
|
|
1928
1953
|
n.type = this.soundPack === "arcade" ? "square" : "sine";
|
|
1929
|
-
const r = i ? 380 : 640,
|
|
1930
|
-
n.frequency.setValueAtTime(r, t), n.frequency.exponentialRampToValueAtTime(
|
|
1954
|
+
const r = i ? 380 : 640, a = i ? 680 : 340;
|
|
1955
|
+
n.frequency.setValueAtTime(r, t), n.frequency.exponentialRampToValueAtTime(a, t + 0.05), s.gain.setValueAtTime(0.03 * this.volume, t), s.gain.exponentialRampToValueAtTime(1e-4, t + 0.05), n.connect(s), s.connect(e.destination), n.start(t), n.stop(t + 0.055);
|
|
1931
1956
|
} catch {
|
|
1932
1957
|
}
|
|
1933
1958
|
}
|
|
@@ -1950,13 +1975,13 @@ class re {
|
|
|
1950
1975
|
}
|
|
1951
1976
|
}
|
|
1952
1977
|
}
|
|
1953
|
-
class
|
|
1978
|
+
class le {
|
|
1954
1979
|
constructor(i, e) {
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1980
|
+
l(this, "element");
|
|
1981
|
+
l(this, "textareaEl");
|
|
1982
|
+
l(this, "errorEl");
|
|
1983
|
+
l(this, "dropzoneEl");
|
|
1984
|
+
l(this, "fileInput");
|
|
1960
1985
|
this.parentEl = i, this.onApply = e, this.element = document.createElement("div"), this.element.className = "relly-modal-backdrop";
|
|
1961
1986
|
const t = document.createElement("div");
|
|
1962
1987
|
t.className = "relly-modal";
|
|
@@ -1979,12 +2004,12 @@ class ae {
|
|
|
1979
2004
|
}), this.dropzoneEl.addEventListener("drop", (c) => {
|
|
1980
2005
|
c.preventDefault(), this.dropzoneEl.classList.remove("relly-dropzone-drag"), c.dataTransfer && c.dataTransfer.files.length > 0 && this.readFile(c.dataTransfer.files[0]);
|
|
1981
2006
|
}), t.appendChild(this.dropzoneEl), t.appendChild(this.fileInput), this.textareaEl = document.createElement("textarea"), this.textareaEl.className = "relly-import-textarea", this.textareaEl.placeholder = "Paste JSON configuration here...", t.appendChild(this.textareaEl), this.errorEl = document.createElement("div"), this.errorEl.className = "relly-import-error", t.appendChild(this.errorEl);
|
|
1982
|
-
const
|
|
1983
|
-
|
|
2007
|
+
const a = document.createElement("div");
|
|
2008
|
+
a.className = "relly-modal-actions";
|
|
1984
2009
|
const o = document.createElement("button");
|
|
1985
2010
|
o.className = "relly-btn", o.textContent = "Cancel", o.style.flex = "1", o.addEventListener("click", () => this.hide());
|
|
1986
2011
|
const h = document.createElement("button");
|
|
1987
|
-
h.className = "relly-btn relly-btn-primary", h.textContent = "Apply & Load", h.style.flex = "2", h.addEventListener("click", () => this.apply()),
|
|
2012
|
+
h.className = "relly-btn relly-btn-primary", h.textContent = "Apply & Load", h.style.flex = "2", h.addEventListener("click", () => this.apply()), a.appendChild(o), a.appendChild(h), t.appendChild(a), this.element.appendChild(t), this.element.addEventListener("click", (c) => {
|
|
1988
2013
|
c.target === this.element && this.hide();
|
|
1989
2014
|
}), this.parentEl.appendChild(this.element);
|
|
1990
2015
|
}
|
|
@@ -2023,24 +2048,24 @@ class ae {
|
|
|
2023
2048
|
this.element.remove();
|
|
2024
2049
|
}
|
|
2025
2050
|
}
|
|
2026
|
-
class
|
|
2051
|
+
class ae {
|
|
2027
2052
|
static load(i, e) {
|
|
2028
2053
|
const t = e.target, n = (s, r) => {
|
|
2029
|
-
for (const
|
|
2030
|
-
const o =
|
|
2031
|
-
if (
|
|
2054
|
+
for (const a of r) {
|
|
2055
|
+
const o = a.children || a.controls;
|
|
2056
|
+
if (a.type === "section") {
|
|
2032
2057
|
const h = s.addSection(
|
|
2033
|
-
|
|
2034
|
-
|
|
2058
|
+
a.label || "Section",
|
|
2059
|
+
a.collapsed
|
|
2035
2060
|
);
|
|
2036
|
-
|
|
2037
|
-
} else if (
|
|
2061
|
+
a.showIf && h.showIf && h.showIf(a.showIf), o && Array.isArray(o) && n(h, o);
|
|
2062
|
+
} else if (a.type === "row") {
|
|
2038
2063
|
const h = s.addRow();
|
|
2039
2064
|
o && Array.isArray(o) && n(h, o);
|
|
2040
2065
|
} else {
|
|
2041
2066
|
const h = {
|
|
2042
|
-
...
|
|
2043
|
-
object:
|
|
2067
|
+
...a,
|
|
2068
|
+
object: a.object !== void 0 ? a.object : t
|
|
2044
2069
|
};
|
|
2045
2070
|
s.createComponent(h);
|
|
2046
2071
|
}
|
|
@@ -2051,7 +2076,7 @@ class le {
|
|
|
2051
2076
|
}
|
|
2052
2077
|
class oe {
|
|
2053
2078
|
constructor(i, e) {
|
|
2054
|
-
|
|
2079
|
+
l(this, "containerEl");
|
|
2055
2080
|
this.parentEl = i, this.soundEngine = e, this.containerEl = document.createElement("div"), this.containerEl.className = "relly-toast-container", this.parentEl.appendChild(this.containerEl);
|
|
2056
2081
|
}
|
|
2057
2082
|
notify(i, e = "info", t = 2600) {
|
|
@@ -2063,14 +2088,14 @@ class oe {
|
|
|
2063
2088
|
s.className = "relly-toast-icon", s.innerHTML = this.getIconSvg(e);
|
|
2064
2089
|
const r = document.createElement("span");
|
|
2065
2090
|
r.className = "relly-toast-msg", r.textContent = i;
|
|
2066
|
-
const
|
|
2067
|
-
|
|
2091
|
+
const a = document.createElement("button");
|
|
2092
|
+
a.className = "relly-toast-close", a.innerHTML = "✕", a.title = "Dismiss", n.appendChild(s), n.appendChild(r), n.appendChild(a);
|
|
2068
2093
|
const o = () => {
|
|
2069
2094
|
n.classList.contains("relly-toast-leave") || (n.classList.add("relly-toast-leave"), setTimeout(() => {
|
|
2070
2095
|
n.parentElement && n.parentElement.removeChild(n);
|
|
2071
2096
|
}, 200));
|
|
2072
2097
|
};
|
|
2073
|
-
return
|
|
2098
|
+
return a.addEventListener("click", (c) => {
|
|
2074
2099
|
c.stopPropagation(), o();
|
|
2075
2100
|
}), n.addEventListener("click", o), this.containerEl.appendChild(n), requestAnimationFrame(() => {
|
|
2076
2101
|
n.classList.add("relly-toast-enter");
|
|
@@ -2095,11 +2120,11 @@ class oe {
|
|
|
2095
2120
|
}
|
|
2096
2121
|
class he {
|
|
2097
2122
|
constructor(i, e) {
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2123
|
+
l(this, "menuEl");
|
|
2124
|
+
l(this, "currentComponent");
|
|
2125
|
+
l(this, "onDocClickBound");
|
|
2126
|
+
l(this, "onKeyDownBound");
|
|
2127
|
+
l(this, "onContextMenu", (i) => {
|
|
2103
2128
|
let e = i.target, t = e == null ? void 0 : e.closest(".relly-row, .relly-graph-row");
|
|
2104
2129
|
if (!t) return;
|
|
2105
2130
|
const n = t.__rellyComponent, s = n == null ? void 0 : n.getContextMenu();
|
|
@@ -2121,17 +2146,19 @@ class he {
|
|
|
2121
2146
|
}
|
|
2122
2147
|
const c = document.createElement("button");
|
|
2123
2148
|
c.type = "button", c.className = "relly-context-item", h.danger && c.classList.add("relly-context-item--danger"), h.disabled && (c.disabled = !0);
|
|
2124
|
-
let
|
|
2125
|
-
h.icon && (
|
|
2126
|
-
var
|
|
2127
|
-
p.stopPropagation(), (
|
|
2149
|
+
let m = "";
|
|
2150
|
+
h.icon && (m = `<span class="relly-context-icon">${h.icon}</span>`), c.innerHTML = `${m}<span class="relly-context-label">${h.label}</span>`, c.addEventListener("click", (p) => {
|
|
2151
|
+
var f;
|
|
2152
|
+
p.stopPropagation(), (f = this.soundEngine) == null || f.playClick();
|
|
2153
|
+
const d = this.currentComponent;
|
|
2154
|
+
this.hide(), h.action(d);
|
|
2128
2155
|
}), this.menuEl.appendChild(c);
|
|
2129
2156
|
}
|
|
2130
2157
|
this.menuEl.style.display = "flex";
|
|
2131
2158
|
const n = this.panelEl.getBoundingClientRect();
|
|
2132
2159
|
let s = e - n.left, r = t - n.top;
|
|
2133
|
-
const
|
|
2134
|
-
s +
|
|
2160
|
+
const a = 160, o = this.menuEl.offsetHeight || 120;
|
|
2161
|
+
s + a > n.width && (s = Math.max(4, n.width - a - 4)), r + o > n.height && (r = Math.max(4, n.height - o - 4)), this.menuEl.style.left = `${s}px`, this.menuEl.style.top = `${r}px`;
|
|
2135
2162
|
}
|
|
2136
2163
|
hide() {
|
|
2137
2164
|
this.menuEl.style.display = "none", this.currentComponent = void 0;
|
|
@@ -2145,8 +2172,8 @@ class ce extends T {
|
|
|
2145
2172
|
const r = document.createElement("div");
|
|
2146
2173
|
r.className = "relly-tab-content";
|
|
2147
2174
|
super(r, t, n, s);
|
|
2148
|
-
|
|
2149
|
-
|
|
2175
|
+
l(this, "contentEl");
|
|
2176
|
+
l(this, "buttonEl");
|
|
2150
2177
|
this.label = e, this.contentEl = r, this.buttonEl = document.createElement("button"), this.buttonEl.className = "relly-tab-btn", this.buttonEl.textContent = e;
|
|
2151
2178
|
}
|
|
2152
2179
|
getLabel() {
|
|
@@ -2161,10 +2188,10 @@ class ce extends T {
|
|
|
2161
2188
|
}
|
|
2162
2189
|
class de {
|
|
2163
2190
|
constructor(i, e, t, n, s) {
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2191
|
+
l(this, "barEl");
|
|
2192
|
+
l(this, "bodyEl");
|
|
2193
|
+
l(this, "tabs", []);
|
|
2194
|
+
l(this, "activeTab", null);
|
|
2168
2195
|
this.bindingEngine = t, this.presetManager = n, this.soundEngine = s, this.barEl = document.createElement("div"), this.barEl.className = "relly-tabs-bar", this.barEl.style.display = "none", this.bodyEl = e, i.insertAdjacentElement("afterend", this.barEl);
|
|
2169
2196
|
}
|
|
2170
2197
|
addTab(i) {
|
|
@@ -2183,6 +2210,9 @@ class de {
|
|
|
2183
2210
|
getActiveTab() {
|
|
2184
2211
|
return this.activeTab;
|
|
2185
2212
|
}
|
|
2213
|
+
getTabs() {
|
|
2214
|
+
return this.tabs;
|
|
2215
|
+
}
|
|
2186
2216
|
destroy() {
|
|
2187
2217
|
for (const i of this.tabs)
|
|
2188
2218
|
i.destroy();
|
|
@@ -2190,20 +2220,21 @@ class de {
|
|
|
2190
2220
|
}
|
|
2191
2221
|
}
|
|
2192
2222
|
const me = ':root{--relly-bg: #1c1d22;--relly-fg: #d1d5db;--relly-header-bg: #141518;--relly-header-fg: #f3f4f6;--relly-accent: #6366f1;--relly-accent-hover: #4f46e5;--relly-border: rgba(255, 255, 255, .08);--relly-input-bg: #26272e;--relly-input-hover: #2f3039;--relly-radius: 6px;--relly-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--relly-font-size: 11px;--relly-row-height: 26px;--relly-ease: cubic-bezier(.16, 1, .3, 1);--relly-transition: all .2s var(--relly-ease)}.relly-host{position:fixed;z-index:999999;pointer-events:none}.relly-panel{position:fixed;z-index:999999;background-color:var(--relly-bg);color:var(--relly-fg);border:1px solid var(--relly-border);border-radius:var(--relly-radius);box-shadow:0 10px 25px -5px #00000080,0 8px 10px -6px #0006;font-family:var(--relly-font);font-size:var(--relly-font-size);-webkit-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden!important;overflow-x:hidden!important;display:flex;flex-direction:column;pointer-events:auto;opacity:1;transform:scale(1) translateY(0);transition:opacity .22s var(--relly-ease),transform .22s var(--relly-ease);min-width:240px;min-height:120px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}.relly-panel.relly-mini-hud{width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;border-radius:9999px!important;box-shadow:0 4px 20px #0006,0 0 0 1px var(--relly-accent)}.relly-panel.relly-mini-hud .relly-header{border-bottom:none;padding:5px 12px;border-radius:9999px;background-color:var(--relly-bg)}.relly-panel.relly-mini-hud .relly-body,.relly-panel.relly-mini-hud .relly-search-bar,.relly-panel.relly-mini-hud .relly-tabs-bar,.relly-panel.relly-mini-hud .relly-resize-handle,.relly-panel.relly-mini-hud .relly-header-btn:not(.relly-minihud-btn){display:none!important}.relly-panel.relly-mini-hud .relly-header-title:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background-color:var(--relly-accent);box-shadow:0 0 6px var(--relly-accent);margin-right:6px;animation:relly-pulse 2s infinite ease-in-out}@keyframes relly-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.85)}}.relly-panel *{box-sizing:border-box}.relly-panel,.relly-panel *,.relly-body,.relly-tabs-bar,.relly-search-bar{scrollbar-width:none!important;-ms-overflow-style:none!important}.relly-panel *::-webkit-scrollbar,.relly-panel::-webkit-scrollbar,.relly-body::-webkit-scrollbar,.relly-tabs-bar::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.relly-panel.relly-hidden{opacity:0!important;transform:scale(.95) translateY(-6px)!important;pointer-events:none!important}.relly-header{display:flex;align-items:center;justify-content:space-between;background-color:var(--relly-header-bg);color:var(--relly-header-fg);padding:6px 10px;font-weight:600;border-bottom:1px solid var(--relly-border);cursor:grab;transition:background-color .2s var(--relly-ease);flex-shrink:0}.relly-header:active{cursor:grabbing}.relly-header-title{display:flex;align-items:center;gap:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.relly-header-title svg{width:14px;height:14px;color:var(--relly-accent);transition:transform .2s var(--relly-ease)}.relly-header-title:hover svg{transform:rotate(15deg)}.relly-header-actions{display:flex;align-items:center;gap:4px}.relly-header-btn{background:transparent;border:none;color:var(--relly-fg);opacity:.7;padding:2px 6px;border-radius:4px;cursor:pointer;font-family:inherit;font-size:11px;line-height:1;display:flex;align-items:center;justify-content:center;transition:opacity .15s,background-color .15s,transform .1s var(--relly-ease)}.relly-header-btn:hover{opacity:1;background-color:#ffffff1a;transform:scale(1.08)}.relly-header-btn:active{transform:scale(.92)}.relly-resize-handle{position:absolute;bottom:0;right:0;width:14px;height:14px;cursor:se-resize;display:flex;align-items:center;justify-content:center;opacity:.4;transition:opacity .15s var(--relly-ease);z-index:100}.relly-resize-handle svg{width:9px;height:9px;stroke:var(--relly-fg);stroke-width:1.5}.relly-resize-handle:hover{opacity:1}.relly-search-bar{display:flex;align-items:center;padding:4px 8px;background-color:#0003;border-bottom:1px solid var(--relly-border);gap:6px;flex-shrink:0}.relly-search-input{width:100%;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:3px 6px;outline:none;transition:border-color .15s var(--relly-ease),background-color .15s}.relly-search-input:focus{border-color:var(--relly-accent);background-color:var(--relly-input-hover)}.relly-search-clear{background:none;border:none;color:var(--relly-fg);cursor:pointer;opacity:.5;font-size:10px;padding:0 4px;transition:opacity .15s}.relly-search-clear:hover{opacity:1}.relly-tabs-bar{display:flex;background-color:var(--relly-header-bg);border-bottom:1px solid var(--relly-border);overflow-x:auto;overflow-y:hidden;flex-shrink:0;scrollbar-width:none!important;-ms-overflow-style:none!important}.relly-tabs-bar::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.relly-tab-btn{flex:1;background:transparent;border:none;border-bottom:2px solid transparent;color:var(--relly-fg);opacity:.6;padding:5px 8px;font-family:inherit;font-size:11px;cursor:pointer;white-space:nowrap;transition:all .2s var(--relly-ease)}.relly-tab-btn:hover{opacity:.9;background-color:#ffffff08}.relly-tab-btn.relly-tab-active{opacity:1;color:var(--relly-accent);border-bottom-color:var(--relly-accent)}.relly-tab-content{display:none}.relly-tab-content.relly-tab-content--active{display:flex;flex-direction:column}.relly-body{display:flex;flex-direction:column;overflow-y:auto!important;overflow-x:hidden!important;max-height:80vh;flex:1;transition:max-height .25s var(--relly-ease);scrollbar-width:none!important;-ms-overflow-style:none!important}.relly-body::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.relly-panel.relly-collapsed .relly-body{display:none}.relly-copy-toast{position:absolute;top:36px;right:10px;background:var(--relly-accent);color:#fff;padding:3px 8px;border-radius:4px;font-size:10px;font-weight:600;box-shadow:0 4px 12px #0000004d;pointer-events:none;opacity:0;transform:translateY(-6px);transition:opacity .2s var(--relly-ease),transform .2s var(--relly-ease);z-index:9999999}.relly-copy-toast.relly-toast-show{opacity:1;transform:translateY(0)}.relly-modal-backdrop{position:absolute;top:0;left:0;width:100%;height:100%;background:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999999;display:flex;align-items:center;justify-content:center;padding:12px;opacity:0;pointer-events:none;transition:opacity .2s var(--relly-ease)}.relly-modal-backdrop.relly-modal-show{opacity:1;pointer-events:auto}.relly-modal{width:100%;max-width:320px;background:var(--relly-bg);border:1px solid var(--relly-border);border-radius:var(--relly-radius);box-shadow:0 12px 30px #0009;padding:12px;display:flex;flex-direction:column;gap:8px;transform:scale(.95);transition:transform .2s var(--relly-ease)}.relly-modal-backdrop.relly-modal-show .relly-modal{transform:scale(1)}.relly-modal-header{display:flex;justify-content:space-between;align-items:center;font-weight:600;color:var(--relly-header-fg);font-size:12px}.relly-dropzone{border:1.5px dashed var(--relly-border);border-radius:4px;padding:12px;text-align:center;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--relly-fg);opacity:.8;font-size:11px;background:#00000026;transition:all .2s var(--relly-ease)}.relly-dropzone:hover,.relly-dropzone.relly-dropzone-drag{border-color:var(--relly-accent);opacity:1;background:#6366f114}.relly-import-textarea{width:100%;height:90px;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:monospace;font-size:10px;padding:6px;outline:none;resize:vertical}.relly-import-textarea:focus{border-color:var(--relly-accent)}.relly-import-error{color:#ef4444;font-size:10px;min-height:12px}.relly-modal-actions{display:flex;gap:6px}.relly-btn-primary{background:var(--relly-accent)!important;color:#fff!important;border-color:var(--relly-accent)!important}.relly-btn-primary:hover{background:var(--relly-accent-hover)!important}.relly-toast-container{position:absolute;top:36px;right:8px;display:flex;flex-direction:column;gap:6px;z-index:9999999;pointer-events:none;max-width:240px}.relly-toast{display:flex;align-items:center;gap:6px;padding:6px 8px;background:var(--relly-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-size:11px;box-shadow:0 4px 16px #00000073;pointer-events:auto;opacity:0;transform:translateY(-8px) scale(.96);transition:opacity .2s var(--relly-ease),transform .2s var(--relly-ease);cursor:pointer}.relly-toast.relly-toast-enter{opacity:1;transform:translateY(0) scale(1)}.relly-toast.relly-toast-leave{opacity:0;transform:translateY(-6px) scale(.95)}.relly-toast-icon svg{width:14px;height:14px;display:block}.relly-toast--success{border-left:3px solid #22c55e}.relly-toast--success .relly-toast-icon{color:#22c55e}.relly-toast--warning{border-left:3px solid #f59e0b}.relly-toast--warning .relly-toast-icon{color:#f59e0b}.relly-toast--error{border-left:3px solid #ef4444}.relly-toast--error .relly-toast-icon{color:#ef4444}.relly-toast--info{border-left:3px solid var(--relly-accent)}.relly-toast--info .relly-toast-icon{color:var(--relly-accent)}.relly-toast-msg{flex:1;line-height:1.3;overflow:hidden;text-overflow:ellipsis}.relly-toast-close{background:transparent;border:none;color:var(--relly-fg);opacity:.5;cursor:pointer;padding:0 2px;font-size:11px}.relly-toast-close:hover{opacity:1}.relly-context-menu{position:absolute;background:var(--relly-bg);border:1px solid var(--relly-border);border-radius:var(--relly-radius);box-shadow:0 8px 24px #0000008c;padding:4px;display:flex;flex-direction:column;min-width:140px;z-index:99999999;animation:relly-menu-in .15s var(--relly-ease)}@keyframes relly-menu-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.relly-context-item{display:flex;align-items:center;gap:6px;background:transparent;border:none;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:5px 8px;border-radius:3px;cursor:pointer;text-align:left;transition:background-color .12s var(--relly-ease),color .12s}.relly-context-item:hover:not(:disabled){background-color:var(--relly-accent);color:#fff}.relly-context-item:disabled{opacity:.4;cursor:not-allowed}.relly-context-item--danger:hover:not(:disabled){background-color:#ef4444!important;color:#fff!important}.relly-context-separator{height:1px;background-color:var(--relly-border);margin:3px 0}.relly-row{display:flex;align-items:center;justify-content:space-between;min-height:var(--relly-row-height);padding:3px 10px;border-bottom:1px solid var(--relly-border);position:relative;transition:background-color .15s var(--relly-ease),opacity .2s var(--relly-ease)}.relly-row:hover{background-color:#ffffff08}.relly-row.relly-search-hidden{display:none!important}.relly-row-label{flex:0 0 40%;max-width:40%;color:var(--relly-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--relly-font-size);cursor:default;position:relative}.relly-row-control{flex:1;display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0}.relly-multi-row{display:flex;align-items:stretch;width:100%;border-bottom:1px solid var(--relly-border)}.relly-multi-row .relly-row{flex:1;border-bottom:none;border-right:1px solid var(--relly-border);padding:3px 6px}.relly-multi-row .relly-row:last-child{border-right:none}.relly-multi-row .relly-row-label{flex:0 0 auto;max-width:none;margin-right:4px}.relly-tooltip{position:absolute;bottom:calc(100% + 4px);left:10px;background-color:#111216;color:#f3f4f6;padding:4px 8px;border-radius:4px;font-size:10px;line-height:1.3;white-space:nowrap;box-shadow:0 4px 12px #00000080;border:1px solid var(--relly-border);pointer-events:none;opacity:0;transform:translateY(4px);transition:opacity .18s var(--relly-ease),transform .18s var(--relly-ease);z-index:99999999}.relly-row:hover .relly-tooltip{opacity:1;transform:translateY(0)}.relly-checkbox-wrapper{display:flex;align-items:center;cursor:pointer;gap:6px}.relly-checkbox-box{width:16px;height:16px;border-radius:4px;background-color:var(--relly-input-bg);border:1px solid var(--relly-border);display:flex;align-items:center;justify-content:center;transition:background-color .18s var(--relly-ease),border-color .18s var(--relly-ease),transform .15s var(--relly-ease)}.relly-checkbox-wrapper:hover .relly-checkbox-box{border-color:var(--relly-accent);transform:scale(1.05)}.relly-checkbox-wrapper:active .relly-checkbox-box{transform:scale(.95)}.relly-checkbox-wrapper.relly-checked .relly-checkbox-box{background-color:var(--relly-accent);border-color:var(--relly-accent);animation:relly-pop .25s var(--relly-ease)}@keyframes relly-pop{0%{transform:scale(.85)}60%{transform:scale(1.15)}to{transform:scale(1)}}.relly-checkbox-icon{display:none;width:10px;height:10px;stroke:#fff;stroke-width:2.5;fill:none}.relly-checkbox-wrapper.relly-checked .relly-checkbox-icon{display:block}.relly-slider-container{display:flex;align-items:center;gap:8px;width:100%}.relly-slider-range{flex:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:4px;border-radius:2px;background:var(--relly-input-bg);outline:none;cursor:pointer;transition:background-color .15s var(--relly-ease)}.relly-slider-range::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:12px;height:12px;border-radius:50%;background:var(--relly-accent);cursor:pointer;box-shadow:0 1px 3px #0000004d;transition:transform .15s var(--relly-ease),background-color .15s}.relly-slider-range::-webkit-slider-thumb:hover{transform:scale(1.25);background:var(--relly-accent-hover)}.relly-slider-range::-webkit-slider-thumb:active{transform:scale(1.35)}.relly-slider-number{width:50px;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:2px 4px;text-align:right;outline:none;transition:border-color .15s var(--relly-ease),background-color .15s}.relly-slider-number:focus{border-color:var(--relly-accent);background:var(--relly-input-hover)}.relly-btn{width:100%;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;font-weight:500;padding:4px 10px;cursor:pointer;transition:background-color .15s var(--relly-ease),border-color .15s,color .15s,transform .1s var(--relly-ease);text-align:center}.relly-btn:hover{background-color:var(--relly-input-hover);border-color:var(--relly-accent);color:#fff;transform:translateY(-1px)}.relly-btn:active{transform:translateY(1px) scale(.98)}.relly-select-input{width:100%;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:3px 6px;outline:none;cursor:pointer;transition:border-color .15s var(--relly-ease),background-color .15s}.relly-select-input:focus{border-color:var(--relly-accent);background:var(--relly-input-hover)}.relly-dynamic-value{color:var(--relly-accent);font-weight:500;font-family:monospace;font-size:11px;background:#6366f11a;padding:2px 6px;border-radius:4px;border:1px solid rgba(99,102,241,.2);transition:all .2s var(--relly-ease)}.relly-color-wrapper{display:flex;align-items:center;gap:6px;width:100%;justify-content:flex-end}.relly-color-preview{width:20px;height:20px;border-radius:4px;border:1px solid var(--relly-border);cursor:pointer;box-shadow:inset 0 0 2px #0006;transition:transform .15s var(--relly-ease),border-color .15s}.relly-color-preview:hover{transform:scale(1.15);border-color:#fff}.relly-eyedropper-btn{background:transparent;border:none;color:var(--relly-fg);cursor:pointer;opacity:.7;padding:2px 4px;border-radius:4px;display:flex;align-items:center;justify-content:center;transition:opacity .15s var(--relly-ease),transform .1s var(--relly-ease)}.relly-eyedropper-btn svg{width:13px;height:13px}.relly-eyedropper-btn:hover{opacity:1;color:var(--relly-accent);transform:scale(1.15)}.relly-color-native{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.relly-color-text{font-family:monospace;font-size:11px;color:var(--relly-fg)}.relly-color-swatches{display:flex;align-items:center;gap:3px;flex-wrap:wrap;margin-right:4px}.relly-color-swatch{width:14px;height:14px;border-radius:3px;border:1px solid rgba(255,255,255,.2);cursor:pointer;padding:0;box-sizing:border-box;transition:transform .12s var(--relly-ease),border-color .12s;box-shadow:inset 0 0 2px #00000059}.relly-color-swatch:hover{transform:scale(1.25);border-color:#fff;z-index:2}.relly-color-swatch.relly-swatch-active{border:1.5px solid #fff;box-shadow:0 0 4px var(--relly-accent)}.relly-point2d-container{display:flex;align-items:center;gap:4px;width:100%}.relly-point2d-item{display:flex;align-items:center;gap:2px;flex:1}.relly-point2d-tag{font-size:10px;font-weight:600;color:var(--relly-accent);font-family:monospace}.relly-point2d-input{width:100%;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:2px 4px;text-align:right;outline:none;transition:border-color .15s var(--relly-ease)}.relly-point2d-input:focus{border-color:var(--relly-accent)}.relly-graph-row{display:flex;flex-direction:column;padding:6px 10px;border-bottom:1px solid var(--relly-border);gap:5px;transition:opacity .2s var(--relly-ease)}.relly-graph-row.relly-search-hidden{display:none!important}.relly-graph-header{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--relly-fg)}.relly-graph-label{font-weight:500;opacity:.85}.relly-graph-stats{display:flex;align-items:center;gap:5px;font-family:monospace;font-size:10px}.relly-graph-badge{opacity:.55;font-size:9px}.relly-graph-badge--paused{opacity:1!important;color:#f59e0b;background:#f59e0b2e;font-weight:700;border-radius:3px;padding:1px 4px;border:1px solid rgba(245,158,11,.4);letter-spacing:.5px}.relly-graph-val{color:var(--relly-accent);font-weight:600;background:#6366f11f;padding:1px 4px;border-radius:3px;border:1px solid rgba(99,102,241,.2)}.relly-graph-legend{display:none;align-items:center;gap:8px;font-size:9px;font-family:monospace;opacity:.75;margin-top:-2px}.relly-graph-legend-item{display:flex;align-items:center;gap:4px}.relly-graph-legend-dot{width:6px;height:6px;border-radius:50%;display:inline-block}.relly-graph-canvas-container{width:100%;height:90px;background:var(--relly-input-bg);border-radius:4px;border:1px solid var(--relly-border);overflow:hidden;position:relative;box-shadow:inset 0 2px 6px #00000040;cursor:crosshair;transition:border-color .2s ease,box-shadow .2s ease}.relly-graph-canvas-container.relly-graph-paused{border-color:#f59e0b;box-shadow:inset 0 2px 6px #00000040,0 0 10px #f59e0b40}.relly-graph-canvas{width:100%;height:100%;display:block}.relly-graph-tooltip{position:absolute;pointer-events:none;background:#0f172aeb;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);border:1px solid var(--relly-border);border-radius:4px;padding:3px 6px;font-size:9px;font-family:monospace;color:#fff;white-space:nowrap;z-index:10;transform:translate(-50%);opacity:0;transition:opacity .12s ease;box-shadow:0 4px 12px #00000080}.relly-graph-tooltip.relly-tooltip-show{opacity:1}.relly-section{display:flex;flex-direction:column;border-bottom:1px solid var(--relly-border);transition:opacity .2s var(--relly-ease)}.relly-section.relly-search-hidden{display:none!important}.relly-section-header{display:flex;align-items:center;justify-content:space-between;padding:5px 10px;background-color:#ffffff05;cursor:pointer;font-weight:600;color:var(--relly-header-fg);transition:background-color .15s var(--relly-ease)}.relly-section-header:hover{background-color:#ffffff0d}.relly-section-title-wrap{display:flex;align-items:center;gap:6px}.relly-section-arrow{width:12px;height:12px;transition:transform .22s var(--relly-ease);fill:currentColor}.relly-section.relly-section--collapsed .relly-section-arrow{transform:rotate(-90deg)}.relly-section-content{display:flex;flex-direction:column;padding-left:6px;border-left:2px solid var(--relly-accent);transition:opacity .2s var(--relly-ease)}.relly-section.relly-section--collapsed .relly-section-content{display:none}.relly-disabled,.relly-component-row.relly-disabled,.relly-section.relly-disabled{opacity:.42!important;pointer-events:none!important;-webkit-user-select:none!important;user-select:none!important;filter:grayscale(.5)}.relly-jog-scrubbing,.relly-jog-scrubbing *{cursor:ew-resize!important;-webkit-user-select:none!important;user-select:none!important}.relly-mini-sparkline{width:48px;height:16px;display:inline-block;vertical-align:middle;margin-left:6px;border-radius:3px;background:#00000040}.relly-point3d-container{display:flex;align-items:center;gap:4px;width:100%}.relly-point3d-item{display:flex;align-items:center;gap:2px;flex:1;min-width:0}.relly-point3d-tag{font-size:9px;font-weight:700;line-height:1;padding:2px 4px;border-radius:3px;text-transform:uppercase}.relly-point3d-tag--x{background-color:#ef444433;color:#ef4444;border:1px solid rgba(239,68,68,.4)}.relly-point3d-tag--y{background-color:#22c55e33;color:#22c55e;border:1px solid rgba(34,197,94,.4)}.relly-point3d-tag--z{background-color:#3b82f633;color:#3b82f6;border:1px solid rgba(59,130,246,.4)}.relly-point3d-input{width:100%;min-width:24px;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:3px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:2px 4px;text-align:right;cursor:ew-resize}.relly-range-wrapper{display:flex;align-items:center;gap:6px;width:100%}.relly-range-track{flex:1;height:6px;background:var(--relly-input-bg);border-radius:9999px;position:relative;cursor:pointer;box-shadow:inset 0 1px 2px #0000004d}.relly-range-bar{position:absolute;top:0;bottom:0;background:var(--relly-accent);border-radius:9999px;cursor:grab;transition:background-color .15s}.relly-range-bar:active{cursor:grabbing;background:var(--relly-accent-hover)}.relly-range-thumb{position:absolute;top:50%;width:12px;height:12px;border-radius:50%;background:#fff;border:2px solid var(--relly-accent);transform:translate(-50%,-50%);cursor:grab;z-index:2;transition:transform .1s var(--relly-ease),box-shadow .15s;box-shadow:0 1px 4px #0006}.relly-range-thumb:hover{transform:translate(-50%,-50%) scale(1.2);box-shadow:0 0 6px var(--relly-accent)}.relly-range-thumb:active{cursor:grabbing;transform:translate(-50%,-50%) scale(1.25)}.relly-range-input{width:38px;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:3px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:2px 4px;text-align:right}.relly-segmented-container{display:flex;position:relative;background:var(--relly-input-bg);border-radius:4px;border:1px solid var(--relly-border);padding:2px;width:100%;overflow:hidden}.relly-segmented-glider{position:absolute;top:2px;bottom:2px;background:var(--relly-accent);border-radius:3px;box-shadow:0 1px 4px #00000059;transition:transform .2s var(--relly-ease),width .2s var(--relly-ease),opacity .15s;pointer-events:none;z-index:1}.relly-segmented-btn{flex:1;position:relative;background:transparent;border:none;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:3px 6px;cursor:pointer;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;z-index:2;transition:color .15s var(--relly-ease)}.relly-segmented-btn:hover{color:#fff}.relly-segmented-btn.relly-segmented-btn--active{color:#fff;font-weight:600}.relly-status-wrapper{display:flex;align-items:center;gap:8px;width:100%;justify-content:flex-end}.relly-status-led{position:relative;width:8px;height:8px;display:flex;align-items:center;justify-content:center}.relly-status-led-core{width:7px;height:7px;border-radius:50%;background-color:#22c55e;position:relative;z-index:2}.relly-status-pulse-ring{position:absolute;width:100%;height:100%;border-radius:50%;background-color:inherit;opacity:.75;animation:relly-status-pulse 2s cubic-bezier(.24,0,.38,1) infinite;z-index:1}@keyframes relly-status-pulse{0%{transform:scale(.95);opacity:.8}70%{transform:scale(2.4);opacity:0}to{transform:scale(2.4);opacity:0}}.relly-status-led--online .relly-status-led-core,.relly-status-led--online .relly-status-pulse-ring{background-color:#22c55e}.relly-status-led--busy .relly-status-led-core,.relly-status-led--busy .relly-status-pulse-ring{background-color:#f59e0b}.relly-status-led--offline .relly-status-led-core,.relly-status-led--offline .relly-status-pulse-ring{background-color:#ef4444}.relly-status-led--info .relly-status-led-core,.relly-status-led--info .relly-status-pulse-ring{background-color:#3b82f6}.relly-status-led--ready .relly-status-led-core,.relly-status-led--ready .relly-status-pulse-ring{background-color:#a855f7}.relly-status-badge{font-size:10px;font-weight:700;padding:1px 6px;border-radius:9999px;text-transform:uppercase;letter-spacing:.04em;background:#ffffff14}.relly-status-badge--online{color:#22c55e;background:#22c55e26}.relly-status-badge--busy{color:#f59e0b;background:#f59e0b26}.relly-status-badge--offline{color:#ef4444;background:#ef444426}.relly-status-badge--info{color:#3b82f6;background:#3b82f626}.relly-status-badge--ready{color:#a855f7;background:#a855f726}.relly-status-detail{font-size:10px;color:var(--relly-fg);opacity:.7;font-family:monospace}', I = "relly-ui-stylesheet";
|
|
2193
|
-
function
|
|
2223
|
+
function K(y) {
|
|
2194
2224
|
const i = y || (typeof document < "u" ? document : null);
|
|
2195
2225
|
if (!i || "getElementById" in i && i.getElementById(I) || "querySelector" in i && i.querySelector(`#${I}`)) return;
|
|
2196
2226
|
const e = document.createElement("style");
|
|
2197
2227
|
e.id = I, e.textContent = me, "head" in i && i.head ? i.head.appendChild(e) : i.appendChild(e);
|
|
2198
2228
|
}
|
|
2199
2229
|
const S = class S extends T {
|
|
2230
|
+
// Calm, readable telemetry rate (~5.5 samples per sec)
|
|
2200
2231
|
constructor(e = {}) {
|
|
2201
|
-
const t = e.shadowDOM !== !1, n = new
|
|
2202
|
-
|
|
2232
|
+
const t = e.shadowDOM !== !1, n = new W(), s = new X(), r = new re(e.sound !== !1, e.soundPack || "synth"), a = document.createElement("div");
|
|
2233
|
+
a.className = "relly-panel";
|
|
2203
2234
|
const o = e.width ?? 280;
|
|
2204
|
-
if (
|
|
2205
|
-
const
|
|
2206
|
-
|
|
2235
|
+
if (a.style.width = typeof o == "number" ? `${o}px` : o, e.height) {
|
|
2236
|
+
const b = e.height;
|
|
2237
|
+
a.style.height = typeof b == "number" ? `${b}px` : b;
|
|
2207
2238
|
}
|
|
2208
2239
|
const h = document.createElement("div");
|
|
2209
2240
|
h.className = "relly-header";
|
|
@@ -2215,8 +2246,8 @@ const S = class S extends T {
|
|
|
2215
2246
|
<line x1="9" y1="21" x2="9" y2="9"></line>
|
|
2216
2247
|
</svg>
|
|
2217
2248
|
`;
|
|
2218
|
-
const
|
|
2219
|
-
|
|
2249
|
+
const m = document.createElement("span");
|
|
2250
|
+
m.textContent = e.title || "RellyUI", c.appendChild(m);
|
|
2220
2251
|
const p = document.createElement("div");
|
|
2221
2252
|
p.className = "relly-header-actions";
|
|
2222
2253
|
const d = document.createElement("button");
|
|
@@ -2226,69 +2257,71 @@ const S = class S extends T {
|
|
|
2226
2257
|
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
|
|
2227
2258
|
</svg>
|
|
2228
2259
|
`, p.appendChild(d);
|
|
2229
|
-
const
|
|
2230
|
-
|
|
2260
|
+
const f = document.createElement("button");
|
|
2261
|
+
f.className = "relly-header-btn", f.title = "Import settings from JSON", f.innerHTML = `
|
|
2231
2262
|
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
2232
2263
|
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
|
|
2233
2264
|
<polyline points="7 10 12 15 17 10"></polyline>
|
|
2234
2265
|
<line x1="12" y1="15" x2="12" y2="3"></line>
|
|
2235
2266
|
</svg>
|
|
2236
|
-
`, p.appendChild(
|
|
2237
|
-
const
|
|
2238
|
-
|
|
2239
|
-
const
|
|
2240
|
-
|
|
2267
|
+
`, p.appendChild(f);
|
|
2268
|
+
const x = document.createElement("button");
|
|
2269
|
+
x.className = "relly-header-btn relly-minihud-btn", x.title = "Toggle Mini-HUD pill (or double-click header)", x.textContent = "⤢", p.appendChild(x);
|
|
2270
|
+
const u = document.createElement("button");
|
|
2271
|
+
u.className = "relly-header-btn", u.title = "Collapse/Expand", u.textContent = "_", p.appendChild(u), h.appendChild(c), h.appendChild(p), a.appendChild(h);
|
|
2241
2272
|
const v = document.createElement("div");
|
|
2242
|
-
v.className = "relly-copy-toast", v.textContent = "JSON Copied!",
|
|
2273
|
+
v.className = "relly-copy-toast", v.textContent = "JSON Copied!", a.appendChild(v);
|
|
2243
2274
|
const E = document.createElement("div");
|
|
2244
|
-
E.className = "relly-body", e.height && (E.style.maxHeight = "none", E.style.flex = "1"),
|
|
2275
|
+
E.className = "relly-body", e.height && (E.style.maxHeight = "none", E.style.flex = "1"), a.appendChild(E);
|
|
2245
2276
|
super(E, n, s, r);
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
+
l(this, "hostEl");
|
|
2278
|
+
l(this, "shadowRoot", null);
|
|
2279
|
+
l(this, "panelEl");
|
|
2280
|
+
l(this, "headerEl");
|
|
2281
|
+
l(this, "titleEl");
|
|
2282
|
+
l(this, "collapseBtn");
|
|
2283
|
+
l(this, "copyToastEl");
|
|
2284
|
+
l(this, "themeManager");
|
|
2285
|
+
l(this, "soundEngine");
|
|
2286
|
+
l(this, "draggableInstance");
|
|
2287
|
+
l(this, "resizableInstance");
|
|
2288
|
+
l(this, "hotkeyInstance");
|
|
2289
|
+
l(this, "searchBarInstance");
|
|
2290
|
+
l(this, "tabsManagerInstance");
|
|
2291
|
+
l(this, "importModalInstance");
|
|
2292
|
+
l(this, "toastManager");
|
|
2293
|
+
l(this, "contextMenuManager");
|
|
2294
|
+
l(this, "isPanelCollapsed", !1);
|
|
2295
|
+
l(this, "isPanelHidden", !1);
|
|
2296
|
+
l(this, "isMiniHud", !1);
|
|
2297
|
+
l(this, "ghostOnIdle", !1);
|
|
2298
|
+
l(this, "idleOpacity", 0.38);
|
|
2299
|
+
l(this, "onResizeBound");
|
|
2300
|
+
l(this, "autoSave", !1);
|
|
2301
|
+
l(this, "autoSaveKey", "relly-ui-session");
|
|
2302
|
+
l(this, "autoSaveTimeout", null);
|
|
2303
|
+
l(this, "sparklineCtx");
|
|
2304
|
+
l(this, "sparklineData", [16, 17, 18, 17, 19, 20, 21, 20, 22, 23, 22, 24, 25, 24, 25, 26]);
|
|
2305
|
+
l(this, "sparklineAnimId");
|
|
2306
|
+
l(this, "lastSparklineTime", 0);
|
|
2307
|
+
l(this, "sparklineInterval", 180);
|
|
2308
|
+
this.panelEl = a, this.headerEl = h, this.titleEl = m, this.collapseBtn = u, this.copyToastEl = v, this.soundEngine = r, this.onResizeBound = () => this.clampToViewport(), e.searchBar && (this.searchBarInstance = new se(E, e.searchOptions), h.insertAdjacentElement("afterend", this.searchBarInstance.element)), this.themeManager = new te(this.panelEl, e.theme), this.mount(e, t), e.autoInjectStyles !== !1 && (this.shadowRoot ? K(this.shadowRoot) : K()), e.draggable !== !1 && (this.draggableInstance = new ie(this.headerEl, this.panelEl, this.soundEngine)), e.resizable !== !1 && (this.resizableInstance = new ne(this.panelEl)), this.toastManager = new oe(this.panelEl, this.soundEngine), this.contextMenuManager = new he(this.panelEl, this.soundEngine), this.importModalInstance = new le(this.panelEl, (b) => {
|
|
2309
|
+
this.importJSON(b);
|
|
2277
2310
|
});
|
|
2278
|
-
const
|
|
2279
|
-
|
|
2311
|
+
const g = e.hotkey === void 0 ? "KeyH" : e.hotkey;
|
|
2312
|
+
g && (this.hotkeyInstance = new $(g, () => {
|
|
2280
2313
|
this.toggle();
|
|
2281
|
-
})),
|
|
2282
|
-
|
|
2283
|
-
}), this.headerEl.addEventListener("dblclick", (
|
|
2284
|
-
|
|
2285
|
-
}), this.collapseBtn.addEventListener("click", (
|
|
2286
|
-
|
|
2287
|
-
}), d.addEventListener("click", (
|
|
2288
|
-
|
|
2289
|
-
}),
|
|
2314
|
+
})), x.addEventListener("click", (b) => {
|
|
2315
|
+
b.stopPropagation(), this.toggleMiniHud();
|
|
2316
|
+
}), this.headerEl.addEventListener("dblclick", (b) => {
|
|
2317
|
+
b.target.closest(".relly-header-btn") || this.toggleMiniHud();
|
|
2318
|
+
}), this.collapseBtn.addEventListener("click", (b) => {
|
|
2319
|
+
b.stopPropagation(), this.soundEngine.playClick(), this.toggleCollapse();
|
|
2320
|
+
}), d.addEventListener("click", (b) => {
|
|
2321
|
+
b.stopPropagation(), this.soundEngine.playClick(), this.copyJSON();
|
|
2322
|
+
}), f.addEventListener("click", (b) => {
|
|
2290
2323
|
var w;
|
|
2291
|
-
|
|
2324
|
+
b.stopPropagation(), this.soundEngine.playClick(), (w = this.importModalInstance) == null || w.show();
|
|
2292
2325
|
}), e.soundVolume !== void 0 && this.soundEngine.setVolume(e.soundVolume), e.accordion && this.setAccordion(!0), e.ghostOnIdle && this.setGhostMode(!0, e.idleOpacity), this.initSparkline(c), this.panelEl.addEventListener("mouseenter", () => {
|
|
2293
2326
|
this.ghostOnIdle && (this.panelEl.style.opacity = "1");
|
|
2294
2327
|
}), this.panelEl.addEventListener("mouseleave", () => {
|
|
@@ -2355,7 +2388,7 @@ const S = class S extends T {
|
|
|
2355
2388
|
return this;
|
|
2356
2389
|
}
|
|
2357
2390
|
loadSchema(e) {
|
|
2358
|
-
return e.title && this.setTitle(e.title),
|
|
2391
|
+
return e.title && this.setTitle(e.title), ae.load(this, e), this;
|
|
2359
2392
|
}
|
|
2360
2393
|
setTitle(e) {
|
|
2361
2394
|
return this.titleEl.textContent = e, this;
|
|
@@ -2396,30 +2429,51 @@ const S = class S extends T {
|
|
|
2396
2429
|
initSparkline(e) {
|
|
2397
2430
|
const t = document.createElement("canvas");
|
|
2398
2431
|
t.className = "relly-mini-sparkline", t.width = 48, t.height = 16, e.appendChild(t), this.sparklineCtx = t.getContext("2d");
|
|
2399
|
-
const n = () => {
|
|
2400
|
-
this.isMiniHud && this.sparklineCtx && this.drawSparkline(), typeof requestAnimationFrame < "u" && (this.sparklineAnimId = requestAnimationFrame(n));
|
|
2432
|
+
const n = (s) => {
|
|
2433
|
+
this.isMiniHud && this.sparklineCtx && (!this.lastSparklineTime || s - this.lastSparklineTime >= this.sparklineInterval) && (this.lastSparklineTime = s, this.updateSparklinePoint(), this.drawSparkline()), typeof requestAnimationFrame < "u" && (this.sparklineAnimId = requestAnimationFrame(n));
|
|
2401
2434
|
};
|
|
2402
2435
|
typeof requestAnimationFrame < "u" && (this.sparklineAnimId = requestAnimationFrame(n));
|
|
2403
2436
|
}
|
|
2437
|
+
findActiveGraphValue() {
|
|
2438
|
+
for (const e of this.children)
|
|
2439
|
+
if (typeof e.getLatestValue == "function")
|
|
2440
|
+
return e.getLatestValue();
|
|
2441
|
+
if (this.tabsManagerInstance) {
|
|
2442
|
+
for (const e of this.tabsManagerInstance.getTabs())
|
|
2443
|
+
for (const t of e.children || [])
|
|
2444
|
+
if (typeof t.getLatestValue == "function")
|
|
2445
|
+
return t.getLatestValue();
|
|
2446
|
+
}
|
|
2447
|
+
return null;
|
|
2448
|
+
}
|
|
2449
|
+
updateSparklinePoint() {
|
|
2450
|
+
let e;
|
|
2451
|
+
const t = this.findActiveGraphValue();
|
|
2452
|
+
if (t !== null && !isNaN(t) && isFinite(t))
|
|
2453
|
+
e = t;
|
|
2454
|
+
else {
|
|
2455
|
+
const n = this.sparklineData[this.sparklineData.length - 1] ?? 20;
|
|
2456
|
+
e = Math.max(8, Math.min(28, n + (Math.random() - 0.49) * 2.2));
|
|
2457
|
+
}
|
|
2458
|
+
this.sparklineData.push(e), this.sparklineData.length > 20 && this.sparklineData.shift();
|
|
2459
|
+
}
|
|
2404
2460
|
drawSparkline() {
|
|
2405
2461
|
const e = this.sparklineCtx;
|
|
2406
2462
|
if (!e) return;
|
|
2407
2463
|
const t = 48, n = 16;
|
|
2408
|
-
e.clearRect(0, 0, t, n);
|
|
2409
|
-
const s =
|
|
2410
|
-
this.sparklineData.push(r), this.sparklineData.length > 14 && this.sparklineData.shift();
|
|
2411
|
-
const l = Math.min(...this.sparklineData) - 1, h = Math.max(...this.sparklineData) + 1 - l || 1, c = t / (this.sparklineData.length - 1);
|
|
2464
|
+
if (e.clearRect(0, 0, t, n), this.sparklineData.length < 2) return;
|
|
2465
|
+
const s = Math.min(...this.sparklineData) - 1, a = Math.max(...this.sparklineData) + 1 - s || 1, o = t / (this.sparklineData.length - 1);
|
|
2412
2466
|
e.beginPath(), e.moveTo(0, n);
|
|
2413
|
-
for (let
|
|
2414
|
-
const
|
|
2415
|
-
e.lineTo(
|
|
2467
|
+
for (let h = 0; h < this.sparklineData.length; h++) {
|
|
2468
|
+
const c = h * o, m = n - (this.sparklineData[h] - s) / a * (n - 3) - 1.5;
|
|
2469
|
+
e.lineTo(c, m);
|
|
2416
2470
|
}
|
|
2417
|
-
e.lineTo(t, n), e.closePath(), e.fillStyle = "rgba(56, 189, 248, 0.
|
|
2418
|
-
for (let
|
|
2419
|
-
const
|
|
2420
|
-
|
|
2471
|
+
e.lineTo(t, n), e.closePath(), e.fillStyle = "rgba(56, 189, 248, 0.2)", e.fill(), e.beginPath();
|
|
2472
|
+
for (let h = 0; h < this.sparklineData.length; h++) {
|
|
2473
|
+
const c = h * o, m = n - (this.sparklineData[h] - s) / a * (n - 3) - 1.5;
|
|
2474
|
+
h === 0 ? e.moveTo(c, m) : e.lineTo(c, m);
|
|
2421
2475
|
}
|
|
2422
|
-
e.strokeStyle = "#38bdf8", e.lineWidth = 1.
|
|
2476
|
+
e.strokeStyle = "#38bdf8", e.lineWidth = 1.3, e.stroke();
|
|
2423
2477
|
}
|
|
2424
2478
|
clampToViewport() {
|
|
2425
2479
|
var e, t;
|
|
@@ -2428,6 +2482,9 @@ const S = class S extends T {
|
|
|
2428
2482
|
toggleCollapse() {
|
|
2429
2483
|
return this.setCollapsed(!this.isPanelCollapsed);
|
|
2430
2484
|
}
|
|
2485
|
+
setHotkey(e) {
|
|
2486
|
+
return this.hotkeyInstance ? this.hotkeyInstance.setHotkey(e) : this.hotkeyInstance = new $(e, () => this.toggle()), this;
|
|
2487
|
+
}
|
|
2431
2488
|
setCollapsed(e) {
|
|
2432
2489
|
return this.isPanelCollapsed = e, this.isPanelCollapsed ? (this.panelEl.classList.add("relly-collapsed"), this.collapseBtn.textContent = "+", this.bindingEngine.pause()) : (this.panelEl.classList.remove("relly-collapsed"), this.collapseBtn.textContent = "_", this.bindingEngine.resume()), this.autoSave && this.queueAutoSave(), this;
|
|
2433
2490
|
}
|
|
@@ -2518,7 +2575,7 @@ const S = class S extends T {
|
|
|
2518
2575
|
typeof window < "u" && (window.removeEventListener("resize", this.onResizeBound), this.sparklineAnimId && cancelAnimationFrame(this.sparklineAnimId)), this.draggableInstance && this.draggableInstance.destroy(), this.resizableInstance && this.resizableInstance.destroy(), this.hotkeyInstance && this.hotkeyInstance.destroy(), this.searchBarInstance && this.searchBarInstance.destroy(), this.tabsManagerInstance && this.tabsManagerInstance.destroy(), this.importModalInstance && this.importModalInstance.destroy(), this.toastManager.destroy(), this.contextMenuManager.destroy(), this.bindingEngine.destroy(), this.destroyChildren(), this.hostEl ? this.hostEl.remove() : this.panelEl.remove();
|
|
2519
2576
|
}
|
|
2520
2577
|
};
|
|
2521
|
-
|
|
2578
|
+
l(S, "version", "1.0.2");
|
|
2522
2579
|
let k = S;
|
|
2523
2580
|
Object.assign(k, {
|
|
2524
2581
|
Checkbox: L,
|
|
@@ -2534,62 +2591,62 @@ Object.assign(k, {
|
|
|
2534
2591
|
Segmented: j,
|
|
2535
2592
|
StatusIndicator: F,
|
|
2536
2593
|
Section: q,
|
|
2537
|
-
Row:
|
|
2594
|
+
Row: G,
|
|
2538
2595
|
Tab: ce,
|
|
2539
2596
|
TabsManager: de,
|
|
2540
2597
|
BaseComponent: C,
|
|
2541
|
-
BindingEngine:
|
|
2542
|
-
PresetManager:
|
|
2543
|
-
ThemeManager:
|
|
2598
|
+
BindingEngine: W,
|
|
2599
|
+
PresetManager: X,
|
|
2600
|
+
ThemeManager: te,
|
|
2544
2601
|
DARK_THEME: U,
|
|
2545
|
-
LIGHT_THEME:
|
|
2546
|
-
CYBERPUNK_THEME:
|
|
2547
|
-
NORD_THEME:
|
|
2548
|
-
DRACULA_THEME:
|
|
2549
|
-
TOKYO_NIGHT_THEME:
|
|
2550
|
-
MATRIX_THEME:
|
|
2551
|
-
SYNTHWAVE_THEME:
|
|
2552
|
-
Draggable:
|
|
2553
|
-
Resizable:
|
|
2554
|
-
HotkeyManager:
|
|
2602
|
+
LIGHT_THEME: J,
|
|
2603
|
+
CYBERPUNK_THEME: Y,
|
|
2604
|
+
NORD_THEME: _,
|
|
2605
|
+
DRACULA_THEME: Q,
|
|
2606
|
+
TOKYO_NIGHT_THEME: Z,
|
|
2607
|
+
MATRIX_THEME: O,
|
|
2608
|
+
SYNTHWAVE_THEME: ee,
|
|
2609
|
+
Draggable: ie,
|
|
2610
|
+
Resizable: ne,
|
|
2611
|
+
HotkeyManager: $,
|
|
2555
2612
|
SearchBar: se,
|
|
2556
2613
|
SoundEngine: re,
|
|
2557
|
-
ImportModal:
|
|
2614
|
+
ImportModal: le,
|
|
2558
2615
|
ToastManager: oe,
|
|
2559
2616
|
ContextMenuManager: he,
|
|
2560
|
-
SchemaLoader:
|
|
2617
|
+
SchemaLoader: ae,
|
|
2561
2618
|
ContainerHelper: T,
|
|
2562
2619
|
RellyUI: k
|
|
2563
2620
|
});
|
|
2564
2621
|
typeof window < "u" && (window.RellyUI = k);
|
|
2565
2622
|
export {
|
|
2566
2623
|
C as BaseComponent,
|
|
2567
|
-
|
|
2624
|
+
W as BindingEngine,
|
|
2568
2625
|
A as Button,
|
|
2569
|
-
|
|
2626
|
+
Y as CYBERPUNK_THEME,
|
|
2570
2627
|
L as Checkbox,
|
|
2571
2628
|
R as ColorPicker,
|
|
2572
2629
|
T as ContainerHelper,
|
|
2573
2630
|
he as ContextMenuManager,
|
|
2574
2631
|
U as DARK_THEME,
|
|
2575
|
-
|
|
2576
|
-
|
|
2632
|
+
Q as DRACULA_THEME,
|
|
2633
|
+
ie as Draggable,
|
|
2577
2634
|
B as DynamicLabel,
|
|
2578
2635
|
N as Graph,
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2636
|
+
$ as HotkeyManager,
|
|
2637
|
+
le as ImportModal,
|
|
2638
|
+
J as LIGHT_THEME,
|
|
2639
|
+
O as MATRIX_THEME,
|
|
2640
|
+
_ as NORD_THEME,
|
|
2584
2641
|
P as Point2D,
|
|
2585
2642
|
D as Point3D,
|
|
2586
|
-
|
|
2643
|
+
X as PresetManager,
|
|
2587
2644
|
H as RangeSlider,
|
|
2588
2645
|
k as RellyUI,
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2646
|
+
ne as Resizable,
|
|
2647
|
+
G as Row,
|
|
2648
|
+
ee as SYNTHWAVE_THEME,
|
|
2649
|
+
ae as SchemaLoader,
|
|
2593
2650
|
se as SearchBar,
|
|
2594
2651
|
q as Section,
|
|
2595
2652
|
j as Segmented,
|
|
@@ -2597,10 +2654,10 @@ export {
|
|
|
2597
2654
|
V as Slider,
|
|
2598
2655
|
re as SoundEngine,
|
|
2599
2656
|
F as StatusIndicator,
|
|
2600
|
-
|
|
2657
|
+
Z as TOKYO_NIGHT_THEME,
|
|
2601
2658
|
ce as Tab,
|
|
2602
2659
|
de as TabsManager,
|
|
2603
|
-
|
|
2660
|
+
te as ThemeManager,
|
|
2604
2661
|
oe as ToastManager,
|
|
2605
2662
|
k as default
|
|
2606
2663
|
};
|