@gkucmierz/nano-ui 1.6.0 → 1.7.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/README.md +383 -38
- package/dist/nano-ui-512.png +0 -0
- package/dist/nano-ui-dark.svg +54 -0
- package/dist/nano-ui.css +1 -1
- package/dist/nano-ui.js +629 -210
- package/dist/nano-ui.svg +89 -0
- package/package.json +6 -2
package/dist/nano-ui.js
CHANGED
|
@@ -96,121 +96,200 @@ var k = new class {
|
|
|
96
96
|
}
|
|
97
97
|
}();
|
|
98
98
|
typeof window < "u" && (window.Analytics = k);
|
|
99
|
+
var A = {
|
|
100
|
+
name: "@gkucmierz/nano-ui",
|
|
101
|
+
version: "1.7.2",
|
|
102
|
+
license: "ISC",
|
|
103
|
+
author: "Grzegorz Kućmierz",
|
|
104
|
+
description: "High-performance, minimal footprint Vue 3 UI library, interactive 3D charts, and directives.",
|
|
105
|
+
type: "module",
|
|
106
|
+
main: "./dist/nano-ui.js",
|
|
107
|
+
module: "./dist/nano-ui.js",
|
|
108
|
+
exports: {
|
|
109
|
+
".": { import: "./dist/nano-ui.js" },
|
|
110
|
+
"./style.css": "./dist/nano-ui.css",
|
|
111
|
+
"./nano-ui.css": "./dist/nano-ui.css",
|
|
112
|
+
"./dist/*": "./dist/*"
|
|
113
|
+
},
|
|
114
|
+
publishConfig: { access: "public" },
|
|
115
|
+
files: ["dist"],
|
|
116
|
+
scripts: {
|
|
117
|
+
dev: "vite",
|
|
118
|
+
prebuild: "node scripts/generate-icons.mjs",
|
|
119
|
+
build: "vite build",
|
|
120
|
+
"prebuild:app": "node scripts/generate-icons.mjs",
|
|
121
|
+
"build:app": "vite build -c vite.config.app.js && node scripts/prerender.mjs",
|
|
122
|
+
prerender: "node scripts/prerender.mjs",
|
|
123
|
+
icons: "node scripts/generate-icons.mjs",
|
|
124
|
+
"test:e2e": "playwright test"
|
|
125
|
+
},
|
|
126
|
+
peerDependencies: { vue: "^3.0.0" },
|
|
127
|
+
devDependencies: {
|
|
128
|
+
"@playwright/test": "^1.61.1",
|
|
129
|
+
"@vitejs/plugin-vue": "^6.0.5",
|
|
130
|
+
vite: "^8.0.12",
|
|
131
|
+
vue: "^3.4.0"
|
|
132
|
+
},
|
|
133
|
+
repository: {
|
|
134
|
+
type: "git",
|
|
135
|
+
url: "https://gitea.7u.pl/gkucmierz/nano-ui.git"
|
|
136
|
+
},
|
|
137
|
+
homepage: "https://gitea.7u.pl/gkucmierz/nano-ui",
|
|
138
|
+
keywords: [
|
|
139
|
+
"vue",
|
|
140
|
+
"ui",
|
|
141
|
+
"components",
|
|
142
|
+
"directives",
|
|
143
|
+
"ripple",
|
|
144
|
+
"nano",
|
|
145
|
+
"glassmorphism",
|
|
146
|
+
"chart",
|
|
147
|
+
"donut-chart",
|
|
148
|
+
"pie-chart",
|
|
149
|
+
"3d-chart",
|
|
150
|
+
"svg-chart",
|
|
151
|
+
"interactive-charts",
|
|
152
|
+
"scrubber",
|
|
153
|
+
"precision-scrubber",
|
|
154
|
+
"high-precision",
|
|
155
|
+
"slider",
|
|
156
|
+
"jog-dial"
|
|
157
|
+
],
|
|
158
|
+
dependencies: {
|
|
159
|
+
"@gkucmierz/analytics": "^1.0.1",
|
|
160
|
+
"vue-router": "^5.0.6"
|
|
161
|
+
}
|
|
162
|
+
}, j = ({ storageKey: e = "nano-ui-theme", defaultTheme: t = "dark" } = {}) => {
|
|
163
|
+
if (typeof window > "u" || typeof document > "u") return t;
|
|
164
|
+
try {
|
|
165
|
+
let n = localStorage.getItem(e), r = window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches, i = n === "light" || n === "dark" ? n : r ? "dark" : t || "light";
|
|
166
|
+
return i === "light" ? document.documentElement.setAttribute("data-theme", "light") : document.documentElement.removeAttribute("data-theme"), document.documentElement.style.colorScheme = i, document.documentElement.classList.add("preload"), i;
|
|
167
|
+
} catch {
|
|
168
|
+
return t;
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
j();
|
|
99
172
|
//#endregion
|
|
100
173
|
//#region src/directives/ripple.js
|
|
101
|
-
var
|
|
174
|
+
var M = { mounted(e, t) {
|
|
102
175
|
e.style.position = "relative", e.style.overflow = "hidden", e.addEventListener("click", function(n) {
|
|
103
176
|
let r = e.getBoundingClientRect(), i = n.clientX - r.left, a = n.clientY - r.top, o = document.createElement("span"), s = Math.max(r.width, r.height), c = s / 2;
|
|
104
177
|
o.style.width = o.style.height = `${s}px`, o.style.left = `${i - c}px`, o.style.top = `${a - c}px`, o.classList.add("ripple"), t.value && typeof t.value == "string" && (o.style.backgroundColor = t.value), o.addEventListener("animationend", () => o.remove(), { once: !0 }), e.appendChild(o);
|
|
105
178
|
});
|
|
106
|
-
} },
|
|
179
|
+
} }, N = _({
|
|
107
180
|
isVisible: !1,
|
|
108
181
|
text: "",
|
|
109
182
|
customClass: "",
|
|
110
183
|
targetRect: null
|
|
111
184
|
});
|
|
112
|
-
function
|
|
185
|
+
function P(e, t) {
|
|
113
186
|
if (!t) return;
|
|
114
187
|
let n = typeof t == "object" ? t.text : t, r = typeof t == "object" && t.class || "";
|
|
115
188
|
if (!n) return;
|
|
116
189
|
e.hasAttribute("aria-label") || e.setAttribute("aria-label", n);
|
|
117
190
|
let i = e.getBoundingClientRect();
|
|
118
|
-
|
|
191
|
+
N.targetRect = {
|
|
119
192
|
top: i.top,
|
|
120
193
|
left: i.left,
|
|
121
194
|
width: i.width,
|
|
122
195
|
bottom: i.bottom,
|
|
123
196
|
right: i.right
|
|
124
|
-
},
|
|
197
|
+
}, N.text = n, N.customClass = r, N.isVisible = !0;
|
|
125
198
|
}
|
|
126
|
-
typeof window < "u" && window.addEventListener("scroll",
|
|
199
|
+
typeof window < "u" && window.addEventListener("scroll", F, {
|
|
127
200
|
passive: !0,
|
|
128
201
|
capture: !0
|
|
129
202
|
});
|
|
130
|
-
function
|
|
131
|
-
|
|
203
|
+
function F() {
|
|
204
|
+
N.isVisible = !1;
|
|
132
205
|
}
|
|
133
206
|
//#endregion
|
|
134
207
|
//#region src/directives/tooltip.js
|
|
135
|
-
var
|
|
208
|
+
var I = {
|
|
136
209
|
mounted(e, t) {
|
|
137
210
|
e._tooltipOptions = t.value;
|
|
138
211
|
let n = null, r = !1;
|
|
139
212
|
e._handleMouseEnter = () => {
|
|
140
|
-
r ||
|
|
213
|
+
r || P(e, e._tooltipOptions);
|
|
141
214
|
}, e._handleMouseLeave = () => {
|
|
142
|
-
r ||
|
|
215
|
+
r || F();
|
|
143
216
|
}, e._handleFocus = () => {
|
|
144
|
-
r ||
|
|
217
|
+
r || P(e, e._tooltipOptions);
|
|
145
218
|
}, e._handleBlur = () => {
|
|
146
|
-
r ||
|
|
219
|
+
r || F();
|
|
147
220
|
}, e._handleTouchStart = () => {
|
|
148
221
|
r = !0, n && clearTimeout(n), n = setTimeout(() => {
|
|
149
|
-
|
|
222
|
+
P(e, e._tooltipOptions);
|
|
150
223
|
}, 400);
|
|
151
224
|
}, e._handleTouchEnd = () => {
|
|
152
|
-
n && clearTimeout(n),
|
|
225
|
+
n && clearTimeout(n), F(), setTimeout(() => {
|
|
153
226
|
r = !1;
|
|
154
227
|
}, 500);
|
|
155
228
|
}, e._handleTouchCancel = () => {
|
|
156
|
-
n && clearTimeout(n),
|
|
229
|
+
n && clearTimeout(n), F(), setTimeout(() => {
|
|
157
230
|
r = !1;
|
|
158
231
|
}, 500);
|
|
159
232
|
}, e._handleContextMenu = (t) => {
|
|
160
233
|
let n = typeof e._tooltipOptions == "object" ? e._tooltipOptions.text : e._tooltipOptions;
|
|
161
|
-
r &&
|
|
234
|
+
r && N.isVisible && N.text === n && t.preventDefault();
|
|
162
235
|
}, e.addEventListener("mouseenter", e._handleMouseEnter), e.addEventListener("mouseleave", e._handleMouseLeave), e.addEventListener("focus", e._handleFocus), e.addEventListener("blur", e._handleBlur), e.addEventListener("touchstart", e._handleTouchStart, { passive: !0 }), e.addEventListener("touchend", e._handleTouchEnd), e.addEventListener("touchmove", e._handleTouchCancel, { passive: !0 }), e.addEventListener("touchcancel", e._handleTouchCancel), e.addEventListener("contextmenu", e._handleContextMenu);
|
|
163
236
|
},
|
|
164
237
|
updated(e, t) {
|
|
165
238
|
e._tooltipOptions = t.value;
|
|
166
239
|
let n = typeof t.value == "object" ? t.value.text : t.value;
|
|
167
|
-
|
|
240
|
+
N.isVisible && N.text !== n && (e.matches(":hover") || document.activeElement === e) && P(e, t.value);
|
|
168
241
|
},
|
|
169
242
|
unmounted(e) {
|
|
170
|
-
e._handleMouseEnter && (e.removeEventListener("mouseenter", e._handleMouseEnter), e.removeEventListener("mouseleave", e._handleMouseLeave), e.removeEventListener("focus", e._handleFocus), e.removeEventListener("blur", e._handleBlur), e.removeEventListener("touchstart", e._handleTouchStart), e.removeEventListener("touchend", e._handleTouchEnd), e.removeEventListener("touchmove", e._handleTouchCancel), e.removeEventListener("touchcancel", e._handleTouchCancel), e.removeEventListener("contextmenu", e._handleContextMenu)),
|
|
243
|
+
e._handleMouseEnter && (e.removeEventListener("mouseenter", e._handleMouseEnter), e.removeEventListener("mouseleave", e._handleMouseLeave), e.removeEventListener("focus", e._handleFocus), e.removeEventListener("blur", e._handleBlur), e.removeEventListener("touchstart", e._handleTouchStart), e.removeEventListener("touchend", e._handleTouchEnd), e.removeEventListener("touchmove", e._handleTouchCancel), e.removeEventListener("touchcancel", e._handleTouchCancel), e.removeEventListener("contextmenu", e._handleContextMenu)), F();
|
|
171
244
|
}
|
|
172
|
-
},
|
|
245
|
+
}, L = (e, t) => {
|
|
173
246
|
let n = e.__vccOpts || e;
|
|
174
247
|
for (let [e, r] of t) n[e] = r;
|
|
175
248
|
return n;
|
|
176
|
-
},
|
|
249
|
+
}, R = /* @__PURE__ */ L({
|
|
177
250
|
__name: "GlobalTooltip",
|
|
178
251
|
setup(e) {
|
|
179
|
-
let t = v(null), n = v(0), r = v(0), i = v(0), a = v(!1)
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
252
|
+
let t = v(null), n = v(0), r = v(0), i = v(0), a = v(!1), s = async () => {
|
|
253
|
+
if (!N.isVisible || !t.value || !N.targetRect || (await d(), !t.value || !N.targetRect)) return;
|
|
254
|
+
let e = N.targetRect, o = t.value, s = o.offsetWidth || o.getBoundingClientRect().width, c = o.offsetHeight || o.getBoundingClientRect().height, l = window.innerWidth, u = window.innerHeight, f = e.top, p = u - e.bottom, m = e.top - c - 8;
|
|
255
|
+
a.value = !1, (m < 8 || f < c + 8 && p > f) && (m = e.bottom + 8, a.value = !0), m + c > u - 8 && (m = Math.max(8, u - c - 8)), m < 8 && (m = 8);
|
|
256
|
+
let h = e.left + e.width / 2, g = h - s / 2, _ = Math.max(8, l - s - 8), v = Math.max(8, Math.min(_, g)), y = h - (v + s / 2), b = Math.max(0, s / 2 - 19);
|
|
257
|
+
i.value = Math.max(-b, Math.min(b, y)), n.value = v, r.value = m;
|
|
258
|
+
};
|
|
259
|
+
return w([
|
|
260
|
+
() => N.isVisible,
|
|
261
|
+
() => N.text,
|
|
262
|
+
() => N.targetRect
|
|
263
|
+
], async ([e]) => {
|
|
264
|
+
e && await s();
|
|
265
|
+
}, { deep: !0 }), m(() => {
|
|
266
|
+
window.addEventListener("resize", s, { passive: !0 });
|
|
267
|
+
}), h(() => {
|
|
268
|
+
window.removeEventListener("resize", s);
|
|
190
269
|
}), (e, s) => (g(), o("div", {
|
|
191
270
|
ref_key: "tooltipRef",
|
|
192
271
|
ref: t,
|
|
193
272
|
class: f([
|
|
194
273
|
"global-tooltip",
|
|
195
274
|
{
|
|
196
|
-
visible: C(
|
|
275
|
+
visible: C(N).isVisible,
|
|
197
276
|
"tooltip-bottom": a.value
|
|
198
277
|
},
|
|
199
|
-
C(
|
|
278
|
+
C(N).customClass
|
|
200
279
|
]),
|
|
201
280
|
style: p({
|
|
202
281
|
transform: `translate(${n.value}px, ${r.value}px)`,
|
|
203
282
|
"--arrow-offset": `${i.value}px`
|
|
204
283
|
})
|
|
205
|
-
}, S(C(
|
|
284
|
+
}, S(C(N).text), 7));
|
|
206
285
|
}
|
|
207
|
-
}, [["__scopeId", "data-v-
|
|
286
|
+
}, [["__scopeId", "data-v-d7961ba4"]]), z = { class: "nano-modal-title" }, B = {
|
|
208
287
|
key: 1,
|
|
209
288
|
class: "nano-modal-body"
|
|
210
|
-
},
|
|
289
|
+
}, ee = {
|
|
211
290
|
key: 2,
|
|
212
291
|
class: "nano-modal-footer"
|
|
213
|
-
},
|
|
292
|
+
}, te = { class: "nano-modal-actions" }, V = /* @__PURE__ */ L({
|
|
214
293
|
__name: "NanoModal",
|
|
215
294
|
props: {
|
|
216
295
|
visible: {
|
|
@@ -292,7 +371,7 @@ var P = {
|
|
|
292
371
|
"cancel"
|
|
293
372
|
],
|
|
294
373
|
setup(e, { emit: u }) {
|
|
295
|
-
let m = e, _ = u, y = v(null), C = v(null), k = v(null), A = v(null), j = v(null), M = v(null), N = v(!1), P = v(!1), F = 0, I = 0,
|
|
374
|
+
let m = e, _ = u, y = v(null), C = v(null), k = v(null), A = v(null), j = v(null), M = v(null), N = v(!1), P = v(!1), F = 0, I = 0, L = 0, R = 0, V = 0, ne = 0, re = 0, ie = 0, ae = r(() => {
|
|
296
375
|
let e = {};
|
|
297
376
|
return j.value === null ? (e.maxWidth = typeof m.width == "number" ? `${m.width}px` : m.width, e.width = "100%") : (e.width = `${j.value}px`, e.maxWidth = "none"), M.value === null ? m.height !== "auto" && (e.height = typeof m.height == "number" ? `${m.height}px` : m.height) : (e.height = `${M.value}px`, e.maxHeight = "none"), k.value !== null && A.value !== null && (e.position = "absolute", e.left = `${k.value}px`, e.top = `${A.value}px`, e.transform = "none", e.margin = "0"), e;
|
|
298
377
|
}), oe = (e) => {
|
|
@@ -301,22 +380,22 @@ var P = {
|
|
|
301
380
|
let e = C.value.getBoundingClientRect();
|
|
302
381
|
k.value = e.left, A.value = e.top, j.value === null && (j.value = e.width), M.value === null && (M.value = e.height);
|
|
303
382
|
}
|
|
304
|
-
|
|
383
|
+
L = k.value, R = A.value, window.addEventListener("mousemove", se), window.addEventListener("mouseup", ce);
|
|
305
384
|
}
|
|
306
385
|
}, se = (e) => {
|
|
307
386
|
if (!N.value) return;
|
|
308
|
-
let t =
|
|
387
|
+
let t = L + (e.clientX - F), n = R + (e.clientY - I), r = window.innerWidth, i = window.innerHeight, a = C.value.getBoundingClientRect();
|
|
309
388
|
t < 0 && (t = 0), n < 0 && (n = 0), t + a.width > r && (t = r - a.width), n + a.height > i && (n = i - a.height), k.value = t, A.value = n;
|
|
310
389
|
}, ce = () => {
|
|
311
390
|
N.value = !1, window.removeEventListener("mousemove", se), window.removeEventListener("mouseup", ce);
|
|
312
391
|
}, le = (e) => {
|
|
313
392
|
if (!m.resizable) return;
|
|
314
|
-
e.preventDefault(), e.stopPropagation(), P.value = !0,
|
|
393
|
+
e.preventDefault(), e.stopPropagation(), P.value = !0, V = e.clientX, ne = e.clientY;
|
|
315
394
|
let t = C.value.getBoundingClientRect();
|
|
316
395
|
k.value === null && (k.value = t.left, A.value = t.top), re = t.width, ie = t.height, window.addEventListener("mousemove", ue), window.addEventListener("mouseup", de);
|
|
317
396
|
}, ue = (e) => {
|
|
318
397
|
if (!P.value) return;
|
|
319
|
-
let t = re + (e.clientX -
|
|
398
|
+
let t = re + (e.clientX - V), n = ie + (e.clientY - ne);
|
|
320
399
|
t < m.minWidth && (t = m.minWidth), n < m.minHeight && (n = m.minHeight);
|
|
321
400
|
let r = window.innerWidth - k.value, i = window.innerHeight - A.value;
|
|
322
401
|
t > r && (t = r), n > i && (n = i), j.value = t, M.value = n;
|
|
@@ -359,7 +438,7 @@ var P = {
|
|
|
359
438
|
key: 0,
|
|
360
439
|
class: f(["nano-modal-header", { "is-draggable": e.draggable }]),
|
|
361
440
|
onMousedown: oe
|
|
362
|
-
}, [b(r.$slots, "header", {}, () => [s("h2",
|
|
441
|
+
}, [b(r.$slots, "header", {}, () => [s("h2", z, S(e.title), 1)], !0), s("button", {
|
|
363
442
|
class: "nano-modal-close-btn",
|
|
364
443
|
onClick: O(pe, ["stop"]),
|
|
365
444
|
"aria-label": "Close",
|
|
@@ -385,8 +464,8 @@ var P = {
|
|
|
385
464
|
x2: "18",
|
|
386
465
|
y2: "18"
|
|
387
466
|
})], -1)]], 32)], 34)) : a("", !0),
|
|
388
|
-
e.showBody ? (g(), o("div",
|
|
389
|
-
e.showFooter ? (g(), o("div",
|
|
467
|
+
e.showBody ? (g(), o("div", B, [b(r.$slots, "body", {}, void 0, !0)])) : a("", !0),
|
|
468
|
+
e.showFooter ? (g(), o("div", ee, [b(r.$slots, "footer", {}, () => [s("div", te, [e.showCancel ? E((g(), o("button", {
|
|
390
469
|
key: 0,
|
|
391
470
|
class: "nano-btn nano-btn-secondary",
|
|
392
471
|
onClick: ge
|
|
@@ -417,21 +496,21 @@ var P = {
|
|
|
417
496
|
})]);
|
|
418
497
|
};
|
|
419
498
|
}
|
|
420
|
-
}, [["__scopeId", "data-v-52e94a15"]]),
|
|
499
|
+
}, [["__scopeId", "data-v-52e94a15"]]), ne = ["viewBox"], re = { key: 0 }, ie = [
|
|
421
500
|
"id",
|
|
422
501
|
"x1",
|
|
423
502
|
"y1",
|
|
424
503
|
"x2",
|
|
425
504
|
"y2"
|
|
426
|
-
],
|
|
505
|
+
], ae = ["stop-color"], oe = ["stop-color"], se = [
|
|
427
506
|
"id",
|
|
428
507
|
"y1",
|
|
429
508
|
"y2"
|
|
430
|
-
],
|
|
509
|
+
], ce = ["stop-color"], le = ["stop-color"], ue = [
|
|
431
510
|
"id",
|
|
432
511
|
"y1",
|
|
433
512
|
"y2"
|
|
434
|
-
],
|
|
513
|
+
], de = ["stop-color"], fe = ["stop-color"], pe = { key: 1 }, me = ["x", "y"], he = { key: 2 }, ge = ["d", "fill"], _e = ["d", "stroke"], ve = ["d", "fill"], ye = ["d", "fill"], be = ["d", "fill"], xe = ["d", "stroke"], Se = ["d", "fill"], Ce = ["d", "stroke"], we = ["d", "stroke-width"], Te = ["transform"], Ee = ["font-size"], De = ["font-size"], Oe = ["d", "fill"], ke = ["d", "stroke"], Ae = ["d", "fill"], je = ["d", "fill"], Me = ["d", "fill"], Ne = ["d", "stroke"], Pe = ["d", "fill"], Fe = ["d", "stroke"], Ie = ["d", "stroke-width"], Le = ["onMouseenter", "onClick"], Re = ["d"], ze = ["d"], Be = ["onMouseenter", "onClick"], Ve = ["d", "stroke"], He = ["y", "fill"], Ue = ["onMouseenter", "onClick"], We = ["d", "stroke"], Ge = ["y", "fill"], Ke = /* @__PURE__ */ L({
|
|
435
514
|
__name: "ThreeDDonutChart",
|
|
436
515
|
props: {
|
|
437
516
|
data: {
|
|
@@ -629,12 +708,12 @@ var P = {
|
|
|
629
708
|
percentage: n
|
|
630
709
|
};
|
|
631
710
|
});
|
|
632
|
-
}),
|
|
711
|
+
}), ee = r(() => A.value.reduce((e, t) => e + t.value, 0)), te = r(() => {
|
|
633
712
|
if (c.centerValue !== void 0 && c.centerValue !== "") return c.centerValue;
|
|
634
|
-
let e =
|
|
635
|
-
return e ? c.centerValueFormatter ? c.centerValueFormatter(e.item.value, e.item) : L(e.item.value) : c.centerValueFormatter ? c.centerValueFormatter(
|
|
636
|
-
}),
|
|
637
|
-
let e =
|
|
713
|
+
let e = ot.value.find((e) => e.item.id === C.value);
|
|
714
|
+
return e ? c.centerValueFormatter ? c.centerValueFormatter(e.item.value, e.item) : L(e.item.value) : c.centerValueFormatter ? c.centerValueFormatter(ee.value, null) : c.valueDecimals === void 0 ? Math.round(ee.value) : L(ee.value);
|
|
715
|
+
}), V = r(() => {
|
|
716
|
+
let e = ot.value.find((e) => e.item.id === C.value);
|
|
638
717
|
return e ? R(e.item.name, 12).toUpperCase() : (c.centerLabel || "").toUpperCase();
|
|
639
718
|
}), Ke = (e, t = !1) => {
|
|
640
719
|
let n = new Map(A.value.map((e) => [e.id, e])), r = new Map(e.map((e) => [e.id, e])), i = [];
|
|
@@ -695,22 +774,22 @@ var P = {
|
|
|
695
774
|
l < o ? (o = l, a = e, s = u) : l === o && u < s && (a = e, s = u);
|
|
696
775
|
}
|
|
697
776
|
return a;
|
|
698
|
-
}, Je = r(() => c.autoRotate && B.value && B.value.length > 0 ? qe(B.value, c.rotationAngle) : c.rotationAngle),
|
|
699
|
-
let e = (
|
|
777
|
+
}, Je = r(() => c.autoRotate && B.value && B.value.length > 0 ? qe(B.value, c.rotationAngle) : c.rotationAngle), Ye = v(Je.value), Xe = v(!1), Ze = v(!1), Qe = null, H = c.is3D, U = v(c.isExpanded ? 380 : 60), W = v(c.isExpanded ? 160 : 60), G = v(c.isExpanded ? 180 : 48), $e = v(c.isExpanded ? H ? 180 * c.slopeRatio : 180 : H ? 48 * c.slopeRatio : 48), K = v(c.isExpanded ? 180 * (1 - c.thickness) : 48 * (1 - c.thickness)), q = v(c.isExpanded ? H ? 180 * (1 - c.thickness) * c.slopeRatio : 180 * (1 - c.thickness) : H ? 48 * (1 - c.thickness) * c.slopeRatio : 48 * (1 - c.thickness)), et = c.isExpanded && H ? 32 : 0, J = v(H && c.slopeRatio > .5 ? et * (2 - 2 * c.slopeRatio) : et), tt = v(c.isExpanded ? 760 : 120), nt = v(c.isExpanded ? 320 : 120), Y = v(c.isExpanded && c.showLabels ? 1 : 0), rt = r(() => {
|
|
778
|
+
let e = (G.value - 48) / 132;
|
|
700
779
|
return 13 + 6 * Math.max(0, Math.min(1, e));
|
|
701
|
-
}),
|
|
702
|
-
let e = (
|
|
780
|
+
}), it = r(() => {
|
|
781
|
+
let e = (G.value - 48) / 132;
|
|
703
782
|
return 7 + 1.5 * Math.max(0, Math.min(1, e));
|
|
704
|
-
}),
|
|
705
|
-
let e = A.value, t =
|
|
783
|
+
}), at = r(() => W.value - J.value / 2), ot = r(() => {
|
|
784
|
+
let e = A.value, t = ee.value;
|
|
706
785
|
if (t === 0) return [];
|
|
707
|
-
let n = [], r =
|
|
708
|
-
|
|
709
|
-
let a =
|
|
786
|
+
let n = [], r = Ye.value * Math.PI / 180, i = U.value;
|
|
787
|
+
W.value;
|
|
788
|
+
let a = G.value, o = $e.value, s = K.value, l = q.value, u = J.value, d = at.value, f = e.filter((e) => e.value > .001);
|
|
710
789
|
if (f.length === 1) {
|
|
711
790
|
let t = f[0], n = e.indexOf(t), r = F(t, n), p = `M ${i - a} ${d} A ${a} ${o} 0 0 1 ${i + a} ${d} A ${a} ${o} 0 0 1 ${i - a} ${d} M ${i - s} ${d} A ${s} ${l} 0 0 0 ${i + s} ${d} A ${s} ${l} 0 0 0 ${i - s} ${d} Z`, m = "", h = "";
|
|
712
791
|
u > 0 && (m = `M ${i + a} ${d} A ${a} ${o} 0 0 1 ${i - a} ${d} L ${i - a} ${d + u} A ${a} ${o} 0 0 0 ${i + a} ${d + u} Z`, h = `M ${i - s} ${d} A ${s} ${l} 0 0 1 ${i + s} ${d} L ${i + s} ${d + u} A ${s} ${l} 0 0 0 ${i - s} ${d + u} Z`);
|
|
713
|
-
let g = `M ${i - a} ${d} A ${a} ${o} 0 0 1 ${i + a} ${d} L ${i + s} ${d} A ${s} ${l} 0 0 0 ${i - s} ${d} Z`, _ = `M ${i - a} ${d} A ${a} ${o} 0 0 1 ${i + a} ${d} M ${i + s} ${d} A ${s} ${l} 0 0 0 ${i - s} ${d}`, v = h, y = `M ${i + a} ${d} A ${a} ${o} 0 0 1 ${i - a} ${d} L ${i - s} ${d} A ${s} ${l} 0 0 0 ${i + s} ${d} Z`, b = `M ${i + a} ${d} A ${a} ${o} 0 0 1 ${i - a} ${d} M ${i - s} ${d} A ${s} ${l} 0 0 0 ${i + s} ${d}`, x = m, S =
|
|
792
|
+
let g = `M ${i - a} ${d} A ${a} ${o} 0 0 1 ${i + a} ${d} L ${i + s} ${d} A ${s} ${l} 0 0 0 ${i - s} ${d} Z`, _ = `M ${i - a} ${d} A ${a} ${o} 0 0 1 ${i + a} ${d} M ${i + s} ${d} A ${s} ${l} 0 0 0 ${i - s} ${d}`, v = h, y = `M ${i + a} ${d} A ${a} ${o} 0 0 1 ${i - a} ${d} L ${i - s} ${d} A ${s} ${l} 0 0 0 ${i + s} ${d} Z`, b = `M ${i + a} ${d} A ${a} ${o} 0 0 1 ${i - a} ${d} M ${i - s} ${d} A ${s} ${l} 0 0 0 ${i + s} ${d}`, x = m, S = Ye.value * Math.PI / 180 + Math.PI, C = i + a * Math.cos(S), w = d + o * Math.sin(S), T = i + (a + 25) * Math.cos(S), E = d + (o + 35 * c.slopeRatio) * Math.sin(S), D = i + (a + s) / 2 * Math.cos(S), O = d + (o + l) / 2 * Math.sin(S), k = a - s, A = o - l;
|
|
714
793
|
return [{
|
|
715
794
|
item: t,
|
|
716
795
|
index: n,
|
|
@@ -804,7 +883,7 @@ var P = {
|
|
|
804
883
|
M ? (P = `M ${h} ${v} A ${a} ${o} 0 ${T} 1 ${y} ${b} M ${x} ${S} A ${s} ${l} 0 ${T} 0 ${C} ${w}`, N || (P += ` L ${h} ${v}`)) : (P = `M ${h} ${v} A ${a} ${o} 0 ${T} 1 ${y} ${b} L ${x} ${S} A ${s} ${l} 0 ${T} 0 ${C} ${w}`, N || (P += " Z"));
|
|
805
884
|
let F = "", I = "", L = "", R = "", z = "", B = "";
|
|
806
885
|
u > 0 && (F = `M ${h} ${v} A ${a} ${o} 0 ${T} 1 ${y} ${b} L ${y} ${b + u} A ${a} ${o} 0 ${T} 0 ${h} ${v + u} Z`, I = `M ${C} ${w} A ${s} ${l} 0 ${T} 1 ${x} ${S} L ${x} ${S + u} A ${s} ${l} 0 ${T} 0 ${C} ${w + u} Z`, M ? (L = `M ${h} ${v} A ${a} ${o} 0 ${T} 1 ${y} ${b} M ${y} ${b + u} A ${a} ${o} 0 ${T} 0 ${h} ${v + u}`, N || (L += ` L ${h} ${v}`)) : (L = `M ${h} ${v} A ${a} ${o} 0 ${T} 1 ${y} ${b} L ${y} ${b + u} A ${a} ${o} 0 ${T} 0 ${h} ${v + u}`, N || (L += " Z")), M ? (R = `M ${C} ${w} A ${s} ${l} 0 ${T} 1 ${x} ${S} M ${x} ${S + u} A ${s} ${l} 0 ${T} 0 ${C} ${w + u}`, N || (R += ` L ${C} ${w}`)) : (R = `M ${C} ${w} A ${s} ${l} 0 ${T} 1 ${x} ${S} L ${x} ${S + u} A ${s} ${l} 0 ${T} 0 ${C} ${w + u}`, N || (R += " Z")), Math.abs(r - A) < .001 && (z = `M ${h} ${v} L ${C} ${w} L ${C} ${w + u} L ${h} ${v + u} Z`), Math.abs(p - j) < .001 && (B = `M ${y} ${b} L ${x} ${S} L ${x} ${S + u} L ${y} ${b + u} Z`));
|
|
807
|
-
let
|
|
886
|
+
let ee = d + o * Math.sin(m), te = i + a * Math.cos(g), V = d + o * Math.sin(g), ne = i + (a + 25) * Math.cos(g), re = d + (o + 35 * c.slopeRatio) * Math.sin(g), ie = i + (a + s) / 2 * Math.cos(g), ae = d + (o + l) / 2 * Math.sin(g), oe = a - s, se = o - l;
|
|
808
887
|
n.push({
|
|
809
888
|
item: e,
|
|
810
889
|
index: f,
|
|
@@ -817,38 +896,38 @@ var P = {
|
|
|
817
896
|
topStrokePath: P,
|
|
818
897
|
outerWallStrokePath: L,
|
|
819
898
|
innerWallStrokePath: R,
|
|
820
|
-
midY:
|
|
899
|
+
midY: ee,
|
|
821
900
|
topPath: E,
|
|
822
901
|
outerWallPath: F,
|
|
823
902
|
innerWallPath: I,
|
|
824
903
|
startCutPath: z,
|
|
825
904
|
endCutPath: B,
|
|
826
|
-
x0:
|
|
827
|
-
y0:
|
|
905
|
+
x0: te,
|
|
906
|
+
y0: V,
|
|
828
907
|
x1: ne,
|
|
829
908
|
y1: re,
|
|
830
909
|
topGradX1: ie - oe / 2,
|
|
831
910
|
topGradY1: ae - se / 2,
|
|
832
911
|
topGradX2: ie + oe / 2,
|
|
833
912
|
topGradY2: ae + se / 2,
|
|
834
|
-
wallY1:
|
|
835
|
-
wallY2:
|
|
913
|
+
wallY1: V,
|
|
914
|
+
wallY2: V + u
|
|
836
915
|
});
|
|
837
916
|
}), r += p;
|
|
838
917
|
}), n.sort((e, t) => e.midY - t.midY);
|
|
839
|
-
}),
|
|
918
|
+
}), st = r(() => {
|
|
840
919
|
let e = /* @__PURE__ */ new Set(), t = [];
|
|
841
|
-
return
|
|
920
|
+
return ot.value.forEach((n) => {
|
|
842
921
|
e.has(n.item.id) || (e.add(n.item.id), t.push(n));
|
|
843
922
|
}), t;
|
|
844
|
-
}),
|
|
845
|
-
if (
|
|
923
|
+
}), ct = (e) => C.value === e.item.id ? { transform: `translate(${10 * Math.cos(e.originalMidAngle)}px, ${10 * Math.sin(e.originalMidAngle)}px)` } : {}, lt = r(() => {
|
|
924
|
+
if (Y.value <= .001) return {
|
|
846
925
|
left: [],
|
|
847
926
|
right: []
|
|
848
927
|
};
|
|
849
928
|
let e = [], t = [];
|
|
850
|
-
return
|
|
851
|
-
let r = Math.cos(n.originalMidAngle) < 0, i = Math.sin(n.originalMidAngle) > 0, a =
|
|
929
|
+
return st.value.forEach((n) => {
|
|
930
|
+
let r = Math.cos(n.originalMidAngle) < 0, i = Math.sin(n.originalMidAngle) > 0, a = J.value, o = n.y0 + (i ? a : 0), s = n.y1 + (i ? a : 0), c = {
|
|
852
931
|
item: n.item,
|
|
853
932
|
index: n.index,
|
|
854
933
|
color: n.color,
|
|
@@ -866,88 +945,85 @@ var P = {
|
|
|
866
945
|
left: e,
|
|
867
946
|
right: t
|
|
868
947
|
};
|
|
869
|
-
}),
|
|
948
|
+
}), ut = r(() => lt.value.left), dt = r(() => lt.value.right), ft = (e) => {
|
|
870
949
|
let t = C.value === e.item.id, n = e.x0, r = e.y0, i = e.finalY;
|
|
871
950
|
if (t) {
|
|
872
951
|
let t = 10 * Math.cos(e.originalMidAngle || 0), a = 10 * Math.sin(e.originalMidAngle || 0);
|
|
873
952
|
n += t, r += a, i -= 5;
|
|
874
953
|
}
|
|
875
|
-
let a = n + 30 * Math.cos(e.originalMidAngle || 0), o = r + 30 * Math.sin(e.originalMidAngle || 0), s = e.isLeft, c = Math.sin(e.originalMidAngle || 0) < 0, l =
|
|
954
|
+
let a = n + 30 * Math.cos(e.originalMidAngle || 0), o = r + 30 * Math.sin(e.originalMidAngle || 0), s = e.isLeft, c = Math.sin(e.originalMidAngle || 0) < 0, l = U.value, u = G.value, d = s ? l - u - 15 : l + u + 15, f = s ? Math.min(d, a - 30) : Math.max(d, a + 30);
|
|
876
955
|
return `M ${n} ${r} C ${a} ${o}, ${f} ${c ? Math.min(o, i) : Math.max(o, i)}, ${s ? 90 : 670} ${i}`;
|
|
877
|
-
},
|
|
956
|
+
}, pt = (e = 450) => {
|
|
878
957
|
if (c.currentLowFxMode || c.immediate) {
|
|
879
958
|
A.value.forEach((e) => {
|
|
880
959
|
e.value = e.targetValue, e.percentage = e.targetPercentage === void 0 ? 0 : e.targetPercentage;
|
|
881
|
-
}), A.value = A.value.filter((e) => e.targetValue > 0),
|
|
960
|
+
}), A.value = A.value.filter((e) => e.targetValue > 0), Ye.value = Je.value;
|
|
882
961
|
let e = c.is3D;
|
|
883
|
-
|
|
962
|
+
U.value = c.isExpanded ? 380 : 60, W.value = c.isExpanded ? 160 : 60, G.value = c.isExpanded ? 180 : 48, $e.value = c.isExpanded ? e ? 180 * c.slopeRatio : 180 : e ? 48 * c.slopeRatio : 48, K.value = c.isExpanded ? 180 * (1 - c.thickness) : 48 * (1 - c.thickness), q.value = c.isExpanded ? e ? 180 * (1 - c.thickness) * c.slopeRatio : 180 * (1 - c.thickness) : e ? 48 * (1 - c.thickness) * c.slopeRatio : 48 * (1 - c.thickness);
|
|
884
963
|
let t = c.isExpanded && e ? 32 : 0;
|
|
885
|
-
|
|
964
|
+
J.value = e && c.slopeRatio > .5 ? t * (2 - 2 * c.slopeRatio) : t, tt.value = c.isExpanded ? 760 : 120, nt.value = c.isExpanded ? 320 : 120, Y.value = c.isExpanded && c.showLabels ? 1 : 0, Xe.value = !1;
|
|
886
965
|
return;
|
|
887
966
|
}
|
|
888
|
-
u && cancelAnimationFrame(u),
|
|
889
|
-
let t = performance.now(), n =
|
|
967
|
+
u && cancelAnimationFrame(u), Xe.value = !0;
|
|
968
|
+
let t = performance.now(), n = Ye.value, r = Je.value, i = U.value, a = W.value, o = G.value, s = $e.value, l = K.value, d = q.value, f = J.value, p = tt.value, m = nt.value, h = Y.value, g = c.is3D, _ = c.isExpanded ? 380 : 60, v = c.isExpanded ? 160 : 60, y = c.isExpanded ? 180 : 48, b = c.isExpanded ? g ? 180 * c.slopeRatio : 180 : g ? 48 * c.slopeRatio : 48, x = c.isExpanded ? 180 * (1 - c.thickness) : 48 * (1 - c.thickness), S = c.isExpanded ? g ? 180 * (1 - c.thickness) * c.slopeRatio : 180 * (1 - c.thickness) : g ? 48 * (1 - c.thickness) * c.slopeRatio : 48 * (1 - c.thickness), C = c.isExpanded && g ? 32 : 0, w = g && c.slopeRatio > .5 ? C * (2 - 2 * c.slopeRatio) : C, T = c.isExpanded ? 760 : 120, E = c.isExpanded ? 320 : 120, D = c.isExpanded && c.showLabels ? 1 : 0, O = (c) => {
|
|
890
969
|
let g = c - t, C = Math.min(1, g / e), k = 1 - (1 - C) ** 3;
|
|
891
970
|
A.value.forEach((e) => {
|
|
892
971
|
e.value = e.startValue + (e.targetValue - e.startValue) * k;
|
|
893
972
|
let t = e.startPercentage === void 0 ? 0 : e.startPercentage, n = e.targetPercentage === void 0 ? 0 : e.targetPercentage;
|
|
894
973
|
e.percentage = Math.round(t + (n - t) * k);
|
|
895
|
-
}),
|
|
974
|
+
}), Ye.value = n + (r - n) * k, U.value = i + (_ - i) * k, W.value = a + (v - a) * k, G.value = o + (y - o) * k, $e.value = s + (b - s) * k, K.value = l + (x - l) * k, q.value = d + (S - d) * k, J.value = f + (w - f) * k, tt.value = p + (T - p) * k, nt.value = m + (E - m) * k, Y.value = h + (D - h) * k, C < 1 ? u = requestAnimationFrame(O) : (u = null, A.value.forEach((e) => {
|
|
896
975
|
e.value = e.targetValue, e.percentage = e.targetPercentage === void 0 ? 0 : e.targetPercentage;
|
|
897
|
-
}), A.value = A.value.filter((e) => e.targetValue > 0),
|
|
976
|
+
}), A.value = A.value.filter((e) => e.targetValue > 0), U.value = _, W.value = v, G.value = y, $e.value = b, K.value = x, q.value = S, J.value = w, tt.value = T, nt.value = E, Y.value = D, Xe.value = !1);
|
|
898
977
|
};
|
|
899
978
|
u = requestAnimationFrame(O);
|
|
900
|
-
},
|
|
979
|
+
}, X = (e) => {
|
|
901
980
|
if (e.isSingleSlice) return !0;
|
|
902
|
-
let t =
|
|
981
|
+
let t = ot.value, n = -1;
|
|
903
982
|
for (let r = t.length - 1; r >= 0; r--) if (t[r].item.id === e.item.id) {
|
|
904
983
|
n = r;
|
|
905
984
|
break;
|
|
906
985
|
}
|
|
907
986
|
return t.indexOf(e) === n;
|
|
908
987
|
};
|
|
909
|
-
return w(B, (e) => {
|
|
988
|
+
return Ke(B.value || [], !0), w(B, (e) => {
|
|
910
989
|
let t = c.immediate || c.currentLowFxMode;
|
|
911
|
-
Ke(e || [], t), t ||
|
|
912
|
-
}, {
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
}), w(() => c.rotationAngle, () => {
|
|
916
|
-
Xe.value = !0, Ze && clearTimeout(Ze), Ze = setTimeout(() => {
|
|
917
|
-
Xe.value = !1;
|
|
990
|
+
Ke(e || [], t), t || pt();
|
|
991
|
+
}, { deep: !0 }), w(() => c.rotationAngle, () => {
|
|
992
|
+
Ze.value = !0, Qe && clearTimeout(Qe), Qe = setTimeout(() => {
|
|
993
|
+
Ze.value = !1;
|
|
918
994
|
}, 100);
|
|
919
995
|
}), w(Je, (e) => {
|
|
920
|
-
c.immediate || c.currentLowFxMode ?
|
|
996
|
+
c.immediate || c.currentLowFxMode ? Ye.value = e : pt();
|
|
921
997
|
}), w(() => c.isExpanded, () => {
|
|
922
998
|
d(() => {
|
|
923
|
-
|
|
999
|
+
pt();
|
|
924
1000
|
});
|
|
925
1001
|
}), w(() => c.is3D, () => {
|
|
926
1002
|
d(() => {
|
|
927
|
-
|
|
1003
|
+
pt();
|
|
928
1004
|
});
|
|
929
1005
|
}), w(() => c.showLabels, () => {
|
|
930
1006
|
d(() => {
|
|
931
|
-
|
|
1007
|
+
pt();
|
|
932
1008
|
});
|
|
933
1009
|
}), w(() => c.slopeRatio, (e) => {
|
|
934
1010
|
if (c.is3D) {
|
|
935
|
-
|
|
1011
|
+
$e.value = c.isExpanded ? 180 * e : 48;
|
|
936
1012
|
let t = c.isExpanded ? 180 : 48, n = c.isExpanded ? 180 * e : 48;
|
|
937
|
-
|
|
1013
|
+
K.value = t * (1 - c.thickness), q.value = n * (1 - c.thickness);
|
|
938
1014
|
let r = c.isExpanded ? 32 : 0;
|
|
939
|
-
|
|
1015
|
+
J.value = e > .5 ? r * (2 - 2 * e) : r;
|
|
940
1016
|
}
|
|
941
1017
|
}), w(() => c.thickness, (e) => {
|
|
942
1018
|
let t = c.is3D, n = c.isExpanded ? 180 : 48, r = c.isExpanded ? t ? 180 * c.slopeRatio : 180 : t ? 48 * c.slopeRatio : 48;
|
|
943
|
-
|
|
1019
|
+
K.value = n * (1 - e), q.value = r * (1 - e);
|
|
944
1020
|
}), w(() => c.hoveredItemId, (e) => {
|
|
945
1021
|
_.value !== e && (_.value = e);
|
|
946
1022
|
}), w(_, (e) => {
|
|
947
1023
|
c.hoveredItemId !== e && l("update:hoveredItemId", e);
|
|
948
1024
|
}), m(() => {
|
|
949
1025
|
document.addEventListener("click", k), d(() => {
|
|
950
|
-
|
|
1026
|
+
pt();
|
|
951
1027
|
});
|
|
952
1028
|
}), h(() => {
|
|
953
1029
|
document.removeEventListener("click", k), u && cancelAnimationFrame(u);
|
|
@@ -960,14 +1036,14 @@ var P = {
|
|
|
960
1036
|
ref: O,
|
|
961
1037
|
class: f(["donut-canvas-wrapper", {
|
|
962
1038
|
"is-expanded": t.isExpanded,
|
|
963
|
-
"no-transitions":
|
|
1039
|
+
"no-transitions": Xe.value || Ze.value || t.immediate
|
|
964
1040
|
}])
|
|
965
1041
|
}, [(g(), o("svg", {
|
|
966
|
-
viewBox: `0 0 ${
|
|
1042
|
+
viewBox: `0 0 ${tt.value} ${nt.value}`,
|
|
967
1043
|
class: "items-svg-chart",
|
|
968
1044
|
xmlns: "http://www.w3.org/2000/svg"
|
|
969
|
-
}, [B.value && B.value.length > 0 ? (g(), o("defs",
|
|
970
|
-
(g(!0), o(e, null, y(
|
|
1045
|
+
}, [B.value && B.value.length > 0 ? (g(), o("defs", re, [
|
|
1046
|
+
(g(!0), o(e, null, y(st.value, (e) => (g(), o("linearGradient", {
|
|
971
1047
|
key: "top-grad-" + z(e.item.id),
|
|
972
1048
|
id: "top-grad-" + z(e.item.id),
|
|
973
1049
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -978,11 +1054,11 @@ var P = {
|
|
|
978
1054
|
}, [s("stop", {
|
|
979
1055
|
offset: "0%",
|
|
980
1056
|
"stop-color": P(e.color, 1.15)
|
|
981
|
-
}, null, 8,
|
|
1057
|
+
}, null, 8, ae), s("stop", {
|
|
982
1058
|
offset: "100%",
|
|
983
1059
|
"stop-color": N(e.color, .85)
|
|
984
|
-
}, null, 8,
|
|
985
|
-
(g(!0), o(e, null, y(
|
|
1060
|
+
}, null, 8, oe)], 8, ie))), 128)),
|
|
1061
|
+
(g(!0), o(e, null, y(st.value, (e) => (g(), o("linearGradient", {
|
|
986
1062
|
key: "outer-grad-" + z(e.item.id),
|
|
987
1063
|
id: "outer-grad-" + z(e.item.id),
|
|
988
1064
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -993,11 +1069,11 @@ var P = {
|
|
|
993
1069
|
}, [s("stop", {
|
|
994
1070
|
offset: "0%",
|
|
995
1071
|
"stop-color": N(e.color, .75)
|
|
996
|
-
}, null, 8,
|
|
1072
|
+
}, null, 8, ce), s("stop", {
|
|
997
1073
|
offset: "100%",
|
|
998
1074
|
"stop-color": N(e.color, .5)
|
|
999
|
-
}, null, 8,
|
|
1000
|
-
(g(!0), o(e, null, y(
|
|
1075
|
+
}, null, 8, le)], 8, se))), 128)),
|
|
1076
|
+
(g(!0), o(e, null, y(st.value, (e) => (g(), o("linearGradient", {
|
|
1001
1077
|
key: "inner-grad-" + z(e.item.id),
|
|
1002
1078
|
id: "inner-grad-" + z(e.item.id),
|
|
1003
1079
|
gradientUnits: "userSpaceOnUse",
|
|
@@ -1008,11 +1084,11 @@ var P = {
|
|
|
1008
1084
|
}, [s("stop", {
|
|
1009
1085
|
offset: "0%",
|
|
1010
1086
|
"stop-color": N(e.color, .6)
|
|
1011
|
-
}, null, 8,
|
|
1087
|
+
}, null, 8, de), s("stop", {
|
|
1012
1088
|
offset: "100%",
|
|
1013
1089
|
"stop-color": N(e.color, .4)
|
|
1014
|
-
}, null, 8,
|
|
1015
|
-
])) : a("", !0), !B.value || B.value.length === 0 ? (g(), o("g",
|
|
1090
|
+
}, null, 8, fe)], 8, ue))), 128))
|
|
1091
|
+
])) : a("", !0), !B.value || B.value.length === 0 ? (g(), o("g", pe, [s("text", {
|
|
1016
1092
|
x: t.isExpanded ? 380 : 60,
|
|
1017
1093
|
y: t.isExpanded ? 160 : 60,
|
|
1018
1094
|
fill: "#64748b",
|
|
@@ -1020,20 +1096,20 @@ var P = {
|
|
|
1020
1096
|
"font-family": "system-ui, -apple-system, sans-serif",
|
|
1021
1097
|
"text-anchor": "middle",
|
|
1022
1098
|
"dominant-baseline": "middle"
|
|
1023
|
-
}, S(t.emptyText || "No data"), 9,
|
|
1024
|
-
(g(!0), o(e, null, y(
|
|
1099
|
+
}, S(t.emptyText || "No data"), 9, me)])) : (g(), o("g", he, [
|
|
1100
|
+
(g(!0), o(e, null, y(ot.value.filter((e) => e.midY < at.value), (e) => (g(), o("g", {
|
|
1025
1101
|
key: "slice-sub-back-" + e.item.id + "-" + e.midAngle,
|
|
1026
1102
|
class: f(["slice-group-3d", {
|
|
1027
1103
|
"is-hovered": C.value === e.item.id,
|
|
1028
1104
|
"is-dimmed": C.value !== null && C.value !== e.item.id
|
|
1029
1105
|
}]),
|
|
1030
|
-
style: p(
|
|
1106
|
+
style: p(ct(e))
|
|
1031
1107
|
}, [
|
|
1032
1108
|
t.isExpanded && e.innerWallPath ? (g(), o("path", {
|
|
1033
1109
|
key: 0,
|
|
1034
1110
|
d: e.innerWallPath,
|
|
1035
1111
|
fill: `url(#inner-grad-${z(e.item.id)})`
|
|
1036
|
-
}, null, 8,
|
|
1112
|
+
}, null, 8, ge)) : a("", !0),
|
|
1037
1113
|
t.isExpanded && e.innerWallStrokePath ? (g(), o("path", {
|
|
1038
1114
|
key: 1,
|
|
1039
1115
|
d: e.innerWallStrokePath,
|
|
@@ -1041,22 +1117,22 @@ var P = {
|
|
|
1041
1117
|
stroke: `url(#inner-grad-${z(e.item.id)})`,
|
|
1042
1118
|
"stroke-width": "0.8",
|
|
1043
1119
|
"stroke-linejoin": "round"
|
|
1044
|
-
}, null, 8,
|
|
1120
|
+
}, null, 8, _e)) : a("", !0),
|
|
1045
1121
|
t.isExpanded && e.startCutPath ? (g(), o("path", {
|
|
1046
1122
|
key: 2,
|
|
1047
1123
|
d: e.startCutPath,
|
|
1048
1124
|
fill: N(e.color, .65)
|
|
1049
|
-
}, null, 8,
|
|
1125
|
+
}, null, 8, ve)) : a("", !0),
|
|
1050
1126
|
t.isExpanded && e.endCutPath ? (g(), o("path", {
|
|
1051
1127
|
key: 3,
|
|
1052
1128
|
d: e.endCutPath,
|
|
1053
1129
|
fill: N(e.color, .75)
|
|
1054
|
-
}, null, 8,
|
|
1130
|
+
}, null, 8, ye)) : a("", !0),
|
|
1055
1131
|
t.isExpanded && e.outerWallPath ? (g(), o("path", {
|
|
1056
1132
|
key: 4,
|
|
1057
1133
|
d: e.outerWallPath,
|
|
1058
1134
|
fill: `url(#outer-grad-${z(e.item.id)})`
|
|
1059
|
-
}, null, 8,
|
|
1135
|
+
}, null, 8, be)) : a("", !0),
|
|
1060
1136
|
t.isExpanded && e.outerWallStrokePath ? (g(), o("path", {
|
|
1061
1137
|
key: 5,
|
|
1062
1138
|
d: e.outerWallStrokePath,
|
|
@@ -1064,65 +1140,65 @@ var P = {
|
|
|
1064
1140
|
stroke: `url(#outer-grad-${z(e.item.id)})`,
|
|
1065
1141
|
"stroke-width": "0.8",
|
|
1066
1142
|
"stroke-linejoin": "round"
|
|
1067
|
-
}, null, 8,
|
|
1068
|
-
|
|
1143
|
+
}, null, 8, xe)) : a("", !0),
|
|
1144
|
+
X(e) ? (g(), o("path", {
|
|
1069
1145
|
key: 6,
|
|
1070
1146
|
d: e.originalTopPath,
|
|
1071
1147
|
fill: `url(#top-grad-${z(e.item.id)})`
|
|
1072
|
-
}, null, 8,
|
|
1073
|
-
|
|
1148
|
+
}, null, 8, Se)) : a("", !0),
|
|
1149
|
+
X(e) ? (g(), o("path", {
|
|
1074
1150
|
key: 7,
|
|
1075
1151
|
d: e.topStrokePath,
|
|
1076
1152
|
fill: "none",
|
|
1077
1153
|
stroke: `url(#top-grad-${z(e.item.id)})`,
|
|
1078
1154
|
"stroke-width": "0.8",
|
|
1079
1155
|
"stroke-linejoin": "round"
|
|
1080
|
-
}, null, 8,
|
|
1081
|
-
|
|
1156
|
+
}, null, 8, Ce)) : a("", !0),
|
|
1157
|
+
X(e) ? (g(), o("path", {
|
|
1082
1158
|
key: 8,
|
|
1083
1159
|
d: e.topStrokePath,
|
|
1084
1160
|
fill: "none",
|
|
1085
1161
|
stroke: "rgba(255, 255, 255, 0.16)",
|
|
1086
1162
|
"stroke-width": t.isExpanded ? .8 : .5,
|
|
1087
1163
|
"stroke-linejoin": "round"
|
|
1088
|
-
}, null, 8,
|
|
1164
|
+
}, null, 8, we)) : a("", !0)
|
|
1089
1165
|
], 6))), 128)),
|
|
1090
1166
|
c.showCenterText ? (g(), o("g", {
|
|
1091
1167
|
key: 0,
|
|
1092
|
-
transform: `translate(${
|
|
1168
|
+
transform: `translate(${U.value}, ${W.value})`,
|
|
1093
1169
|
class: "center-text-group"
|
|
1094
1170
|
}, [s("text", {
|
|
1095
1171
|
x: "0",
|
|
1096
1172
|
y: "-3",
|
|
1097
1173
|
class: "center-text-value",
|
|
1098
|
-
"font-size":
|
|
1174
|
+
"font-size": rt.value,
|
|
1099
1175
|
"font-weight": "bold",
|
|
1100
1176
|
"font-family": "'JetBrains Mono', monospace",
|
|
1101
1177
|
"text-anchor": "middle",
|
|
1102
1178
|
"dominant-baseline": "middle"
|
|
1103
|
-
}, S(
|
|
1179
|
+
}, S(te.value), 9, Ee), s("text", {
|
|
1104
1180
|
x: "0",
|
|
1105
1181
|
y: "10",
|
|
1106
1182
|
class: "center-text-label",
|
|
1107
|
-
"font-size":
|
|
1183
|
+
"font-size": it.value,
|
|
1108
1184
|
"font-family": "system-ui, -apple-system, sans-serif",
|
|
1109
1185
|
"font-weight": "600",
|
|
1110
1186
|
"text-anchor": "middle",
|
|
1111
1187
|
"dominant-baseline": "middle"
|
|
1112
|
-
}, S(
|
|
1113
|
-
(g(!0), o(e, null, y(
|
|
1188
|
+
}, S(V.value), 9, De)], 8, Te)) : a("", !0),
|
|
1189
|
+
(g(!0), o(e, null, y(ot.value.filter((e) => e.midY >= at.value), (e) => (g(), o("g", {
|
|
1114
1190
|
key: "slice-sub-front-" + e.item.id + "-" + e.midAngle,
|
|
1115
1191
|
class: f(["slice-group-3d", {
|
|
1116
1192
|
"is-hovered": C.value === e.item.id,
|
|
1117
1193
|
"is-dimmed": C.value !== null && C.value !== e.item.id
|
|
1118
1194
|
}]),
|
|
1119
|
-
style: p(
|
|
1195
|
+
style: p(ct(e))
|
|
1120
1196
|
}, [
|
|
1121
1197
|
t.isExpanded && e.innerWallPath ? (g(), o("path", {
|
|
1122
1198
|
key: 0,
|
|
1123
1199
|
d: e.innerWallPath,
|
|
1124
1200
|
fill: `url(#inner-grad-${z(e.item.id)})`
|
|
1125
|
-
}, null, 8,
|
|
1201
|
+
}, null, 8, Oe)) : a("", !0),
|
|
1126
1202
|
t.isExpanded && e.innerWallStrokePath ? (g(), o("path", {
|
|
1127
1203
|
key: 1,
|
|
1128
1204
|
d: e.innerWallStrokePath,
|
|
@@ -1130,22 +1206,22 @@ var P = {
|
|
|
1130
1206
|
stroke: `url(#inner-grad-${z(e.item.id)})`,
|
|
1131
1207
|
"stroke-width": "0.8",
|
|
1132
1208
|
"stroke-linejoin": "round"
|
|
1133
|
-
}, null, 8,
|
|
1209
|
+
}, null, 8, ke)) : a("", !0),
|
|
1134
1210
|
t.isExpanded && e.startCutPath ? (g(), o("path", {
|
|
1135
1211
|
key: 2,
|
|
1136
1212
|
d: e.startCutPath,
|
|
1137
1213
|
fill: N(e.color, .65)
|
|
1138
|
-
}, null, 8,
|
|
1214
|
+
}, null, 8, Ae)) : a("", !0),
|
|
1139
1215
|
t.isExpanded && e.endCutPath ? (g(), o("path", {
|
|
1140
1216
|
key: 3,
|
|
1141
1217
|
d: e.endCutPath,
|
|
1142
1218
|
fill: N(e.color, .75)
|
|
1143
|
-
}, null, 8,
|
|
1219
|
+
}, null, 8, je)) : a("", !0),
|
|
1144
1220
|
t.isExpanded && e.outerWallPath ? (g(), o("path", {
|
|
1145
1221
|
key: 4,
|
|
1146
1222
|
d: e.outerWallPath,
|
|
1147
1223
|
fill: `url(#outer-grad-${z(e.item.id)})`
|
|
1148
|
-
}, null, 8,
|
|
1224
|
+
}, null, 8, Me)) : a("", !0),
|
|
1149
1225
|
t.isExpanded && e.outerWallStrokePath ? (g(), o("path", {
|
|
1150
1226
|
key: 5,
|
|
1151
1227
|
d: e.outerWallStrokePath,
|
|
@@ -1153,30 +1229,30 @@ var P = {
|
|
|
1153
1229
|
stroke: `url(#outer-grad-${z(e.item.id)})`,
|
|
1154
1230
|
"stroke-width": "0.8",
|
|
1155
1231
|
"stroke-linejoin": "round"
|
|
1156
|
-
}, null, 8,
|
|
1157
|
-
|
|
1232
|
+
}, null, 8, Ne)) : a("", !0),
|
|
1233
|
+
X(e) ? (g(), o("path", {
|
|
1158
1234
|
key: 6,
|
|
1159
1235
|
d: e.originalTopPath,
|
|
1160
1236
|
fill: `url(#top-grad-${z(e.item.id)})`
|
|
1161
|
-
}, null, 8,
|
|
1162
|
-
|
|
1237
|
+
}, null, 8, Pe)) : a("", !0),
|
|
1238
|
+
X(e) ? (g(), o("path", {
|
|
1163
1239
|
key: 7,
|
|
1164
1240
|
d: e.topStrokePath,
|
|
1165
1241
|
fill: "none",
|
|
1166
1242
|
stroke: `url(#top-grad-${z(e.item.id)})`,
|
|
1167
1243
|
"stroke-width": "0.8",
|
|
1168
1244
|
"stroke-linejoin": "round"
|
|
1169
|
-
}, null, 8,
|
|
1170
|
-
|
|
1245
|
+
}, null, 8, Fe)) : a("", !0),
|
|
1246
|
+
X(e) ? (g(), o("path", {
|
|
1171
1247
|
key: 8,
|
|
1172
1248
|
d: e.topStrokePath,
|
|
1173
1249
|
fill: "none",
|
|
1174
1250
|
stroke: "rgba(255, 255, 255, 0.16)",
|
|
1175
1251
|
"stroke-width": t.isExpanded ? .8 : .5,
|
|
1176
1252
|
"stroke-linejoin": "round"
|
|
1177
|
-
}, null, 8,
|
|
1253
|
+
}, null, 8, Ie)) : a("", !0)
|
|
1178
1254
|
], 6))), 128)),
|
|
1179
|
-
(g(!0), o(e, null, y(
|
|
1255
|
+
(g(!0), o(e, null, y(st.value, (e) => (g(), o("g", {
|
|
1180
1256
|
key: "hover-trigger-" + e.item.id,
|
|
1181
1257
|
class: "hover-trigger-group",
|
|
1182
1258
|
style: p({ cursor: c.selectable && !j.value ? "pointer" : "default" }),
|
|
@@ -1186,18 +1262,18 @@ var P = {
|
|
|
1186
1262
|
}, [s("path", {
|
|
1187
1263
|
d: e.hoverPath || e.originalTopPath,
|
|
1188
1264
|
fill: "transparent"
|
|
1189
|
-
}, null, 8,
|
|
1265
|
+
}, null, 8, Re), e.originalOuterWallPath ? (g(), o("path", {
|
|
1190
1266
|
key: 0,
|
|
1191
1267
|
d: e.originalOuterWallPath,
|
|
1192
1268
|
fill: "transparent"
|
|
1193
|
-
}, null, 8,
|
|
1269
|
+
}, null, 8, ze)) : a("", !0)], 44, Le))), 128)),
|
|
1194
1270
|
s("g", {
|
|
1195
1271
|
class: "labels-layer",
|
|
1196
1272
|
style: p({
|
|
1197
|
-
opacity:
|
|
1198
|
-
pointerEvents:
|
|
1273
|
+
opacity: Y.value,
|
|
1274
|
+
pointerEvents: Y.value > .01 ? "auto" : "none"
|
|
1199
1275
|
})
|
|
1200
|
-
}, [(g(!0), o(e, null, y(
|
|
1276
|
+
}, [(g(!0), o(e, null, y(ut.value, (e, t) => (g(), o("g", {
|
|
1201
1277
|
key: "label-left-" + e.item.id,
|
|
1202
1278
|
class: f(["label-group", {
|
|
1203
1279
|
"is-hovered": C.value === e.item.id,
|
|
@@ -1208,11 +1284,11 @@ var P = {
|
|
|
1208
1284
|
onClick: (t) => E(e.item.id),
|
|
1209
1285
|
style: p({ cursor: c.selectable && !j.value ? "pointer" : "default" })
|
|
1210
1286
|
}, [s("path", {
|
|
1211
|
-
d:
|
|
1287
|
+
d: ft(e),
|
|
1212
1288
|
fill: "none",
|
|
1213
1289
|
stroke: e.color,
|
|
1214
1290
|
"stroke-width": "1.2"
|
|
1215
|
-
}, null, 8,
|
|
1291
|
+
}, null, 8, Ve), s("text", {
|
|
1216
1292
|
x: "85",
|
|
1217
1293
|
y: e.finalY,
|
|
1218
1294
|
fill: e.color,
|
|
@@ -1222,7 +1298,7 @@ var P = {
|
|
|
1222
1298
|
"text-anchor": "end",
|
|
1223
1299
|
"dominant-baseline": "middle",
|
|
1224
1300
|
style: p(C.value === e.item.id ? "transform: translate(0, -5px);" : "")
|
|
1225
|
-
}, S(R(e.item.name, 24)) + " " + S(L(e.item.value)) + " " + S(e.item.unit || "") + " (" + S(e.item.percentage) + "%) ", 13,
|
|
1301
|
+
}, S(R(e.item.name, 24)) + " " + S(L(e.item.value)) + " " + S(e.item.unit || "") + " (" + S(e.item.percentage) + "%) ", 13, He)], 46, Be))), 128)), (g(!0), o(e, null, y(dt.value, (e, t) => (g(), o("g", {
|
|
1226
1302
|
key: "label-right-" + e.item.id,
|
|
1227
1303
|
class: f(["label-group", {
|
|
1228
1304
|
"is-hovered": C.value === e.item.id,
|
|
@@ -1233,11 +1309,11 @@ var P = {
|
|
|
1233
1309
|
onClick: (t) => E(e.item.id),
|
|
1234
1310
|
style: p({ cursor: c.selectable && !j.value ? "pointer" : "default" })
|
|
1235
1311
|
}, [s("path", {
|
|
1236
|
-
d:
|
|
1312
|
+
d: ft(e),
|
|
1237
1313
|
fill: "none",
|
|
1238
1314
|
stroke: e.color,
|
|
1239
1315
|
"stroke-width": "1.2"
|
|
1240
|
-
}, null, 8,
|
|
1316
|
+
}, null, 8, We), s("text", {
|
|
1241
1317
|
x: "675",
|
|
1242
1318
|
y: e.finalY,
|
|
1243
1319
|
fill: e.color,
|
|
@@ -1247,21 +1323,21 @@ var P = {
|
|
|
1247
1323
|
"text-anchor": "start",
|
|
1248
1324
|
"dominant-baseline": "middle",
|
|
1249
1325
|
style: p(C.value === e.item.id ? "transform: translate(0, -5px);" : "")
|
|
1250
|
-
}, S(R(e.item.name, 24)) + " " + S(L(e.item.value)) + " " + S(e.item.unit || "") + " (" + S(e.item.percentage) + "%) ", 13,
|
|
1251
|
-
]))], 8,
|
|
1326
|
+
}, S(R(e.item.name, 24)) + " " + S(L(e.item.value)) + " " + S(e.item.unit || "") + " (" + S(e.item.percentage) + "%) ", 13, Ge)], 46, Ue))), 128))], 4)
|
|
1327
|
+
]))], 8, ne))], 2));
|
|
1252
1328
|
}
|
|
1253
|
-
}, [["__scopeId", "data-v-
|
|
1329
|
+
}, [["__scopeId", "data-v-6b25a1b8"]]), qe = { class: "nano-scrub-label" }, Je = {
|
|
1254
1330
|
key: 0,
|
|
1255
1331
|
class: "nano-scrub-overlay"
|
|
1256
|
-
},
|
|
1332
|
+
}, Ye = {
|
|
1257
1333
|
key: 1,
|
|
1258
1334
|
class: "nano-scrub-svg-line"
|
|
1259
|
-
},
|
|
1335
|
+
}, Xe = [
|
|
1260
1336
|
"x1",
|
|
1261
1337
|
"y1",
|
|
1262
1338
|
"x2",
|
|
1263
1339
|
"y2"
|
|
1264
|
-
],
|
|
1340
|
+
], Ze = { class: "nano-scrub-popup-val" }, Qe = { class: "nano-scrub-popup-res" }, H = /* @__PURE__ */ L(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1265
1341
|
__name: "PrecisionScrubber",
|
|
1266
1342
|
props: {
|
|
1267
1343
|
modelValue: {
|
|
@@ -1339,7 +1415,7 @@ var P = {
|
|
|
1339
1415
|
}, r.$attrs), [s("div", {
|
|
1340
1416
|
class: "nano-scrub-progress",
|
|
1341
1417
|
style: p({ width: O.value + "%" })
|
|
1342
|
-
}, null, 4), s("span",
|
|
1418
|
+
}, null, 4), s("span", qe, S(n.label), 1)], 16), (g(), i(t, { to: "body" }, [m.value ? (g(), o("div", Je, [
|
|
1343
1419
|
h.value ? (g(), o("div", {
|
|
1344
1420
|
key: 0,
|
|
1345
1421
|
class: "nano-scrub-anchor",
|
|
@@ -1348,7 +1424,7 @@ var P = {
|
|
|
1348
1424
|
top: x.value + "px"
|
|
1349
1425
|
})
|
|
1350
1426
|
}, null, 4)) : a("", !0),
|
|
1351
|
-
h.value ? (g(), o("svg",
|
|
1427
|
+
h.value ? (g(), o("svg", Ye, [s("line", {
|
|
1352
1428
|
x1: b.value,
|
|
1353
1429
|
y1: x.value,
|
|
1354
1430
|
x2: w.value,
|
|
@@ -1357,7 +1433,7 @@ var P = {
|
|
|
1357
1433
|
"stroke-dasharray": "4,4",
|
|
1358
1434
|
"stroke-width": "1.5",
|
|
1359
1435
|
opacity: "0.6"
|
|
1360
|
-
}, null, 8,
|
|
1436
|
+
}, null, 8, Xe)])) : a("", !0),
|
|
1361
1437
|
s("div", {
|
|
1362
1438
|
class: "nano-scrub-popup",
|
|
1363
1439
|
style: p({
|
|
@@ -1366,21 +1442,21 @@ var P = {
|
|
|
1366
1442
|
})
|
|
1367
1443
|
}, [
|
|
1368
1444
|
c[0] ||= s("div", { class: "nano-scrub-popup-title" }, "Scrubbing Mode", -1),
|
|
1369
|
-
s("div",
|
|
1370
|
-
s("div",
|
|
1445
|
+
s("div", Ze, S(k.value), 1),
|
|
1446
|
+
s("div", Qe, S(E.value), 1)
|
|
1371
1447
|
], 4)
|
|
1372
1448
|
])) : a("", !0)]))], 64));
|
|
1373
1449
|
}
|
|
1374
|
-
}), [["__scopeId", "data-v-21b41bc4"]]),
|
|
1450
|
+
}), [["__scopeId", "data-v-21b41bc4"]]), U = { class: "header-inner" }, W = {
|
|
1375
1451
|
key: 0,
|
|
1376
1452
|
class: "header-left"
|
|
1377
|
-
},
|
|
1453
|
+
}, G = {
|
|
1378
1454
|
key: 1,
|
|
1379
1455
|
class: "header-center"
|
|
1380
|
-
},
|
|
1456
|
+
}, $e = {
|
|
1381
1457
|
key: 2,
|
|
1382
1458
|
class: "header-right"
|
|
1383
|
-
}, K = /* @__PURE__ */
|
|
1459
|
+
}, K = /* @__PURE__ */ L({
|
|
1384
1460
|
__name: "MutatingHeader",
|
|
1385
1461
|
props: {
|
|
1386
1462
|
threshold: {
|
|
@@ -1451,39 +1527,39 @@ var P = {
|
|
|
1451
1527
|
"--floating-margin": e.floatingMargin,
|
|
1452
1528
|
"--floating-radius": e.floatingRadius
|
|
1453
1529
|
})
|
|
1454
|
-
}, [s("div",
|
|
1455
|
-
t.$slots.left ? (g(), o("div",
|
|
1456
|
-
t.$slots.center ? (g(), o("div",
|
|
1457
|
-
t.$slots.right ? (g(), o("div",
|
|
1530
|
+
}, [s("div", U, [
|
|
1531
|
+
t.$slots.left ? (g(), o("div", W, [b(t.$slots, "left", { isStuck: l.value }, void 0, !0)])) : a("", !0),
|
|
1532
|
+
t.$slots.center ? (g(), o("div", G, [b(t.$slots, "center", { isStuck: l.value }, void 0, !0)])) : a("", !0),
|
|
1533
|
+
t.$slots.right ? (g(), o("div", $e, [b(t.$slots, "right", { isStuck: l.value }, void 0, !0)])) : a("", !0),
|
|
1458
1534
|
!t.$slots.left && !t.$slots.center && !t.$slots.right ? b(t.$slots, "default", {
|
|
1459
1535
|
key: 3,
|
|
1460
1536
|
isStuck: l.value
|
|
1461
1537
|
}, void 0, !0) : a("", !0)
|
|
1462
1538
|
])], 6));
|
|
1463
1539
|
}
|
|
1464
|
-
}, [["__scopeId", "data-v-fd47d0d0"]]),
|
|
1540
|
+
}, [["__scopeId", "data-v-fd47d0d0"]]), q = [
|
|
1465
1541
|
"viewBox",
|
|
1466
1542
|
"width",
|
|
1467
1543
|
"height"
|
|
1468
|
-
],
|
|
1544
|
+
], et = ["points"], J = ["points"], tt = ["points"], nt = ["points"], Y = [
|
|
1469
1545
|
"x1",
|
|
1470
1546
|
"y1",
|
|
1471
1547
|
"x2",
|
|
1472
1548
|
"y2"
|
|
1473
|
-
],
|
|
1549
|
+
], rt = ["x", "y"], it = [
|
|
1474
1550
|
"points",
|
|
1475
1551
|
"fill",
|
|
1476
1552
|
"stroke",
|
|
1477
1553
|
"opacity"
|
|
1478
|
-
],
|
|
1554
|
+
], at = [
|
|
1479
1555
|
"points",
|
|
1480
1556
|
"fill",
|
|
1481
1557
|
"stroke"
|
|
1482
|
-
],
|
|
1558
|
+
], ot = [
|
|
1483
1559
|
"cx",
|
|
1484
1560
|
"cy",
|
|
1485
1561
|
"fill"
|
|
1486
|
-
],
|
|
1562
|
+
], st = /* @__PURE__ */ L({
|
|
1487
1563
|
__name: "TopologyRadar",
|
|
1488
1564
|
props: {
|
|
1489
1565
|
size: {
|
|
@@ -1552,7 +1628,7 @@ var P = {
|
|
|
1552
1628
|
fill: "var(--nano-radar-grid-bg, rgba(15,23,42,0.8))",
|
|
1553
1629
|
stroke: "var(--nano-radar-grid-stroke, rgba(255,255,255,0.1))",
|
|
1554
1630
|
"stroke-width": "1"
|
|
1555
|
-
}, null, 8,
|
|
1631
|
+
}, null, 8, et),
|
|
1556
1632
|
s("polygon", {
|
|
1557
1633
|
points: f(.75),
|
|
1558
1634
|
fill: "none",
|
|
@@ -1564,13 +1640,13 @@ var P = {
|
|
|
1564
1640
|
fill: "none",
|
|
1565
1641
|
stroke: "var(--nano-radar-grid-subtle, rgba(255,255,255,0.05))",
|
|
1566
1642
|
"stroke-width": "1"
|
|
1567
|
-
}, null, 8,
|
|
1643
|
+
}, null, 8, tt),
|
|
1568
1644
|
s("polygon", {
|
|
1569
1645
|
points: f(.25),
|
|
1570
1646
|
fill: "none",
|
|
1571
1647
|
stroke: "var(--nano-radar-grid-subtle, rgba(255,255,255,0.05))",
|
|
1572
1648
|
"stroke-width": "1"
|
|
1573
|
-
}, null, 8,
|
|
1649
|
+
}, null, 8, nt),
|
|
1574
1650
|
(g(!0), o(e, null, y(t.labels, (e, n) => (g(), o("line", {
|
|
1575
1651
|
key: "axis-" + n,
|
|
1576
1652
|
x1: t.size / 2,
|
|
@@ -1579,7 +1655,7 @@ var P = {
|
|
|
1579
1655
|
y2: d(100, n).y,
|
|
1580
1656
|
stroke: "var(--nano-radar-grid-stroke, rgba(255,255,255,0.1))",
|
|
1581
1657
|
"stroke-width": "1"
|
|
1582
|
-
}, null, 8,
|
|
1658
|
+
}, null, 8, Y))), 128)),
|
|
1583
1659
|
(g(!0), o(e, null, y(t.labels, (e, t) => (g(), o("text", {
|
|
1584
1660
|
key: "label-" + t,
|
|
1585
1661
|
x: d(115, t).x,
|
|
@@ -1590,7 +1666,7 @@ var P = {
|
|
|
1590
1666
|
"font-weight": "bold",
|
|
1591
1667
|
"text-anchor": "middle",
|
|
1592
1668
|
"dominant-baseline": "middle"
|
|
1593
|
-
}, S(e), 9,
|
|
1669
|
+
}, S(e), 9, rt))), 128)),
|
|
1594
1670
|
(g(!0), o(e, null, y(t.history, (e, n) => (g(), o("polygon", {
|
|
1595
1671
|
key: "hist-" + n,
|
|
1596
1672
|
points: m(e),
|
|
@@ -1598,7 +1674,7 @@ var P = {
|
|
|
1598
1674
|
stroke: t.color,
|
|
1599
1675
|
"stroke-width": 1,
|
|
1600
1676
|
opacity: .1 + n / Math.max(1, t.history.length) * .4
|
|
1601
|
-
}, null, 8,
|
|
1677
|
+
}, null, 8, it))), 128)),
|
|
1602
1678
|
t.history.length > 0 ? (g(), o("polygon", {
|
|
1603
1679
|
key: 0,
|
|
1604
1680
|
points: m(t.history[t.history.length - 1]),
|
|
@@ -1606,7 +1682,7 @@ var P = {
|
|
|
1606
1682
|
stroke: t.color,
|
|
1607
1683
|
"stroke-width": "2.5",
|
|
1608
1684
|
style: { filter: "drop-shadow(0 0 8px rgba(0, 229, 255, 0.5))" }
|
|
1609
|
-
}, null, 8,
|
|
1685
|
+
}, null, 8, at)) : a("", !0),
|
|
1610
1686
|
t.history.length > 0 ? (g(!0), o(e, { key: 1 }, y(t.history[t.history.length - 1], (e, n) => (g(), o("circle", {
|
|
1611
1687
|
key: "pt-" + n,
|
|
1612
1688
|
cx: d(e, n).x,
|
|
@@ -1614,19 +1690,19 @@ var P = {
|
|
|
1614
1690
|
r: "3",
|
|
1615
1691
|
fill: t.color,
|
|
1616
1692
|
style: { filter: "drop-shadow(0 0 5px rgba(0, 229, 255, 0.8))" }
|
|
1617
|
-
}, null, 8,
|
|
1618
|
-
], 8,
|
|
1693
|
+
}, null, 8, ot))), 128)) : a("", !0)
|
|
1694
|
+
], 8, q))], 4));
|
|
1619
1695
|
}
|
|
1620
|
-
}, [["__scopeId", "data-v-bb4bd598"]]),
|
|
1696
|
+
}, [["__scopeId", "data-v-bb4bd598"]]), ct = ["for"], lt = [
|
|
1621
1697
|
"checked",
|
|
1622
1698
|
"disabled",
|
|
1623
1699
|
"name",
|
|
1624
1700
|
"id",
|
|
1625
1701
|
"aria-checked"
|
|
1626
|
-
],
|
|
1702
|
+
], ut = {
|
|
1627
1703
|
key: 0,
|
|
1628
1704
|
class: "nano-switch-label"
|
|
1629
|
-
},
|
|
1705
|
+
}, dt = /* @__PURE__ */ L({
|
|
1630
1706
|
__name: "NanoSwitch",
|
|
1631
1707
|
props: {
|
|
1632
1708
|
modelValue: {
|
|
@@ -1708,12 +1784,351 @@ var P = {
|
|
|
1708
1784
|
onChange: p,
|
|
1709
1785
|
role: "switch",
|
|
1710
1786
|
"aria-checked": u.value ? "mixed" : d.value
|
|
1711
|
-
}, null, 40,
|
|
1787
|
+
}, null, 40, lt),
|
|
1712
1788
|
n[0] ||= s("div", { class: "nano-switch-slider" }, null, -1),
|
|
1713
|
-
e.label || t.$slots.default ? (g(), o("span",
|
|
1714
|
-
], 10,
|
|
1789
|
+
e.label || t.$slots.default ? (g(), o("span", ut, [b(t.$slots, "default", {}, () => [c(S(e.label), 1)], !0)])) : a("", !0)
|
|
1790
|
+
], 10, ct));
|
|
1715
1791
|
}
|
|
1716
|
-
}, [["__scopeId", "data-v-50b63887"]]),
|
|
1792
|
+
}, [["__scopeId", "data-v-50b63887"]]), ft = { class: "rotator-fallback" }, pt = { class: "fallback-angle" }, X = /* @__PURE__ */ L({
|
|
1793
|
+
__name: "KineticRotator",
|
|
1794
|
+
props: {
|
|
1795
|
+
modelValue: {
|
|
1796
|
+
type: Number,
|
|
1797
|
+
default: 0
|
|
1798
|
+
},
|
|
1799
|
+
duration: {
|
|
1800
|
+
type: Number,
|
|
1801
|
+
default: 1e3
|
|
1802
|
+
},
|
|
1803
|
+
speedMultiplier: {
|
|
1804
|
+
type: Number,
|
|
1805
|
+
default: 1
|
|
1806
|
+
},
|
|
1807
|
+
step: {
|
|
1808
|
+
type: Number,
|
|
1809
|
+
default: 90
|
|
1810
|
+
},
|
|
1811
|
+
shortestPath: {
|
|
1812
|
+
type: Boolean,
|
|
1813
|
+
default: !0
|
|
1814
|
+
},
|
|
1815
|
+
timingMode: {
|
|
1816
|
+
type: String,
|
|
1817
|
+
default: "proportional",
|
|
1818
|
+
validator: (e) => ["proportional", "fixed"].includes(e)
|
|
1819
|
+
},
|
|
1820
|
+
inertiaThreshold: {
|
|
1821
|
+
type: Number,
|
|
1822
|
+
default: .25
|
|
1823
|
+
},
|
|
1824
|
+
size: {
|
|
1825
|
+
type: [Number, String],
|
|
1826
|
+
default: 260
|
|
1827
|
+
}
|
|
1828
|
+
},
|
|
1829
|
+
emits: [
|
|
1830
|
+
"update:modelValue",
|
|
1831
|
+
"change",
|
|
1832
|
+
"settled",
|
|
1833
|
+
"frame"
|
|
1834
|
+
],
|
|
1835
|
+
setup(e, { expose: t, emit: n }) {
|
|
1836
|
+
let i = e, a = n, c = (e, t) => (t - 2) * e * e * e + (3 - 2 * t) * e * e + t * e, l = (e, t) => 3 * (t - 2) * e * e + 2 * (3 - 2 * t) * e + t, u = (e, t) => 6 * (t - 2) * e + 2 * (3 - 2 * t), d = (e) => e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2, f = (e) => e < .5 ? 12 * e * e : 3 * (-2 * e + 2) ** 2, _ = (e) => e < .5 ? 24 * e : 24 * e - 24, y = (e) => (e % 360 + 360) % 360, x = (e, t) => {
|
|
1837
|
+
let n = y(e);
|
|
1838
|
+
return ((y(t) - n + 180) % 360 + 360) % 360 - 180;
|
|
1839
|
+
}, C = v(i.modelValue), T = v(i.modelValue), E = v(0), D = v(0), O = v(!1), k = v(1), A = v(0), j = null, M = null, N = r(() => {
|
|
1840
|
+
let e = typeof i.size == "number" ? `${i.size}px` : i.size;
|
|
1841
|
+
return {
|
|
1842
|
+
width: e,
|
|
1843
|
+
height: e
|
|
1844
|
+
};
|
|
1845
|
+
}), P = (e) => {
|
|
1846
|
+
if (!j) return {
|
|
1847
|
+
angle: C.value,
|
|
1848
|
+
vel: 0,
|
|
1849
|
+
acc: 0,
|
|
1850
|
+
p: 1
|
|
1851
|
+
};
|
|
1852
|
+
let t = e - j.startTime, n = Math.max(0, Math.min(1, t / j.duration)), r = j.v0 === void 0 ? d(n) : c(n, j.v0), i = j.startAngle + (j.targetAngle - j.startAngle) * r, a = j.v0 === void 0 ? f(n) : l(n, j.v0), o = j.targetAngle - j.startAngle;
|
|
1853
|
+
return {
|
|
1854
|
+
angle: i,
|
|
1855
|
+
vel: o * a / j.duration * 1e3,
|
|
1856
|
+
acc: o * (j.v0 === void 0 ? _(n) : u(n, j.v0)) / (j.duration * j.duration) * 1e6,
|
|
1857
|
+
p: n
|
|
1858
|
+
};
|
|
1859
|
+
}, F = (e) => {
|
|
1860
|
+
if (!j) {
|
|
1861
|
+
O.value = !1, E.value = 0, D.value = 0, k.value = 1;
|
|
1862
|
+
return;
|
|
1863
|
+
}
|
|
1864
|
+
let { angle: t, vel: n, acc: r, p: i } = P(e);
|
|
1865
|
+
if (C.value = t, E.value = n, D.value = r, k.value = i, a("frame", {
|
|
1866
|
+
currentAngle: t,
|
|
1867
|
+
targetAngle: j.targetAngle,
|
|
1868
|
+
velocity: n,
|
|
1869
|
+
acceleration: r,
|
|
1870
|
+
progress: i,
|
|
1871
|
+
isMoving: !0,
|
|
1872
|
+
v0: j.v0 || 0,
|
|
1873
|
+
timestamp: e
|
|
1874
|
+
}), i < 1) M = requestAnimationFrame(F);
|
|
1875
|
+
else {
|
|
1876
|
+
C.value = j.targetAngle, E.value = 0, D.value = 0, k.value = 1, O.value = !1;
|
|
1877
|
+
let t = j.targetAngle;
|
|
1878
|
+
j = null, a("update:modelValue", t), a("settled", {
|
|
1879
|
+
angle: t,
|
|
1880
|
+
normalizedAngle: y(t)
|
|
1881
|
+
}), a("frame", {
|
|
1882
|
+
currentAngle: t,
|
|
1883
|
+
targetAngle: t,
|
|
1884
|
+
velocity: 0,
|
|
1885
|
+
acceleration: 0,
|
|
1886
|
+
progress: 1,
|
|
1887
|
+
isMoving: !1,
|
|
1888
|
+
v0: 0,
|
|
1889
|
+
timestamp: e
|
|
1890
|
+
});
|
|
1891
|
+
}
|
|
1892
|
+
}, I = (e, { isRelative: t = !1, delta: n = 0 } = {}) => {
|
|
1893
|
+
let r = performance.now(), o = C.value, s = E.value;
|
|
1894
|
+
if (j && O.value) {
|
|
1895
|
+
let e = P(r);
|
|
1896
|
+
o = e.angle, s = e.vel;
|
|
1897
|
+
}
|
|
1898
|
+
let c = e;
|
|
1899
|
+
if (i.shortestPath) {
|
|
1900
|
+
let r = 0;
|
|
1901
|
+
if (t) {
|
|
1902
|
+
let e = T.value;
|
|
1903
|
+
r = y(e + n);
|
|
1904
|
+
} else r = y(e);
|
|
1905
|
+
let a = x(o, r);
|
|
1906
|
+
if (i.inertiaThreshold > 0 && Math.abs(s) > 20 && (s > 0 && a < 0 || s < 0 && a > 0)) {
|
|
1907
|
+
let e = a > 0 ? a - 360 : a + 360;
|
|
1908
|
+
360 - 2 * Math.abs(a) < Math.abs(s) * i.inertiaThreshold && (a = e);
|
|
1909
|
+
}
|
|
1910
|
+
c = o + a;
|
|
1911
|
+
}
|
|
1912
|
+
T.value = c, a("change", c);
|
|
1913
|
+
let l = c - o;
|
|
1914
|
+
if (Math.abs(l) < .05) {
|
|
1915
|
+
C.value = c, E.value = 0, D.value = 0, k.value = 1, O.value = !1, j = null, a("update:modelValue", c);
|
|
1916
|
+
return;
|
|
1917
|
+
}
|
|
1918
|
+
let u = Math.max(.01, i.speedMultiplier), d = i.timingMode === "fixed" ? i.duration / u : i.duration / u * Math.max(.2, Math.abs(l) / i.step), f = 0;
|
|
1919
|
+
Math.abs(l) > .01 && Math.abs(s) > .1 && (f = s / 1e3 * d / l, f = Math.max(-2.5, Math.min(2.5, f))), A.value = f, O.value = !0, j = {
|
|
1920
|
+
startAngle: o,
|
|
1921
|
+
targetAngle: c,
|
|
1922
|
+
startTime: r,
|
|
1923
|
+
duration: d,
|
|
1924
|
+
v0: f
|
|
1925
|
+
}, M && cancelAnimationFrame(M), M = requestAnimationFrame(F);
|
|
1926
|
+
}, L = (e) => {
|
|
1927
|
+
I(T.value + e, {
|
|
1928
|
+
isRelative: !0,
|
|
1929
|
+
delta: e
|
|
1930
|
+
});
|
|
1931
|
+
}, R = (e) => {
|
|
1932
|
+
I(e, { isRelative: !1 });
|
|
1933
|
+
}, z = () => {
|
|
1934
|
+
M && cancelAnimationFrame(M), j = null, C.value = 0, T.value = 0, E.value = 0, D.value = 0, k.value = 1, O.value = !1, A.value = 0, a("update:modelValue", 0), a("settled", {
|
|
1935
|
+
angle: 0,
|
|
1936
|
+
normalizedAngle: 0
|
|
1937
|
+
});
|
|
1938
|
+
}, B = () => {
|
|
1939
|
+
if (!j || !O.value) return;
|
|
1940
|
+
let e = performance.now(), { p: t } = P(e);
|
|
1941
|
+
if (t >= 1) return;
|
|
1942
|
+
let n = j.targetAngle - j.startAngle, r = Math.max(.01, i.speedMultiplier), a = i.timingMode === "fixed" ? i.duration / r : i.duration / r * Math.max(.2, Math.abs(n) / i.step);
|
|
1943
|
+
j.duration = a, j.startTime = e - t * a;
|
|
1944
|
+
};
|
|
1945
|
+
return w([
|
|
1946
|
+
() => i.duration,
|
|
1947
|
+
() => i.speedMultiplier,
|
|
1948
|
+
() => i.timingMode
|
|
1949
|
+
], B), w(() => i.modelValue, (e) => {
|
|
1950
|
+
Math.abs(e - T.value) > .01 && R(e);
|
|
1951
|
+
}), m(() => {
|
|
1952
|
+
C.value = i.modelValue, T.value = i.modelValue;
|
|
1953
|
+
}), h(() => {
|
|
1954
|
+
M && cancelAnimationFrame(M);
|
|
1955
|
+
}), t({
|
|
1956
|
+
currentAngle: C,
|
|
1957
|
+
targetAngle: T,
|
|
1958
|
+
velocity: E,
|
|
1959
|
+
acceleration: D,
|
|
1960
|
+
isMoving: O,
|
|
1961
|
+
progress: k,
|
|
1962
|
+
v0: A,
|
|
1963
|
+
rotateBy: L,
|
|
1964
|
+
setAngle: R,
|
|
1965
|
+
reset: z,
|
|
1966
|
+
updateActiveDuration: B
|
|
1967
|
+
}), (e, t) => (g(), o("div", {
|
|
1968
|
+
class: "nano-kinetic-rotator",
|
|
1969
|
+
style: p(N.value)
|
|
1970
|
+
}, [s("div", {
|
|
1971
|
+
class: "rotator-tile",
|
|
1972
|
+
style: p({ transform: `rotate(${C.value}deg)` })
|
|
1973
|
+
}, [b(e.$slots, "default", {
|
|
1974
|
+
currentAngle: C.value,
|
|
1975
|
+
targetAngle: T.value,
|
|
1976
|
+
normalizedAngle: y(C.value),
|
|
1977
|
+
velocity: E.value,
|
|
1978
|
+
acceleration: D.value,
|
|
1979
|
+
isMoving: O.value,
|
|
1980
|
+
progress: k.value
|
|
1981
|
+
}, () => [s("div", ft, [t[0] ||= s("span", { class: "fallback-icon" }, "⚡", -1), s("span", pt, S(Math.round(y(C.value))) + "°", 1)])], !0)], 4)], 4));
|
|
1982
|
+
}
|
|
1983
|
+
}, [["__scopeId", "data-v-abbbb111"]]), mt = {
|
|
1984
|
+
key: 0,
|
|
1985
|
+
class: "code-block-header"
|
|
1986
|
+
}, ht = { class: "code-block-title-group" }, gt = {
|
|
1987
|
+
key: 0,
|
|
1988
|
+
class: "code-block-title"
|
|
1989
|
+
}, _t = {
|
|
1990
|
+
key: 1,
|
|
1991
|
+
class: "code-block-lang"
|
|
1992
|
+
}, vt = { class: "code-block-actions" }, yt = ["aria-label"], bt = {
|
|
1993
|
+
key: 0,
|
|
1994
|
+
class: "action-svg",
|
|
1995
|
+
viewBox: "0 0 24 24",
|
|
1996
|
+
fill: "none",
|
|
1997
|
+
stroke: "currentColor",
|
|
1998
|
+
"stroke-width": "2",
|
|
1999
|
+
"stroke-linecap": "round",
|
|
2000
|
+
"stroke-linejoin": "round"
|
|
2001
|
+
}, xt = {
|
|
2002
|
+
key: 1,
|
|
2003
|
+
class: "action-svg",
|
|
2004
|
+
viewBox: "0 0 24 24",
|
|
2005
|
+
fill: "none",
|
|
2006
|
+
stroke: "currentColor",
|
|
2007
|
+
"stroke-width": "2",
|
|
2008
|
+
"stroke-linecap": "round",
|
|
2009
|
+
"stroke-linejoin": "round"
|
|
2010
|
+
}, St = ["aria-label"], Ct = {
|
|
2011
|
+
key: 0,
|
|
2012
|
+
class: "action-svg",
|
|
2013
|
+
viewBox: "0 0 24 24",
|
|
2014
|
+
fill: "none",
|
|
2015
|
+
stroke: "currentColor",
|
|
2016
|
+
"stroke-width": "2",
|
|
2017
|
+
"stroke-linecap": "round",
|
|
2018
|
+
"stroke-linejoin": "round"
|
|
2019
|
+
}, wt = {
|
|
2020
|
+
key: 1,
|
|
2021
|
+
class: "action-svg success-icon",
|
|
2022
|
+
viewBox: "0 0 24 24",
|
|
2023
|
+
fill: "none",
|
|
2024
|
+
stroke: "currentColor",
|
|
2025
|
+
"stroke-width": "2.5",
|
|
2026
|
+
"stroke-linecap": "round",
|
|
2027
|
+
"stroke-linejoin": "round"
|
|
2028
|
+
}, Tt = /* @__PURE__ */ L({
|
|
2029
|
+
__name: "NanoCodeBlock",
|
|
2030
|
+
props: {
|
|
2031
|
+
title: {
|
|
2032
|
+
type: String,
|
|
2033
|
+
default: ""
|
|
2034
|
+
},
|
|
2035
|
+
lang: {
|
|
2036
|
+
type: String,
|
|
2037
|
+
default: ""
|
|
2038
|
+
},
|
|
2039
|
+
code: {
|
|
2040
|
+
type: String,
|
|
2041
|
+
default: ""
|
|
2042
|
+
},
|
|
2043
|
+
defaultWrap: {
|
|
2044
|
+
type: Boolean,
|
|
2045
|
+
default: !1
|
|
2046
|
+
},
|
|
2047
|
+
allowWrap: {
|
|
2048
|
+
type: Boolean,
|
|
2049
|
+
default: !0
|
|
2050
|
+
},
|
|
2051
|
+
allowCopy: {
|
|
2052
|
+
type: Boolean,
|
|
2053
|
+
default: !0
|
|
2054
|
+
},
|
|
2055
|
+
maxHeight: {
|
|
2056
|
+
type: [Number, String],
|
|
2057
|
+
default: null
|
|
2058
|
+
}
|
|
2059
|
+
},
|
|
2060
|
+
emits: ["update:wrap", "copied"],
|
|
2061
|
+
setup(e, { emit: t }) {
|
|
2062
|
+
let n = e, i = t, l = v(n.defaultWrap), u = v(!1), d = v(null), m = null, h = () => {
|
|
2063
|
+
l.value = !l.value, i("update:wrap", l.value);
|
|
2064
|
+
}, _ = async () => {
|
|
2065
|
+
let e = n.code;
|
|
2066
|
+
if (!e && d.value && (e = d.value.innerText || d.value.textContent || ""), e) try {
|
|
2067
|
+
if (navigator.clipboard && navigator.clipboard.writeText) await navigator.clipboard.writeText(e);
|
|
2068
|
+
else {
|
|
2069
|
+
let t = document.createElement("textarea");
|
|
2070
|
+
t.value = e, t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select(), document.execCommand("copy"), document.body.removeChild(t);
|
|
2071
|
+
}
|
|
2072
|
+
u.value = !0, i("copied", e), m && clearTimeout(m), m = setTimeout(() => {
|
|
2073
|
+
u.value = !1;
|
|
2074
|
+
}, 2e3);
|
|
2075
|
+
} catch (e) {
|
|
2076
|
+
console.error("Failed to copy code snippet:", e);
|
|
2077
|
+
}
|
|
2078
|
+
}, y = r(() => {
|
|
2079
|
+
if (n.maxHeight) return typeof n.maxHeight == "number" ? `${n.maxHeight}px` : n.maxHeight;
|
|
2080
|
+
});
|
|
2081
|
+
return (t, n) => {
|
|
2082
|
+
let r = x("tooltip");
|
|
2083
|
+
return g(), o("div", { class: f(["nano-code-block", { "is-wrapped": l.value }]) }, [e.title || e.lang || t.$slots.header || e.allowWrap || e.allowCopy ? (g(), o("div", mt, [s("div", ht, [b(t.$slots, "header", {}, () => [e.title ? (g(), o("span", gt, S(e.title), 1)) : a("", !0), e.lang ? (g(), o("span", _t, S(e.lang), 1)) : a("", !0)], !0)]), s("div", vt, [e.allowWrap ? E((g(), o("button", {
|
|
2084
|
+
key: 0,
|
|
2085
|
+
type: "button",
|
|
2086
|
+
class: f(["code-action-btn", { active: l.value }]),
|
|
2087
|
+
onClick: h,
|
|
2088
|
+
"aria-label": l.value ? "Unwrap lines (Scroll mode)" : "Wrap lines (Word-wrap mode)"
|
|
2089
|
+
}, [l.value ? (g(), o("svg", xt, [...n[1] ||= [
|
|
2090
|
+
s("line", {
|
|
2091
|
+
x1: "3",
|
|
2092
|
+
y1: "6",
|
|
2093
|
+
x2: "21",
|
|
2094
|
+
y2: "6"
|
|
2095
|
+
}, null, -1),
|
|
2096
|
+
s("line", {
|
|
2097
|
+
x1: "3",
|
|
2098
|
+
y1: "12",
|
|
2099
|
+
x2: "21",
|
|
2100
|
+
y2: "12"
|
|
2101
|
+
}, null, -1),
|
|
2102
|
+
s("line", {
|
|
2103
|
+
x1: "3",
|
|
2104
|
+
y1: "18",
|
|
2105
|
+
x2: "21",
|
|
2106
|
+
y2: "18"
|
|
2107
|
+
}, null, -1)
|
|
2108
|
+
]])) : (g(), o("svg", bt, [...n[0] ||= [s("polyline", { points: "9 10 4 15 9 20" }, null, -1), s("path", { d: "M20 4v7a4 4 0 0 1-4 4H4" }, null, -1)]]))], 10, yt)), [[r, l.value ? "Unwrap lines (Scroll)" : "Wrap lines"]]) : a("", !0), e.allowCopy ? E((g(), o("button", {
|
|
2109
|
+
key: 1,
|
|
2110
|
+
type: "button",
|
|
2111
|
+
class: f(["code-action-btn", { copied: u.value }]),
|
|
2112
|
+
onClick: _,
|
|
2113
|
+
"aria-label": u.value ? "Copied to clipboard" : "Copy code to clipboard"
|
|
2114
|
+
}, [u.value ? (g(), o("svg", wt, [...n[3] ||= [s("polyline", { points: "20 6 9 17 4 12" }, null, -1)]])) : (g(), o("svg", Ct, [...n[2] ||= [s("rect", {
|
|
2115
|
+
x: "9",
|
|
2116
|
+
y: "9",
|
|
2117
|
+
width: "13",
|
|
2118
|
+
height: "13",
|
|
2119
|
+
rx: "2",
|
|
2120
|
+
ry: "2"
|
|
2121
|
+
}, null, -1), s("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" }, null, -1)]]))], 10, St)), [[r, u.value ? "Copied!" : "Copy code"]]) : a("", !0)])])) : a("", !0), s("div", {
|
|
2122
|
+
class: "code-block-body",
|
|
2123
|
+
style: p({ maxHeight: y.value })
|
|
2124
|
+
}, [s("pre", {
|
|
2125
|
+
ref_key: "preRef",
|
|
2126
|
+
ref: d,
|
|
2127
|
+
class: "code-block-pre"
|
|
2128
|
+
}, [b(t.$slots, "default", {}, () => [c(S(e.code), 1)], !0)], 512)], 4)], 2);
|
|
2129
|
+
};
|
|
2130
|
+
}
|
|
2131
|
+
}, [["__scopeId", "data-v-3f0f2177"]]), Z = {
|
|
1717
2132
|
instant: 100,
|
|
1718
2133
|
fast: 150,
|
|
1719
2134
|
normal: 200,
|
|
@@ -1775,7 +2190,7 @@ var P = {
|
|
|
1775
2190
|
ease: Q.linear,
|
|
1776
2191
|
css: `${Z.ripple}ms ${Q.linear}`
|
|
1777
2192
|
}
|
|
1778
|
-
},
|
|
2193
|
+
}, Et = {
|
|
1779
2194
|
"--nano-duration-fast": `${Z.fast}ms`,
|
|
1780
2195
|
"--nano-duration": `${Z.normal}ms`,
|
|
1781
2196
|
"--nano-duration-toggle": `${Z.toggle}ms`,
|
|
@@ -1797,8 +2212,12 @@ var P = {
|
|
|
1797
2212
|
//#endregion
|
|
1798
2213
|
//#region src/index.js
|
|
1799
2214
|
k.init("nano-ui", "https://analytics.7u.pl");
|
|
1800
|
-
var
|
|
1801
|
-
|
|
1802
|
-
} }
|
|
2215
|
+
var Dt = A.version, Ot = { isPreTag: (e) => e === "pre" || e === "NanoCodeBlock" || e === "nano-code-block" }, kt = {
|
|
2216
|
+
version: A.version,
|
|
2217
|
+
install(e, { directivePrefix: t = "", componentPrefix: n = "" } = {}) {
|
|
2218
|
+
let r = t ? `${t}-` : "", i = n ? `${n}` : "";
|
|
2219
|
+
e.directive(`${r}ripple`, M), e.directive(`${r}tooltip`, I), e.component(`${i}GlobalTooltip`, R), e.component(`${i}NanoModal`, V), e.component(`${i}ThreeDDonutChart`, Ke), e.component(`${i}PrecisionScrubber`, H), e.component(`${i}TopologyRadar`, st), e.component(`${i}MutatingHeader`, K), e.component(`${i}NanoSwitch`, dt), e.component(`${i}KineticRotator`, X), e.component(`${i}NanoCodeBlock`, Tt);
|
|
2220
|
+
}
|
|
2221
|
+
};
|
|
1803
2222
|
//#endregion
|
|
1804
|
-
export {
|
|
2223
|
+
export { R as GlobalTooltip, X as KineticRotator, K as MutatingHeader, Tt as NanoCodeBlock, V as NanoModal, dt as NanoSwitch, H as PrecisionScrubber, M as Ripple, Ke as ThreeDDonutChart, st as TopologyRadar, kt as default, Z as durations, Q as easings, F as hideTooltip, j as initTheme, Ot as nanoCompilerOptions, P as showTooltip, I as tooltipDirective, N as tooltipState, Et as transitionVariables, $ as transitions, Dt as version };
|