@ac-design/design-system 2.6.1 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/lib/charts/graph.d.ts +9 -15
- package/dist/lib/charts/graph.js +79 -75
- package/dist/lib/charts/index.d.ts +4 -2
- package/dist/lib/charts/index.js +2 -1
- package/dist/lib/charts/nodeSymbol.d.ts +15 -0
- package/dist/lib/charts/nodeSymbol.js +27 -0
- package/dist/lib/charts/tree.d.ts +15 -0
- package/dist/lib/charts/tree.js +89 -0
- package/dist/lib/compat.css +113 -0
- package/dist/lib/components/AcAccordionItem.vue.d.ts +3 -1
- package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +35 -26
- package/dist/lib/components/AcAlert.vue.d.ts +1 -1
- package/dist/lib/components/AcBadge.vue.d.ts +1 -1
- package/dist/lib/components/AcBanner.vue.d.ts +1 -1
- package/dist/lib/components/AcCard.vue.d.ts +1 -1
- package/dist/lib/components/AcCellValue.vue.d.ts +1 -1
- package/dist/lib/components/AcCheckList.vue.d.ts +1 -1
- package/dist/lib/components/AcConfirmModal.vue.d.ts +1 -1
- package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
- package/dist/lib/components/AcFeatureCard.vue.d.ts +1 -1
- package/dist/lib/components/AcGraphChart.vue.d.ts +53 -3
- package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +401 -233
- package/dist/lib/components/AcList.js +5 -0
- package/dist/lib/components/AcList.vue.d.ts +56 -0
- package/dist/lib/components/AcList.vue_vue_type_script_setup_true_lang.js +74 -0
- package/dist/lib/components/AcListItem.js +5 -0
- package/dist/lib/components/AcListItem.vue.d.ts +53 -0
- package/dist/lib/components/AcListItem.vue_vue_type_script_setup_true_lang.js +105 -0
- package/dist/lib/components/AcMapChart.vue.d.ts +66 -3
- package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +403 -201
- package/dist/lib/components/AcMonthPicker.js +5 -0
- package/dist/lib/components/AcMonthPicker.vue.d.ts +102 -0
- package/dist/lib/components/AcMonthPicker.vue_vue_type_script_setup_true_lang.js +595 -0
- package/dist/lib/components/AcNavbarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcResourceCard.vue.d.ts +1 -1
- package/dist/lib/components/AcSideTabs.vue.d.ts +3 -1
- package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +53 -33
- package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
- package/dist/lib/components/AcStatCard.vue.d.ts +1 -1
- package/dist/lib/components/AcTreeChart.js +5 -0
- package/dist/lib/components/AcTreeChart.vue.d.ts +135 -0
- package/dist/lib/components/AcTreeChart.vue_vue_type_script_setup_true_lang.js +809 -0
- package/dist/lib/components/AcUsageCard.vue.d.ts +1 -1
- package/dist/lib/components/index.d.ts +5 -2
- package/dist/lib/composables/copyText.d.ts +5 -1
- package/dist/lib/composables/copyText.js +15 -3
- package/dist/lib/index.d.ts +3 -0
- package/dist/lib/index.js +85 -81
- package/package.json +1 -1
|
@@ -2,27 +2,38 @@ import e from "./AcTooltip.js";
|
|
|
2
2
|
import t from "../charts/ChartFrame.js";
|
|
3
3
|
import { bindItemHover as n, useEChart as r } from "../charts/echarts.js";
|
|
4
4
|
import { chartColor as i } from "../charts/shared.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { nodeImage as a } from "../charts/nodeSymbol.js";
|
|
6
|
+
import { LABEL_DETAILS as o, labelDetail as s, layoutGraph as c, nodeKind as l, nodeName as u, overhang as d, truncate as ee } from "../charts/graph.js";
|
|
7
|
+
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createSlots as te, createTextVNode as ne, createVNode as re, defineComponent as v, guardReactiveProps as ie, mergeModels as ae, nextTick as oe, normalizeClass as se, normalizeProps as ce, normalizeStyle as le, onBeforeUnmount as ue, openBlock as y, ref as b, renderList as de, renderSlot as fe, resolveDynamicComponent as pe, toDisplayString as x, unref as me, useModel as he, vModelText as ge, watch as S, withCtx as C, withDirectives as _e } from "vue";
|
|
8
|
+
import { Box as ve, Maximize as ye, Network as be, ZoomIn as xe, ZoomOut as Se } from "@lucide/vue";
|
|
9
|
+
import { graphic as Ce, use as we } from "echarts/core";
|
|
10
|
+
import { GraphChart as Te } from "echarts/charts";
|
|
10
11
|
//#region src/lib/components/AcGraphChart.vue?vue&type=script&setup=true&lang.ts
|
|
11
|
-
var
|
|
12
|
+
var Ee = { class: "font-medium text-heading" }, De = {
|
|
12
13
|
key: 0,
|
|
13
14
|
class: "mt-0.5 flex items-center gap-1.5 text-muted"
|
|
14
|
-
},
|
|
15
|
+
}, Oe = {
|
|
15
16
|
key: 2,
|
|
16
17
|
class: "mt-1.5 border-t border-border pt-1.5 text-muted"
|
|
17
|
-
},
|
|
18
|
+
}, ke = {
|
|
18
19
|
key: 0,
|
|
19
|
-
class: "w-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
class: "flex h-7 w-12 cursor-text items-center justify-center rounded-full text-xs text-muted tabular-nums transition-colors focus-within:bg-surface-sunken focus-within:text-heading focus-within:ring-2 focus-within:ring-ring hover:bg-surface-sunken hover:text-heading motion-reduce:transition-none"
|
|
21
|
+
}, Ae = [
|
|
22
|
+
"aria-valuenow",
|
|
23
|
+
"aria-valuemin",
|
|
24
|
+
"aria-valuemax",
|
|
25
|
+
"aria-valuetext"
|
|
26
|
+
], je = ["aria-label", "onClick"], w = "graph", Me = 1.25, T = 16, Ne = .05, Pe = 48, Fe = .2, Ie = 4, Le = 80, E = "", Re = /*@__PURE__*/ v({
|
|
22
27
|
__name: "AcGraphChart",
|
|
23
|
-
props: /*@__PURE__*/
|
|
28
|
+
props: /*@__PURE__*/ ae({
|
|
24
29
|
nodes: {},
|
|
25
30
|
links: { default: () => [] },
|
|
31
|
+
groups: { default: () => [] },
|
|
32
|
+
highlight: { default: "neighbors" },
|
|
33
|
+
highlightOnHover: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !1
|
|
36
|
+
},
|
|
26
37
|
direction: { default: "LR" },
|
|
27
38
|
height: { default: 480 },
|
|
28
39
|
shape: { default: "circle" },
|
|
@@ -57,124 +68,186 @@ var Se = { class: "font-medium text-heading" }, Ce = {
|
|
|
57
68
|
selected: { default: null },
|
|
58
69
|
selectedModifiers: {}
|
|
59
70
|
}),
|
|
60
|
-
emits: /*@__PURE__*/
|
|
61
|
-
setup(
|
|
62
|
-
|
|
63
|
-
let D =
|
|
64
|
-
["wheel",
|
|
65
|
-
["mousewheel",
|
|
66
|
-
["touchstart",
|
|
67
|
-
["touchmove",
|
|
68
|
-
["touchend",
|
|
69
|
-
],
|
|
71
|
+
emits: /*@__PURE__*/ ae(["node-click"], ["update:selected"]),
|
|
72
|
+
setup(v, { expose: ae, emit: Re }) {
|
|
73
|
+
we([Te]);
|
|
74
|
+
let D = v, O = he(v, "selected"), ze = Re, k = [.25, 1.5], Be = [
|
|
75
|
+
["wheel", It],
|
|
76
|
+
["mousewheel", It],
|
|
77
|
+
["touchstart", Lt],
|
|
78
|
+
["touchmove", Lt],
|
|
79
|
+
["touchend", Lt]
|
|
80
|
+
], A = {
|
|
70
81
|
success: "var(--color-success)",
|
|
71
82
|
info: "var(--color-info)",
|
|
72
83
|
warning: "var(--color-warning)",
|
|
73
84
|
danger: "var(--color-danger)",
|
|
74
85
|
neutral: void 0
|
|
75
|
-
},
|
|
86
|
+
}, Ve = {
|
|
76
87
|
success: "Healthy",
|
|
77
88
|
info: "Info",
|
|
78
89
|
warning: "Warning",
|
|
79
90
|
danger: "Critical",
|
|
80
91
|
neutral: ""
|
|
81
|
-
},
|
|
92
|
+
}, He = {
|
|
82
93
|
success: "text-success-strong",
|
|
83
94
|
info: "text-info-strong",
|
|
84
95
|
warning: "text-warning-strong",
|
|
85
96
|
danger: "text-danger-strong",
|
|
86
97
|
neutral: "text-muted"
|
|
87
|
-
},
|
|
98
|
+
}, Ue = {
|
|
88
99
|
success: "bg-success",
|
|
89
100
|
info: "bg-info",
|
|
90
101
|
warning: "bg-warning",
|
|
91
102
|
danger: "bg-danger",
|
|
92
103
|
neutral: "bg-border-dark"
|
|
93
|
-
},
|
|
94
|
-
function
|
|
95
|
-
return
|
|
104
|
+
}, We = b(), j = b([]), Ge = b(0), M = b(null), Ke = b(), N = b(null), qe = b(null), P = b(""), F = null, I = null, Je = !1, L, R = null, Ye = /* @__PURE__ */ new Map(), Xe = /* @__PURE__ */ new Map(), z = p(() => new Map(D.nodes.map((e) => [e.id, e]))), Ze = p(() => new Map(D.groups.map((e) => [e.id, e]))), Qe = p(() => [...new Set(D.nodes.map((e) => e.kind ?? E).filter((e) => e !== E))]), $e = p(() => new Map(Qe.value.map((e, t) => [e, i(D.kindColors?.[e], t)])));
|
|
105
|
+
function et(e) {
|
|
106
|
+
return $e.value.get(e.kind ?? E) ?? "var(--color-muted)";
|
|
96
107
|
}
|
|
97
|
-
function
|
|
108
|
+
function B(e) {
|
|
98
109
|
return e ?? "neutral";
|
|
99
110
|
}
|
|
100
|
-
function
|
|
101
|
-
return e.statusText ||
|
|
111
|
+
function tt(e) {
|
|
112
|
+
return e.statusText || Ve[B(e.status)];
|
|
102
113
|
}
|
|
103
|
-
function
|
|
114
|
+
function nt(e) {
|
|
104
115
|
return e.status === "warning" || e.status === "danger";
|
|
105
116
|
}
|
|
106
|
-
function
|
|
107
|
-
return e.icon ?? D.kindIcons?.[e.kind ?? E] ??
|
|
117
|
+
function rt(e) {
|
|
118
|
+
return e.icon ?? D.kindIcons?.[e.kind ?? E] ?? ve;
|
|
108
119
|
}
|
|
109
|
-
let
|
|
120
|
+
let V = p(() => D.nodes.filter((e) => !j.value.includes(e.kind ?? E))), H = p(() => new Set(V.value.map((e) => e.id))), U = p(() => D.links.filter((e) => z.value.has(e.source) && z.value.has(e.target))), W = p(() => U.value.filter((e) => H.value.has(e.source) && H.value.has(e.target))), it = p(() => c(V.value.map((e) => ({
|
|
110
121
|
id: e.id,
|
|
111
122
|
label: e.label,
|
|
112
|
-
kind: e
|
|
123
|
+
kind: lt(e),
|
|
113
124
|
group: e.group,
|
|
114
|
-
badge:
|
|
115
|
-
})),
|
|
125
|
+
badge: nt(e)
|
|
126
|
+
})), W.value.map((e) => ({
|
|
116
127
|
source: e.source,
|
|
117
128
|
target: e.target,
|
|
118
129
|
label: e.label ?? ""
|
|
119
|
-
})), D.direction)),
|
|
120
|
-
let e =
|
|
121
|
-
for (l of a)
|
|
122
|
-
u = d(e, c, l);
|
|
123
|
-
for (let t = 0; t < 4; t++) c = Math.max(Math.min(1, (i - u.left - u.right) / n, (s - u.top - u.bottom) / r), .05), u = d(e, c, l);
|
|
124
|
-
if (a.indexOf(o(c)) <= a.indexOf(l)) break;
|
|
125
|
-
}
|
|
130
|
+
})), D.direction, new Map(D.groups.filter((e) => e.parent).map((e) => [e.id, e.parent])))), G = p(() => {
|
|
131
|
+
let e = it.value, { centers: t } = e, n = Math.max(t.maxX - t.minX, 2), r = Math.max(t.maxY - t.minY, 2), i = Math.max(Ge.value - 32, 1), a = Math.max(D.height - T - (D.zoom ? Pe : T), 1), c = 1, l = "full", u = d(e, c, l);
|
|
132
|
+
for (l of o) if (c = at(e, l, n, r, i, a), u = d(e, c, l), o.indexOf(s(c)) <= o.indexOf(l)) break;
|
|
126
133
|
let ee = n * c + u.left + u.right, f = r * c + u.top + u.bottom;
|
|
127
134
|
return {
|
|
128
135
|
layout: e,
|
|
129
136
|
scale: c,
|
|
130
137
|
detail: l,
|
|
131
138
|
left: T + (i - ee) / 2 + u.left,
|
|
132
|
-
top: T + (
|
|
139
|
+
top: T + (a - f) / 2 + u.top,
|
|
133
140
|
width: n * c,
|
|
134
141
|
height: r * c,
|
|
135
142
|
center: [(t.minX + t.maxX) / 2, (t.minY + t.maxY) / 2]
|
|
136
143
|
};
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
+
});
|
|
145
|
+
function at(e, t, n, r, i, a) {
|
|
146
|
+
let o = (o) => {
|
|
147
|
+
let s = d(e, o, t);
|
|
148
|
+
return n * o + s.left + s.right <= i && r * o + s.top + s.bottom <= a;
|
|
149
|
+
};
|
|
150
|
+
if (o(1)) return 1;
|
|
151
|
+
let s = Ne, c = 1;
|
|
152
|
+
for (let e = 0; e < 20; e++) {
|
|
153
|
+
let e = (s + c) / 2;
|
|
154
|
+
o(e) ? s = e : c = e;
|
|
155
|
+
}
|
|
156
|
+
return s;
|
|
157
|
+
}
|
|
158
|
+
let ot = p(() => O.value && H.value.has(O.value) ? O.value : void 0), st = p(() => {
|
|
159
|
+
let e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
160
|
+
for (let n of W.value) e.set(n.source, [...e.get(n.source) ?? [], n.target]), t.set(n.target, [...t.get(n.target) ?? [], n.source]);
|
|
161
|
+
return {
|
|
162
|
+
out: e,
|
|
163
|
+
into: t
|
|
164
|
+
};
|
|
165
|
+
}), ct = p(() => {
|
|
166
|
+
let e = qe.value;
|
|
167
|
+
if (e && "link" in e) return ft(e.link);
|
|
168
|
+
let t = e && "node" in e ? e.node : ot.value;
|
|
169
|
+
return t && H.value.has(t) ? dt(t) : null;
|
|
170
|
+
}), K = p(() => Math.round((N.value ?? G.value.scale) * 100)), q = p(() => N.value === null ? G.value.detail : s(N.value));
|
|
171
|
+
function lt(e) {
|
|
172
|
+
return e.sublabel || e.kind || E;
|
|
173
|
+
}
|
|
174
|
+
function J(e, t) {
|
|
175
|
+
let n = t ? st.value.out : st.value.into, r = new Set(e), i = [...e];
|
|
176
|
+
for (; i.length;) for (let e of n.get(i.pop()) ?? []) r.has(e) || (r.add(e), i.push(e));
|
|
177
|
+
return r;
|
|
178
|
+
}
|
|
179
|
+
function ut(e, t) {
|
|
180
|
+
let n = /* @__PURE__ */ new Set();
|
|
181
|
+
return W.value.forEach((r, i) => {
|
|
182
|
+
(e.has(r.source) && e.has(r.target) || t.has(r.source) && t.has(r.target)) && n.add(i);
|
|
183
|
+
}), {
|
|
184
|
+
nodes: /* @__PURE__ */ new Set([...e, ...t]),
|
|
185
|
+
links: n
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function dt(e) {
|
|
189
|
+
if (D.highlight === "path") return ut(J([e], !0), J([e], !1));
|
|
190
|
+
let t = {
|
|
191
|
+
nodes: /* @__PURE__ */ new Set([e]),
|
|
192
|
+
links: /* @__PURE__ */ new Set()
|
|
193
|
+
};
|
|
194
|
+
return W.value.forEach((n, r) => {
|
|
195
|
+
(n.source === e || n.target === e) && (t.links.add(r), t.nodes.add(n.source), t.nodes.add(n.target));
|
|
196
|
+
}), t;
|
|
197
|
+
}
|
|
198
|
+
function ft(e) {
|
|
199
|
+
let t = W.value[e];
|
|
200
|
+
if (!t) return null;
|
|
201
|
+
let n = D.highlight === "path" ? ut(J([t.target], !0), J([t.source], !1)) : {
|
|
202
|
+
nodes: /* @__PURE__ */ new Set([t.source, t.target]),
|
|
203
|
+
links: /* @__PURE__ */ new Set()
|
|
204
|
+
};
|
|
205
|
+
return n.links.add(e), n;
|
|
206
|
+
}
|
|
144
207
|
function Y(e) {
|
|
145
208
|
return e.replace(/[{}]/g, "");
|
|
146
209
|
}
|
|
147
|
-
function
|
|
148
|
-
let r =
|
|
149
|
-
typeof i == "string" ? `t:${i}` : `c:${
|
|
150
|
-
o,
|
|
151
|
-
a,
|
|
210
|
+
function pt(e, t, n) {
|
|
211
|
+
let r = B(t.status), i = rt(t), o = n ? e.primary : A[r] ? e.color(A[r]) : e.borderDark, s = e.color(et(t)), c = n ? 3 : 2, l = [
|
|
212
|
+
typeof i == "string" ? `t:${i}` : `c:${mt(i)}`,
|
|
152
213
|
s,
|
|
214
|
+
o,
|
|
215
|
+
c,
|
|
153
216
|
e.surface,
|
|
154
217
|
D.shape
|
|
155
|
-
].join("|"), u =
|
|
156
|
-
return u || (u =
|
|
218
|
+
].join("|"), u = Ye.get(l);
|
|
219
|
+
return u || (u = a({
|
|
157
220
|
icon: i,
|
|
158
|
-
iconColor:
|
|
221
|
+
iconColor: s,
|
|
159
222
|
fill: e.surface,
|
|
160
|
-
ring:
|
|
161
|
-
ringWidth:
|
|
223
|
+
ring: o,
|
|
224
|
+
ringWidth: c,
|
|
162
225
|
shape: D.shape,
|
|
163
226
|
font: e.font
|
|
164
|
-
}),
|
|
227
|
+
}), Ye.set(l, u)), u;
|
|
228
|
+
}
|
|
229
|
+
function mt(e) {
|
|
230
|
+
let t = Xe.get(e);
|
|
231
|
+
return t === void 0 && (t = Xe.size, Xe.set(e, t)), t;
|
|
165
232
|
}
|
|
166
|
-
function
|
|
167
|
-
let t =
|
|
168
|
-
|
|
233
|
+
function ht(e) {
|
|
234
|
+
let t = nt(e) ? `{${e.status}|!}` : "";
|
|
235
|
+
if (q.value === "badge") return t;
|
|
236
|
+
let n = `${t ? `${t} ` : ""}{name|${Y(u(e.label))}}`, r = lt(e);
|
|
237
|
+
return r && q.value === "full" ? `${n}\n{kind|${Y(l(r))}}` : n;
|
|
238
|
+
}
|
|
239
|
+
function gt(e, t) {
|
|
240
|
+
let n = A[B(t.status)];
|
|
241
|
+
return n ? e.color(n) : t.color ? e.color(i(t.color, 0)) : e.borderDark;
|
|
242
|
+
}
|
|
243
|
+
function _t(e) {
|
|
244
|
+
return e.color && !A[B(e.status)] ? i(e.color, 0) : "var(--color-primary)";
|
|
169
245
|
}
|
|
170
|
-
function
|
|
171
|
-
|
|
172
|
-
if (J.value === "badge") return t;
|
|
173
|
-
let n = `${t ? `${t} ` : ""}{name|${Y(u(e.label))}}`;
|
|
174
|
-
return e.kind && J.value === "full" ? `${n}\n{kind|${Y(l(e.kind))}}` : n;
|
|
246
|
+
function vt(e) {
|
|
247
|
+
if (e.arrow !== void 0) return e.arrow ? ["none", "arrow"] : ["none", "none"];
|
|
175
248
|
}
|
|
176
|
-
function
|
|
177
|
-
let t =
|
|
249
|
+
function yt(e) {
|
|
250
|
+
let t = G.value, n = F?.frame === t ? F : null, r = ct.value, i = ot.value, a = new Map(V.value.map((e, t) => [e.id, t])), o = (t, n) => ({
|
|
178
251
|
backgroundColor: e.color(t),
|
|
179
252
|
color: e.color(n),
|
|
180
253
|
width: 14,
|
|
@@ -196,8 +269,8 @@ var Se = { class: "font-medium text-heading" }, Ce = {
|
|
|
196
269
|
roam: !0,
|
|
197
270
|
roamTrigger: "global",
|
|
198
271
|
scaleLimit: {
|
|
199
|
-
min: Math.min(1,
|
|
200
|
-
max: Math.max(1,
|
|
272
|
+
min: Math.min(1, k[0] / t.scale),
|
|
273
|
+
max: Math.max(1, k[1] / t.scale)
|
|
201
274
|
},
|
|
202
275
|
zoom: n?.zoom ?? 1,
|
|
203
276
|
center: n?.center ?? t.center,
|
|
@@ -238,35 +311,40 @@ var Se = { class: "font-medium text-heading" }, Ce = {
|
|
|
238
311
|
padding: [2, 6],
|
|
239
312
|
borderRadius: 6
|
|
240
313
|
},
|
|
241
|
-
data:
|
|
242
|
-
let [a, o] = t.layout.positions.get(n.id), s = r && !r.has(n.id) ?
|
|
314
|
+
data: V.value.map((n) => {
|
|
315
|
+
let [a, o] = t.layout.positions.get(n.id), s = r && !r.nodes.has(n.id) ? Fe : 1;
|
|
243
316
|
return {
|
|
244
317
|
id: n.id,
|
|
245
318
|
name: n.id,
|
|
246
319
|
x: a,
|
|
247
320
|
y: o,
|
|
248
|
-
symbol:
|
|
321
|
+
symbol: pt(e, n, n.id === i),
|
|
249
322
|
symbolSize: 40 * t.scale,
|
|
250
323
|
itemStyle: { opacity: s },
|
|
251
324
|
label: {
|
|
252
|
-
formatter:
|
|
325
|
+
formatter: ht(n),
|
|
253
326
|
opacity: s
|
|
254
327
|
}
|
|
255
328
|
};
|
|
256
329
|
}),
|
|
257
|
-
links:
|
|
258
|
-
let
|
|
330
|
+
links: W.value.map((t, n) => {
|
|
331
|
+
let i = !!r?.links.has(n), o = i ? e.color(_t(t)) : gt(e, t), s = r && !i ? Fe : 1, c = i ? {
|
|
332
|
+
shadowBlur: 6,
|
|
333
|
+
shadowColor: e.alpha(_t(t), .45)
|
|
334
|
+
} : {};
|
|
259
335
|
return {
|
|
260
336
|
source: a.get(t.source),
|
|
261
337
|
target: a.get(t.target),
|
|
338
|
+
symbol: vt(t),
|
|
262
339
|
lineStyle: {
|
|
263
340
|
color: o,
|
|
264
|
-
width:
|
|
265
|
-
type: t.dashed ? "dashed" : "solid",
|
|
341
|
+
width: i ? 2.5 : 1.5,
|
|
342
|
+
type: t.style ?? (t.dashed ? "dashed" : "solid"),
|
|
266
343
|
opacity: s,
|
|
267
|
-
curveness: 0
|
|
344
|
+
curveness: 0,
|
|
345
|
+
...c
|
|
268
346
|
},
|
|
269
|
-
label: t.label &&
|
|
347
|
+
label: t.label && q.value === "full" ? {
|
|
270
348
|
show: !0,
|
|
271
349
|
formatter: Y(t.label),
|
|
272
350
|
opacity: s
|
|
@@ -276,140 +354,173 @@ var Se = { class: "font-medium text-heading" }, Ce = {
|
|
|
276
354
|
};
|
|
277
355
|
}
|
|
278
356
|
let X = r({
|
|
279
|
-
host:
|
|
357
|
+
host: We,
|
|
280
358
|
renderer: () => D.renderer,
|
|
281
359
|
option: (e) => ({
|
|
282
360
|
animation: D.animation && !e.reducedMotion,
|
|
283
361
|
animationDurationUpdate: 300,
|
|
284
362
|
textStyle: { fontFamily: e.font },
|
|
285
|
-
series: [
|
|
363
|
+
series: [yt(e)]
|
|
286
364
|
}),
|
|
287
|
-
setup:
|
|
365
|
+
setup: bt
|
|
288
366
|
});
|
|
289
|
-
function
|
|
367
|
+
function bt(e) {
|
|
290
368
|
let t = e.getZr();
|
|
291
369
|
R = {
|
|
292
|
-
root: new
|
|
370
|
+
root: new Ce.Group({ silent: !0 }),
|
|
293
371
|
items: /* @__PURE__ */ new Map()
|
|
294
|
-
}, t.add(R.root), n(e,
|
|
372
|
+
}, t.add(R.root), n(e, Nt, Pt), t.on("mousedown", (e) => {
|
|
295
373
|
I = [e.offsetX, e.offsetY];
|
|
296
374
|
}), t.on("click", (e) => {
|
|
297
|
-
!e.target &&
|
|
375
|
+
!e.target && !Ct(e) && (O.value = null);
|
|
298
376
|
}), e.on("click", (e) => {
|
|
299
|
-
let t = e, n = t.data?.id ?
|
|
300
|
-
t.dataType === "node" && n && t.event?.event &&
|
|
301
|
-
}), e.on("graphroam", () =>
|
|
377
|
+
let t = e, n = t.data?.id ? z.value.get(t.data.id) : void 0;
|
|
378
|
+
t.dataType === "node" && n && t.event?.event && !Ct(t.event) && Ft(n, t.event.event);
|
|
379
|
+
}), e.on("mouseover", (e) => xt(e)), e.on("mouseout", St), t.on("globalout", () => Z(null)), e.on("graphroam", () => Tt(e)), e.on("rendered", () => wt(e));
|
|
302
380
|
}
|
|
303
|
-
function
|
|
304
|
-
|
|
381
|
+
function xt(e) {
|
|
382
|
+
D.highlightOnHover && (e.dataType === "node" && e.data?.id ? Z({ node: e.data.id }) : e.dataType === "edge" && e.dataIndex !== void 0 && Z({ link: e.dataIndex }));
|
|
305
383
|
}
|
|
306
|
-
function
|
|
384
|
+
function St() {
|
|
385
|
+
clearTimeout(L), L = setTimeout(() => Z(null), Le);
|
|
386
|
+
}
|
|
387
|
+
function Z(e) {
|
|
388
|
+
clearTimeout(L);
|
|
389
|
+
let t = qe.value;
|
|
390
|
+
t === e || t && e && JSON.stringify(t) === JSON.stringify(e) || (qe.value = e);
|
|
391
|
+
}
|
|
392
|
+
function Ct(e) {
|
|
393
|
+
return !!I && Math.hypot(e.offsetX - I[0], e.offsetY - I[1]) > Ie;
|
|
394
|
+
}
|
|
395
|
+
function Q(e, t) {
|
|
307
396
|
return e.convertToPixel({ seriesId: w }, t);
|
|
308
397
|
}
|
|
309
|
-
function
|
|
398
|
+
function wt(e) {
|
|
310
399
|
let t = X.theme.value;
|
|
311
400
|
if (!R || !t) return;
|
|
312
401
|
let n = /* @__PURE__ */ new Set();
|
|
313
|
-
for (let r of
|
|
314
|
-
let
|
|
315
|
-
if (!
|
|
402
|
+
for (let r of G.value.layout.groups) {
|
|
403
|
+
let a = Q(e, [r.x, r.y]), o = Q(e, [r.x + r.width, r.y + r.height]);
|
|
404
|
+
if (!a || !o) continue;
|
|
316
405
|
n.add(r.name);
|
|
317
|
-
let
|
|
318
|
-
x:
|
|
319
|
-
y:
|
|
320
|
-
width:
|
|
321
|
-
height:
|
|
322
|
-
r: 10 *
|
|
323
|
-
},
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
406
|
+
let s = (o[0] - a[0]) / r.width, c = {
|
|
407
|
+
x: a[0],
|
|
408
|
+
y: a[1],
|
|
409
|
+
width: o[0] - a[0],
|
|
410
|
+
height: o[1] - a[1],
|
|
411
|
+
r: 10 * s
|
|
412
|
+
}, l = a[1] + 15 * s, u = Ze.value.get(r.name), d = u?.color ? i(u.color, 0) : void 0, f = r.depth && q.value === "badge" ? "" : ee(u?.label || r.name, 40), p = u?.description && q.value === "full" ? ee(u.description, 32) : "", m = [
|
|
413
|
+
c.x,
|
|
414
|
+
c.y,
|
|
415
|
+
c.width,
|
|
416
|
+
c.height,
|
|
328
417
|
t.surface,
|
|
329
418
|
t.borderDark,
|
|
330
|
-
t.muted
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
419
|
+
t.muted,
|
|
420
|
+
f,
|
|
421
|
+
p,
|
|
422
|
+
d
|
|
423
|
+
].map(String).join("|"), h = R.items.get(r.name);
|
|
424
|
+
h || (h = {
|
|
425
|
+
rect: new Ce.Rect({
|
|
334
426
|
z: 1,
|
|
335
427
|
silent: !0
|
|
336
428
|
}),
|
|
337
|
-
text: new
|
|
429
|
+
text: new Ce.Text({
|
|
338
430
|
z: 1,
|
|
339
431
|
silent: !0
|
|
340
432
|
}),
|
|
341
433
|
sig: ""
|
|
342
|
-
}, R.root.add(
|
|
434
|
+
}, R.root.add(h.rect), R.root.add(h.text), R.items.set(r.name, h)), h.rect.attr("z2", r.depth * 2), h.text.attr("z2", r.depth * 2 + 1), h.sig !== m && (h.sig = m, h.rect.setShape(c), h.rect.setStyle(d ? {
|
|
435
|
+
fill: t.alpha(d, .06),
|
|
436
|
+
stroke: t.alpha(d, .6),
|
|
437
|
+
lineWidth: 1.5
|
|
438
|
+
} : {
|
|
343
439
|
fill: t.color("var(--color-surface-muted)"),
|
|
344
440
|
stroke: t.borderDark,
|
|
345
441
|
lineWidth: 1
|
|
346
|
-
}),
|
|
347
|
-
text:
|
|
348
|
-
x:
|
|
349
|
-
y:
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
442
|
+
}), h.text.setStyle({
|
|
443
|
+
text: p ? `{name|${Y(f)}} {description|${Y(p)}}` : f && `{name|${Y(f)}}`,
|
|
444
|
+
x: a[0] + 10 * s,
|
|
445
|
+
y: l,
|
|
446
|
+
verticalAlign: "middle",
|
|
447
|
+
rich: {
|
|
448
|
+
name: {
|
|
449
|
+
fill: d ? t.heading : t.muted,
|
|
450
|
+
font: `${d ? 600 : 500} 11px ${t.font}`
|
|
451
|
+
},
|
|
452
|
+
description: {
|
|
453
|
+
fill: t.muted,
|
|
454
|
+
font: `400 11px ${t.font}`
|
|
455
|
+
}
|
|
456
|
+
}
|
|
353
457
|
}));
|
|
354
458
|
}
|
|
355
459
|
for (let [e, t] of R.items) n.has(e) || (R.root.remove(t.rect), R.root.remove(t.text), R.items.delete(e));
|
|
356
460
|
}
|
|
357
|
-
function
|
|
358
|
-
|
|
359
|
-
let t =
|
|
461
|
+
function Tt(e) {
|
|
462
|
+
M.value = null, Z(null), wt(e);
|
|
463
|
+
let t = G.value, n = e.convertFromPixel({ seriesId: w }, [t.left + t.width / 2, t.top + t.height / 2]), r = Q(e, [0, 0]), i = Q(e, [100, 0]);
|
|
360
464
|
if (!n || !r || !i) return;
|
|
361
465
|
let a = (i[0] - r[0]) / 100;
|
|
362
466
|
F = {
|
|
363
467
|
frame: t,
|
|
364
468
|
zoom: a / t.scale,
|
|
365
469
|
center: n
|
|
366
|
-
},
|
|
470
|
+
}, N.value = Math.round(a * 1e3) / 1e3;
|
|
367
471
|
}
|
|
368
|
-
let
|
|
472
|
+
let Et = p(() => Qe.value.map((e) => ({
|
|
369
473
|
key: e,
|
|
370
474
|
name: e,
|
|
371
|
-
color:
|
|
475
|
+
color: $e.value.get(e)
|
|
372
476
|
})));
|
|
373
|
-
function
|
|
374
|
-
let t = (e) =>
|
|
477
|
+
function Dt(e) {
|
|
478
|
+
let t = (e) => z.value.get(e)?.label ?? e;
|
|
375
479
|
return {
|
|
376
|
-
targets:
|
|
377
|
-
sources:
|
|
480
|
+
targets: U.value.filter((t) => t.source === e).map((e) => t(e.target)),
|
|
481
|
+
sources: U.value.filter((t) => t.target === e).map((e) => t(e.source))
|
|
378
482
|
};
|
|
379
483
|
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
e
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
n
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
484
|
+
function Ot(e) {
|
|
485
|
+
return e ? Ze.value.get(e)?.label || e : "";
|
|
486
|
+
}
|
|
487
|
+
let kt = p(() => {
|
|
488
|
+
let e = D.nodes.some((e) => e.group);
|
|
489
|
+
return {
|
|
490
|
+
columns: [
|
|
491
|
+
"Resource",
|
|
492
|
+
"Kind",
|
|
493
|
+
"Status",
|
|
494
|
+
"Connects to",
|
|
495
|
+
"Connected from",
|
|
496
|
+
...e ? ["Group"] : []
|
|
497
|
+
],
|
|
498
|
+
rows: D.nodes.map((t) => {
|
|
499
|
+
let { targets: n, sources: r } = Dt(t.id), i = [
|
|
500
|
+
t.label,
|
|
501
|
+
t.kind ?? "",
|
|
502
|
+
tt(t),
|
|
503
|
+
n.join(", ") || "None",
|
|
504
|
+
r.join(", ") || "None"
|
|
505
|
+
];
|
|
506
|
+
return e ? [...i, Ot(t.group) || "None"] : i;
|
|
507
|
+
})
|
|
508
|
+
};
|
|
509
|
+
});
|
|
510
|
+
function At(e, t) {
|
|
400
511
|
return `${e} ${t}${e === 1 ? "" : "s"}`;
|
|
401
512
|
}
|
|
402
|
-
let
|
|
403
|
-
let e = D.nodes.filter(
|
|
513
|
+
let jt = p(() => {
|
|
514
|
+
let e = D.nodes.filter(nt).length, t = `Topology: ${At(D.nodes.length, "resource")}, ${At(U.value.length, "connection")}${e ? `, ${e} with problems` : ""}.`;
|
|
404
515
|
return [D.title, D.description || t].filter(Boolean).join(". ");
|
|
405
|
-
}),
|
|
406
|
-
node:
|
|
407
|
-
...
|
|
516
|
+
}), Mt = p(() => M.value ? z.value.get(String(M.value.datum.id)) : void 0), $ = p(() => Mt.value ? {
|
|
517
|
+
node: Mt.value,
|
|
518
|
+
...Dt(Mt.value.id)
|
|
408
519
|
} : void 0);
|
|
409
|
-
function
|
|
410
|
-
let t = e.dataType === "node" ?
|
|
411
|
-
if (!t || !D.tooltip) return
|
|
412
|
-
|
|
520
|
+
function Nt(e) {
|
|
521
|
+
let t = e.dataType === "node" ? z.value.get(String(e.data?.id)) : void 0;
|
|
522
|
+
if (!t || !D.tooltip) return Pt();
|
|
523
|
+
M.value = {
|
|
413
524
|
clientX: e.clientX,
|
|
414
525
|
clientY: e.clientY,
|
|
415
526
|
title: t.label,
|
|
@@ -418,21 +529,21 @@ var Se = { class: "font-medium text-heading" }, Ce = {
|
|
|
418
529
|
index: e.dataIndex
|
|
419
530
|
};
|
|
420
531
|
}
|
|
421
|
-
function
|
|
422
|
-
|
|
532
|
+
function Pt() {
|
|
533
|
+
M.value = null;
|
|
423
534
|
}
|
|
424
|
-
function
|
|
425
|
-
O.value = O.value === e.id ? null : e.id,
|
|
535
|
+
function Ft(e, t) {
|
|
536
|
+
O.value = O.value === e.id ? null : e.id, Ke.value?.focus({ preventScroll: !0 }), ze("node-click", e, t);
|
|
426
537
|
}
|
|
427
|
-
function
|
|
538
|
+
function It(e) {
|
|
428
539
|
let t = e;
|
|
429
540
|
!t.ctrlKey && !t.metaKey && e.stopPropagation();
|
|
430
541
|
}
|
|
431
|
-
function
|
|
542
|
+
function Lt(e) {
|
|
432
543
|
let t = e;
|
|
433
|
-
t.type === "touchstart" && t.touches.length > 1 && (
|
|
544
|
+
t.type === "touchstart" && t.touches.length > 1 && (Je = !0), Je || e.stopPropagation(), t.type === "touchend" && !t.touches.length && (Je = !1);
|
|
434
545
|
}
|
|
435
|
-
function
|
|
546
|
+
function Rt(e) {
|
|
436
547
|
let t = X.chart.value;
|
|
437
548
|
t && t.dispatchAction({
|
|
438
549
|
type: "graphRoam",
|
|
@@ -442,16 +553,16 @@ var Se = { class: "font-medium text-heading" }, Ce = {
|
|
|
442
553
|
originY: t.getHeight() / 2
|
|
443
554
|
});
|
|
444
555
|
}
|
|
445
|
-
function
|
|
446
|
-
|
|
556
|
+
function zt() {
|
|
557
|
+
Rt(Me);
|
|
447
558
|
}
|
|
448
|
-
function
|
|
449
|
-
|
|
559
|
+
function Bt() {
|
|
560
|
+
Rt(1 / Me);
|
|
450
561
|
}
|
|
451
|
-
function
|
|
452
|
-
let e = X.chart.value, t =
|
|
562
|
+
function Vt() {
|
|
563
|
+
let e = X.chart.value, t = G.value;
|
|
453
564
|
if (!e) return;
|
|
454
|
-
let n = F?.frame === t ? F.zoom : 1, r =
|
|
565
|
+
let n = F?.frame === t ? F.zoom : 1, r = Q(e, t.center);
|
|
455
566
|
r && (e.dispatchAction({
|
|
456
567
|
type: "graphRoam",
|
|
457
568
|
seriesId: w,
|
|
@@ -463,95 +574,152 @@ var Se = { class: "font-medium text-heading" }, Ce = {
|
|
|
463
574
|
seriesId: w,
|
|
464
575
|
dx: t.left + t.width / 2 - r[0],
|
|
465
576
|
dy: t.top + t.height / 2 - r[1]
|
|
466
|
-
}),
|
|
577
|
+
}), N.value = null);
|
|
578
|
+
}
|
|
579
|
+
let Ht = p(() => ({
|
|
580
|
+
min: Math.round(Math.min(k[0], G.value.scale) * 100),
|
|
581
|
+
max: Math.round(Math.max(k[1], G.value.scale) * 100)
|
|
582
|
+
}));
|
|
583
|
+
function Ut(e) {
|
|
584
|
+
if (!Number.isFinite(e)) return;
|
|
585
|
+
let { min: t, max: n } = Ht.value;
|
|
586
|
+
Rt(Math.min(n, Math.max(t, e)) / 100 / (N.value ?? G.value.scale));
|
|
587
|
+
}
|
|
588
|
+
function Wt() {
|
|
589
|
+
let e = Number.parseFloat(P.value);
|
|
590
|
+
Number.isFinite(e) && Math.round(e) !== K.value && Ut(e), P.value = String(K.value);
|
|
467
591
|
}
|
|
468
|
-
|
|
592
|
+
function Gt(e) {
|
|
593
|
+
let t = e.shiftKey ? 10 : 1;
|
|
594
|
+
if (e.key === "Enter") Wt();
|
|
595
|
+
else if (e.key === "ArrowUp") Ut(K.value + t);
|
|
596
|
+
else if (e.key === "ArrowDown") Ut(K.value - t);
|
|
597
|
+
else if (e.key === "Escape") P.value = String(K.value), oe(() => e.target.select());
|
|
598
|
+
else return;
|
|
599
|
+
e.preventDefault();
|
|
600
|
+
}
|
|
601
|
+
async function Kt(e) {
|
|
602
|
+
let t = z.value.get(e);
|
|
603
|
+
if (!t) return !1;
|
|
604
|
+
let n = t.kind ?? E;
|
|
605
|
+
j.value.includes(n) && (j.value = j.value.filter((e) => e !== n)), O.value = e, await oe(), await new Promise((e) => requestAnimationFrame(e));
|
|
606
|
+
let r = X.chart.value, i = G.value.layout.positions.get(e), a = r && i ? Q(r, i) : void 0;
|
|
607
|
+
if (!r || !a) return !0;
|
|
608
|
+
let o = D.height - (D.zoom ? Pe : T);
|
|
609
|
+
return r.dispatchAction({
|
|
610
|
+
type: "graphRoam",
|
|
611
|
+
seriesId: w,
|
|
612
|
+
dx: r.getWidth() / 2 - a[0],
|
|
613
|
+
dy: (T + o) / 2 - a[1]
|
|
614
|
+
}), !0;
|
|
615
|
+
}
|
|
616
|
+
let qt = [
|
|
469
617
|
{
|
|
470
618
|
label: "Zoom out",
|
|
471
|
-
icon:
|
|
472
|
-
action:
|
|
619
|
+
icon: Se,
|
|
620
|
+
action: Bt
|
|
473
621
|
},
|
|
474
622
|
{
|
|
475
623
|
label: "Zoom in",
|
|
476
|
-
icon:
|
|
477
|
-
action:
|
|
624
|
+
icon: xe,
|
|
625
|
+
action: zt
|
|
478
626
|
},
|
|
479
627
|
{
|
|
480
628
|
label: "Fit to view",
|
|
481
|
-
icon:
|
|
482
|
-
action:
|
|
629
|
+
icon: ye,
|
|
630
|
+
action: Vt
|
|
483
631
|
}
|
|
484
632
|
];
|
|
485
|
-
function
|
|
633
|
+
function Jt(e) {
|
|
486
634
|
e.key === "Escape" && !e.defaultPrevented && O.value && (e.preventDefault(), O.value = null);
|
|
487
635
|
}
|
|
488
|
-
return
|
|
489
|
-
for (let [n, r] of
|
|
636
|
+
return S(G, () => N.value = null), S(K, (e) => P.value = String(e), { immediate: !0 }), S(() => D.highlightOnHover, (e) => !e && Z(null)), S(We, (e, t) => {
|
|
637
|
+
for (let [n, r] of Be) t?.removeEventListener(n, r, { capture: !0 }), e?.addEventListener(n, r, {
|
|
490
638
|
capture: !0,
|
|
491
639
|
passive: !0
|
|
492
640
|
});
|
|
493
|
-
}), (
|
|
641
|
+
}), ue(() => clearTimeout(L)), ae({
|
|
642
|
+
focusNode: Kt,
|
|
643
|
+
fit: Vt,
|
|
644
|
+
zoomIn: zt,
|
|
645
|
+
zoomOut: Bt,
|
|
646
|
+
zoomTo: Ut
|
|
647
|
+
}), (n, r) => (y(), m(t, {
|
|
494
648
|
hidden: j.value,
|
|
495
|
-
"onUpdate:hidden": r[
|
|
496
|
-
width:
|
|
497
|
-
"onUpdate:width": r[
|
|
649
|
+
"onUpdate:hidden": r[2] ||= (e) => j.value = e,
|
|
650
|
+
width: Ge.value,
|
|
651
|
+
"onUpdate:width": r[3] ||= (e) => Ge.value = e,
|
|
498
652
|
testid: "ac-graph-chart",
|
|
499
|
-
height:
|
|
500
|
-
loading:
|
|
501
|
-
empty: !
|
|
502
|
-
"empty-text":
|
|
503
|
-
"empty-icon":
|
|
504
|
-
legend:
|
|
505
|
-
"legend-items":
|
|
506
|
-
summary:
|
|
507
|
-
title:
|
|
508
|
-
description:
|
|
509
|
-
table:
|
|
510
|
-
tip:
|
|
511
|
-
tooltip:
|
|
512
|
-
onKeydown:
|
|
513
|
-
},
|
|
514
|
-
tooltip:
|
|
515
|
-
|
|
516
|
-
$.value.node.kind ? (y(),
|
|
653
|
+
height: v.height,
|
|
654
|
+
loading: v.loading,
|
|
655
|
+
empty: !v.nodes.length,
|
|
656
|
+
"empty-text": v.emptyText,
|
|
657
|
+
"empty-icon": me(be),
|
|
658
|
+
legend: v.legend,
|
|
659
|
+
"legend-items": Et.value,
|
|
660
|
+
summary: jt.value,
|
|
661
|
+
title: v.title,
|
|
662
|
+
description: v.description,
|
|
663
|
+
table: kt.value,
|
|
664
|
+
tip: M.value,
|
|
665
|
+
tooltip: v.tooltip,
|
|
666
|
+
onKeydown: Jt
|
|
667
|
+
}, te({
|
|
668
|
+
tooltip: C(() => [$.value ? fe(n.$slots, "tooltip", ce(ie($.value)), () => [
|
|
669
|
+
_("p", Ee, x($.value.node.label), 1),
|
|
670
|
+
$.value.node.kind ? (y(), g("p", De, [_("span", {
|
|
517
671
|
class: "size-2 shrink-0 rounded-full",
|
|
518
|
-
style:
|
|
672
|
+
style: le({ backgroundColor: et($.value.node) }),
|
|
519
673
|
"aria-hidden": "true"
|
|
520
|
-
}, null, 4),
|
|
521
|
-
|
|
674
|
+
}, null, 4), ne(" " + x($.value.node.kind), 1)])) : h("", !0),
|
|
675
|
+
tt($.value.node) ? (y(), g("p", {
|
|
522
676
|
key: 1,
|
|
523
|
-
class:
|
|
524
|
-
}, [
|
|
525
|
-
class:
|
|
677
|
+
class: se(["mt-1 flex items-center gap-1.5", He[B($.value.node.status)]])
|
|
678
|
+
}, [_("span", {
|
|
679
|
+
class: se(["size-2 shrink-0 rounded-full", Ue[B($.value.node.status)]]),
|
|
526
680
|
"aria-hidden": "true"
|
|
527
|
-
}, null, 2),
|
|
528
|
-
$.value.node.description ? (y(),
|
|
529
|
-
], void 0, 0) :
|
|
530
|
-
default:
|
|
681
|
+
}, null, 2), ne(" " + x(tt($.value.node)), 1)], 2)) : h("", !0),
|
|
682
|
+
$.value.node.description ? (y(), g("p", Oe, x($.value.node.description), 1)) : h("", !0)
|
|
683
|
+
], void 0, 0) : h("", !0)]),
|
|
684
|
+
default: C(() => [_("div", {
|
|
531
685
|
ref_key: "host",
|
|
532
|
-
ref:
|
|
686
|
+
ref: We,
|
|
533
687
|
class: "size-full"
|
|
534
688
|
}, null, 512)]),
|
|
535
689
|
_: 2
|
|
536
|
-
}, [
|
|
690
|
+
}, [v.zoom ? {
|
|
537
691
|
name: "controls",
|
|
538
|
-
fn:
|
|
692
|
+
fn: C(() => [_("div", {
|
|
539
693
|
ref_key: "controls",
|
|
540
|
-
ref:
|
|
694
|
+
ref: Ke,
|
|
541
695
|
class: "absolute right-3 bottom-3 flex items-center gap-0.5 rounded-full border border-border bg-surface/90 p-1 shadow-sm backdrop-blur focus:outline-none",
|
|
542
696
|
role: "group",
|
|
543
697
|
"aria-label": "Zoom",
|
|
544
698
|
tabindex: "-1"
|
|
545
|
-
}, [(y(),
|
|
546
|
-
|
|
699
|
+
}, [(y(), g(f, null, de(qt, (t) => (y(), g(f, { key: t.label }, [t.label === "Zoom in" ? (y(), g("label", ke, [_e(_("input", {
|
|
700
|
+
"onUpdate:modelValue": r[0] ||= (e) => P.value = e,
|
|
701
|
+
type: "text",
|
|
702
|
+
inputmode: "numeric",
|
|
703
|
+
role: "spinbutton",
|
|
704
|
+
"aria-label": "Zoom percentage",
|
|
705
|
+
"aria-valuenow": K.value,
|
|
706
|
+
"aria-valuemin": Ht.value.min,
|
|
707
|
+
"aria-valuemax": Ht.value.max,
|
|
708
|
+
"aria-valuetext": `${K.value}%`,
|
|
709
|
+
class: "m-0 w-[3ch] border-0 bg-transparent p-0 text-right text-xs text-inherit tabular-nums outline-none",
|
|
710
|
+
onKeydown: Gt,
|
|
711
|
+
onBlur: Wt,
|
|
712
|
+
onFocus: r[1] ||= (e) => e.target.select()
|
|
713
|
+
}, null, 40, Ae), [[ge, P.value]]), r[4] ||= ne("% ", -1)])) : h("", !0), re(e, { content: t.label }, {
|
|
714
|
+
default: C(() => [_("button", {
|
|
547
715
|
type: "button",
|
|
548
716
|
class: "inline-flex size-7 cursor-pointer items-center justify-center rounded-full text-muted transition-colors hover:bg-surface-sunken hover:text-heading focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none",
|
|
549
717
|
"aria-label": t.label,
|
|
550
718
|
onClick: t.action
|
|
551
|
-
}, [(y(),
|
|
719
|
+
}, [(y(), m(pe(t.icon), {
|
|
552
720
|
class: "size-4",
|
|
553
721
|
"aria-hidden": "true"
|
|
554
|
-
}))], 8,
|
|
722
|
+
}))], 8, je)]),
|
|
555
723
|
_: 2
|
|
556
724
|
}, 1032, ["content"])], 64))), 64))], 512)]),
|
|
557
725
|
key: "0"
|
|
@@ -575,4 +743,4 @@ var Se = { class: "font-medium text-heading" }, Ce = {
|
|
|
575
743
|
}
|
|
576
744
|
});
|
|
577
745
|
//#endregion
|
|
578
|
-
export {
|
|
746
|
+
export { Re as default };
|