@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.
Files changed (50) hide show
  1. package/dist/lib/charts/ChartFrame.vue_vue_type_script_setup_true_lang.js +2 -2
  2. package/dist/lib/charts/graph.d.ts +9 -15
  3. package/dist/lib/charts/graph.js +79 -75
  4. package/dist/lib/charts/index.d.ts +4 -2
  5. package/dist/lib/charts/index.js +2 -1
  6. package/dist/lib/charts/nodeSymbol.d.ts +15 -0
  7. package/dist/lib/charts/nodeSymbol.js +27 -0
  8. package/dist/lib/charts/tree.d.ts +15 -0
  9. package/dist/lib/charts/tree.js +89 -0
  10. package/dist/lib/compat.css +113 -0
  11. package/dist/lib/components/AcAccordionItem.vue.d.ts +3 -1
  12. package/dist/lib/components/AcAccordionItem.vue_vue_type_script_setup_true_lang.js +35 -26
  13. package/dist/lib/components/AcAlert.vue.d.ts +1 -1
  14. package/dist/lib/components/AcBadge.vue.d.ts +1 -1
  15. package/dist/lib/components/AcBanner.vue.d.ts +1 -1
  16. package/dist/lib/components/AcCard.vue.d.ts +1 -1
  17. package/dist/lib/components/AcCellValue.vue.d.ts +1 -1
  18. package/dist/lib/components/AcCheckList.vue.d.ts +1 -1
  19. package/dist/lib/components/AcConfirmModal.vue.d.ts +1 -1
  20. package/dist/lib/components/AcDropdownItem.vue.d.ts +1 -1
  21. package/dist/lib/components/AcFeatureCard.vue.d.ts +1 -1
  22. package/dist/lib/components/AcGraphChart.vue.d.ts +53 -3
  23. package/dist/lib/components/AcGraphChart.vue_vue_type_script_setup_true_lang.js +401 -233
  24. package/dist/lib/components/AcList.js +5 -0
  25. package/dist/lib/components/AcList.vue.d.ts +56 -0
  26. package/dist/lib/components/AcList.vue_vue_type_script_setup_true_lang.js +74 -0
  27. package/dist/lib/components/AcListItem.js +5 -0
  28. package/dist/lib/components/AcListItem.vue.d.ts +53 -0
  29. package/dist/lib/components/AcListItem.vue_vue_type_script_setup_true_lang.js +105 -0
  30. package/dist/lib/components/AcMapChart.vue.d.ts +66 -3
  31. package/dist/lib/components/AcMapChart.vue_vue_type_script_setup_true_lang.js +403 -201
  32. package/dist/lib/components/AcMonthPicker.js +5 -0
  33. package/dist/lib/components/AcMonthPicker.vue.d.ts +102 -0
  34. package/dist/lib/components/AcMonthPicker.vue_vue_type_script_setup_true_lang.js +595 -0
  35. package/dist/lib/components/AcNavbarItem.vue.d.ts +1 -1
  36. package/dist/lib/components/AcResourceCard.vue.d.ts +1 -1
  37. package/dist/lib/components/AcSideTabs.vue.d.ts +3 -1
  38. package/dist/lib/components/AcSideTabs.vue_vue_type_script_setup_true_lang.js +53 -33
  39. package/dist/lib/components/AcSidebarItem.vue.d.ts +1 -1
  40. package/dist/lib/components/AcStatCard.vue.d.ts +1 -1
  41. package/dist/lib/components/AcTreeChart.js +5 -0
  42. package/dist/lib/components/AcTreeChart.vue.d.ts +135 -0
  43. package/dist/lib/components/AcTreeChart.vue_vue_type_script_setup_true_lang.js +809 -0
  44. package/dist/lib/components/AcUsageCard.vue.d.ts +1 -1
  45. package/dist/lib/components/index.d.ts +5 -2
  46. package/dist/lib/composables/copyText.d.ts +5 -1
  47. package/dist/lib/composables/copyText.js +15 -3
  48. package/dist/lib/index.d.ts +3 -0
  49. package/dist/lib/index.js +85 -81
  50. package/package.json +1 -1
