@tresjs/leches 0.14.0 → 0.15.0-next.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/components/Graph.vue.d.ts +21 -0
- package/dist/components/TresPerf.vue.d.ts +2 -0
- package/dist/components/performance-monitor/Pane.vue.d.ts +22 -0
- package/dist/components/performance-monitor/Tree.vue.d.ts +42 -0
- package/dist/components/performance-monitor/index.vue.d.ts +21 -0
- package/dist/composables/usePerf.d.ts +37 -0
- package/dist/index.d.ts +3 -1
- package/dist/style.css +2 -2
- package/dist/tresleches.js +740 -441
- package/dist/tresleches.umd.cjs +2 -2
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/perf.d.ts +6 -0
- package/package.json +9 -3
package/dist/tresleches.js
CHANGED
|
@@ -1,100 +1,101 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/leches
|
|
3
|
-
* version: v0.
|
|
3
|
+
* version: v0.15.0-next.2
|
|
4
4
|
* (c) 2023
|
|
5
5
|
* description: Tasty GUI for Vue controls 🍰
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
7
7
|
*/
|
|
8
|
-
import { unref as
|
|
9
|
-
import { useWindowSize as
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
import { unref as k, isRef as H, toRefs as q, customRef as $t, ref as b, watch as N, computed as P, defineComponent as w, reactive as V, h as kt, provide as pt, isReactive as Mt, onUnmounted as Ct, openBlock as d, createElementBlock as v, normalizeClass as C, Fragment as K, createTextVNode as J, toDisplayString as M, createVNode as F, createElementVNode as i, withDirectives as Q, vShow as Z, normalizeStyle as Et, renderList as B, createCommentVNode as W, watchEffect as Tt, createBlock as I, Transition as ft, withCtx as R, renderSlot as mt } from "vue";
|
|
9
|
+
import { useWindowSize as vt, useEventListener as tt, useStorage as St, isClient as It, useFps as Ft, useMemory as At, useRafFn as bt, useMouse as st, useMousePressed as Dt, useKeyModifier as ut } from "@vueuse/core";
|
|
10
|
+
import { useTresContext as Kt } from "@tresjs/core";
|
|
11
|
+
function O(e) {
|
|
12
|
+
return typeof e == "function" ? e() : k(e);
|
|
12
13
|
}
|
|
13
|
-
const
|
|
14
|
+
const gt = typeof window < "u" && typeof document < "u";
|
|
14
15
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
15
|
-
function
|
|
16
|
-
if (!
|
|
17
|
-
return
|
|
16
|
+
function Pt(e, n = {}) {
|
|
17
|
+
if (!H(e))
|
|
18
|
+
return q(e);
|
|
18
19
|
const l = Array.isArray(e.value) ? Array.from({ length: e.value.length }) : {};
|
|
19
|
-
for (const
|
|
20
|
-
l[
|
|
20
|
+
for (const o in e.value)
|
|
21
|
+
l[o] = $t(() => ({
|
|
21
22
|
get() {
|
|
22
|
-
return e.value[
|
|
23
|
+
return e.value[o];
|
|
23
24
|
},
|
|
24
25
|
set(t) {
|
|
25
|
-
var
|
|
26
|
-
if ((
|
|
26
|
+
var c;
|
|
27
|
+
if ((c = O(n.replaceRef)) != null ? c : !0)
|
|
27
28
|
if (Array.isArray(e.value)) {
|
|
28
|
-
const
|
|
29
|
-
|
|
29
|
+
const s = [...e.value];
|
|
30
|
+
s[o] = t, e.value = s;
|
|
30
31
|
} else {
|
|
31
|
-
const
|
|
32
|
-
Object.setPrototypeOf(
|
|
32
|
+
const s = { ...e.value, [o]: t };
|
|
33
|
+
Object.setPrototypeOf(s, Object.getPrototypeOf(e.value)), e.value = s;
|
|
33
34
|
}
|
|
34
35
|
else
|
|
35
|
-
e.value[
|
|
36
|
+
e.value[o] = t;
|
|
36
37
|
}
|
|
37
38
|
}));
|
|
38
39
|
return l;
|
|
39
40
|
}
|
|
40
|
-
const
|
|
41
|
-
function
|
|
41
|
+
const Vt = gt ? window : void 0;
|
|
42
|
+
function Ut(e, n = {}) {
|
|
42
43
|
const {
|
|
43
44
|
pointerTypes: l,
|
|
44
|
-
preventDefault:
|
|
45
|
+
preventDefault: o,
|
|
45
46
|
stopPropagation: t,
|
|
46
|
-
exact:
|
|
47
|
-
onMove:
|
|
48
|
-
onEnd:
|
|
49
|
-
onStart:
|
|
50
|
-
initialValue:
|
|
51
|
-
axis:
|
|
52
|
-
draggingElement:
|
|
53
|
-
handle:
|
|
54
|
-
} =
|
|
55
|
-
let
|
|
56
|
-
const
|
|
57
|
-
|
|
47
|
+
exact: c,
|
|
48
|
+
onMove: a,
|
|
49
|
+
onEnd: s,
|
|
50
|
+
onStart: f,
|
|
51
|
+
initialValue: y,
|
|
52
|
+
axis: g = "both",
|
|
53
|
+
draggingElement: u = Vt,
|
|
54
|
+
handle: r = e
|
|
55
|
+
} = n, { width: p } = vt();
|
|
56
|
+
let E = p.value;
|
|
57
|
+
const m = b(
|
|
58
|
+
O(y) ?? { x: 0, y: 0 }
|
|
58
59
|
);
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
|
|
60
|
+
N(p, () => {
|
|
61
|
+
const _ = p.value - E;
|
|
62
|
+
m.value.x += _, E = p.value;
|
|
62
63
|
});
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
}, A = (
|
|
66
|
-
if (!
|
|
64
|
+
const S = b(), U = (_) => l ? l.includes(_.pointerType) : !0, T = (_) => {
|
|
65
|
+
O(o) && _.preventDefault(), O(t) && _.stopPropagation();
|
|
66
|
+
}, A = (_) => {
|
|
67
|
+
if (!U(_) || O(c) && _.target !== O(e))
|
|
67
68
|
return;
|
|
68
|
-
const
|
|
69
|
-
x:
|
|
70
|
-
y:
|
|
69
|
+
const h = O(e).getBoundingClientRect(), $ = {
|
|
70
|
+
x: _.clientX - h.left,
|
|
71
|
+
y: _.clientY - h.top
|
|
71
72
|
};
|
|
72
|
-
(
|
|
73
|
-
},
|
|
74
|
-
if (!
|
|
73
|
+
(f == null ? void 0 : f($, _)) !== !1 && (S.value = $, T(_));
|
|
74
|
+
}, L = (_) => {
|
|
75
|
+
if (!U(_) || !S.value)
|
|
75
76
|
return;
|
|
76
|
-
let { x:
|
|
77
|
-
(
|
|
78
|
-
x:
|
|
79
|
-
y:
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
|
|
77
|
+
let { x: h, y: $ } = m.value;
|
|
78
|
+
(g === "x" || g === "both") && (h = _.clientX - S.value.x), (g === "y" || g === "both") && ($ = _.clientY - S.value.y), m.value = {
|
|
79
|
+
x: h,
|
|
80
|
+
y: $
|
|
81
|
+
}, a == null || a(m.value, _), T(_);
|
|
82
|
+
}, Y = (_) => {
|
|
83
|
+
U(_) && S.value && (S.value = void 0, s == null || s(m.value, _), T(_));
|
|
83
84
|
};
|
|
84
|
-
if (
|
|
85
|
-
const
|
|
86
|
-
|
|
85
|
+
if (gt) {
|
|
86
|
+
const _ = { capture: n.capture ?? !0 };
|
|
87
|
+
tt(r, "pointerdown", A, _), tt(u, "pointermove", L, _), tt(u, "pointerup", Y, _);
|
|
87
88
|
}
|
|
88
89
|
return {
|
|
89
|
-
...
|
|
90
|
-
position:
|
|
91
|
-
isDragging:
|
|
92
|
-
style:
|
|
93
|
-
() => `left:${
|
|
90
|
+
...Pt(m),
|
|
91
|
+
position: m,
|
|
92
|
+
isDragging: P(() => !!S.value),
|
|
93
|
+
style: P(
|
|
94
|
+
() => `left:${m.value.x}px;top:${m.value.y}px;`
|
|
94
95
|
)
|
|
95
96
|
};
|
|
96
97
|
}
|
|
97
|
-
const
|
|
98
|
+
const Ot = /* @__PURE__ */ w({
|
|
98
99
|
name: "UseDraggable",
|
|
99
100
|
props: [
|
|
100
101
|
"storageKey",
|
|
@@ -111,155 +112,236 @@ const It = /* @__PURE__ */ k({
|
|
|
111
112
|
"onMove",
|
|
112
113
|
"onEnd"
|
|
113
114
|
],
|
|
114
|
-
setup(e, { slots:
|
|
115
|
-
const l =
|
|
115
|
+
setup(e, { slots: n }) {
|
|
116
|
+
const l = b(), o = P(() => e.handle ?? l.value), t = e.storageKey && St(
|
|
116
117
|
e.storageKey,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
),
|
|
118
|
+
O(e.initialValue) || { x: 0, y: 0 },
|
|
119
|
+
It ? e.storageType === "session" ? sessionStorage : localStorage : void 0
|
|
120
|
+
), c = t || e.initialValue || { x: 0, y: 0 }, s = V(Ut(l, {
|
|
120
121
|
...e,
|
|
121
|
-
handle:
|
|
122
|
-
initialValue:
|
|
123
|
-
onEnd: (
|
|
124
|
-
var
|
|
125
|
-
(
|
|
122
|
+
handle: o,
|
|
123
|
+
initialValue: c,
|
|
124
|
+
onEnd: (f, y) => {
|
|
125
|
+
var g;
|
|
126
|
+
(g = e.onEnd) == null || g.call(e, f, y), t && (t.value.x = f.x, t.value.y = f.y);
|
|
126
127
|
}
|
|
127
128
|
}));
|
|
128
129
|
return () => {
|
|
129
|
-
if (
|
|
130
|
-
return
|
|
130
|
+
if (n.default)
|
|
131
|
+
return kt(e.as || "div", { ref: l, style: `touch-action:none;${s.style}` }, n.default(s));
|
|
131
132
|
};
|
|
132
133
|
}
|
|
133
|
-
}),
|
|
134
|
-
function
|
|
135
|
-
return
|
|
134
|
+
}), Bt = Symbol("CONTROLS_CONTEXT_KEY"), yt = "default", X = V({});
|
|
135
|
+
function Lt(e = yt) {
|
|
136
|
+
return pt(Bt, X), X[e];
|
|
136
137
|
}
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
return typeof e == "boolean" ? "boolean" : typeof e == "number" ? "number" : typeof e == "string" &&
|
|
140
|
-
},
|
|
138
|
+
const et = (e) => {
|
|
139
|
+
const n = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$|^0x([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;
|
|
140
|
+
return typeof e == "boolean" ? "boolean" : typeof e == "number" ? "number" : typeof e == "string" && n.test(e) ? "color" : typeof e == "string" ? "string" : e.isVector3 || e.isVector2 || e.isEuler || e.value instanceof Array || e.value.isVector3 || e.value.isVector2 || e.value.isEuler || e.value.value instanceof Array ? "vector" : e.min !== void 0 || e.max !== void 0 || e.step !== void 0 ? "range" : e.options && Array.isArray(e.options) ? "select" : "unknown";
|
|
141
|
+
}, G = (e, n, l, o) => {
|
|
141
142
|
const t = {
|
|
142
|
-
key:
|
|
143
|
-
label:
|
|
144
|
-
name:
|
|
145
|
-
type:
|
|
146
|
-
value:
|
|
147
|
-
visible:
|
|
148
|
-
icon:
|
|
149
|
-
uniqueKey:
|
|
150
|
-
[e]:
|
|
143
|
+
key: b(e),
|
|
144
|
+
label: b(e),
|
|
145
|
+
name: b(e),
|
|
146
|
+
type: b(l),
|
|
147
|
+
value: b(n),
|
|
148
|
+
visible: b(!0),
|
|
149
|
+
icon: b(),
|
|
150
|
+
uniqueKey: b(e),
|
|
151
|
+
[e]: b(n)
|
|
151
152
|
};
|
|
152
|
-
return
|
|
153
|
-
},
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
const
|
|
157
|
-
return
|
|
153
|
+
return o && (t.folder = b(o)), t;
|
|
154
|
+
}, bl = (e, n, l) => {
|
|
155
|
+
const o = {}, t = typeof e == "string" ? e : null, c = t ? n : e, a = t && t !== "fpsgraph" ? l : n, s = (a == null ? void 0 : a.uuid) || yt;
|
|
156
|
+
if (X[s] || (X[s] = V({})), e === "fpsgraph") {
|
|
157
|
+
const u = G("fpsgraph", null, "fpsgraph", null);
|
|
158
|
+
return X[s].fpsgraph = u, o.fpsgraph = u, q(V(o));
|
|
158
159
|
}
|
|
159
|
-
const
|
|
160
|
-
for (const
|
|
161
|
-
let
|
|
162
|
-
if (
|
|
163
|
-
const
|
|
164
|
-
|
|
160
|
+
const f = X[s], y = Mt(c), g = y ? q(c) : {};
|
|
161
|
+
for (const u in c) {
|
|
162
|
+
let r = c[u], p = u;
|
|
163
|
+
if (y && g[u] && (r = g[u]), t && (p = `${t}${u.charAt(0).toUpperCase() + u.slice(1)}`), typeof r == "object" && !H(r) && !Array.isArray(r) && r.value !== void 0) {
|
|
164
|
+
const m = r, S = H(m.value) ? m.value : b(m.value), U = m.type || et(m), T = G(u, S, U, t);
|
|
165
|
+
U === "select" && (T.options = b(m.options.map((A) => typeof A == "object" && A.text && A.value ? A : {
|
|
165
166
|
text: A,
|
|
166
167
|
value: A
|
|
167
|
-
}))),
|
|
168
|
+
}))), U === "range" && (T.min = b(m.min || 0), T.max = b(m.max || 1), T.step = b(m.step || 0.1)), T.label.value = m.label || u, T.icon.value = m.icon, T.visible.value = m.visible !== void 0 ? m.visible : !0, T.uniqueKey.value = p, f[p] = T, o[p] = T;
|
|
168
169
|
continue;
|
|
169
170
|
}
|
|
170
|
-
if (
|
|
171
|
-
const
|
|
172
|
-
|
|
171
|
+
if (H(r)) {
|
|
172
|
+
const m = G(u, r, r.value.type || et(r.value), t);
|
|
173
|
+
f[p] = m, o[p] = m;
|
|
173
174
|
continue;
|
|
174
|
-
} else if (typeof
|
|
175
|
-
const
|
|
176
|
-
|
|
175
|
+
} else if (typeof r == "object" && !Array.isArray(r)) {
|
|
176
|
+
const m = q(r);
|
|
177
|
+
m[u] && (r = m[u]);
|
|
177
178
|
}
|
|
178
|
-
const
|
|
179
|
-
|
|
179
|
+
const E = G(u, r, r.type || et(r), t);
|
|
180
|
+
f[p] = E, o[p] = E, E.uniqueKey.value = p;
|
|
180
181
|
}
|
|
181
|
-
return Object.keys(
|
|
182
|
-
}
|
|
182
|
+
return Object.keys(o).length > 1 ? q(V(o)) : Object.values(o)[0];
|
|
183
|
+
};
|
|
184
|
+
function zt(e) {
|
|
185
|
+
if (typeof e == "number")
|
|
186
|
+
return [e, e, e];
|
|
187
|
+
if (rt(e)) {
|
|
188
|
+
const { x: n, y: l, z: o } = e;
|
|
189
|
+
return [n, l, o];
|
|
190
|
+
}
|
|
191
|
+
if (nt(e)) {
|
|
192
|
+
const { x: n, y: l } = e;
|
|
193
|
+
return [n, l];
|
|
194
|
+
}
|
|
195
|
+
return e;
|
|
196
|
+
}
|
|
197
|
+
function nt(e) {
|
|
198
|
+
return e && typeof e.x == "number" && typeof e.y == "number";
|
|
199
|
+
}
|
|
200
|
+
function rt(e) {
|
|
201
|
+
return e && typeof e.x == "number" && typeof e.y == "number" && typeof e.z == "number";
|
|
202
|
+
}
|
|
203
|
+
function Rt(e) {
|
|
204
|
+
let n = 0;
|
|
205
|
+
return e.traverse((l) => {
|
|
206
|
+
if (l.isMesh && l.geometry) {
|
|
207
|
+
const o = l.geometry, t = o.attributes.position.count * 3 * Float32Array.BYTES_PER_ELEMENT, c = o.index ? o.index.count * Uint32Array.BYTES_PER_ELEMENT : 0, a = o.attributes.normal ? o.attributes.normal.count * 3 * Float32Array.BYTES_PER_ELEMENT : 0, s = o.attributes.uv ? o.attributes.uv.count * 2 * Float32Array.BYTES_PER_ELEMENT : 0, f = t + c + a + s;
|
|
208
|
+
n += f;
|
|
209
|
+
}
|
|
210
|
+
}), n;
|
|
211
|
+
}
|
|
212
|
+
function qt(e) {
|
|
213
|
+
return (e / 1024).toFixed(2);
|
|
214
|
+
}
|
|
215
|
+
const Nt = Symbol("PERF_CONTEXT_KEY"), it = "default", at = V({
|
|
216
|
+
[it]: {
|
|
217
|
+
perf: {
|
|
218
|
+
fps: V({
|
|
219
|
+
value: 0,
|
|
220
|
+
accumulator: [],
|
|
221
|
+
lastLoggedTime: Date.now(),
|
|
222
|
+
logInterval: 1e3
|
|
223
|
+
}),
|
|
224
|
+
memory: V({
|
|
225
|
+
currentMem: 0,
|
|
226
|
+
averageMem: 0,
|
|
227
|
+
maxMemory: 0,
|
|
228
|
+
allocatedMem: 0,
|
|
229
|
+
accumulator: [],
|
|
230
|
+
lastLoggedTime: Date.now(),
|
|
231
|
+
logInterval: 1e3
|
|
232
|
+
}),
|
|
233
|
+
// Placeholder for memory object
|
|
234
|
+
gl: void 0,
|
|
235
|
+
scene: void 0
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
function ct(e = it) {
|
|
240
|
+
return pt(Nt, at), at[e].perf;
|
|
241
|
+
}
|
|
242
|
+
function Xt(e) {
|
|
243
|
+
const { renderer: n, scene: l } = Kt(), o = (e == null ? void 0 : e.renderer) || n.value;
|
|
244
|
+
if (!o)
|
|
245
|
+
throw new Error("Renderer not found");
|
|
246
|
+
const t = at[it].perf;
|
|
247
|
+
t.gl = o, t.scene = l.value;
|
|
248
|
+
const c = 100, a = Ft({ every: c }), { isSupported: s, memory: f } = At({ interval: c }), y = 80;
|
|
249
|
+
let g = performance.now();
|
|
250
|
+
const u = ({ timestamp: E }) => {
|
|
251
|
+
t.memory.allocatedMem = Rt(k(l)), E - g >= c && (g = E, t.fps.accumulator.push(a.value), t.fps.accumulator.length > y && t.fps.accumulator.shift(), t.fps.value = t.fps.accumulator.reduce((m, S) => m + S, 0) / t.fps.accumulator.length, s.value && f.value && (t.memory.accumulator.push(f.value.usedJSHeapSize / 1024 / 1024), t.memory.accumulator.length > y && t.memory.accumulator.shift(), t.memory.currentMem = t.memory.accumulator.reduce((m, S) => m + S, 0) / t.memory.accumulator.length));
|
|
252
|
+
}, { pause: r, resume: p } = bt(u, { immediate: !0 });
|
|
253
|
+
return Ct(() => {
|
|
254
|
+
r();
|
|
255
|
+
}), {
|
|
256
|
+
perf: t,
|
|
257
|
+
fps: t.fps,
|
|
258
|
+
memory: t.memory,
|
|
259
|
+
gl: t.gl,
|
|
260
|
+
pausePerfTracking: r,
|
|
261
|
+
resumePerfTracking: p
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
const Yt = ["for", "title"], j = /* @__PURE__ */ w({
|
|
183
265
|
__name: "ControlLabel",
|
|
184
266
|
props: {
|
|
185
267
|
label: {},
|
|
186
268
|
control: {}
|
|
187
269
|
},
|
|
188
270
|
setup(e) {
|
|
189
|
-
return (
|
|
190
|
-
for:
|
|
191
|
-
title:
|
|
271
|
+
return (n, l) => (d(), v("label", {
|
|
272
|
+
for: n.control.uniqueKey,
|
|
273
|
+
title: n.label,
|
|
192
274
|
class: "tl-text-gray-500 tl-w-1/3 tl-truncate"
|
|
193
275
|
}, [
|
|
194
|
-
|
|
276
|
+
n.control.icon ? (d(), v("i", {
|
|
195
277
|
key: 0,
|
|
196
|
-
class:
|
|
197
|
-
}, null, 2)) : (
|
|
198
|
-
|
|
278
|
+
class: C(n.control.icon)
|
|
279
|
+
}, null, 2)) : (d(), v(K, { key: 1 }, [
|
|
280
|
+
J(M(n.label), 1)
|
|
199
281
|
], 64))
|
|
200
|
-
], 8,
|
|
282
|
+
], 8, Yt));
|
|
201
283
|
}
|
|
202
|
-
}),
|
|
284
|
+
}), Wt = { class: "tl-flex tl-px-4 tl-justify-between tl-gap-4 tl-items-center tl-mb-2" }, jt = ["id", "value", "min", "max", "step"], Gt = /* @__PURE__ */ w({
|
|
203
285
|
__name: "NumberControl",
|
|
204
286
|
props: {
|
|
205
287
|
label: {},
|
|
206
288
|
control: {}
|
|
207
289
|
},
|
|
208
290
|
emits: ["change"],
|
|
209
|
-
setup(e, { emit:
|
|
210
|
-
const l = e,
|
|
211
|
-
function t(
|
|
212
|
-
const { target:
|
|
213
|
-
|
|
291
|
+
setup(e, { emit: n }) {
|
|
292
|
+
const l = e, o = n;
|
|
293
|
+
function t(u) {
|
|
294
|
+
const { target: r } = u;
|
|
295
|
+
o("change", r.valueAsNumber);
|
|
214
296
|
}
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
},
|
|
220
|
-
return
|
|
221
|
-
if (
|
|
222
|
-
const
|
|
223
|
-
|
|
297
|
+
const c = st(), a = b(0), s = b(!1), f = (u) => {
|
|
298
|
+
a.value = u.clientX, s.value = !0;
|
|
299
|
+
}, y = () => {
|
|
300
|
+
s.value = !1;
|
|
301
|
+
}, g = (u) => Math.floor(Math.abs(u) / 10);
|
|
302
|
+
return N(c.x, (u) => {
|
|
303
|
+
if (s.value) {
|
|
304
|
+
const r = u - a.value, p = g(r);
|
|
305
|
+
r > 0 ? o("change", l.control.value + 1 + p) : r < 0 && o("change", l.control.value - 1 + p), l.control.min !== void 0 && l.control.value < l.control.min && o("change", l.control.min), l.control.max !== void 0 && l.control.value > l.control.max && o("change", l.control.max), a.value = u;
|
|
224
306
|
}
|
|
225
|
-
}), (
|
|
226
|
-
|
|
227
|
-
label:
|
|
228
|
-
control:
|
|
307
|
+
}), (u, r) => (d(), v("div", Wt, [
|
|
308
|
+
F(j, {
|
|
309
|
+
label: u.label,
|
|
310
|
+
control: u.control
|
|
229
311
|
}, null, 8, ["label", "control"]),
|
|
230
|
-
|
|
231
|
-
id:
|
|
232
|
-
value:
|
|
233
|
-
class:
|
|
312
|
+
i("input", {
|
|
313
|
+
id: u.control.uniqueKey,
|
|
314
|
+
value: u.control.value,
|
|
315
|
+
class: C(["tl-p-2 tl-w-1/3 tl-rounded tl-text-right tl-text-xs tl-text-gray-400 tl-bg-gray-100 tl-focus:border-gray-200 tl-outline-none tl-border-none tl-font-sans", { "tl-cursor-ew-resize": s.value }]),
|
|
234
316
|
type: "number",
|
|
235
|
-
min:
|
|
236
|
-
max:
|
|
237
|
-
step:
|
|
317
|
+
min: u.control.min,
|
|
318
|
+
max: u.control.max,
|
|
319
|
+
step: u.control.step,
|
|
238
320
|
onInput: t,
|
|
239
|
-
onMousedown:
|
|
240
|
-
onMouseup:
|
|
241
|
-
}, null, 42,
|
|
321
|
+
onMousedown: f,
|
|
322
|
+
onMouseup: y
|
|
323
|
+
}, null, 42, jt)
|
|
242
324
|
]));
|
|
243
325
|
}
|
|
244
|
-
}),
|
|
326
|
+
}), Ht = { class: "tl-flex tl-px-4 tl-justify-between tl-gap-4 tl-items-center tl-mb-2 tl-min-h-32px" }, Jt = ["id", "value", "aria-label"], Qt = /* @__PURE__ */ w({
|
|
245
327
|
__name: "TextControl",
|
|
246
328
|
props: {
|
|
247
329
|
label: {},
|
|
248
330
|
control: {}
|
|
249
331
|
},
|
|
250
332
|
emits: ["change"],
|
|
251
|
-
setup(e, { emit:
|
|
252
|
-
const l =
|
|
253
|
-
function
|
|
254
|
-
const { target:
|
|
255
|
-
l("change",
|
|
333
|
+
setup(e, { emit: n }) {
|
|
334
|
+
const l = n;
|
|
335
|
+
function o(t) {
|
|
336
|
+
const { target: c } = t;
|
|
337
|
+
l("change", c.value);
|
|
256
338
|
}
|
|
257
|
-
return (t,
|
|
258
|
-
|
|
339
|
+
return (t, c) => (d(), v("div", Ht, [
|
|
340
|
+
F(j, {
|
|
259
341
|
label: t.label,
|
|
260
342
|
control: t.control
|
|
261
343
|
}, null, 8, ["label", "control"]),
|
|
262
|
-
|
|
344
|
+
i("input", {
|
|
263
345
|
id: t.control.uniqueKey,
|
|
264
346
|
value: t.control.value,
|
|
265
347
|
type: "text",
|
|
@@ -267,504 +349,721 @@ const Q = (e) => {
|
|
|
267
349
|
class: "tl-p-2 tl-w-2/3 tl-rounded tl-text-right tl-text-xs tl-text-gray-400 tl-bg-gray-100 focus:tl-border-gray-200 tl-border-none tl-font-sans",
|
|
268
350
|
"aria-label": t.label,
|
|
269
351
|
placeholder: "Enter value here...",
|
|
270
|
-
onChange:
|
|
271
|
-
}, null, 40,
|
|
352
|
+
onChange: o
|
|
353
|
+
}, null, 40, Jt)
|
|
272
354
|
]));
|
|
273
355
|
}
|
|
274
|
-
}),
|
|
356
|
+
}), Zt = { class: "tl-flex tl-px-4 tl-justify-start tl-gap-2 tl-items-center tl-mb-2 tl-min-h-32px" }, te = { class: "tl-text-gray-500 tl-w-1/3" }, ee = ["id", "checked"], le = ["for"], oe = ["aria-checked"], ne = { class: "i-ic:baseline-check tl-text-light" }, re = /* @__PURE__ */ w({
|
|
275
357
|
__name: "BooleanControl",
|
|
276
358
|
props: {
|
|
277
359
|
label: {},
|
|
278
360
|
control: {}
|
|
279
361
|
},
|
|
280
362
|
emits: ["change"],
|
|
281
|
-
setup(e, { emit:
|
|
282
|
-
const l = e,
|
|
283
|
-
function t(
|
|
284
|
-
const { target:
|
|
285
|
-
|
|
363
|
+
setup(e, { emit: n }) {
|
|
364
|
+
const l = e, o = n;
|
|
365
|
+
function t(a) {
|
|
366
|
+
const { target: s } = a;
|
|
367
|
+
o("change", s.checked);
|
|
286
368
|
}
|
|
287
|
-
function
|
|
288
|
-
(
|
|
369
|
+
function c(a) {
|
|
370
|
+
(a.code === "Space" || a.code === "Enter") && (a.preventDefault(), o("change", !l.control.value));
|
|
289
371
|
}
|
|
290
|
-
return (
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
id:
|
|
294
|
-
checked:
|
|
372
|
+
return (a, s) => (d(), v("div", Zt, [
|
|
373
|
+
i("label", te, M(a.label), 1),
|
|
374
|
+
i("input", {
|
|
375
|
+
id: a.control.uniqueKey,
|
|
376
|
+
checked: a.control.value,
|
|
295
377
|
class: "tl-hidden",
|
|
296
378
|
type: "checkbox",
|
|
297
379
|
onInput: t
|
|
298
|
-
}, null, 40,
|
|
299
|
-
|
|
300
|
-
for:
|
|
380
|
+
}, null, 40, ee),
|
|
381
|
+
i("label", {
|
|
382
|
+
for: a.control.uniqueKey,
|
|
301
383
|
class: "tl-inline-flex tl-items-center tl-cursor-pointer"
|
|
302
384
|
}, [
|
|
303
|
-
|
|
385
|
+
i("span", {
|
|
304
386
|
tabindex: "0",
|
|
305
387
|
role: "checkbox",
|
|
306
|
-
"aria-checked":
|
|
307
|
-
class:
|
|
308
|
-
onKeydown:
|
|
388
|
+
"aria-checked": a.control.value.toString(),
|
|
389
|
+
class: C([{ "tl-bg-dark-500": a.control.value, "tl-bg-gray-200": !a.control.value }, "tl-w-4 tl-h-4 tl-flex tl-justify-center tl-items-center tl-rounded tl-border tl-border-gray-300 tl-mr-2 tl-transition-colors tl-duration-200"]),
|
|
390
|
+
onKeydown: c
|
|
309
391
|
}, [
|
|
310
|
-
|
|
311
|
-
[
|
|
392
|
+
Q(i("i", ne, null, 512), [
|
|
393
|
+
[Z, a.control.value]
|
|
312
394
|
])
|
|
313
|
-
], 42,
|
|
314
|
-
], 8,
|
|
395
|
+
], 42, oe)
|
|
396
|
+
], 8, le)
|
|
315
397
|
]));
|
|
316
398
|
}
|
|
317
|
-
}),
|
|
399
|
+
}), ae = { class: "tl-px-4 tl-relative tl-flex tl-justify-between tl-gap-4 tl-items-center tl-mb-2" }, se = ["value", "min", "max", "step"], ie = ["value", "min", "max", "step"], ce = /* @__PURE__ */ w({
|
|
318
400
|
__name: "SliderControl",
|
|
319
401
|
props: {
|
|
320
402
|
label: {},
|
|
321
403
|
control: {}
|
|
322
404
|
},
|
|
323
405
|
emits: ["change"],
|
|
324
|
-
setup(e, { emit:
|
|
325
|
-
const l = e,
|
|
326
|
-
function t(
|
|
327
|
-
const { target:
|
|
328
|
-
|
|
406
|
+
setup(e, { emit: n }) {
|
|
407
|
+
const l = e, o = n;
|
|
408
|
+
function t(r) {
|
|
409
|
+
const { target: p } = r;
|
|
410
|
+
o("change", p.valueAsNumber);
|
|
329
411
|
}
|
|
330
|
-
const
|
|
412
|
+
const c = P(() => ({
|
|
331
413
|
backgroundImage: `linear-gradient(to right, #333 0% ${100 * (l.control.value - (l.control.min || 0)) / ((l.control.max || 100) - (l.control.min || 0))}%, #e2e2e2 0%)`
|
|
332
|
-
})),
|
|
333
|
-
|
|
334
|
-
},
|
|
335
|
-
|
|
336
|
-
},
|
|
337
|
-
return
|
|
338
|
-
if (
|
|
339
|
-
const
|
|
340
|
-
|
|
414
|
+
})), a = st(), s = b(0), f = b(!1), y = (r) => {
|
|
415
|
+
s.value = r.clientX, f.value = !0;
|
|
416
|
+
}, g = () => {
|
|
417
|
+
f.value = !1;
|
|
418
|
+
}, u = (r) => Math.floor(Math.abs(r) / 10);
|
|
419
|
+
return N(a.x, (r) => {
|
|
420
|
+
if (f.value) {
|
|
421
|
+
const p = r - s.value, E = u(p);
|
|
422
|
+
p > 0 ? o("change", l.control.value + 1 + E) : p < 0 && o("change", l.control.value - 1 + E), l.control.min !== void 0 && l.control.value < l.control.min && o("change", l.control.min), l.control.max !== void 0 && l.control.value > l.control.max && o("change", l.control.max), s.value = r;
|
|
341
423
|
}
|
|
342
|
-
}), (
|
|
343
|
-
|
|
344
|
-
label:
|
|
345
|
-
control:
|
|
424
|
+
}), (r, p) => (d(), v("div", ae, [
|
|
425
|
+
F(j, {
|
|
426
|
+
label: r.label,
|
|
427
|
+
control: r.control
|
|
346
428
|
}, null, 8, ["label", "control"]),
|
|
347
|
-
|
|
348
|
-
value:
|
|
429
|
+
i("input", {
|
|
430
|
+
value: r.control.value,
|
|
349
431
|
class: "tl-w-1/2 tl-h-0.75 tl-bg-dark-200 tl-rounded-full tl-appearance-none",
|
|
350
|
-
style:
|
|
432
|
+
style: Et(c.value),
|
|
351
433
|
type: "range",
|
|
352
|
-
min:
|
|
353
|
-
max:
|
|
354
|
-
step:
|
|
434
|
+
min: r.control.min,
|
|
435
|
+
max: r.control.max,
|
|
436
|
+
step: r.control.step,
|
|
355
437
|
onInput: t
|
|
356
|
-
}, null, 44,
|
|
357
|
-
|
|
358
|
-
value:
|
|
359
|
-
class:
|
|
438
|
+
}, null, 44, se),
|
|
439
|
+
i("input", {
|
|
440
|
+
value: r.control.value,
|
|
441
|
+
class: C(["tl-p-2 tl-w-1/4 tl-rounded tl-text-right tl-text-xs tl-text-gray-400 tl-bg-gray-100 tl-focus:border-gray-200 tl-outline-none tl-border-none tl-font-sans", { "tl-cursor-ew-resize": f.value }]),
|
|
360
442
|
type: "number",
|
|
361
|
-
min:
|
|
362
|
-
max:
|
|
363
|
-
step:
|
|
443
|
+
min: r.control.min,
|
|
444
|
+
max: r.control.max,
|
|
445
|
+
step: r.control.step,
|
|
364
446
|
onInput: t,
|
|
365
|
-
onMousedown:
|
|
366
|
-
onMouseup:
|
|
367
|
-
}, null, 42,
|
|
447
|
+
onMousedown: y,
|
|
448
|
+
onMouseup: g
|
|
449
|
+
}, null, 42, ie)
|
|
368
450
|
]));
|
|
369
451
|
}
|
|
370
|
-
}),
|
|
452
|
+
}), ht = (e, n) => {
|
|
371
453
|
const l = e.__vccOpts || e;
|
|
372
|
-
for (const [
|
|
373
|
-
l[
|
|
454
|
+
for (const [o, t] of n)
|
|
455
|
+
l[o] = t;
|
|
374
456
|
return l;
|
|
375
|
-
},
|
|
457
|
+
}, ue = /* @__PURE__ */ ht(ce, [["__scopeId", "data-v-e775088a"]]), de = { class: "tl-flex tl-px-4 tl-justify-between tl-gap-4 tl-items-center tl-mb-2" }, pe = { class: "tl-text-gray-500 tl-w-1/3" }, fe = ["id", "value", "aria-label"], me = ["id", "aria-label", "value"], ve = /* @__PURE__ */ w({
|
|
376
458
|
__name: "ColorControl",
|
|
377
459
|
props: {
|
|
378
460
|
label: {},
|
|
379
461
|
control: {}
|
|
380
462
|
},
|
|
381
463
|
emits: ["change"],
|
|
382
|
-
setup(e, { emit:
|
|
383
|
-
const l =
|
|
384
|
-
function
|
|
385
|
-
const { target:
|
|
386
|
-
l("change",
|
|
464
|
+
setup(e, { emit: n }) {
|
|
465
|
+
const l = n;
|
|
466
|
+
function o(t) {
|
|
467
|
+
const { target: c } = t;
|
|
468
|
+
l("change", c.value);
|
|
387
469
|
}
|
|
388
|
-
return (t,
|
|
389
|
-
|
|
390
|
-
|
|
470
|
+
return (t, c) => (d(), v("div", de, [
|
|
471
|
+
i("label", pe, M(t.label), 1),
|
|
472
|
+
i("input", {
|
|
391
473
|
id: t.control.uniqueKey,
|
|
392
474
|
tabindex: "0",
|
|
393
475
|
value: t.control.value,
|
|
394
476
|
"aria-label": t.label,
|
|
395
|
-
class:
|
|
477
|
+
class: C(["focus:tl-outline-none focus:tl-ring-2 focus:tl-ring-blue-600", { "important-tl-outline-gray-200": t.control.value === "#ffffff" }]),
|
|
396
478
|
type: "color",
|
|
397
|
-
onInput:
|
|
398
|
-
}, null, 42,
|
|
399
|
-
|
|
479
|
+
onInput: o
|
|
480
|
+
}, null, 42, fe),
|
|
481
|
+
i("input", {
|
|
400
482
|
id: t.control.uniqueKey,
|
|
401
483
|
tabindex: "0",
|
|
402
484
|
"aria-label": t.label,
|
|
403
485
|
value: t.control.value,
|
|
404
486
|
class: "tl-p-2 tl-w-2/3 tl-rounded tl-text-right tl-text-xs tl-text-gray-400 tl-bg-gray-100 tl-border-none tl-font-sans",
|
|
405
487
|
type: "text",
|
|
406
|
-
onInput:
|
|
407
|
-
}, null, 40,
|
|
488
|
+
onInput: o
|
|
489
|
+
}, null, 40, me)
|
|
408
490
|
]));
|
|
409
491
|
}
|
|
410
|
-
})
|
|
411
|
-
function ne(e) {
|
|
412
|
-
if (typeof e == "number")
|
|
413
|
-
return [e, e, e];
|
|
414
|
-
if (et(e)) {
|
|
415
|
-
const { x: o, y: l, z: n } = e;
|
|
416
|
-
return [o, l, n];
|
|
417
|
-
}
|
|
418
|
-
if (tt(e)) {
|
|
419
|
-
const { x: o, y: l } = e;
|
|
420
|
-
return [o, l];
|
|
421
|
-
}
|
|
422
|
-
return e;
|
|
423
|
-
}
|
|
424
|
-
function tt(e) {
|
|
425
|
-
return e && typeof e.x == "number" && typeof e.y == "number";
|
|
426
|
-
}
|
|
427
|
-
function et(e) {
|
|
428
|
-
return e && typeof e.x == "number" && typeof e.y == "number" && typeof e.z == "number";
|
|
429
|
-
}
|
|
430
|
-
const oe = { class: "tl-relative tl-w-2/3 tl-flex tl-justify-between tl-gap-0.5" }, ae = {
|
|
492
|
+
}), be = { class: "tl-relative tl-w-2/3 tl-flex tl-justify-between tl-gap-0.5" }, ge = {
|
|
431
493
|
key: 0,
|
|
432
494
|
class: "tl-font-bold tl-px-1 tl-py-1 tl-text-0.65rem tl-text-gray-300"
|
|
433
|
-
},
|
|
495
|
+
}, ye = ["id", "step", "value", "onInput", "onMousedown", "onMouseup", "onFocus"], he = /* @__PURE__ */ w({
|
|
434
496
|
__name: "VectorControl",
|
|
435
497
|
props: {
|
|
436
498
|
label: {},
|
|
437
499
|
control: {}
|
|
438
500
|
},
|
|
439
501
|
emits: ["change"],
|
|
440
|
-
setup(e, { emit:
|
|
441
|
-
const l = e,
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
}),
|
|
445
|
-
|
|
502
|
+
setup(e, { emit: n }) {
|
|
503
|
+
const l = e, o = n, t = st(), { pressed: c } = Dt(), a = b(0), s = b(!1), f = b(0), y = b(null), g = b(1), u = ut("Shift"), r = ut("Alt");
|
|
504
|
+
N(u, (h) => {
|
|
505
|
+
g.value = h ? 10 : 1;
|
|
506
|
+
}), N(r, (h) => {
|
|
507
|
+
g.value = h ? 0.1 : 1;
|
|
446
508
|
});
|
|
447
|
-
const
|
|
448
|
-
|
|
449
|
-
},
|
|
450
|
-
|
|
451
|
-
},
|
|
452
|
-
|
|
453
|
-
},
|
|
454
|
-
|
|
455
|
-
},
|
|
456
|
-
|
|
509
|
+
const p = (h) => {
|
|
510
|
+
y.value = h;
|
|
511
|
+
}, E = () => {
|
|
512
|
+
y.value = null;
|
|
513
|
+
}, m = (h, $) => {
|
|
514
|
+
f.value = $, a.value = h.clientX, s.value = !0;
|
|
515
|
+
}, S = (h, $) => {
|
|
516
|
+
f.value = $, s.value = !1;
|
|
517
|
+
}, U = () => {
|
|
518
|
+
s.value = !1;
|
|
457
519
|
};
|
|
458
|
-
|
|
459
|
-
|
|
520
|
+
N(c, (h) => {
|
|
521
|
+
h || (s.value = !1);
|
|
460
522
|
});
|
|
461
|
-
const
|
|
462
|
-
function
|
|
463
|
-
const { value:
|
|
464
|
-
|
|
523
|
+
const T = (h) => Math.floor(Math.abs(h) / 10), A = P(() => zt(l.control.value)), L = b(["x", "y", "z"]), Y = P(() => nt(l.control.value) || rt(l.control.value));
|
|
524
|
+
function _(h, $) {
|
|
525
|
+
const { value: z } = l.control, { target: x } = h;
|
|
526
|
+
f.value = $, z[Y.value ? L.value[f.value] : f.value] = parseFloat(x.value), o("change", z);
|
|
465
527
|
}
|
|
466
|
-
return
|
|
467
|
-
if (
|
|
468
|
-
const
|
|
469
|
-
|
|
528
|
+
return N(t.x, (h) => {
|
|
529
|
+
if (s.value) {
|
|
530
|
+
const $ = h - a.value, z = T($), { value: x } = l.control, D = Y.value ? L.value[f.value] : f.value;
|
|
531
|
+
$ > 0 ? x[D] += g.value + z : $ < 0 && (x[D] -= g.value + z), l.control.min !== void 0 && x < l.control.min && (x[D] = l.control.min), l.control.max !== void 0 && x > l.control.max && (x[D] = l.control.max), o("change", x), a.value = h;
|
|
470
532
|
}
|
|
471
|
-
}), (
|
|
533
|
+
}), (h, $) => (d(), v("div", {
|
|
472
534
|
class: "tl-flex tl-px-4 tl-justify-between tl-gap-1 tl-items-center tl-mb-2",
|
|
473
|
-
onMouseup:
|
|
535
|
+
onMouseup: $[0] || ($[0] = (z) => U())
|
|
474
536
|
}, [
|
|
475
|
-
|
|
476
|
-
label:
|
|
477
|
-
control:
|
|
537
|
+
F(j, {
|
|
538
|
+
label: h.label,
|
|
539
|
+
control: h.control
|
|
478
540
|
}, null, 8, ["label", "control"]),
|
|
479
|
-
|
|
480
|
-
(
|
|
481
|
-
key:
|
|
482
|
-
class:
|
|
483
|
-
"tl-w-2/5":
|
|
484
|
-
"tl-w-1/3":
|
|
485
|
-
"tl-w-1/2":
|
|
541
|
+
i("div", be, [
|
|
542
|
+
(d(!0), v(K, null, B(A.value, (z, x) => (d(), v("div", {
|
|
543
|
+
key: h.label + x,
|
|
544
|
+
class: C(["tl-flex tl-items-center tl-bg-gray-100 tl-rounded", {
|
|
545
|
+
"tl-w-2/5": y.value === x,
|
|
546
|
+
"tl-w-1/3": k(rt)(h.control.value),
|
|
547
|
+
"tl-w-1/2": k(nt)(h.control.value)
|
|
486
548
|
}])
|
|
487
549
|
}, [
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
id: `${
|
|
550
|
+
L.value[x] && Y.value ? (d(), v("span", ge, M(L.value[x]), 1)) : W("", !0),
|
|
551
|
+
i("input", {
|
|
552
|
+
id: `${h.control.uniqueKey}-${L.value[x]}`,
|
|
491
553
|
type: "number",
|
|
492
|
-
step:
|
|
493
|
-
class:
|
|
494
|
-
value: A.value[
|
|
495
|
-
onInput: (
|
|
496
|
-
onMousedown: (
|
|
497
|
-
onMouseup: (
|
|
498
|
-
onFocus: (
|
|
499
|
-
onBlur:
|
|
500
|
-
}, null, 42,
|
|
554
|
+
step: g.value,
|
|
555
|
+
class: C(["tl-w-full tl-px-0 tl-p-1 tl-text-right tl-text-0.65rem tl-text-gray-400 tl-bg-transparent focus:tl-border-gray-200 tl-outline-none tl-border-none tl-font-sans tl-appearence-none", { "tl-cursor-ew-resize": s.value }]),
|
|
556
|
+
value: A.value[x].toFixed(2),
|
|
557
|
+
onInput: (D) => _(D, x),
|
|
558
|
+
onMousedown: (D) => m(D, x),
|
|
559
|
+
onMouseup: (D) => S(D, x),
|
|
560
|
+
onFocus: (D) => p(x),
|
|
561
|
+
onBlur: E
|
|
562
|
+
}, null, 42, ye)
|
|
501
563
|
], 2))), 128))
|
|
502
564
|
])
|
|
503
565
|
], 32));
|
|
504
566
|
}
|
|
505
|
-
}),
|
|
506
|
-
__name: "
|
|
567
|
+
}), _e = { class: "tl-flex tl-px-4 tl-justify-between tl-gap-4 tl-items-center tl-mb-2" }, xe = { class: "tl-text-gray-500 tl-w-1/3" }, we = { class: "tl-relative tl-w-2/3 tl-p-1 tl-rounded tl-text-right tl-text-xs tl-text-gray-400 tl-bg-gray-100 tl-focus:border-gray-200 tl-outline-none tl-border-none tl-font-sans" }, $e = { class: "tl-absolute tl-bottom-0.5 tl-right-0.5 tl-font-sans tl-text-xs" }, ke = ["points"], Me = 160, lt = 40, dt = 2, _t = /* @__PURE__ */ w({
|
|
568
|
+
__name: "Graph",
|
|
507
569
|
props: {
|
|
508
|
-
|
|
509
|
-
|
|
570
|
+
points: {},
|
|
571
|
+
value: {},
|
|
572
|
+
unit: {},
|
|
573
|
+
label: {}
|
|
510
574
|
},
|
|
511
575
|
setup(e) {
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
576
|
+
const n = e, l = b(140);
|
|
577
|
+
Tt(() => {
|
|
578
|
+
const t = Math.max(...n.points, 30);
|
|
579
|
+
l.value = Math.max(t, l.value);
|
|
580
|
+
});
|
|
581
|
+
const o = P(() => n.points.map(
|
|
582
|
+
(t, c) => `${c * dt},${lt - t * lt / l.value}`
|
|
583
|
+
).join(" "));
|
|
584
|
+
return (t, c) => (d(), v("div", _e, [
|
|
585
|
+
i("label", xe, M(t.label), 1),
|
|
586
|
+
i("div", we, [
|
|
587
|
+
i("div", $e, M(Math.round(t.value)) + " " + M(t.unit), 1),
|
|
588
|
+
(d(), v("svg", {
|
|
589
|
+
width: Me,
|
|
590
|
+
height: lt,
|
|
525
591
|
xmlns: "http://www.w3.org/2000/svg",
|
|
526
592
|
class: "tl-bg-gray-100"
|
|
527
593
|
}, [
|
|
528
|
-
|
|
529
|
-
points:
|
|
594
|
+
i("polyline", {
|
|
595
|
+
points: o.value,
|
|
530
596
|
fill: "none",
|
|
531
597
|
stroke: "lightgray",
|
|
532
|
-
"stroke-width":
|
|
598
|
+
"stroke-width": dt,
|
|
533
599
|
"stroke-linecap": "round",
|
|
534
600
|
"stroke-linejoin": "round"
|
|
535
|
-
}, null, 8,
|
|
601
|
+
}, null, 8, ke)
|
|
536
602
|
]))
|
|
537
603
|
])
|
|
538
604
|
]));
|
|
539
605
|
}
|
|
540
|
-
}),
|
|
606
|
+
}), Ce = /* @__PURE__ */ w({
|
|
607
|
+
__name: "FPSGraph",
|
|
608
|
+
props: {
|
|
609
|
+
label: {},
|
|
610
|
+
control: {}
|
|
611
|
+
},
|
|
612
|
+
setup(e) {
|
|
613
|
+
const { fps: n } = ct();
|
|
614
|
+
return (l, o) => (d(), I(_t, {
|
|
615
|
+
points: k(n).accumulator,
|
|
616
|
+
value: k(n).value,
|
|
617
|
+
unit: "FPS",
|
|
618
|
+
label: l.label
|
|
619
|
+
}, null, 8, ["points", "value", "label"]));
|
|
620
|
+
}
|
|
621
|
+
}), Ee = { class: "tl-flex tl-px-4 tl-justify-between tl-gap-4 tl-items-center tl-mb-2 tl-min-h-32px" }, Te = ["id", "value"], Se = ["value"], Ie = /* @__PURE__ */ w({
|
|
541
622
|
__name: "SelectControl",
|
|
542
623
|
props: {
|
|
543
624
|
label: {},
|
|
544
625
|
control: {}
|
|
545
626
|
},
|
|
546
627
|
emits: ["change"],
|
|
547
|
-
setup(e, { emit:
|
|
548
|
-
const l =
|
|
549
|
-
function
|
|
628
|
+
setup(e, { emit: n }) {
|
|
629
|
+
const l = n;
|
|
630
|
+
function o(t) {
|
|
550
631
|
l("change", t.target.value);
|
|
551
632
|
}
|
|
552
|
-
return (t,
|
|
553
|
-
|
|
633
|
+
return (t, c) => (d(), v("div", Ee, [
|
|
634
|
+
F(j, {
|
|
554
635
|
label: t.label,
|
|
555
636
|
control: t.control
|
|
556
637
|
}, null, 8, ["label", "control"]),
|
|
557
|
-
|
|
638
|
+
i("select", {
|
|
558
639
|
id: t.control.uniqueKey,
|
|
559
640
|
value: t.control.value,
|
|
560
641
|
class: "tl-p-2 tl-w-2/3 tl-rounded tl-text-left tl-text-xs tl-text-gray-400 tl-bg-gray-100 focus:tl-border-gray-200 tl-outline-none tl-border-none tl-font-sans",
|
|
561
|
-
onChange:
|
|
642
|
+
onChange: o
|
|
562
643
|
}, [
|
|
563
|
-
(
|
|
564
|
-
key:
|
|
565
|
-
value:
|
|
566
|
-
},
|
|
567
|
-
], 40,
|
|
644
|
+
(d(!0), v(K, null, B(t.control.options, (a) => (d(), v("option", {
|
|
645
|
+
key: a.value,
|
|
646
|
+
value: a.value
|
|
647
|
+
}, M(a.text), 9, Se))), 128))
|
|
648
|
+
], 40, Te)
|
|
568
649
|
]));
|
|
569
650
|
}
|
|
570
|
-
}),
|
|
651
|
+
}), Fe = /* @__PURE__ */ w({
|
|
571
652
|
__name: "ButtonControl",
|
|
572
653
|
props: {
|
|
573
654
|
label: {},
|
|
574
655
|
control: {}
|
|
575
656
|
},
|
|
576
657
|
setup(e) {
|
|
577
|
-
const
|
|
578
|
-
const
|
|
579
|
-
return [
|
|
658
|
+
const n = e, l = P(() => {
|
|
659
|
+
const o = "leches-btn", t = `leches-btn-${n.control.value.variant || "primary"}`, c = `leches-btn-${n.control.value.size || "sm"}`;
|
|
660
|
+
return [o, t, c];
|
|
580
661
|
});
|
|
581
|
-
return (
|
|
582
|
-
class:
|
|
662
|
+
return (o, t) => (d(), v("button", {
|
|
663
|
+
class: C(l.value),
|
|
583
664
|
onClick: t[0] || (t[0] = //@ts-ignore
|
|
584
|
-
(...
|
|
665
|
+
(...c) => o.control.value.onClick && o.control.value.onClick(...c))
|
|
585
666
|
}, [
|
|
586
|
-
|
|
587
|
-
class:
|
|
667
|
+
i("i", {
|
|
668
|
+
class: C([o.control.value.icon, o.control.value.label ? "mr-1" : ""])
|
|
588
669
|
}, null, 2),
|
|
589
|
-
|
|
670
|
+
J(" " + M(o.control.value.label), 1)
|
|
590
671
|
], 2));
|
|
591
672
|
}
|
|
592
|
-
}),
|
|
673
|
+
}), Ae = /* @__PURE__ */ ht(Fe, [["__scopeId", "data-v-6a95ac59"]]), xt = /* @__PURE__ */ w({
|
|
593
674
|
__name: "ControlInput",
|
|
594
675
|
props: {
|
|
595
676
|
control: {}
|
|
596
677
|
},
|
|
597
678
|
emits: ["change"],
|
|
598
|
-
setup(e, { emit:
|
|
599
|
-
const l =
|
|
600
|
-
function
|
|
679
|
+
setup(e, { emit: n }) {
|
|
680
|
+
const l = n;
|
|
681
|
+
function o(t) {
|
|
601
682
|
l("change", t);
|
|
602
683
|
}
|
|
603
|
-
return (t,
|
|
604
|
-
t.control.type === "color" ? (
|
|
684
|
+
return (t, c) => t.control.visible ? (d(), v(K, { key: 0 }, [
|
|
685
|
+
t.control.type === "color" ? (d(), I(ve, {
|
|
605
686
|
key: 0,
|
|
606
687
|
label: t.control.label,
|
|
607
688
|
control: t.control,
|
|
608
|
-
onChange:
|
|
609
|
-
}, null, 8, ["label", "control"])) : t.control.type === "select" ? (
|
|
689
|
+
onChange: o
|
|
690
|
+
}, null, 8, ["label", "control"])) : t.control.type === "select" ? (d(), I(Ie, {
|
|
610
691
|
key: 1,
|
|
611
692
|
label: t.control.label,
|
|
612
693
|
control: t.control,
|
|
613
|
-
onChange:
|
|
614
|
-
}, null, 8, ["label", "control"])) : t.control.type === "vector" ? (
|
|
694
|
+
onChange: o
|
|
695
|
+
}, null, 8, ["label", "control"])) : t.control.type === "vector" ? (d(), I(he, {
|
|
615
696
|
key: 2,
|
|
616
697
|
label: t.control.label,
|
|
617
698
|
control: t.control,
|
|
618
|
-
onChange:
|
|
619
|
-
}, null, 8, ["label", "control"])) : t.control.type === "boolean" ? (
|
|
699
|
+
onChange: o
|
|
700
|
+
}, null, 8, ["label", "control"])) : t.control.type === "boolean" ? (d(), I(re, {
|
|
620
701
|
key: 3,
|
|
621
702
|
label: t.control.label,
|
|
622
703
|
control: t.control,
|
|
623
|
-
onChange:
|
|
624
|
-
}, null, 8, ["label", "control"])) : t.control.type === "fpsgraph" ? (
|
|
704
|
+
onChange: o
|
|
705
|
+
}, null, 8, ["label", "control"])) : t.control.type === "fpsgraph" ? (d(), I(Ce, {
|
|
625
706
|
key: 4,
|
|
626
707
|
label: t.control.label,
|
|
627
708
|
control: t.control
|
|
628
|
-
}, null, 8, ["label", "control"])) : t.control.type === "number" ? (
|
|
709
|
+
}, null, 8, ["label", "control"])) : t.control.type === "number" ? (d(), I(Gt, {
|
|
629
710
|
key: 5,
|
|
630
711
|
label: t.control.label,
|
|
631
712
|
control: t.control,
|
|
632
|
-
onChange:
|
|
633
|
-
}, null, 8, ["label", "control"])) : t.control.type === "range" ? (
|
|
713
|
+
onChange: o
|
|
714
|
+
}, null, 8, ["label", "control"])) : t.control.type === "range" ? (d(), I(ue, {
|
|
634
715
|
key: 6,
|
|
635
716
|
label: t.control.label,
|
|
636
717
|
control: t.control,
|
|
637
|
-
onChange:
|
|
638
|
-
}, null, 8, ["label", "control"])) : t.control.type === "button" ? (
|
|
718
|
+
onChange: o
|
|
719
|
+
}, null, 8, ["label", "control"])) : t.control.type === "button" ? (d(), v("div", {
|
|
639
720
|
key: 7,
|
|
640
|
-
class:
|
|
721
|
+
class: C(["tl-p-2", t.control.value.size === "tl-block" ? "tl-flex" : "tl-inline-flex"])
|
|
641
722
|
}, [
|
|
642
|
-
|
|
723
|
+
F(Ae, {
|
|
643
724
|
label: t.control.label,
|
|
644
725
|
control: t.control
|
|
645
726
|
}, null, 8, ["label", "control"])
|
|
646
|
-
], 2)) : (
|
|
727
|
+
], 2)) : (d(), I(Qt, {
|
|
647
728
|
key: 8,
|
|
648
729
|
label: t.control.label,
|
|
649
730
|
control: t.control,
|
|
650
|
-
onChange:
|
|
731
|
+
onChange: o
|
|
651
732
|
}, null, 8, ["label", "control"]))
|
|
652
|
-
], 64)) :
|
|
733
|
+
], 64)) : W("", !0);
|
|
653
734
|
}
|
|
654
|
-
}),
|
|
735
|
+
}), De = { class: "tl-mb-4" }, Ke = ["aria-expanded", "data-folder"], Pe = {
|
|
655
736
|
class: "tl-bg-white tl-rounded-b tl-pt-4",
|
|
656
737
|
role: "menu"
|
|
657
|
-
},
|
|
738
|
+
}, Ve = /* @__PURE__ */ w({
|
|
658
739
|
__name: "Folder",
|
|
659
740
|
props: {
|
|
660
741
|
controls: {},
|
|
661
742
|
label: {}
|
|
662
743
|
},
|
|
663
744
|
setup(e) {
|
|
664
|
-
function
|
|
665
|
-
|
|
745
|
+
function n(t, c) {
|
|
746
|
+
c.value = t;
|
|
666
747
|
}
|
|
667
|
-
const l =
|
|
748
|
+
const l = b(!1), o = () => {
|
|
668
749
|
l.value = !l.value;
|
|
669
750
|
};
|
|
670
|
-
return (t,
|
|
671
|
-
|
|
751
|
+
return (t, c) => (d(), v("div", De, [
|
|
752
|
+
i("button", {
|
|
672
753
|
class: "tl-flex tl-items-center tl-justify-between tl-w-full tl-py-2 tl-px-4 tl-bg-gray-100 tl-border-none tl-text-gray-400 tl-font-bold tl-text-xs tl-font-sans tl-cursor-pointer",
|
|
673
754
|
"aria-expanded": l.value,
|
|
674
755
|
"aria-haspopup": "true",
|
|
675
756
|
role: "button",
|
|
676
757
|
"data-folder": t.label,
|
|
677
758
|
tabindex: "0",
|
|
678
|
-
onClick:
|
|
759
|
+
onClick: o
|
|
679
760
|
}, [
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
class:
|
|
761
|
+
i("span", null, M(t.label), 1),
|
|
762
|
+
i("i", {
|
|
763
|
+
class: C(l.value ? "i-ic:baseline-keyboard-arrow-up" : "i-ic:baseline-keyboard-arrow-down")
|
|
683
764
|
}, null, 2)
|
|
684
|
-
], 8,
|
|
685
|
-
|
|
765
|
+
], 8, Ke),
|
|
766
|
+
F(ft, {
|
|
686
767
|
name: "slide",
|
|
687
768
|
"enter-active-class": "tl-animate-fade-in tl-animate-duration-200 tl-animate-ease-in-out",
|
|
688
769
|
"leave-active-class": "tl-animate-fade-out tl-animate-duration-200 tl-animate-ease-in-out"
|
|
689
770
|
}, {
|
|
690
|
-
default:
|
|
691
|
-
|
|
692
|
-
(
|
|
693
|
-
key:
|
|
694
|
-
control:
|
|
771
|
+
default: R(() => [
|
|
772
|
+
Q(i("div", Pe, [
|
|
773
|
+
(d(!0), v(K, null, B(t.controls, (a) => (d(), I(xt, {
|
|
774
|
+
key: a.label,
|
|
775
|
+
control: a,
|
|
695
776
|
role: "menuitem",
|
|
696
|
-
onChange: (
|
|
777
|
+
onChange: (s) => n(s, a)
|
|
697
778
|
}, null, 8, ["control", "onChange"]))), 128))
|
|
698
779
|
], 512), [
|
|
699
|
-
[
|
|
780
|
+
[Z, l.value]
|
|
700
781
|
])
|
|
701
782
|
]),
|
|
702
783
|
_: 1
|
|
703
784
|
})
|
|
704
785
|
]));
|
|
705
786
|
}
|
|
706
|
-
}),
|
|
787
|
+
}), Ue = { class: "tl-relative tl-px-4 tl-py-6 tl-grid tl-grid-cols-2 tl-border tl-border-solid tl-border-gray-300 tl-rounded tl-my-4" }, Oe = { class: "tl-absolute tl-bg-white tl-text-gray-400 tl-px-2 tl-rounded -tl-top-2 tl-left-2" }, ot = /* @__PURE__ */ w({
|
|
788
|
+
__name: "Pane",
|
|
789
|
+
props: {
|
|
790
|
+
title: {}
|
|
791
|
+
},
|
|
792
|
+
setup(e) {
|
|
793
|
+
return (n, l) => (d(), v("div", Ue, [
|
|
794
|
+
i("span", Oe, M(n.title), 1),
|
|
795
|
+
mt(n.$slots, "default")
|
|
796
|
+
]));
|
|
797
|
+
}
|
|
798
|
+
}), Be = { class: "" }, Le = ["onClick"], ze = { class: "tl-cursor-pointer tl-flex tl-items-center" }, Re = { class: "tl-mr-2 tl-py-2" }, qe = /* @__PURE__ */ i("path", {
|
|
799
|
+
"stroke-linecap": "round",
|
|
800
|
+
"stroke-linejoin": "round",
|
|
801
|
+
"stroke-width": "2",
|
|
802
|
+
d: "M9 5l7 7-7 7"
|
|
803
|
+
}, null, -1), Ne = [
|
|
804
|
+
qe
|
|
805
|
+
], Xe = { class: "tl-border-l-2 tl-border-transparent tl-border-l-gray-200 tl-border-2 tl-border-solid tl-ml-2 tl-pl-4" }, wt = /* @__PURE__ */ w({
|
|
806
|
+
__name: "Tree",
|
|
807
|
+
props: {
|
|
808
|
+
items: {},
|
|
809
|
+
depth: { default: 0 }
|
|
810
|
+
},
|
|
811
|
+
setup(e) {
|
|
812
|
+
const n = e, l = P(() => {
|
|
813
|
+
var t;
|
|
814
|
+
return (t = n.items) == null ? void 0 : t.map((c) => V({
|
|
815
|
+
...c,
|
|
816
|
+
isOpen: !1
|
|
817
|
+
}));
|
|
818
|
+
});
|
|
819
|
+
function o(t) {
|
|
820
|
+
t.isOpen = !t.isOpen;
|
|
821
|
+
}
|
|
822
|
+
return (t, c) => (d(), v("div", Be, [
|
|
823
|
+
i("ul", {
|
|
824
|
+
class: C(["tl-list-none", { "tl-pl-0": t.depth === 0 }]),
|
|
825
|
+
"V-IF": ""
|
|
826
|
+
}, [
|
|
827
|
+
(d(!0), v(K, null, B(l.value, (a, s) => (d(), v("li", {
|
|
828
|
+
key: s,
|
|
829
|
+
onClick: (f) => o(a)
|
|
830
|
+
}, [
|
|
831
|
+
i("div", ze, [
|
|
832
|
+
i("span", Re, [
|
|
833
|
+
(d(), v("svg", {
|
|
834
|
+
class: C([a.isOpen ? "tl-transform tl-rotate-90" : "", "tl-w-4 tl-h-4 tl-transition-transform tl-text-gray-300"]),
|
|
835
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
836
|
+
fill: "none",
|
|
837
|
+
viewBox: "0 0 24 24",
|
|
838
|
+
stroke: "currentColor"
|
|
839
|
+
}, Ne, 2))
|
|
840
|
+
]),
|
|
841
|
+
J(" " + M(a.name), 1)
|
|
842
|
+
]),
|
|
843
|
+
Q(i("div", Xe, [
|
|
844
|
+
mt(t.$slots, `depth-${t.depth}`, { item: a }, () => [
|
|
845
|
+
F(wt, {
|
|
846
|
+
items: a.children,
|
|
847
|
+
depth: t.depth + 1
|
|
848
|
+
}, null, 8, ["items", "depth"])
|
|
849
|
+
])
|
|
850
|
+
], 512), [
|
|
851
|
+
[Z, a.isOpen]
|
|
852
|
+
])
|
|
853
|
+
], 8, Le))), 128))
|
|
854
|
+
], 2)
|
|
855
|
+
]));
|
|
856
|
+
}
|
|
857
|
+
}), Ye = { class: "tl-mb-4" }, We = ["aria-expanded"], je = /* @__PURE__ */ i("span", null, [
|
|
858
|
+
/* @__PURE__ */ i("i", { class: "i-iconoir-dashboard-speed" }),
|
|
859
|
+
/* @__PURE__ */ J(" Performance ")
|
|
860
|
+
], -1), Ge = {
|
|
861
|
+
class: "tl-bg-white tl-rounded-b tl-pt-4",
|
|
862
|
+
role: "menu"
|
|
863
|
+
}, He = { class: "tl-p-2" }, Je = { class: "tl-flex tl-items-center tl-mb-2" }, Qe = { class: "tl-bg-gray-200 tl-text-gray-600 tl-rounded tl-p-1 tl-flex tl-w-4 tl-mr-1" }, Ze = { class: "tl-ml-2 tl-font-bold tl-text" }, tl = { class: "tl-text-xs tl-text-gray-500" }, el = { class: "tl-flex tl-items-center tl-mb-2" }, ll = { class: "tl-bg-gray-200 tl-text-gray-600 tl-rounded tl-p-1 tl-flex tl-w-4 tl-mr-1" }, ol = { class: "tl-ml-2 tl-font-bold tl-text" }, nl = { class: "tl-text-xs tl-text-gray-500" }, rl = { class: "tl-w-full tl-overflow tl-text-xxs" }, al = /* @__PURE__ */ w({
|
|
864
|
+
__name: "index",
|
|
865
|
+
props: {
|
|
866
|
+
uuid: {}
|
|
867
|
+
},
|
|
868
|
+
setup(e) {
|
|
869
|
+
const n = e, { uuid: l } = q(n), { gl: o, memory: t } = ct(l == null ? void 0 : l.value), c = [{
|
|
870
|
+
label: "geometries",
|
|
871
|
+
icon: "i-iconoir-box-3d-three-points"
|
|
872
|
+
}, {
|
|
873
|
+
label: "textures",
|
|
874
|
+
icon: "i-iconoir-select-face-3d"
|
|
875
|
+
}], a = [{
|
|
876
|
+
label: "calls",
|
|
877
|
+
icon: "i-iconoir-comp-align-left"
|
|
878
|
+
}, {
|
|
879
|
+
label: "triangles",
|
|
880
|
+
icon: "i-iconoir-triangle"
|
|
881
|
+
}, {
|
|
882
|
+
label: "points",
|
|
883
|
+
icon: "i-iconoir-one-point-circle"
|
|
884
|
+
}, {
|
|
885
|
+
label: "lines",
|
|
886
|
+
icon: "i-iconoir-linear"
|
|
887
|
+
}], s = V({
|
|
888
|
+
geometries: 0,
|
|
889
|
+
textures: 0,
|
|
890
|
+
calls: 0,
|
|
891
|
+
triangles: 0,
|
|
892
|
+
points: 0,
|
|
893
|
+
lines: 0,
|
|
894
|
+
programs: []
|
|
895
|
+
});
|
|
896
|
+
bt(() => {
|
|
897
|
+
o && (s.geometries = o.info.memory.geometries, s.textures = o.info.memory.textures, s.calls = o.info.render.calls, s.triangles = o.info.render.triangles, s.points = o.info.render.points, s.lines = o.info.render.lines, s.programs = o.info.programs);
|
|
898
|
+
});
|
|
899
|
+
const f = b(!1), y = () => {
|
|
900
|
+
f.value = !f.value;
|
|
901
|
+
}, g = P(() => s.programs.map((u) => ({
|
|
902
|
+
...u,
|
|
903
|
+
name: u.type,
|
|
904
|
+
uniforms: u.getUniforms()
|
|
905
|
+
})));
|
|
906
|
+
return (u, r) => (d(), v("div", Ye, [
|
|
907
|
+
i("button", {
|
|
908
|
+
class: "tl-flex tl-items-center tl-justify-between tl-w-full tl-py-2 tl-px-4 tl-bg-gray-100 tl-border-none tl-text-gray-400 tl-font-bold tl-text-xs tl-font-sans tl-cursor-pointer",
|
|
909
|
+
"aria-expanded": f.value,
|
|
910
|
+
"aria-haspopup": "true",
|
|
911
|
+
role: "button",
|
|
912
|
+
tabindex: "0",
|
|
913
|
+
onClick: y
|
|
914
|
+
}, [
|
|
915
|
+
je,
|
|
916
|
+
i("i", {
|
|
917
|
+
class: C(f.value ? "i-ic:baseline-keyboard-arrow-up" : "i-ic:baseline-keyboard-arrow-down")
|
|
918
|
+
}, null, 2)
|
|
919
|
+
], 8, We),
|
|
920
|
+
F(ft, {
|
|
921
|
+
name: "slide",
|
|
922
|
+
"enter-active-class": "tl-animate-fade-in tl-animate-duration-200 tl-animate-ease-in-out",
|
|
923
|
+
"leave-active-class": "tl-animate-fade-out tl-animate-duration-200 tl-animate-ease-in-out"
|
|
924
|
+
}, {
|
|
925
|
+
default: R(() => [
|
|
926
|
+
Q(i("div", Ge, [
|
|
927
|
+
i("div", He, [
|
|
928
|
+
F(ot, {
|
|
929
|
+
title: `Memory ${k(qt)(k(t).allocatedMem)}KB`
|
|
930
|
+
}, {
|
|
931
|
+
default: R(() => [
|
|
932
|
+
(d(), v(K, null, B(c, (p) => i("div", {
|
|
933
|
+
key: p,
|
|
934
|
+
class: "tl-flex tl-flex-col tl-items-center"
|
|
935
|
+
}, [
|
|
936
|
+
i("div", Je, [
|
|
937
|
+
i("span", Qe, [
|
|
938
|
+
i("i", {
|
|
939
|
+
class: C(["tl-pl tl-text-sm", p.icon])
|
|
940
|
+
}, null, 2)
|
|
941
|
+
]),
|
|
942
|
+
i("span", Ze, M(s[p.label]), 1)
|
|
943
|
+
]),
|
|
944
|
+
i("span", tl, M(p.label), 1)
|
|
945
|
+
])), 64))
|
|
946
|
+
]),
|
|
947
|
+
_: 1
|
|
948
|
+
}, 8, ["title"]),
|
|
949
|
+
F(_t, {
|
|
950
|
+
points: k(t).accumulator,
|
|
951
|
+
value: k(t).currentMem,
|
|
952
|
+
unit: "MB",
|
|
953
|
+
label: "memory"
|
|
954
|
+
}, null, 8, ["points", "value"]),
|
|
955
|
+
F(ot, { title: "Render" }, {
|
|
956
|
+
default: R(() => [
|
|
957
|
+
(d(), v(K, null, B(a, (p) => i("div", {
|
|
958
|
+
key: p,
|
|
959
|
+
class: "tl-flex tl-flex-col tl-items-center tl-mb-2"
|
|
960
|
+
}, [
|
|
961
|
+
i("div", el, [
|
|
962
|
+
i("span", ll, [
|
|
963
|
+
i("i", {
|
|
964
|
+
class: C(["tl-pl tl-text-sm", p.icon])
|
|
965
|
+
}, null, 2)
|
|
966
|
+
]),
|
|
967
|
+
i("span", ol, M(s[p.label]), 1)
|
|
968
|
+
]),
|
|
969
|
+
i("span", nl, M(p.label), 1)
|
|
970
|
+
])), 64))
|
|
971
|
+
]),
|
|
972
|
+
_: 1
|
|
973
|
+
}),
|
|
974
|
+
F(ot, { title: "Programs" }, {
|
|
975
|
+
default: R(() => [
|
|
976
|
+
F(wt, { items: g.value }, {
|
|
977
|
+
"depth-0": R(({ item: p }) => [
|
|
978
|
+
i("pre", rl, M(p), 1)
|
|
979
|
+
]),
|
|
980
|
+
_: 1
|
|
981
|
+
}, 8, ["items"])
|
|
982
|
+
]),
|
|
983
|
+
_: 1
|
|
984
|
+
})
|
|
985
|
+
])
|
|
986
|
+
], 512), [
|
|
987
|
+
[Z, f.value]
|
|
988
|
+
])
|
|
989
|
+
]),
|
|
990
|
+
_: 1
|
|
991
|
+
})
|
|
992
|
+
]));
|
|
993
|
+
}
|
|
994
|
+
}), sl = {
|
|
707
995
|
tabindex: "0",
|
|
708
996
|
class: "tl-bg-white tl-shadow-xl tl-rounded tl-border-4 tl-border-solid tl-border-black"
|
|
709
|
-
},
|
|
710
|
-
/* @__PURE__ */
|
|
711
|
-
/* @__PURE__ */
|
|
712
|
-
/* @__PURE__ */
|
|
713
|
-
], -1),
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
],
|
|
997
|
+
}, il = /* @__PURE__ */ i("i", { class: "tl-h-4 tl-w-4 tl-p-1.5 tl-flex tl-items-center tl-line-height-0 tl-rounded-full tl-bg-gray-100 tl-text-xs" }, "🍰", -1), cl = /* @__PURE__ */ i("div", null, [
|
|
998
|
+
/* @__PURE__ */ i("i", { class: "i-ic-baseline-drag-indicator" }),
|
|
999
|
+
/* @__PURE__ */ i("i", { class: "i-ic-baseline-drag-indicator" }),
|
|
1000
|
+
/* @__PURE__ */ i("i", { class: "i-ic-baseline-drag-indicator" })
|
|
1001
|
+
], -1), ul = /* @__PURE__ */ i("div", null, null, -1), dl = [
|
|
1002
|
+
il,
|
|
1003
|
+
cl,
|
|
1004
|
+
ul
|
|
1005
|
+
], pl = 280, gl = /* @__PURE__ */ w({
|
|
718
1006
|
__name: "TresLeches",
|
|
719
1007
|
props: {
|
|
720
1008
|
uuid: {}
|
|
721
1009
|
},
|
|
722
1010
|
setup(e) {
|
|
723
|
-
const
|
|
724
|
-
function
|
|
725
|
-
|
|
1011
|
+
const n = e, { uuid: l } = q(n), { width: o } = vt(), t = b(null), c = Lt(l == null ? void 0 : l.value), a = ct(l == null ? void 0 : l.value);
|
|
1012
|
+
function s(y, g) {
|
|
1013
|
+
c[k(y)].value = g, c[k(y)][k(y)] = g;
|
|
726
1014
|
}
|
|
727
|
-
const
|
|
728
|
-
const
|
|
729
|
-
for (const
|
|
730
|
-
const
|
|
731
|
-
|
|
1015
|
+
const f = P(() => {
|
|
1016
|
+
const y = {};
|
|
1017
|
+
for (const g in c) {
|
|
1018
|
+
const u = c[g], r = u.folder || "default";
|
|
1019
|
+
y[r] || (y[r] = []), y[r].push(u);
|
|
732
1020
|
}
|
|
733
|
-
return
|
|
1021
|
+
return y;
|
|
734
1022
|
});
|
|
735
|
-
return (
|
|
736
|
-
id:
|
|
737
|
-
"initial-value": { x:
|
|
738
|
-
class:
|
|
1023
|
+
return (y, g) => (d(), I(k(Ot), {
|
|
1024
|
+
id: k(l),
|
|
1025
|
+
"initial-value": { x: k(o) - pl - 40, y: 10 },
|
|
1026
|
+
class: C(["tl-absolute tl-select-none tl-z-24 tl-w-280px tl-font-sans tl-text-xs", y.$attrs.class]),
|
|
739
1027
|
handle: t.value
|
|
740
1028
|
}, {
|
|
741
|
-
default:
|
|
742
|
-
|
|
743
|
-
|
|
1029
|
+
default: R(() => [
|
|
1030
|
+
i("div", sl, [
|
|
1031
|
+
i("header", {
|
|
744
1032
|
ref_key: "handle",
|
|
745
1033
|
ref: t,
|
|
746
1034
|
class: "tl-relative tl-cursor-grabbing tl-p-4 tl-flex tl-justify-between tl-text-gray-200 tl-relative"
|
|
747
|
-
},
|
|
748
|
-
(
|
|
749
|
-
|
|
1035
|
+
}, dl, 512),
|
|
1036
|
+
(d(!0), v(K, null, B(f.value, (u, r) => (d(), v(K, { key: r }, [
|
|
1037
|
+
r !== "default" ? (d(), I(Ve, {
|
|
750
1038
|
key: 0,
|
|
751
|
-
label:
|
|
752
|
-
controls:
|
|
753
|
-
}, null, 8, ["label", "controls"])) :
|
|
754
|
-
|
|
755
|
-
key:
|
|
756
|
-
control:
|
|
757
|
-
onChange: (
|
|
758
|
-
}, null, 8, ["control", "onChange"]))), 128)) :
|
|
759
|
-
], 64))), 128))
|
|
1039
|
+
label: r,
|
|
1040
|
+
controls: u
|
|
1041
|
+
}, null, 8, ["label", "controls"])) : W("", !0),
|
|
1042
|
+
r === "default" ? (d(!0), v(K, { key: 1 }, B(u, (p) => (d(), I(xt, {
|
|
1043
|
+
key: p.label,
|
|
1044
|
+
control: p,
|
|
1045
|
+
onChange: (E) => s(p.key, E)
|
|
1046
|
+
}, null, 8, ["control", "onChange"]))), 128)) : W("", !0)
|
|
1047
|
+
], 64))), 128)),
|
|
1048
|
+
k(a).gl ? (d(), I(al, {
|
|
1049
|
+
key: 0,
|
|
1050
|
+
uuid: k(l)
|
|
1051
|
+
}, null, 8, ["uuid"])) : W("", !0)
|
|
760
1052
|
])
|
|
761
1053
|
]),
|
|
762
1054
|
_: 1
|
|
763
1055
|
}, 8, ["id", "initial-value", "class", "handle"]));
|
|
764
1056
|
}
|
|
1057
|
+
}), yl = /* @__PURE__ */ w({
|
|
1058
|
+
__name: "TresPerf",
|
|
1059
|
+
setup(e) {
|
|
1060
|
+
return Xt(), (n, l) => (d(), v("div"));
|
|
1061
|
+
}
|
|
765
1062
|
});
|
|
766
1063
|
export {
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
1064
|
+
yl as Perf,
|
|
1065
|
+
gl as TresLeches,
|
|
1066
|
+
bl as useControls,
|
|
1067
|
+
Lt as useControlsProvider,
|
|
1068
|
+
Xt as usePerf
|
|
770
1069
|
};
|