@voltro/devtools 0.89.2 → 0.91.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.
@@ -1,5 +1,5 @@
1
- import { useDevtoolsStrings as e } from "../strings.js";
2
- import { clearInspectRefusals as t, useInspectRefusals as n } from "../inspectRefusal.js";
1
+ import { clearInspectRefusals as e, useInspectRefusals as t } from "../inspectRefusal.js";
2
+ import { useDevtoolsStrings as n } from "../strings.js";
3
3
  import { useState as r } from "react";
4
4
  import { useFrameworkRuntimes as i } from "@voltro/client";
5
5
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
@@ -10,21 +10,21 @@ var s = (e) => {
10
10
  } catch {
11
11
  return;
12
12
  }
13
- }, c = ({ url: n }) => {
14
- let i = e().inspect, [s, c] = r(""), [l, u] = r(null), d = async (e) => {
15
- e.preventDefault(), u(null);
13
+ }, c = ({ url: t }) => {
14
+ let i = n().inspect, [s, c] = r(""), [l, u] = r(null), d = async (n) => {
15
+ n.preventDefault(), u(null);
16
16
  try {
17
- let e = await fetch(n, {
17
+ let n = await fetch(t, {
18
18
  method: "POST",
19
19
  credentials: "same-origin",
20
20
  headers: { "content-type": "application/json" },
21
21
  body: JSON.stringify({ token: s })
22
22
  });
23
- if (e.ok) {
24
- c(""), t();
23
+ if (n.ok) {
24
+ c(""), e();
25
25
  return;
26
26
  }
27
- let r = await e.json().catch(() => null), i = typeof r == "object" && r && typeof r.reason == "string" ? r.reason : `HTTP ${e.status}`;
27
+ let r = await n.json().catch(() => null), i = typeof r == "object" && r && typeof r.reason == "string" ? r.reason : `HTTP ${n.status}`;
28
28
  u(i);
29
29
  } catch (e) {
30
30
  u(e instanceof Error ? e.message : String(e));
@@ -54,13 +54,13 @@ var s = (e) => {
54
54
  ]
55
55
  });
56
56
  }, l = () => {
57
- let t = n(), r = i(), l = e().inspect;
58
- if (t.length === 0) return null;
57
+ let e = t(), r = i(), l = n().inspect;
58
+ if (e.length === 0) return null;
59
59
  let u = (e) => r.names.find((t) => r.get(t).inspectBaseUrl === e) ?? e;
60
60
  return /* @__PURE__ */ a("div", {
61
61
  className: "vdt-refusals",
62
62
  role: "status",
63
- children: t.map((e) => {
63
+ children: e.map((e) => {
64
64
  let t = e.locked === !0 ? s(e) : void 0;
65
65
  return /* @__PURE__ */ o("div", {
66
66
  className: "vdt-refusal",
@@ -1,21 +1,21 @@
1
1
  import { getLogs as e, subscribeLogs as t } from "../logsBus.js";
2
- import { defaultDevtoolsStrings as n, useDevtoolsStrings as r } from "../strings.js";
3
- import { formatCacheKey as i, useLiveApiSections as a } from "../panels/subscriptions.js";
4
- import { fmtDuration as o, useTracesAcrossApis as s } from "../panels/traces.js";
2
+ import { formatCacheKey as n, useLiveApiSections as r } from "../panels/subscriptions.js";
3
+ import { fmtDuration as i, useTracesAcrossApis as a } from "../panels/traces.js";
4
+ import { defaultDevtoolsStrings as o, useDevtoolsStrings as s } from "../strings.js";
5
5
  import { compactJson as c } from "./searchIndex.js";
6
6
  import { useMemo as l, useSyncExternalStore as u } from "react";
7
7
  import { getMutations as d, subscribeMutations as f } from "@voltro/client";
8
8
  // src/console/sources.ts
9
9
  var p = (e) => e.recovery.phase === "stuck" || e.snapshot.error ? "err" : e.recovery.phase !== "steady" || e.snapshot.pendingPatches > 0 ? "warn" : e.snapshot.revision >= 0 ? "ok" : e.hasFiber ? "info" : "idle", m = (e, t) => {
10
- let n = i(t.key), r = [];
11
- t.subscriberCount > 0 && r.push(`${t.subscriberCount} sub${t.subscriberCount === 1 ? "" : "s"}`), t.snapshot.revision >= 0 && r.push(`r${t.snapshot.revision}`), t.snapshot.pendingPatches > 0 && r.push(`+${t.snapshot.pendingPatches} pending`), t.evicting && r.push("evicting");
10
+ let r = n(t.key), i = [];
11
+ t.subscriberCount > 0 && i.push(`${t.subscriberCount} sub${t.subscriberCount === 1 ? "" : "s"}`), t.snapshot.revision >= 0 && i.push(`r${t.snapshot.revision}`), t.snapshot.pendingPatches > 0 && i.push(`+${t.snapshot.pendingPatches} pending`), t.evicting && i.push("evicting");
12
12
  let a = t.snapshot.error ? "error" : t.recovery.phase === "steady" ? void 0 : t.recovery.phase;
13
13
  return {
14
14
  id: `sub:${e}:${t.key}`,
15
15
  source: "subscription",
16
16
  apiName: e,
17
- name: n,
18
- summary: r.join(" · "),
17
+ name: r,
18
+ summary: i.join(" · "),
19
19
  ...a === void 0 ? {} : { status: a },
20
20
  tone: p(t),
21
21
  at: 0,
@@ -64,11 +64,11 @@ var p = (e) => e.recovery.phase === "stuck" || e.snapshot.error ? "err" : e.reco
64
64
  source: "log",
65
65
  record: e
66
66
  }
67
- }), b = (e, t, r = n.traces) => {
68
- let i = t.spans.map((e) => e.attributes["db.operation.name"] ?? e.attributes["db.operation"]).find((e) => typeof e == "string"), a = t.spans.filter((e) => e.name !== t.rootName).slice(0, 3).map((e) => e.name).join(" → "), s = t.kind === "subscription" ? `${t.deliveryCount ?? 0} ${r.delivery(t.deliveryCount ?? 0)}` : [
69
- o(t.durationMs),
70
- r.spans(t.spanCount),
71
- i ?? a
67
+ }), b = (e, t, n = o.traces) => {
68
+ let r = t.spans.map((e) => e.attributes["db.operation.name"] ?? e.attributes["db.operation"]).find((e) => typeof e == "string"), a = t.spans.filter((e) => e.name !== t.rootName).slice(0, 3).map((e) => e.name).join(" → "), s = t.kind === "subscription" ? `${t.deliveryCount ?? 0} ${n.delivery(t.deliveryCount ?? 0)}` : [
69
+ i(t.durationMs),
70
+ n.spans(t.spanCount),
71
+ r ?? a
72
72
  ].filter(Boolean).join(" · "), c = t.spans.filter((e) => e.status === "error").map((e) => `${e.name} ${e.statusMessage ?? ""}`).join(" ");
73
73
  return {
74
74
  id: `trace:${e}:${t.traceId}`,
@@ -87,7 +87,7 @@ var p = (e) => e.recovery.phase === "stuck" || e.snapshot.error ? "err" : e.reco
87
87
  }
88
88
  };
89
89
  }, x = () => u(f, d, d), S = () => u(t, e, e), C = (e, t = !1) => {
90
- let n = r().traces, i = a(), o = x(), c = S(), u = s(e, t);
90
+ let n = s().traces, i = r(), o = x(), c = S(), u = a(e, t);
91
91
  return l(() => {
92
92
  let e = [];
93
93
  for (let t of i) for (let n of t.entries) e.push(m(t.name, n));
package/dist/index.d.ts CHANGED
@@ -244,6 +244,16 @@ export declare interface DevtoolsStrings {
244
244
  readonly active: string;
245
245
  readonly paused: string;
246
246
  readonly attempt: (n: number) => string;
247
+ readonly targetPages: string;
248
+ readonly deliveryPages: string;
249
+ readonly pageRange: (from: number, to: number) => string;
250
+ readonly pageLoading: string;
251
+ readonly pageError: string;
252
+ readonly pageFirst: string;
253
+ readonly pagePrevious: string;
254
+ readonly pageNext: string;
255
+ readonly pageRefresh: string;
256
+ readonly pageLiveHint: string;
247
257
  };
248
258
  /** <MutationsPanel> empty state + section chrome. */
249
259
  readonly mutations: {
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { DevtoolsStringsProvider as e, defaultDevtoolsStrings as t, useDevtoolsStrings as n } from "./strings.js";
2
- import { VoltroDevtools as r } from "./Devtools.js";
3
- export { e as DevtoolsStringsProvider, r as VoltroDevtools, t as defaultDevtoolsStrings, n as useDevtoolsStrings };
1
+ import { VoltroDevtools as e } from "./Devtools.js";
2
+ import { DevtoolsStringsProvider as t, defaultDevtoolsStrings as n, useDevtoolsStrings as r } from "./strings.js";
3
+ export { t as DevtoolsStringsProvider, e as VoltroDevtools, n as defaultDevtoolsStrings, r as useDevtoolsStrings };
@@ -1,22 +1,22 @@
1
- import { inspectBaseOf as e, isRefusalStatus as t, mayAskInspect as n, noteInspectFailure as r, noteInspectRefusal as i, noteInspectSuccess as a, readInspectRefusal as o } from "./inspectRefusal.js";
2
- import { inspectHeaders as s } from "./inspectAuth.js";
1
+ import { inspectHeaders as e } from "./inspectAuth.js";
2
+ import { inspectBaseOf as t, isRefusalStatus as n, mayAskInspect as r, noteInspectFailure as i, noteInspectRefusal as a, noteInspectSuccess as o, readInspectRefusal as s } from "./inspectRefusal.js";
3
3
  // src/inspectFetch.ts
4
- var c = (e) => typeof e == "object" && !!e && "data" in e, l = (e) => c(e) ? e.data : null, u = async (e, t, n) => {
5
- let r = await fetch(e, {
4
+ var c = (e) => typeof e == "object" && !!e && "data" in e, l = (e) => c(e) ? e.data : null, u = async (t, n, r) => {
5
+ let i = await fetch(t, {
6
6
  method: "POST",
7
- headers: s(t, {
7
+ headers: e(n, {
8
8
  accept: "application/json",
9
9
  "content-type": "application/json"
10
10
  }),
11
- body: JSON.stringify(n ?? {})
12
- }), i = await r.json().catch(() => null);
13
- if (!r.ok) {
14
- let e = typeof i == "object" && i ? i : void 0, t = typeof e?.message == "string" ? e.message : typeof e?.error == "string" ? e.error : `HTTP ${r.status}`;
11
+ body: JSON.stringify(r ?? {})
12
+ }), a = await i.json().catch(() => null);
13
+ if (!i.ok) {
14
+ let e = typeof a == "object" && a ? a : void 0, t = typeof e?.message == "string" ? e.message : typeof e?.error == "string" ? e.error : `HTTP ${i.status}`;
15
15
  throw Error(t);
16
16
  }
17
- let a = l(i);
18
- if (a === null) throw Error("the api answered without an observation");
19
- return a;
17
+ let o = l(a);
18
+ if (o === null) throw Error("the api answered without an observation");
19
+ return o;
20
20
  }, d = (e, t) => {
21
21
  let n = `${e}\u0000${t ?? ""}`, r = f.get(n);
22
22
  if (r !== void 0) return r;
@@ -25,17 +25,17 @@ var c = (e) => typeof e == "object" && !!e && "data" in e, l = (e) => c(e) ? e.d
25
25
  });
26
26
  return f.set(n, i), i;
27
27
  }, f = /* @__PURE__ */ new Map(), p = async (c, u) => {
28
- let d = e(c);
29
- if (!n(d)) return null;
28
+ let d = t(c);
29
+ if (!r(d)) return null;
30
30
  let f;
31
31
  try {
32
- f = await fetch(c, { headers: s(u, { accept: "application/json" }) });
32
+ f = await fetch(c, { headers: e(u, { accept: "application/json" }) });
33
33
  } catch {
34
- return r(d, !0), null;
34
+ return i(d, !0), null;
35
35
  }
36
- if (t(f.status)) return i(await o(d, f)), null;
37
- if (!f.ok) return r(d, !1), null;
38
- a(d);
36
+ if (n(f.status)) return a(await s(d, f)), null;
37
+ if (!f.ok) return i(d, !1), null;
38
+ o(d);
39
39
  try {
40
40
  return l(await f.json());
41
41
  } catch {
@@ -1,28 +1,28 @@
1
- import { inspectRefusalFor as e, isRefusalStatus as t, noteInspectRefusal as n, readInspectRefusal as r } from "./inspectRefusal.js";
2
- import { inspectHeaders as i } from "./inspectAuth.js";
1
+ import { inspectHeaders as e } from "./inspectAuth.js";
2
+ import { inspectRefusalFor as t, isRefusalStatus as n, noteInspectRefusal as r, readInspectRefusal as i } from "./inspectRefusal.js";
3
3
  import { useEffect as a, useState as o } from "react";
4
4
  // src/inspectStream.ts
5
5
  var s = (a, o) => {
6
6
  let s = `${a}/_voltro/inspect/stream?channels=${encodeURIComponent(o.channels.join(","))}`, c = !1, l = !1, u = 0, d, f, p = async () => {
7
7
  if (c) return;
8
- if (e(a) !== void 0) {
8
+ if (t(a) !== void 0) {
9
9
  l = !0;
10
10
  return;
11
11
  }
12
12
  d = new AbortController();
13
13
  let m;
14
14
  try {
15
- let e = await fetch(s, {
16
- headers: i(o.token, { accept: "text/event-stream" }),
15
+ let t = await fetch(s, {
16
+ headers: e(o.token, { accept: "text/event-stream" }),
17
17
  signal: d.signal
18
18
  });
19
- if (t(e.status)) throw n(await r(a, e)), l = !0, Error(`inspect stream refused (HTTP ${e.status})`);
20
- if (!e.ok || e.body === null) throw Error(`inspect stream HTTP ${e.status}`);
19
+ if (n(t.status)) throw r(await i(a, t)), l = !0, Error(`inspect stream refused (HTTP ${t.status})`);
20
+ if (!t.ok || t.body === null) throw Error(`inspect stream HTTP ${t.status}`);
21
21
  if (c) {
22
- await e.body.cancel();
22
+ await t.body.cancel();
23
23
  return;
24
24
  }
25
- u = 0, m = e.body.getReader();
25
+ u = 0, m = t.body.getReader();
26
26
  let f = new TextDecoder(), p = "";
27
27
  for (; !c;) {
28
28
  let { done: e, value: t } = await m.read();
@@ -1,12 +1,12 @@
1
- import { Monitor as e } from "../components/icons.js";
2
- import { useDevtoolsStrings as t } from "../strings.js";
3
- import { Badge as n, Button as r, Card as i, Empty as a, KeyValue as o, SectionTitle as s } from "../components/primitives.js";
1
+ import { Badge as e, Button as t, Card as n, Empty as r, KeyValue as i, SectionTitle as a } from "../components/primitives.js";
2
+ import { Monitor as o } from "../components/icons.js";
3
+ import { useDevtoolsStrings as s } from "../strings.js";
4
4
  import { useCallback as c, useEffect as l, useState as u } from "react";
5
5
  import { readPairing as d, usePlatform as f, useShellExtension as p } from "@voltro/client";
6
6
  import { jsx as m, jsxs as h } from "react/jsx-runtime";
7
7
  // src/panels/desktop.tsx
8
8
  var g = (e) => Object.entries(e ?? {}).filter(([, e]) => e === !0).map(([e]) => e).sort(), _ = (e) => [e.fullscreen ? "fullscreen" : e.maximized ? "maximized" : "windowed", e.focused ? "focused" : "unfocused"].join(", "), v = () => {
9
- let v = t().desktop, y = f(), b = p("desktop"), [x, S] = u(0), [C, w] = u(null), [T, E] = u(null), D = c(() => S((e) => e + 1), []);
9
+ let v = s().desktop, y = f(), b = p("desktop"), [x, S] = u(0), [C, w] = u(null), [T, E] = u(null), D = c(() => S((e) => e + 1), []);
10
10
  if (l(() => {
11
11
  if (!b) return;
12
12
  let e = b.window.subscribe(D), t = b.os.onThemeChange(D);
@@ -16,23 +16,23 @@ var g = (e) => Object.entries(e ?? {}).filter(([, e]) => e === !0).map(([e]) =>
16
16
  }, [b, D]), l(() => {
17
17
  let e = y.storage("local");
18
18
  e === null ? E(null) : d(e).then(E);
19
- }, [y, x]), !b) return /* @__PURE__ */ m(a, { children: v.notDesktop });
19
+ }, [y, x]), !b) return /* @__PURE__ */ m(r, { children: v.notDesktop });
20
20
  let O = g(y.capabilities);
21
21
  return /* @__PURE__ */ h("div", {
22
22
  className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
23
23
  children: [
24
- /* @__PURE__ */ h(i, { children: [/* @__PURE__ */ m(s, {
25
- Icon: e,
26
- right: /* @__PURE__ */ m(r, {
24
+ /* @__PURE__ */ h(n, { children: [/* @__PURE__ */ m(a, {
25
+ Icon: o,
26
+ right: /* @__PURE__ */ m(t, {
27
27
  size: "sm",
28
28
  onClick: D,
29
29
  children: v.refresh
30
30
  }),
31
31
  children: v.shell
32
- }), /* @__PURE__ */ m(o, { entries: [
32
+ }), /* @__PURE__ */ m(i, { entries: [
33
33
  {
34
34
  key: v.kind,
35
- value: /* @__PURE__ */ m(n, {
35
+ value: /* @__PURE__ */ m(e, {
36
36
  tone: "info",
37
37
  children: b.kind
38
38
  })
@@ -54,8 +54,8 @@ var g = (e) => Object.entries(e ?? {}).filter(([, e]) => e === !0).map(([e]) =>
54
54
  value: y.platform.appVersion ?? v.unknown
55
55
  }
56
56
  ] })] }),
57
- /* @__PURE__ */ h(i, { children: [/* @__PURE__ */ m(s, {
58
- right: y.updates ? /* @__PURE__ */ m(r, {
57
+ /* @__PURE__ */ h(n, { children: [/* @__PURE__ */ m(a, {
58
+ right: y.updates ? /* @__PURE__ */ m(t, {
59
59
  size: "sm",
60
60
  onClick: () => {
61
61
  y.updates.check().then(w);
@@ -63,14 +63,14 @@ var g = (e) => Object.entries(e ?? {}).filter(([, e]) => e === !0).map(([e]) =>
63
63
  children: v.checkNow
64
64
  }) : void 0,
65
65
  children: v.updater
66
- }), /* @__PURE__ */ m(o, { entries: [{
66
+ }), /* @__PURE__ */ m(i, { entries: [{
67
67
  key: v.updaterPort,
68
68
  value: y.updates ? v.yes : v.no
69
69
  }, {
70
70
  key: v.waitingVersion,
71
71
  value: C?.version ?? v.none
72
72
  }] })] }),
73
- /* @__PURE__ */ h(i, { children: [/* @__PURE__ */ m(s, { children: v.localStack }), /* @__PURE__ */ m(o, { entries: [
73
+ /* @__PURE__ */ h(n, { children: [/* @__PURE__ */ m(a, { children: v.localStack }), /* @__PURE__ */ m(i, { entries: [
74
74
  {
75
75
  key: v.sidecarPort,
76
76
  value: b.sidecar === void 0 ? v.no : v.yes
@@ -84,15 +84,15 @@ var g = (e) => Object.entries(e ?? {}).filter(([, e]) => e === !0).map(([e]) =>
84
84
  value: T?.name ?? v.none
85
85
  }
86
86
  ] })] }),
87
- /* @__PURE__ */ h(i, { children: [/* @__PURE__ */ m(s, { children: v.capabilities }), O.length === 0 ? /* @__PURE__ */ m("div", {
87
+ /* @__PURE__ */ h(n, { children: [/* @__PURE__ */ m(a, { children: v.capabilities }), O.length === 0 ? /* @__PURE__ */ m("div", {
88
88
  className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-subtle",
89
89
  children: v.noCapabilities
90
90
  }) : /* @__PURE__ */ m("div", {
91
91
  className: "vdt:flex vdt:flex-wrap vdt:gap-1 vdt:px-3 vdt:py-2",
92
- children: O.map((e) => /* @__PURE__ */ m(n, {
92
+ children: O.map((t) => /* @__PURE__ */ m(e, {
93
93
  tone: "neutral",
94
- children: e
95
- }, e))
94
+ children: t
95
+ }, t))
96
96
  })] })
97
97
  ]
98
98
  });
@@ -1,20 +1,20 @@
1
- import { Activity as e } from "../components/icons.js";
2
- import { useDevtoolsStrings as t } from "../strings.js";
3
- import { Badge as n, Card as r, CardBody as i, Empty as a, SectionTitle as o } from "../components/primitives.js";
4
- import { inspectRefusalFor as s } from "../inspectRefusal.js";
5
- import { useInspectToken as c } from "../inspectAuth.js";
6
- import { fetchInspect as l } from "../inspectFetch.js";
7
- import { useDocumentVisible as u } from "../useDocumentVisible.js";
1
+ import { Badge as e, Card as t, CardBody as n, Empty as r, SectionTitle as i } from "../components/primitives.js";
2
+ import { Activity as a } from "../components/icons.js";
3
+ import { useInspectToken as o } from "../inspectAuth.js";
4
+ import { fetchInspect as s } from "../inspectFetch.js";
5
+ import { inspectRefusalFor as c } from "../inspectRefusal.js";
6
+ import { useDocumentVisible as l } from "../useDocumentVisible.js";
7
+ import { useDevtoolsStrings as u } from "../strings.js";
8
8
  import { useEffect as d, useState as f } from "react";
9
9
  import { useFrameworkRuntimes as p } from "@voltro/client";
10
10
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
11
11
  // src/panels/indexes.tsx
12
12
  var _ = 5e3, v = async (e, t) => {
13
13
  if (e === "") return null;
14
- let n = await l(`${e}/_voltro/inspect/subscriptions`, t);
14
+ let n = await s(`${e}/_voltro/inspect/subscriptions`, t);
15
15
  return n !== null && Array.isArray(n.subscriptions) ? n : null;
16
16
  }, y = (e) => {
17
- let t = p(), n = u(), r = c(), i = t.names, a = e && n, [o, l] = f(() => i.map((e) => ({
17
+ let t = p(), n = l(), r = o(), i = t.names, a = e && n, [s, u] = f(() => i.map((e) => ({
18
18
  name: e,
19
19
  response: null,
20
20
  live: !1
@@ -22,17 +22,17 @@ var _ = 5e3, v = async (e, t) => {
22
22
  return d(() => {
23
23
  if (!a) return;
24
24
  let e = !1, n = (t, n) => {
25
- e || l((e) => e.map((e) => e.name === t ? {
25
+ e || u((e) => e.map((e) => e.name === t ? {
26
26
  ...e,
27
27
  ...n
28
28
  } : e));
29
29
  }, o = i.map((i) => {
30
30
  let a = t.get(i).inspectBaseUrl;
31
31
  if (a === "") return { teardown: () => {} };
32
- let o = null, c = null, l, u = () => {
33
- c !== null && clearInterval(c), c = null;
34
- }, d = () => s(a) !== void 0, f = () => {
35
- if (c !== null || d()) return;
32
+ let o = null, s = null, l, u = () => {
33
+ s !== null && clearInterval(s), s = null;
34
+ }, d = () => c(a) !== void 0, f = () => {
35
+ if (s !== null || d()) return;
36
36
  let e = async () => {
37
37
  let e = await v(a, r);
38
38
  e !== null && n(i, {
@@ -40,7 +40,7 @@ var _ = 5e3, v = async (e, t) => {
40
40
  live: !1
41
41
  }), d() && (u(), o?.close());
42
42
  };
43
- e(), c = setInterval(() => {
43
+ e(), s = setInterval(() => {
44
44
  e();
45
45
  }, _);
46
46
  };
@@ -77,7 +77,7 @@ var _ = 5e3, v = async (e, t) => {
77
77
  t,
78
78
  i,
79
79
  r
80
- ]), o;
80
+ ]), s;
81
81
  }, b = (e) => {
82
82
  if (typeof e != "object" || !e) return !1;
83
83
  let t = e;
@@ -102,90 +102,90 @@ var _ = 5e3, v = async (e, t) => {
102
102
  }
103
103
  return typeof n.column == "string" && typeof n.op == "string" ? E(n) : JSON.stringify(e);
104
104
  }, O = () => {
105
- let n = y(!0), s = t().indexes, c = n.filter((e) => e.response !== null).length;
106
- return n.length === 0 ? /* @__PURE__ */ h(a, { children: s.noApis }) : c === 0 ? /* @__PURE__ */ g(a, { children: [s.unreachableTitle, /* @__PURE__ */ h("div", {
105
+ let e = y(!0), o = u().indexes, s = e.filter((e) => e.response !== null).length;
106
+ return e.length === 0 ? /* @__PURE__ */ h(r, { children: o.noApis }) : s === 0 ? /* @__PURE__ */ g(r, { children: [o.unreachableTitle, /* @__PURE__ */ h("div", {
107
107
  className: "vdt:mt-1 vdt:text-foreground-subtle",
108
- children: s.unreachableHint
108
+ children: o.unreachableHint
109
109
  })] }) : /* @__PURE__ */ h("div", {
110
110
  className: "vdt:flex vdt:flex-col vdt:gap-3 vdt:p-3",
111
- children: n.map(({ name: t, response: n, live: a }) => n === null ? /* @__PURE__ */ g(r, { children: [/* @__PURE__ */ h(o, {
112
- Icon: e,
113
- children: t
114
- }), /* @__PURE__ */ h(i, {
111
+ children: e.map(({ name: e, response: r, live: s }) => r === null ? /* @__PURE__ */ g(t, { children: [/* @__PURE__ */ h(i, {
112
+ Icon: a,
113
+ children: e
114
+ }), /* @__PURE__ */ h(n, {
115
115
  className: "vdt:text-xs vdt:text-foreground-subtle",
116
- children: s.offline
117
- })] }, t) : /* @__PURE__ */ h(k, {
118
- apiName: t,
119
- response: n,
120
- live: a
121
- }, t))
116
+ children: o.offline
117
+ })] }, e) : /* @__PURE__ */ h(k, {
118
+ apiName: e,
119
+ response: r,
120
+ live: s
121
+ }, e))
122
122
  });
123
- }, k = ({ apiName: i, response: a, live: s }) => {
124
- let c = t().indexes, l = [...a.subscriptions].sort((e, t) => t.subscriberCount - e.subscriberCount);
125
- return /* @__PURE__ */ g(r, { children: [
126
- /* @__PURE__ */ h(o, {
127
- Icon: e,
123
+ }, k = ({ apiName: n, response: r, live: o }) => {
124
+ let s = u().indexes, c = [...r.subscriptions].sort((e, t) => t.subscriberCount - e.subscriberCount);
125
+ return /* @__PURE__ */ g(t, { children: [
126
+ /* @__PURE__ */ h(i, {
127
+ Icon: a,
128
128
  right: /* @__PURE__ */ g("div", {
129
129
  className: "vdt:flex vdt:items-center vdt:gap-1",
130
- children: [/* @__PURE__ */ h(n, {
130
+ children: [/* @__PURE__ */ h(e, {
131
131
  tone: "info",
132
- children: c.subsBadge(a.subscriptions.length)
133
- }), /* @__PURE__ */ h(n, {
134
- tone: s ? "success" : "neutral",
135
- children: s ? c.live : c.poll
132
+ children: s.subsBadge(r.subscriptions.length)
133
+ }), /* @__PURE__ */ h(e, {
134
+ tone: o ? "success" : "neutral",
135
+ children: o ? s.live : s.poll
136
136
  })]
137
137
  }),
138
- children: i
138
+ children: n
139
139
  }),
140
- a.matcherStats.length > 0 && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
140
+ r.matcherStats.length > 0 && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
141
141
  className: "vdt:text-[11px] vdt:uppercase vdt:tracking-wide vdt:text-foreground-subtle vdt:mt-3 vdt:mb-1",
142
- children: c.tables
142
+ children: s.tables
143
143
  }), /* @__PURE__ */ h("div", {
144
144
  className: "vdt:flex vdt:flex-col vdt:gap-1",
145
- children: a.matcherStats.map((e) => /* @__PURE__ */ g("div", {
145
+ children: r.matcherStats.map((t) => /* @__PURE__ */ g("div", {
146
146
  className: "vdt:flex vdt:items-baseline vdt:gap-3 vdt:text-xs",
147
147
  children: [
148
148
  /* @__PURE__ */ h("span", {
149
149
  className: "vdt:font-mono vdt:text-foreground",
150
- children: e.tableName
150
+ children: t.tableName
151
151
  }),
152
152
  /* @__PURE__ */ g("span", {
153
153
  className: "vdt:text-foreground-subtle",
154
- children: [e.tupleRouted + e.columnBucketed + e.rangeBucketed + e.unindexedFallback, " subs"]
154
+ children: [t.tupleRouted + t.columnBucketed + t.rangeBucketed + t.unindexedFallback, " subs"]
155
155
  }),
156
- e.tupleRouted > 0 && /* @__PURE__ */ h(n, {
156
+ t.tupleRouted > 0 && /* @__PURE__ */ h(e, {
157
157
  tone: "success",
158
- children: `${e.tupleRouted} tuple`
158
+ children: `${t.tupleRouted} tuple`
159
159
  }),
160
- e.columnBucketed > 0 && /* @__PURE__ */ h(n, {
160
+ t.columnBucketed > 0 && /* @__PURE__ */ h(e, {
161
161
  tone: "info",
162
- children: `${e.columnBucketed} column`
162
+ children: `${t.columnBucketed} column`
163
163
  }),
164
- e.rangeBucketed > 0 && /* @__PURE__ */ h(n, {
164
+ t.rangeBucketed > 0 && /* @__PURE__ */ h(e, {
165
165
  tone: "neutral",
166
- children: `${e.rangeBucketed} range`
166
+ children: `${t.rangeBucketed} range`
167
167
  }),
168
- e.unindexedFallback > 0 && /* @__PURE__ */ h(n, {
168
+ t.unindexedFallback > 0 && /* @__PURE__ */ h(e, {
169
169
  tone: "warning",
170
- children: `${e.unindexedFallback} unindexed`
170
+ children: `${t.unindexedFallback} unindexed`
171
171
  }),
172
- e.distinctTupleKeys > 0 && /* @__PURE__ */ g("span", {
172
+ t.distinctTupleKeys > 0 && /* @__PURE__ */ g("span", {
173
173
  className: "vdt:text-foreground-subtle",
174
- children: [e.distinctTupleKeys, " tuple keys"]
174
+ children: [t.distinctTupleKeys, " tuple keys"]
175
175
  })
176
176
  ]
177
- }, e.tableName))
177
+ }, t.tableName))
178
178
  })] }),
179
- l.length > 0 && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
179
+ c.length > 0 && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
180
180
  className: "vdt:text-[11px] vdt:uppercase vdt:tracking-wide vdt:text-foreground-subtle vdt:mt-3 vdt:mb-1",
181
- children: c.subscriptionsSection
181
+ children: s.subscriptionsSection
182
182
  }), /* @__PURE__ */ h("div", {
183
183
  className: "vdt:flex vdt:flex-col vdt:gap-2",
184
- children: l.map((e) => /* @__PURE__ */ h(A, { sub: e }, e.fingerprint))
184
+ children: c.map((e) => /* @__PURE__ */ h(A, { sub: e }, e.fingerprint))
185
185
  })] })
186
186
  ] });
187
- }, A = ({ sub: e }) => {
188
- let r = t().indexes, i = S(e);
187
+ }, A = ({ sub: t }) => {
188
+ let n = u().indexes, r = S(t);
189
189
  return /* @__PURE__ */ g("div", {
190
190
  className: "vdt:flex vdt:flex-col vdt:gap-0.5 vdt:px-2 vdt:py-1 vdt:rounded-sm vdt:bg-muted/40",
191
191
  children: [/* @__PURE__ */ g("div", {
@@ -193,35 +193,35 @@ var _ = 5e3, v = async (e, t) => {
193
193
  children: [
194
194
  /* @__PURE__ */ h("span", {
195
195
  className: "vdt:font-mono vdt:text-foreground",
196
- children: e.table
196
+ children: t.table
197
197
  }),
198
- /* @__PURE__ */ h(n, {
199
- tone: C(i),
200
- children: w(i)
198
+ /* @__PURE__ */ h(e, {
199
+ tone: C(r),
200
+ children: w(r)
201
201
  }),
202
- e.usingIndex && /* @__PURE__ */ g("span", {
202
+ t.usingIndex && /* @__PURE__ */ g("span", {
203
203
  className: "vdt:text-foreground-subtle",
204
204
  children: [
205
- r.via,
205
+ n.via,
206
206
  " ",
207
207
  /* @__PURE__ */ h("span", {
208
208
  className: "vdt:font-mono",
209
- children: e.usingIndex.name
209
+ children: t.usingIndex.name
210
210
  })
211
211
  ]
212
212
  }),
213
213
  /* @__PURE__ */ g("span", {
214
214
  className: "vdt:text-foreground-subtle vdt:ml-auto",
215
215
  children: [
216
- e.subscriberCount,
216
+ t.subscriberCount,
217
217
  " ",
218
- r.clients(e.subscriberCount)
218
+ n.clients(t.subscriberCount)
219
219
  ]
220
220
  })
221
221
  ]
222
222
  }), /* @__PURE__ */ h("div", {
223
223
  className: "vdt:text-[11px] vdt:font-mono vdt:text-foreground-subtle vdt:break-all",
224
- children: D(e.predicate)
224
+ children: D(t.predicate)
225
225
  })]
226
226
  });
227
227
  }, j = (e) => {