@@ -18,20 +18,32 @@ var ue = {
18
18
  }, ge = {
19
19
  key: 1,
20
20
  class: "text-xs font-semibold"
21
- }, _e = [
21
+ }, _e = {
22
+ key: 1,
23
+ class: "min-w-0 flex-1"
24
+ }, ve = { class: "block truncate" }, ye = { class: "block truncate text-xs font-normal text-muted" }, be = [
22
25
  "disabled",
23
26
  "aria-expanded",
24
27
  "aria-controls",
25
28
  "title",
26
29
  "onClick"
27
- ], ve = {
30
+ ], xe = {
28
31
  key: 1,
29
32
  class: "text-xs font-semibold"
30
- }, ye = ["id"], be = { class: "min-w-0 flex-1 truncate" }, xe = [
33
+ }, Se = {
34
+ key: 1,
35
+ class: "min-w-0 flex-1"
36
+ }, Ce = { class: "block truncate" }, we = { class: "block truncate text-xs font-normal text-muted" }, Te = ["id"], Ee = {
37
+ key: 1,
38
+ class: "min-w-0 flex-1"
39
+ }, De = { class: "block truncate" }, Oe = { class: "block truncate text-xs font-normal text-muted" }, ke = {
40
+ key: 2,
41
+ class: "min-w-0 flex-1 truncate"
42
+ }, Ae = [
31
43
  "aria-label",
32
44
  "aria-expanded",
33
45
  "title"
34
- ], Se = { key: 2 }, Ce = {
46
+ ], je = { key: 2 }, Me = {
35
47
  key: 1,
36
48
  class: "min-w-0 flex-1"
37
49
  }, C = /*@__PURE__*/ s({
@@ -75,19 +87,19 @@ var ue = {
75
87
  success: "bg-success text-white",
76
88
  warning: "bg-warning text-on-warning",
77
89
  danger: "bg-danger text-white"
78
- }, we = {
90
+ }, Ne = {
79
91
  neutral: "bg-muted",
80
92
  primary: "bg-primary",
81
93
  info: "bg-info",
82
94
  success: "bg-success",
83
95
  warning: "bg-warning",
84
96
  danger: "bg-danger"
85
- }, Te = {
97
+ }, Pe = {
86
98
  none: ["border-transparent text-heading/80 hover:border-border hover:bg-accent-hover hover:text-heading", "border-primary/35 bg-primary/10 text-heading shadow-xs shadow-primary/10"],
87
99
  danger: ["border-transparent text-danger-strong hover:border-danger/25 hover:bg-danger/10", "border-danger/25 bg-danger/10 text-danger-strong"],
88
100
  warning: ["border-transparent text-warning-strong hover:border-warning/30 hover:bg-warning/10", "border-warning/30 bg-warning/10 text-warning-strong"],
89
101
  success: ["border-transparent text-success-strong hover:border-success/25 hover:bg-success/10", "border-success/25 bg-success/10 text-success-strong"]
90
- }, O = ae(), Ee = oe(), k = c()?.appContext, A = k?.components.RouterLink, j = k?.config.globalProperties.$router, M = h(null), N = h(null), P = h(!1), F = h(0), I = h({}), L = null, R = null, z = n(() => !!Ee.default), B = n(() => T.value && !P.value), V = n(() => C.items.flatMap((e) => e.children?.length ? e.children : [e])), De = n(() => {
102
+ }, O = ae(), Fe = oe(), k = c()?.appContext, A = k?.components.RouterLink, j = k?.config.globalProperties.$router, M = h(null), N = h(null), P = h(!1), F = h(0), I = h({}), L = null, R = null, z = n(() => !!Fe.default), B = n(() => T.value && !P.value), V = n(() => C.items.flatMap((e) => e.children?.length ? e.children : [e])), Ie = n(() => {
91
103
  let e = [];
92
104
  for (let t of C.items) {
93
105
  let n = t.group ?? "", r = e[e.length - 1];
@@ -97,17 +109,19 @@ var ue = {
97
109
  });
98
110
  }
99
111
  return e;
100
- }), Oe = n(() => C.items.flatMap((e) => e.children?.length ? e.children.map((t) => ({
112
+ }), Le = n(() => C.items.flatMap((e) => e.children?.length ? e.children.map((t) => ({
101
113
  value: t.key,
102
114
  label: t.label,
115
+ description: t.description,
103
116
  group: e.label,
104
117
  disabled: t.disabled
105
118
  })) : [{
106
119
  value: e.key,
107
120
  label: e.label,
121
+ description: e.description,
108
122
  group: e.group,
109
123
  disabled: e.disabled
110
- }])), ke = n(() => {
124
+ }])), Re = n(() => {
111
125
  if (!j) return "";
112
126
  let e = j.currentRoute.value.path, t = "", n = -1;
113
127
  for (let r of V.value) {
@@ -123,10 +137,10 @@ var ue = {
123
137
  e.startsWith(a) && i.length > n && (t = r.key, n = i.length);
124
138
  }
125
139
  return t;
126
- }), H = n(() => F.value ? `calc(${C.top} + ${F.value}px)` : C.top), Ae = n(() => C.sticky ? {
140
+ }), H = n(() => F.value ? `calc(${C.top} + ${F.value}px)` : C.top), ze = n(() => C.sticky ? {
127
141
  top: H.value,
128
142
  maxHeight: `calc(100dvh - ${H.value} - ${C.bottom})`
129
- } : void 0), je = n(() => ({
143
+ } : void 0), Be = n(() => ({
130
144
  width: B.value ? "calc(56px * var(--ac-scale))" : C.width,
131
145
  minHeight: C.sticky && z.value ? `calc(100dvh - ${H.value} - ${C.bottom})` : void 0
132
146
  }));
@@ -139,7 +153,7 @@ var ue = {
139
153
  function G(e) {
140
154
  return !I.value[e.key];
141
155
  }
142
- function Me(e) {
156
+ function Ve(e) {
143
157
  if (B.value) {
144
158
  T.value = !1, I.value[e.key] = !1;
145
159
  return;
@@ -154,7 +168,7 @@ var ue = {
154
168
  return t === A ? n.to = e.to : t === "a" ? e.disabled ? (n.role = "link", n["aria-disabled"] = "true") : n.href = e.href ?? e.to : (n.type = "button", n.disabled = e.disabled || void 0), n;
155
169
  }
156
170
  function J(e) {
157
- let [t, n] = Te[e.tone ?? "none"];
171
+ let [t, n] = Pe[e.tone ?? "none"];
158
172
  return [U(e) ? n : t, e.disabled ? "pointer-events-none cursor-not-allowed opacity-50" : "cursor-pointer"];
159
173
  }
160
174
  function Y(e, t) {
@@ -164,7 +178,7 @@ var ue = {
164
178
  }
165
179
  w.value = e.key, E("select", e);
166
180
  }
167
- function Ne(e) {
181
+ function He(e) {
168
182
  let t = V.value.find((t) => t.key === e);
169
183
  t && !t.disabled && (w.value = t.key, E("select", t), t.to !== void 0 && j ? j.push(t.to) : t.href && window.location.assign(t.href));
170
184
  }
@@ -197,7 +211,7 @@ var ue = {
197
211
  let e = C.offsetSelectors.map((e) => document.querySelector(e)).filter((e) => !!e), t = () => F.value = e.reduce((e, t) => e + t.offsetHeight, 0);
198
212
  R = new ResizeObserver(t), e.forEach((e) => R.observe(e)), t();
199
213
  }
200
- return x(ke, (e) => {
214
+ return x(Re, (e) => {
201
215
  e && (w.value = e);
202
216
  }, { immediate: !0 }), x(w, (e) => {
203
217
  let t = C.items.find((t) => t.children?.some((t) => t.key === e));
@@ -218,9 +232,9 @@ var ue = {
218
232
  "data-testid": "ac-side-tabs"
219
233
  }, [s.hideTabs ? i("", !0) : (m(), a(t, { key: 0 }, [P.value && s.mobile === "select" ? (m(), a("div", ue, [te(e, {
220
234
  "model-value": w.value || null,
221
- options: Oe.value,
235
+ options: Le.value,
222
236
  label: s.label,
223
- "onUpdate:modelValue": Ne
237
+ "onUpdate:modelValue": He
224
238
  }, null, 8, [
225
239
  "model-value",
226
240
  "options",
@@ -258,13 +272,13 @@ var ue = {
258
272
  }, 1040, ["class", "onClick"]))]))), 128))], 544)], 8, de)) : (m(), a("div", {
259
273
  key: 2,
260
274
  class: "shrink-0 border-r border-border bg-surface transition-[width] duration-200 ease-out-soft motion-reduce:transition-none",
261
- style: p(je.value)
275
+ style: p(Be.value)
262
276
  }, [o("nav", {
263
277
  "aria-label": s.label,
264
278
  class: f(["ac-scrollbar flex flex-col gap-4", [s.sticky && "sticky", B.value ? "p-2" : "p-3"]]),
265
- style: p(Ae.value),
279
+ style: p(ze.value),
266
280
  onKeydown: X
267
- }, [(m(!0), a(t, null, g(De.value, (e, n) => (m(), a("div", { key: e.name || `section-${n}` }, [e.name && !B.value ? (m(), a("p", pe, v(e.name), 1)) : e.name && n > 0 ? (m(), a("div", me)) : i("", !0), o("ul", he, [(m(!0), a(t, null, g(e.items, (e) => (m(), a("li", { key: e.key }, [e.children?.length ? (m(), a(t, { key: 1 }, [o("button", {
281
+ }, [(m(!0), a(t, null, g(Ie.value, (e, n) => (m(), a("div", { key: e.name || `section-${n}` }, [e.name && !B.value ? (m(), a("p", pe, v(e.name), 1)) : e.name && n > 0 ? (m(), a("div", me)) : i("", !0), o("ul", he, [(m(!0), a(t, null, g(e.items, (e) => (m(), a("li", { key: e.key }, [e.children?.length ? (m(), a(t, { key: 1 }, [o("button", {
268
282
  type: "button",
269
283
  "data-side-tab": "",
270
284
  class: f(["group flex w-full cursor-pointer items-center gap-3 rounded-10 border py-2 text-left text-base font-medium transition-all duration-200 select-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none focus-visible:ring-inset disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none", [B.value ? "h-9.5 justify-center" : "px-3", B.value && W(e) ? "border-primary/35 bg-primary/10 text-heading shadow-xs shadow-primary/10" : ["border-transparent hover:border-border hover:bg-accent-hover hover:text-heading", W(e) ? "text-heading" : "text-heading/80"]]]),
@@ -272,7 +286,7 @@ var ue = {
272
286
  "aria-expanded": B.value ? void 0 : G(e),
273
287
  "aria-controls": `${y(O)}-${e.key}`,
274
288
  title: B.value ? e.label : void 0,
275
- onClick: (t) => Me(e)
289
+ onClick: (t) => Ve(e)
276
290
  }, [
277
291
  e.icon || B.value ? (m(), a("span", {
278
292
  key: 0,
@@ -281,18 +295,21 @@ var ue = {
281
295
  }, [e.icon ? (m(), r(_(e.icon), {
282
296
  key: 0,
283
297
  class: "size-4"
284
- })) : (m(), a("span", ve, v(e.label.charAt(0)), 1))], 2)) : i("", !0),
285
- o("span", { class: f(B.value ? "sr-only" : "min-w-0 flex-1 truncate") }, v(e.label), 3),
298
+ })) : (m(), a("span", xe, v(e.label.charAt(0)), 1))], 2)) : i("", !0),
299
+ e.description && !B.value ? (m(), a("span", Se, [o("span", Ce, v(e.label), 1), o("span", we, v(e.description), 1)])) : (m(), a("span", {
300
+ key: 2,
301
+ class: f(B.value ? "sr-only" : "min-w-0 flex-1 truncate")
302
+ }, v(e.label), 3)),
286
303
  !B.value && e.badge !== void 0 && e.badge !== "" ? (m(), a("span", {
287
- key: 1,
304
+ key: 3,
288
305
  class: f(["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-6 px-2 text-xs leading-none font-medium tabular-nums", D[e.badgeColor ?? "neutral"]])
289
306
  }, v(e.badge), 3)) : i("", !0),
290
307
  B.value ? i("", !0) : (m(), r(y(se), {
291
- key: 2,
308
+ key: 4,
292
309
  class: f(["size-4 shrink-0 text-muted transition-transform duration-200 motion-reduce:transition-none", G(e) && "rotate-90"]),
293
310
  "aria-hidden": "true"
294
311
  }, null, 8, ["class"]))
295
- ], 10, _e), o("ul", {
312
+ ], 10, be), o("ul", {
296
313
  id: `${y(O)}-${e.key}`,
297
314
  role: "list",
298
315
  class: f(["mt-1 ml-5 flex-col gap-1 border-l border-border pl-2", G(e) && !B.value ? "flex" : "hidden"])
@@ -307,14 +324,14 @@ var ue = {
307
324
  class: f(["size-4 shrink-0", !e.tone && (U(e) ? "text-primary" : "text-muted group-hover:text-heading")]),
308
325
  "aria-hidden": "true"
309
326
  }, null, 8, ["class"])) : i("", !0),
310
- o("span", be, v(e.label), 1),
327
+ e.description ? (m(), a("span", Ee, [o("span", De, v(e.label), 1), o("span", Oe, v(e.description), 1)])) : (m(), a("span", ke, v(e.label), 1)),
311
328
  e.badge !== void 0 && e.badge !== "" ? (m(), a("span", {
312
- key: 1,
329
+ key: 3,
313
330
  class: f(["inline-flex h-5 min-w-5 shrink-0 items-center justify-center rounded-6 px-2 text-xs leading-none font-medium tabular-nums", D[e.badgeColor ?? "neutral"]])
314
331
  }, v(e.badge), 3)) : i("", !0)
315
332
  ]),
316
333
  _: 2
317
- }, 1040, ["class", "onClick"]))]))), 128))], 10, ye)], 64)) : (m(), r(_(K(e)), u({
334
+ }, 1040, ["class", "onClick"]))]))), 128))], 10, Te)], 64)) : (m(), r(_(K(e)), u({
318
335
  key: 0,
319
336
  ref_for: !0
320
337
  }, q(e), {
@@ -332,10 +349,13 @@ var ue = {
332
349
  key: 0,
333
350
  class: "size-4"
334
351
  })) : (m(), a("span", ge, v(e.label.charAt(0)), 1))], 2)) : i("", !0),
335
- o("span", { class: f(B.value ? "sr-only" : "min-w-0 flex-1 truncate") }, v(e.label), 3),
336
- e.badge !== void 0 && e.badge !== "" ? (m(), a(t, { key: 1 }, [B.value ? (m(), a("span", {
352
+ e.description && !B.value ? (m(), a("span", _e, [o("span", ve, v(e.label), 1), o("span", ye, v(e.description), 1)])) : (m(), a("span", {
353
+ key: 2,
354
+ class: f(B.value ? "sr-only" : "min-w-0 flex-1 truncate")
355
+ }, v(e.label), 3)),
356
+ e.badge !== void 0 && e.badge !== "" ? (m(), a(t, { key: 3 }, [B.value ? (m(), a("span", {
337
357
  key: 0,
338
- class: f(["absolute top-1 right-1 size-2 rounded-full", we[e.badgeColor ?? "neutral"]]),
358
+ class: f(["absolute top-1 right-1 size-2 rounded-full", Ne[e.badgeColor ?? "neutral"]]),
339
359
  "aria-hidden": "true"
340
360
  }, null, 2)) : (m(), a("span", {
341
361
  key: 1,
@@ -363,7 +383,7 @@ var ue = {
363
383
  key: 1,
364
384
  class: "size-4 shrink-0 text-muted group-hover:text-heading",
365
385
  "aria-hidden": "true"
366
- })), B.value ? i("", !0) : (m(), a("span", Se, "Collapse"))], 10, xe)) : i("", !0)], 46, fe)], 4))], 64)), z.value ? (m(), a("div", Ce, [ie(n.$slots, "default", {
386
+ })), B.value ? i("", !0) : (m(), a("span", je, "Collapse"))], 10, Ae)) : i("", !0)], 46, fe)], 4))], 64)), z.value ? (m(), a("div", Me, [ie(n.$slots, "default", {
367
387
  active: w.value,
368
388
  compact: P.value
369
389
  })])) : i("", !0)], 2));
@@ -38,9 +38,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
38
38
  onClick?: ((e: MouseEvent) => any) | undefined;
39
39
  }>, {
40
40
  disabled: boolean;
41
- icon: Component;
42
41
  href: string;
43
42
  to: string | object;
43
+ icon: Component;
44
44
  active: boolean;
45
45
  badge: string | number;
46
46
  badgeColor: Tone | "neutral";
@@ -57,10 +57,10 @@ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, i
57
57
  }>, {
58
58
  progress: number;
59
59
  value: string | number;
60
- icon: Component;
61
60
  target: string;
62
61
  href: string;
63
62
  to: string | Record<string, unknown>;
63
+ icon: Component;
64
64
  size: "small" | "normal";
65
65
  status: "default" | "success" | "info" | "warning" | "danger";
66
66
  loading: boolean;
@@ -0,0 +1,5 @@
1
+ import e from "./AcTreeChart.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/lib/components/AcTreeChart.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,135 @@
1
+ import type { Component } from "vue";
2
+ import type { ChartRenderer } from "../charts/echarts";
3
+ import type { ChartColor } from "../charts/shared";
4
+ /** A node's health: drawn as the ring colour, and counted as a problem when `warning` or `danger`. */
5
+ export type TreeChartStatus = "success" | "info" | "warning" | "danger" | "neutral";
6
+ /** One node of the tree. Nest nodes in `children`. */
7
+ export interface TreeChartNode {
8
+ /** Unique id across the whole tree. Events and `reveal()` use it. */
9
+ id: string;
10
+ /** Name on the first line of the label, e.g. `demo-vpc`. */
11
+ name: string;
12
+ /** Second line of the label, e.g. a CIDR or an instance size. Also in the tooltip. */
13
+ description?: string;
14
+ /** Resource type, e.g. "Subnet". Picks the icon and its colour through `kindIcons` and `kindColors`, and shows in the tooltip. */
15
+ kind?: string;
16
+ /** A Lucide icon component, or 1–3 characters of text, drawn in the node. Overrides `kindIcons`. Without either the node is a dot. */
17
+ icon?: Component | string;
18
+ /** Colours the ring. `warning` and `danger` also add a `!` badge to the label. */
19
+ status?: TreeChartStatus;
20
+ /** Status in words for the tooltip and data table, e.g. "NotReady". Defaults to the status name. */
21
+ statusText?: string;
22
+ /** A short chip after the name, e.g. `{ text: "Public", tone: "success" }`. */
23
+ badge?: {
24
+ text: string;
25
+ tone?: TreeChartStatus;
26
+ };
27
+ /** How the node relates to its parent, shown muted before the name, e.g. "routes via" or ":8080". */
28
+ relation?: string;
29
+ /** Draws the node and its label faded, e.g. a reference to a resource whose own entry is elsewhere in the tree. */
30
+ muted?: boolean;
31
+ /** Starts this node folded (`true`) or open (`false`), whatever `expandDepth` says. */
32
+ collapsed?: boolean;
33
+ children?: TreeChartNode[];
34
+ }
35
+ /** What the `tooltip` slot gets for the hovered node. */
36
+ export interface TreeChartTooltipSlotProps {
37
+ /** The hovered node, as passed in `data`. */
38
+ node: TreeChartNode;
39
+ /** Names of its ancestors, from the root down. */
40
+ path: string[];
41
+ /** Whether its children are showing. Always false for a node without children. */
42
+ expanded: boolean;
43
+ }
44
+ export interface Props {
45
+ /** The tree: one root node, or an array of roots drawn one under the other. */
46
+ data: TreeChartNode | TreeChartNode[];
47
+ /** Layout direction: `LR` (left to right, best for deep or wide trees) or `TB` (top to bottom, for small hierarchies). */
48
+ direction?: "LR" | "TB";
49
+ /** How many levels start open: `1` shows the roots' children, `2` their grandchildren too. A node's `collapsed` wins. Pass `Infinity` to open everything. */
50
+ expandDepth?: number;
51
+ /** Text to find. Matching names, descriptions and kinds are highlighted, and their branches open. */
52
+ search?: string;
53
+ /** Plot height in px. With `autoHeight`, only used while there's nothing to measure yet. */
54
+ height?: number;
55
+ /** Grows the plot to fit the open rows (34px a row, 40px with descriptions, up to 4,000px), so opening a branch never squeezes the rest. */
56
+ autoHeight?: boolean;
57
+ /** `polyline` draws square elbows from a parent to its children; `curve` draws one curved line per child. */
58
+ edgeShape?: "polyline" | "curve";
59
+ /** Icon colour per kind: `{ Subnet: "chart-2" }`. Without it, kinds take `chart-1`, `chart-2`… in order of first appearance. */
60
+ kindColors?: Record<string, ChartColor>;
61
+ /** Icon per kind, so node data can stay plain JSON: `{ Subnet: Network }`. A node's own `icon` wins. */
62
+ kindIcons?: Record<string, Component | string>;
63
+ /** Shows zoom in, zoom out and fit buttons in the bottom-right corner. Dragging pans either way. */
64
+ zoom?: boolean;
65
+ /** Shows a tooltip with the node's name, kind, status and description on hover. */
66
+ tooltip?: boolean;
67
+ /** Shows a skeleton of the same height while data loads. */
68
+ loading?: boolean;
69
+ /** Text shown in place of the tree when `data` is empty. */
70
+ emptyText?: string;
71
+ /** Accessible name, e.g. "Resources of demo-vpc". Show the visible title in the surrounding card. */
72
+ title?: string;
73
+ /** A sentence for screen readers on what the tree shows. Defaults to the number of items, levels and problems. */
74
+ description?: string;
75
+ /** `canvas` (default) stays fast with thousands of nodes; `svg` is crisper when printed and lighter for a few dozen. */
76
+ renderer?: ChartRenderer;
77
+ /** Animates opening and moving branches. Off when the viewer asks for reduced motion, and above 2,000 nodes. */
78
+ animation?: boolean;
79
+ }
80
+ type __VLS_Slots = {
81
+ /** Replaces the tooltip body for the hovered node. */
82
+ tooltip?: (props: TreeChartTooltipSlotProps) => unknown;
83
+ };
84
+ /** Opens every level down to `depth` (`1` shows the roots' children) and folds the rest. */
85
+ declare function expandToDepth(depth: number): void;
86
+ /** Opens every node. */
87
+ declare function expandAll(): void;
88
+ /** Folds everything below the roots' children. */
89
+ declare function collapseAll(): void;
90
+ /** Opens the ancestors of the node with this id, so it's on screen. */
91
+ declare function reveal(id: string): void;
92
+ /** Resets pan and zoom to show the tree as first drawn. */
93
+ declare function fit(): void;
94
+ declare const __VLS_base: import("vue").DefineComponent<Props, {
95
+ expandAll: typeof expandAll;
96
+ collapseAll: typeof collapseAll;
97
+ expandToDepth: typeof expandToDepth;
98
+ reveal: typeof reveal;
99
+ fit: typeof fit;
100
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
101
+ select: (node: TreeChartNode) => any;
102
+ open: (node: TreeChartNode) => any;
103
+ toggle: (node: TreeChartNode, expanded: boolean) => any;
104
+ matches: (nodes: TreeChartNode[]) => any;
105
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
106
+ onSelect?: ((node: TreeChartNode) => any) | undefined;
107
+ onOpen?: ((node: TreeChartNode) => any) | undefined;
108
+ onToggle?: ((node: TreeChartNode, expanded: boolean) => any) | undefined;
109
+ onMatches?: ((nodes: TreeChartNode[]) => any) | undefined;
110
+ }>, {
111
+ search: string;
112
+ title: string;
113
+ description: string;
114
+ height: number;
115
+ direction: "LR" | "TB";
116
+ animation: boolean;
117
+ tooltip: boolean;
118
+ loading: boolean;
119
+ emptyText: string;
120
+ renderer: ChartRenderer;
121
+ zoom: boolean;
122
+ kindColors: Record<string, ChartColor>;
123
+ kindIcons: Record<string, Component | string>;
124
+ expandDepth: number;
125
+ autoHeight: boolean;
126
+ edgeShape: "polyline" | "curve";
127
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
128
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
129
+ declare const _default: typeof __VLS_export;
130
+ export default _default;
131
+ type __VLS_WithSlots<T, S> = T & {
132
+ new (): {
133
+ $slots: S;
134
+ };
135
+ };