@voltro/devtools 0.89.2 → 0.90.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/CHANGELOG.md +1822 -0
- package/dist/console/Console.js +218 -213
- package/dist/index.d.ts +10 -0
- package/dist/panels/webhooks.js +235 -110
- package/dist/strings.js +13 -3
- package/package.json +4 -4
package/dist/console/Console.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { Activity as e, Compass as t, Database as n, Grip as r, Indexes as i, Logs as a, Monitor as o, Mutation as s, Search as ee, Trace as c, VoltroMark as
|
|
2
|
-
import { useDevtoolsStrings as
|
|
3
|
-
import { SubscriptionDetail as
|
|
4
|
-
import { DockMenu as
|
|
5
|
-
import { InspectRefusals as
|
|
6
|
-
import { IndexesPanel as
|
|
7
|
-
import { WebhooksPanel as
|
|
8
|
-
import { WorkflowsPanel as
|
|
9
|
-
import { RoutesPanel as
|
|
10
|
-
import { RuntimesPanel as
|
|
11
|
-
import { PwaPanel as
|
|
12
|
-
import { DesktopPanel as
|
|
13
|
-
import { StoresPanel as
|
|
14
|
-
import { MutationDetail as
|
|
15
|
-
import { LogDetail as
|
|
16
|
-
import { TraceDetail as
|
|
17
|
-
import { ALL_SCOPES as
|
|
18
|
-
import { useConsoleItems as
|
|
19
|
-
import { useEffect as
|
|
20
|
-
import { getRouteSnapshot as
|
|
21
|
-
import { useConnectionStatus as
|
|
22
|
-
import { Fragment as
|
|
1
|
+
import { Activity as e, Compass as t, Database as n, Grip as r, Indexes as i, Logs as a, Monitor as o, Mutation as s, Search as ee, Trace as c, VoltroMark as te, Webhook as l, Workflow as u, X as ne, Zap as d } from "../components/icons.js";
|
|
2
|
+
import { useDevtoolsStrings as f } from "../strings.js";
|
|
3
|
+
import { SubscriptionDetail as p } from "../panels/subscriptions.js";
|
|
4
|
+
import { DockMenu as re } from "../components/dockMenu.js";
|
|
5
|
+
import { InspectRefusals as ie } from "./InspectRefusals.js";
|
|
6
|
+
import { IndexesPanel as ae, useIndexesCount as oe } from "../panels/indexes.js";
|
|
7
|
+
import { WebhooksPanel as se, useWebhooksCount as ce } from "../panels/webhooks.js";
|
|
8
|
+
import { WorkflowsPanel as le, useWorkflowsCount as m } from "../panels/workflows.js";
|
|
9
|
+
import { RoutesPanel as ue } from "../panels/routes.js";
|
|
10
|
+
import { RuntimesPanel as de } from "../panels/runtimes.js";
|
|
11
|
+
import { PwaPanel as fe } from "../panels/pwa.js";
|
|
12
|
+
import { DesktopPanel as pe } from "../panels/desktop.js";
|
|
13
|
+
import { StoresPanel as me } from "../panels/stores.js";
|
|
14
|
+
import { MutationDetail as h } from "../panels/mutations.js";
|
|
15
|
+
import { LogDetail as g } from "../panels/logs.js";
|
|
16
|
+
import { TraceDetail as _ } from "../panels/traces.js";
|
|
17
|
+
import { ALL_SCOPES as he, SEARCHABLE_SCOPES as ge, countBySource as _e, filterConsoleItems as v, isPendingInvocation as y, isSearchableScope as b, stepSelection as x } from "./searchIndex.js";
|
|
18
|
+
import { useConsoleItems as ve } from "./sources.js";
|
|
19
|
+
import { useEffect as S, useMemo as C, useRef as w, useState as T, useSyncExternalStore as E } from "react";
|
|
20
|
+
import { getRouteSnapshot as D, subscribeRouteSnapshot as O } from "@voltro/web";
|
|
21
|
+
import { useConnectionStatus as k, useFrameworkRuntimes as ye } from "@voltro/client";
|
|
22
|
+
import { Fragment as be, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
23
23
|
// src/console/Console.tsx
|
|
24
|
-
var
|
|
24
|
+
var M = {
|
|
25
25
|
all: null,
|
|
26
26
|
subscription: e,
|
|
27
27
|
mutation: s,
|
|
28
|
-
action:
|
|
28
|
+
action: d,
|
|
29
29
|
trace: c,
|
|
30
30
|
log: a,
|
|
31
|
-
workflows:
|
|
31
|
+
workflows: u,
|
|
32
32
|
stores: n,
|
|
33
33
|
indexes: i,
|
|
34
|
-
webhooks:
|
|
34
|
+
webhooks: l,
|
|
35
35
|
routes: t,
|
|
36
36
|
runtimes: o,
|
|
37
37
|
pwa: o,
|
|
38
38
|
desktop: o
|
|
39
|
-
},
|
|
39
|
+
}, N = typeof navigator < "u" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent) ? {
|
|
40
40
|
search: "⌘K",
|
|
41
41
|
alt: "⌥",
|
|
42
42
|
shift: "⇧"
|
|
@@ -44,7 +44,7 @@ var N = {
|
|
|
44
44
|
search: "Ctrl K",
|
|
45
45
|
alt: "Alt",
|
|
46
46
|
shift: "Shift"
|
|
47
|
-
},
|
|
47
|
+
}, xe = (e, t, n) => {
|
|
48
48
|
if (n.trim() !== "") return {
|
|
49
49
|
title: e.noResults,
|
|
50
50
|
hint: e.noResultsHint
|
|
@@ -75,14 +75,14 @@ var N = {
|
|
|
75
75
|
hint: e.emptyAllHint
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
},
|
|
78
|
+
}, P = (e) => {
|
|
79
79
|
let t = new Date(e), n = (e) => e < 10 ? `0${e}` : String(e);
|
|
80
80
|
return `${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
81
|
-
},
|
|
82
|
-
let r =
|
|
83
|
-
return
|
|
81
|
+
}, Se = ({ item: e, selected: t, onSelect: n }) => {
|
|
82
|
+
let r = w(null);
|
|
83
|
+
return S(() => {
|
|
84
84
|
t && r.current !== null && typeof r.current.scrollIntoView == "function" && r.current.scrollIntoView({ block: "nearest" });
|
|
85
|
-
}, [t]), /* @__PURE__ */
|
|
85
|
+
}, [t]), /* @__PURE__ */ j("button", {
|
|
86
86
|
ref: r,
|
|
87
87
|
type: "button",
|
|
88
88
|
role: "option",
|
|
@@ -91,106 +91,106 @@ var N = {
|
|
|
91
91
|
className: `vdt-row${t ? " vdt-row-sel" : ""}`,
|
|
92
92
|
onClick: n,
|
|
93
93
|
children: [
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ A("span", {
|
|
95
95
|
className: `vdt-dot vdt-dot-${e.tone}`,
|
|
96
96
|
"aria-hidden": "true"
|
|
97
97
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ A("span", {
|
|
99
99
|
className: "vdt-row-src",
|
|
100
100
|
children: e.source
|
|
101
101
|
}),
|
|
102
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ j("span", {
|
|
103
103
|
className: "vdt-row-main",
|
|
104
|
-
children: [/* @__PURE__ */
|
|
104
|
+
children: [/* @__PURE__ */ A("code", {
|
|
105
105
|
className: "vdt-row-name",
|
|
106
106
|
children: e.name
|
|
107
|
-
}), /* @__PURE__ */
|
|
107
|
+
}), /* @__PURE__ */ A("span", {
|
|
108
108
|
className: "vdt-row-summary",
|
|
109
109
|
children: e.summary
|
|
110
110
|
})]
|
|
111
111
|
}),
|
|
112
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ j("span", {
|
|
113
113
|
className: "vdt-row-meta",
|
|
114
114
|
children: [
|
|
115
|
-
e.apiName === void 0 ? null : /* @__PURE__ */
|
|
115
|
+
e.apiName === void 0 ? null : /* @__PURE__ */ A("span", {
|
|
116
116
|
className: "vdt-row-api",
|
|
117
117
|
children: e.apiName
|
|
118
118
|
}),
|
|
119
|
-
e.status === void 0 ? null : /* @__PURE__ */
|
|
119
|
+
e.status === void 0 ? null : /* @__PURE__ */ A("span", {
|
|
120
120
|
className: `vdt-tag vdt-tag-${e.tone}`,
|
|
121
121
|
children: e.status
|
|
122
122
|
}),
|
|
123
|
-
e.at > 0 ? /* @__PURE__ */
|
|
123
|
+
e.at > 0 ? /* @__PURE__ */ A("span", {
|
|
124
124
|
className: "vdt-row-time",
|
|
125
|
-
children:
|
|
125
|
+
children: P(e.at)
|
|
126
126
|
}) : null
|
|
127
127
|
]
|
|
128
128
|
})
|
|
129
129
|
]
|
|
130
130
|
});
|
|
131
|
-
},
|
|
132
|
-
let n = e.detail, r =
|
|
133
|
-
return /* @__PURE__ */
|
|
131
|
+
}, F = ({ item: e, retained: t }) => {
|
|
132
|
+
let n = e.detail, r = f().shell;
|
|
133
|
+
return /* @__PURE__ */ j("div", {
|
|
134
134
|
className: "vdt-detail",
|
|
135
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ j("div", {
|
|
136
136
|
className: "vdt-detail-head",
|
|
137
137
|
children: [
|
|
138
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ A("span", {
|
|
139
139
|
className: `vdt-dot vdt-dot-${e.tone}`,
|
|
140
140
|
"aria-hidden": "true"
|
|
141
141
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ A("span", {
|
|
143
143
|
className: "vdt-row-src",
|
|
144
144
|
children: e.source
|
|
145
145
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ A("code", {
|
|
147
147
|
className: "vdt-detail-name",
|
|
148
148
|
children: e.name
|
|
149
149
|
}),
|
|
150
|
-
e.status === void 0 ? null : /* @__PURE__ */
|
|
150
|
+
e.status === void 0 ? null : /* @__PURE__ */ A("span", {
|
|
151
151
|
className: `vdt-tag vdt-tag-${e.tone}`,
|
|
152
152
|
children: e.status
|
|
153
153
|
}),
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
e.apiName === void 0 ? null : /* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ A("span", { className: "vdt-sp" }),
|
|
155
|
+
e.apiName === void 0 ? null : /* @__PURE__ */ A("span", {
|
|
156
156
|
className: "vdt-row-api",
|
|
157
157
|
children: e.apiName
|
|
158
158
|
}),
|
|
159
|
-
e.at > 0 ? /* @__PURE__ */
|
|
159
|
+
e.at > 0 ? /* @__PURE__ */ A("span", {
|
|
160
160
|
className: "vdt-row-time",
|
|
161
|
-
children:
|
|
161
|
+
children: P(e.at)
|
|
162
162
|
}) : null
|
|
163
163
|
]
|
|
164
|
-
}), /* @__PURE__ */
|
|
164
|
+
}), /* @__PURE__ */ j("div", {
|
|
165
165
|
className: "vdt-detail-body",
|
|
166
166
|
children: [
|
|
167
|
-
t ? /* @__PURE__ */
|
|
167
|
+
t ? /* @__PURE__ */ A("p", {
|
|
168
168
|
className: "vdt:px-3 vdt:py-2 vdt:text-xs vdt:text-foreground-muted",
|
|
169
169
|
role: "status",
|
|
170
170
|
children: r.retainedSelection
|
|
171
171
|
}) : null,
|
|
172
|
-
n.source === "subscription" ? /* @__PURE__ */
|
|
173
|
-
n.source === "mutation" || n.source === "action" ? /* @__PURE__ */
|
|
174
|
-
n.source === "trace" ? /* @__PURE__ */
|
|
175
|
-
n.source === "log" ? /* @__PURE__ */
|
|
172
|
+
n.source === "subscription" ? /* @__PURE__ */ A(p, { entry: n.entry }) : null,
|
|
173
|
+
n.source === "mutation" || n.source === "action" ? /* @__PURE__ */ A(h, { mutation: n.mutation }) : null,
|
|
174
|
+
n.source === "trace" ? /* @__PURE__ */ A(_, { trace: n.trace }) : null,
|
|
175
|
+
n.source === "log" ? /* @__PURE__ */ A(g, { record: n.record }) : null
|
|
176
176
|
]
|
|
177
177
|
})]
|
|
178
178
|
});
|
|
179
|
-
},
|
|
180
|
-
let t =
|
|
181
|
-
return /* @__PURE__ */
|
|
179
|
+
}, Ce = ({ name: e }) => {
|
|
180
|
+
let t = f().shell, n = k(e).status, r = n === "connected" ? "ok" : n === "recovering" ? "warn" : "err", i = n === "connected" ? t.connected : n === "recovering" ? t.recovering : n === "degraded" ? t.degraded : t.offline;
|
|
181
|
+
return /* @__PURE__ */ j("span", {
|
|
182
182
|
className: "vdt-chip",
|
|
183
183
|
"data-status": n,
|
|
184
184
|
children: [
|
|
185
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ A("span", {
|
|
186
186
|
className: `vdt-dot vdt-dot-${r}`,
|
|
187
187
|
"aria-hidden": "true"
|
|
188
188
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ A("b", { children: e }),
|
|
190
|
+
/* @__PURE__ */ A("span", { children: i })
|
|
191
191
|
]
|
|
192
192
|
});
|
|
193
|
-
},
|
|
193
|
+
}, we = () => E(O, () => D().pathname ?? "", () => ""), I = (e) => {
|
|
194
194
|
let t = e.detail;
|
|
195
195
|
switch (t.source) {
|
|
196
196
|
case "subscription": return t.entry;
|
|
@@ -199,304 +199,309 @@ var N = {
|
|
|
199
199
|
case "trace": return t.trace;
|
|
200
200
|
case "log": return t.record;
|
|
201
201
|
}
|
|
202
|
-
},
|
|
203
|
-
let
|
|
204
|
-
|
|
205
|
-
if (
|
|
206
|
-
let e =
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
202
|
+
}, L = ({ dock: e, push: t, onDock: n, onPush: i, onClose: a, scope: o, onScope: s, searchRef: c, onHeaderPointerDown: l }) => {
|
|
203
|
+
let u = f(), d = u.shell, p = u.tabs, h = ye(), [g, _] = T(!1), w = ve(!0, g), E = oe(!0), D = ce(!0), O = m(!0), k = we(), [P, L] = T(""), [R, z] = T(!1), [B, V] = T(null), H = B?.id ?? null, U = B?.detail.source === "mutation" || B?.detail.source === "action" ? B.detail.mutation.subjectSignal : void 0;
|
|
204
|
+
S(() => {
|
|
205
|
+
if (U === void 0) return;
|
|
206
|
+
let e = () => V((e) => (e?.detail.source === "mutation" || e?.detail.source === "action") && e.detail.mutation.subjectSignal === U ? null : e);
|
|
207
|
+
if (U.aborted) e();
|
|
208
|
+
else return U.addEventListener("abort", e, { once: !0 }), () => U.removeEventListener("abort", e);
|
|
209
|
+
}, [U]), S(() => {
|
|
210
|
+
if (B === null || B.source === "subscription") return;
|
|
211
|
+
let e = w.find((e) => e.id === B.id);
|
|
212
|
+
e !== void 0 && I(e) !== I(B) && V(e);
|
|
213
|
+
}, [w, B]);
|
|
214
|
+
let W = b(o), G = C(() => _e(w), [w]), Te = C(() => w.filter((e) => e.source === "trace" && e.tone === "err").length, [w]), K = C(() => w.filter(y).length, [w]), q = B === null || U?.aborted ? null : w.find((e) => e.id === B.id) ?? null, J = B !== null && !U?.aborted && B.source !== "subscription" && q === null, Y = C(() => {
|
|
215
|
+
let e = q ?? (J ? B : null);
|
|
216
|
+
return e !== null && v([e], P, o).length > 0 ? e : null;
|
|
212
217
|
}, [
|
|
213
218
|
q,
|
|
214
219
|
J,
|
|
215
|
-
|
|
216
|
-
|
|
220
|
+
B,
|
|
221
|
+
P,
|
|
217
222
|
o
|
|
218
|
-
]), X =
|
|
219
|
-
let e = J && Y !== null ? [...
|
|
220
|
-
return
|
|
223
|
+
]), X = C(() => {
|
|
224
|
+
let e = J && Y !== null ? [...w, Y] : w;
|
|
225
|
+
return v(R ? e.filter(y) : e, P, o);
|
|
221
226
|
}, [
|
|
222
|
-
|
|
223
|
-
|
|
227
|
+
w,
|
|
228
|
+
P,
|
|
224
229
|
o,
|
|
225
|
-
|
|
230
|
+
R,
|
|
226
231
|
J,
|
|
227
232
|
Y
|
|
228
|
-
]), Z =
|
|
229
|
-
title:
|
|
230
|
-
hint:
|
|
231
|
-
} :
|
|
232
|
-
|
|
233
|
+
]), Z = C(() => R && P.trim() === "" ? {
|
|
234
|
+
title: d.emptyPending,
|
|
235
|
+
hint: d.emptyPendingHint
|
|
236
|
+
} : xe(d, o, P), [
|
|
237
|
+
d,
|
|
233
238
|
o,
|
|
234
|
-
|
|
235
|
-
|
|
239
|
+
P,
|
|
240
|
+
R
|
|
236
241
|
]), Q = (e) => {
|
|
237
|
-
|
|
238
|
-
},
|
|
242
|
+
V(e === null ? null : X.find((t) => t.id === e) ?? null);
|
|
243
|
+
}, Ee = (e) => {
|
|
239
244
|
switch (e) {
|
|
240
|
-
case "all": return
|
|
245
|
+
case "all": return w.length;
|
|
241
246
|
case "subscription": return G.subscription;
|
|
242
247
|
case "mutation": return G.mutation;
|
|
243
248
|
case "action": return G.action;
|
|
244
249
|
case "trace": return G.trace;
|
|
245
250
|
case "log": return G.log;
|
|
246
|
-
case "indexes": return
|
|
247
|
-
case "webhooks": return
|
|
248
|
-
case "workflows": return
|
|
251
|
+
case "indexes": return E;
|
|
252
|
+
case "webhooks": return D;
|
|
253
|
+
case "workflows": return O;
|
|
249
254
|
default: return null;
|
|
250
255
|
}
|
|
251
256
|
}, $ = (e) => {
|
|
252
257
|
switch (e) {
|
|
253
|
-
case "all": return
|
|
254
|
-
case "subscription": return
|
|
255
|
-
case "mutation": return
|
|
256
|
-
case "action": return
|
|
257
|
-
case "trace": return
|
|
258
|
-
case "log": return
|
|
259
|
-
case "workflows": return
|
|
260
|
-
case "stores": return
|
|
261
|
-
case "indexes": return
|
|
262
|
-
case "webhooks": return
|
|
263
|
-
case "routes": return
|
|
264
|
-
case "runtimes": return
|
|
265
|
-
case "pwa": return
|
|
266
|
-
case "desktop": return
|
|
258
|
+
case "all": return d.scopeAll;
|
|
259
|
+
case "subscription": return p.subscriptions;
|
|
260
|
+
case "mutation": return p.mutations;
|
|
261
|
+
case "action": return p.actions;
|
|
262
|
+
case "trace": return p.traces;
|
|
263
|
+
case "log": return p.logs;
|
|
264
|
+
case "workflows": return p.workflows;
|
|
265
|
+
case "stores": return p.stores;
|
|
266
|
+
case "indexes": return p.indexes;
|
|
267
|
+
case "webhooks": return p.webhooks;
|
|
268
|
+
case "routes": return p.routes;
|
|
269
|
+
case "runtimes": return p.runtimes;
|
|
270
|
+
case "pwa": return p.pwa;
|
|
271
|
+
case "desktop": return p.desktop;
|
|
267
272
|
}
|
|
268
273
|
};
|
|
269
|
-
return /* @__PURE__ */
|
|
270
|
-
/* @__PURE__ */
|
|
274
|
+
return /* @__PURE__ */ j(be, { children: [
|
|
275
|
+
/* @__PURE__ */ j("header", {
|
|
271
276
|
className: "vdt-bar",
|
|
272
|
-
onPointerDown:
|
|
277
|
+
onPointerDown: l,
|
|
273
278
|
children: [
|
|
274
|
-
e === "window" ? /* @__PURE__ */
|
|
279
|
+
e === "window" ? /* @__PURE__ */ A("span", {
|
|
275
280
|
className: "vdt-win-handle",
|
|
276
|
-
title:
|
|
281
|
+
title: d.moveTitle,
|
|
277
282
|
"aria-hidden": "true",
|
|
278
|
-
children: /* @__PURE__ */
|
|
283
|
+
children: /* @__PURE__ */ A(r, { className: "vdt:w-4 vdt:h-4" })
|
|
279
284
|
}) : null,
|
|
280
|
-
/* @__PURE__ */
|
|
281
|
-
W ? /* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ A(te, { className: "vdt-bar-mark" }),
|
|
286
|
+
W ? /* @__PURE__ */ j("label", {
|
|
282
287
|
className: "vdt-search",
|
|
283
288
|
children: [
|
|
284
|
-
/* @__PURE__ */
|
|
285
|
-
/* @__PURE__ */
|
|
289
|
+
/* @__PURE__ */ A(ee, { className: "vdt:w-3.5 vdt:h-3.5" }),
|
|
290
|
+
/* @__PURE__ */ A("input", {
|
|
286
291
|
ref: c,
|
|
287
292
|
type: "search",
|
|
288
|
-
value:
|
|
289
|
-
onChange: (e) =>
|
|
293
|
+
value: P,
|
|
294
|
+
onChange: (e) => L(e.target.value),
|
|
290
295
|
onKeyDown: (e) => {
|
|
291
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), Q(
|
|
296
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), Q(x(X.map((e) => e.id), H, e.key === "ArrowDown" ? 1 : -1))) : e.key === "Escape" ? P === "" ? a() : (e.preventDefault(), L("")) : e.key === "Enter" && Y === null && X.length > 0 && Q(X[0].id);
|
|
292
297
|
},
|
|
293
|
-
placeholder:
|
|
294
|
-
"aria-label":
|
|
298
|
+
placeholder: d.searchPlaceholder,
|
|
299
|
+
"aria-label": d.searchLabel,
|
|
295
300
|
autoComplete: "off",
|
|
296
301
|
spellCheck: !1
|
|
297
302
|
}),
|
|
298
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ A("kbd", {
|
|
299
304
|
className: "vdt-kbd",
|
|
300
|
-
children:
|
|
305
|
+
children: N.search
|
|
301
306
|
})
|
|
302
307
|
]
|
|
303
|
-
}) : /* @__PURE__ */
|
|
308
|
+
}) : /* @__PURE__ */ j("span", {
|
|
304
309
|
className: "vdt-bar-title",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
310
|
+
children: [/* @__PURE__ */ A("span", {
|
|
306
311
|
className: "vdt-bar-brand",
|
|
307
|
-
children:
|
|
308
|
-
}), /* @__PURE__ */
|
|
312
|
+
children: d.brandWord
|
|
313
|
+
}), /* @__PURE__ */ A("span", {
|
|
309
314
|
className: "vdt-bar-kicker",
|
|
310
|
-
children:
|
|
315
|
+
children: d.kicker
|
|
311
316
|
})]
|
|
312
317
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ A("div", {
|
|
314
319
|
role: "tablist",
|
|
315
|
-
"aria-label":
|
|
320
|
+
"aria-label": d.brand,
|
|
316
321
|
className: "vdt-scopes",
|
|
317
|
-
children:
|
|
318
|
-
let n =
|
|
319
|
-
return /* @__PURE__ */
|
|
322
|
+
children: he.map((e, t) => {
|
|
323
|
+
let n = M[e], r = Ee(e), i = e === o;
|
|
324
|
+
return /* @__PURE__ */ j("button", {
|
|
320
325
|
type: "button",
|
|
321
326
|
role: "tab",
|
|
322
327
|
"aria-label": r !== null && r > 0 ? `${$(e)} (${r})` : $(e),
|
|
323
328
|
"aria-selected": i,
|
|
324
329
|
"data-scope": e,
|
|
325
|
-
className: `vdt-scope${i ? " vdt-scope-on" : ""}${t ===
|
|
330
|
+
className: `vdt-scope${i ? " vdt-scope-on" : ""}${t === ge.length ? " vdt-scope-sep" : ""}`,
|
|
326
331
|
onClick: () => {
|
|
327
|
-
s(e), Q(null),
|
|
332
|
+
s(e), Q(null), z(!1), b(e) && requestAnimationFrame(() => {
|
|
328
333
|
let e = c.current;
|
|
329
334
|
e !== null && e.getRootNode().activeElement !== e && e.focus();
|
|
330
335
|
});
|
|
331
336
|
},
|
|
332
337
|
children: [
|
|
333
|
-
n ? /* @__PURE__ */
|
|
334
|
-
/* @__PURE__ */
|
|
338
|
+
n ? /* @__PURE__ */ A(n, { className: "vdt:w-3.5 vdt:h-3.5" }) : null,
|
|
339
|
+
/* @__PURE__ */ A("span", {
|
|
335
340
|
className: "vdt-scope-label",
|
|
336
341
|
children: $(e)
|
|
337
342
|
}),
|
|
338
|
-
r !== null && r > 0 ? /* @__PURE__ */
|
|
339
|
-
className: `vdt-badge${i ? " vdt-badge-acc" : ""}${e === "trace" &&
|
|
343
|
+
r !== null && r > 0 ? /* @__PURE__ */ A("span", {
|
|
344
|
+
className: `vdt-badge${i ? " vdt-badge-acc" : ""}${e === "trace" && Te > 0 ? " vdt-badge-err" : ""}`,
|
|
340
345
|
children: r
|
|
341
346
|
}) : null
|
|
342
347
|
]
|
|
343
348
|
}, e);
|
|
344
349
|
})
|
|
345
350
|
}),
|
|
346
|
-
/* @__PURE__ */
|
|
347
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ A("span", { className: "vdt-sp" }),
|
|
352
|
+
/* @__PURE__ */ A(re, {
|
|
348
353
|
dock: e,
|
|
349
354
|
push: t,
|
|
350
355
|
onDock: n,
|
|
351
356
|
onPush: i
|
|
352
357
|
}),
|
|
353
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ A("button", {
|
|
354
359
|
type: "button",
|
|
355
360
|
className: "vdt-iconbtn",
|
|
356
|
-
title:
|
|
357
|
-
"aria-label":
|
|
361
|
+
title: d.closeTitle,
|
|
362
|
+
"aria-label": d.closeTitle,
|
|
358
363
|
onClick: a,
|
|
359
|
-
children: /* @__PURE__ */
|
|
364
|
+
children: /* @__PURE__ */ A(ne, { className: "vdt:w-4 vdt:h-4" })
|
|
360
365
|
})
|
|
361
366
|
]
|
|
362
367
|
}),
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
W ? /* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ A(ie, {}),
|
|
369
|
+
W ? /* @__PURE__ */ j("div", {
|
|
365
370
|
className: "vdt-body",
|
|
366
371
|
"data-empty": X.length === 0 && Y === null ? "true" : "false",
|
|
367
|
-
children: [/* @__PURE__ */
|
|
372
|
+
children: [/* @__PURE__ */ A("div", {
|
|
368
373
|
role: "listbox",
|
|
369
|
-
"aria-label":
|
|
374
|
+
"aria-label": d.results(X.length),
|
|
370
375
|
tabIndex: 0,
|
|
371
376
|
className: "vdt-results",
|
|
372
377
|
onKeyDown: (e) => {
|
|
373
|
-
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), Q(
|
|
378
|
+
e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), Q(x(X.map((e) => e.id), H, e.key === "ArrowDown" ? 1 : -1))) : e.key === "Escape" && a();
|
|
374
379
|
},
|
|
375
|
-
children: X.length === 0 ? /* @__PURE__ */
|
|
380
|
+
children: X.length === 0 ? /* @__PURE__ */ j("div", {
|
|
376
381
|
className: "vdt-empty",
|
|
377
|
-
children: [/* @__PURE__ */
|
|
382
|
+
children: [/* @__PURE__ */ A("div", {
|
|
378
383
|
className: "vdt-empty-title",
|
|
379
384
|
children: Z.title
|
|
380
|
-
}), /* @__PURE__ */
|
|
385
|
+
}), /* @__PURE__ */ A("div", {
|
|
381
386
|
className: "vdt-empty-hint",
|
|
382
387
|
children: Z.hint
|
|
383
388
|
})]
|
|
384
|
-
}) : X.map((e) => /* @__PURE__ */
|
|
389
|
+
}) : X.map((e) => /* @__PURE__ */ A(Se, {
|
|
385
390
|
item: e,
|
|
386
|
-
selected: e.id ===
|
|
387
|
-
onSelect: () => Q(e.id ===
|
|
391
|
+
selected: e.id === H,
|
|
392
|
+
onSelect: () => Q(e.id === H ? null : e.id)
|
|
388
393
|
}, e.id))
|
|
389
|
-
}), /* @__PURE__ */
|
|
394
|
+
}), /* @__PURE__ */ A("aside", {
|
|
390
395
|
className: "vdt-side",
|
|
391
396
|
"aria-live": "polite",
|
|
392
|
-
children: Y === null ? /* @__PURE__ */
|
|
397
|
+
children: Y === null ? /* @__PURE__ */ A("div", {
|
|
393
398
|
className: "vdt-empty vdt-empty-side",
|
|
394
|
-
children: /* @__PURE__ */
|
|
399
|
+
children: /* @__PURE__ */ A("div", {
|
|
395
400
|
className: "vdt-empty-hint",
|
|
396
|
-
children:
|
|
401
|
+
children: d.selectHint
|
|
397
402
|
})
|
|
398
|
-
}) : /* @__PURE__ */
|
|
403
|
+
}) : /* @__PURE__ */ A(F, {
|
|
399
404
|
item: Y,
|
|
400
405
|
retained: J
|
|
401
406
|
})
|
|
402
407
|
})]
|
|
403
|
-
}) : /* @__PURE__ */
|
|
408
|
+
}) : /* @__PURE__ */ j("div", {
|
|
404
409
|
className: "vdt-body vdt-body-panel",
|
|
405
410
|
children: [
|
|
406
|
-
o === "workflows" ? /* @__PURE__ */
|
|
407
|
-
o === "stores" ? /* @__PURE__ */
|
|
408
|
-
o === "indexes" ? /* @__PURE__ */
|
|
409
|
-
o === "webhooks" ? /* @__PURE__ */
|
|
410
|
-
o === "routes" ? /* @__PURE__ */
|
|
411
|
-
o === "runtimes" ? /* @__PURE__ */
|
|
412
|
-
o === "pwa" ? /* @__PURE__ */
|
|
413
|
-
o === "desktop" ? /* @__PURE__ */
|
|
411
|
+
o === "workflows" ? /* @__PURE__ */ A(le, {}) : null,
|
|
412
|
+
o === "stores" ? /* @__PURE__ */ A(me, {}) : null,
|
|
413
|
+
o === "indexes" ? /* @__PURE__ */ A(ae, {}) : null,
|
|
414
|
+
o === "webhooks" ? /* @__PURE__ */ A(se, {}) : null,
|
|
415
|
+
o === "routes" ? /* @__PURE__ */ A(ue, {}) : null,
|
|
416
|
+
o === "runtimes" ? /* @__PURE__ */ A(de, {}) : null,
|
|
417
|
+
o === "pwa" ? /* @__PURE__ */ A(fe, {}) : null,
|
|
418
|
+
o === "desktop" ? /* @__PURE__ */ A(pe, {}) : null
|
|
414
419
|
]
|
|
415
420
|
}),
|
|
416
|
-
/* @__PURE__ */
|
|
421
|
+
/* @__PURE__ */ j("footer", {
|
|
417
422
|
className: "vdt-foot",
|
|
418
423
|
children: [
|
|
419
|
-
o === "trace" ? /* @__PURE__ */
|
|
424
|
+
o === "trace" ? /* @__PURE__ */ A("button", {
|
|
420
425
|
type: "button",
|
|
421
426
|
className: "vdt-chip vdt-background-filter",
|
|
422
|
-
"aria-pressed":
|
|
423
|
-
onClick: () =>
|
|
424
|
-
children:
|
|
427
|
+
"aria-pressed": g,
|
|
428
|
+
onClick: () => _(!g),
|
|
429
|
+
children: u.traces.includeBackground
|
|
425
430
|
}) : null,
|
|
426
|
-
K > 0 ||
|
|
431
|
+
K > 0 || R ? /* @__PURE__ */ j("button", {
|
|
427
432
|
type: "button",
|
|
428
433
|
className: "vdt-chip vdt-chip-info vdt-pending-filter",
|
|
429
434
|
"data-chip": "pending",
|
|
430
|
-
"aria-label":
|
|
431
|
-
"aria-pressed":
|
|
435
|
+
"aria-label": d.pendingInvocations(K),
|
|
436
|
+
"aria-pressed": R,
|
|
432
437
|
onClick: () => {
|
|
433
|
-
|
|
438
|
+
z(!R), s("all"), L(""), Q(null);
|
|
434
439
|
},
|
|
435
440
|
children: [
|
|
436
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ A("span", {
|
|
437
442
|
className: "vdt-dot vdt-dot-info",
|
|
438
443
|
"aria-hidden": "true"
|
|
439
444
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ A("b", { children: K }),
|
|
441
446
|
" ",
|
|
442
|
-
|
|
447
|
+
d.pending
|
|
443
448
|
]
|
|
444
449
|
}) : null,
|
|
445
|
-
|
|
446
|
-
|
|
450
|
+
h.names.map((e) => /* @__PURE__ */ A(Ce, { name: e }, e)),
|
|
451
|
+
k === "" ? null : /* @__PURE__ */ A("span", {
|
|
447
452
|
className: "vdt-foot-route",
|
|
448
|
-
children: /* @__PURE__ */
|
|
453
|
+
children: /* @__PURE__ */ A("code", { children: k })
|
|
449
454
|
}),
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ A("span", { className: "vdt-sp" }),
|
|
456
|
+
/* @__PURE__ */ j("span", {
|
|
452
457
|
className: "vdt-hints",
|
|
453
458
|
children: [
|
|
454
|
-
/* @__PURE__ */
|
|
455
|
-
/* @__PURE__ */
|
|
459
|
+
/* @__PURE__ */ j("span", { children: [
|
|
460
|
+
/* @__PURE__ */ A("kbd", {
|
|
456
461
|
className: "vdt-kbd",
|
|
457
462
|
children: "↑↓"
|
|
458
463
|
}),
|
|
459
464
|
" ",
|
|
460
|
-
|
|
465
|
+
d.hintNavigate
|
|
461
466
|
] }),
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
/* @__PURE__ */
|
|
467
|
+
/* @__PURE__ */ j("span", { children: [
|
|
468
|
+
/* @__PURE__ */ A("kbd", {
|
|
464
469
|
className: "vdt-kbd",
|
|
465
470
|
children: "↵"
|
|
466
471
|
}),
|
|
467
472
|
" ",
|
|
468
|
-
|
|
473
|
+
d.hintOpen
|
|
469
474
|
] }),
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ j("span", { children: [
|
|
476
|
+
/* @__PURE__ */ A("kbd", {
|
|
472
477
|
className: "vdt-kbd",
|
|
473
|
-
children:
|
|
478
|
+
children: N.alt
|
|
474
479
|
}),
|
|
475
480
|
"+",
|
|
476
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ A("kbd", {
|
|
477
482
|
className: "vdt-kbd",
|
|
478
483
|
children: "V"
|
|
479
484
|
}),
|
|
480
485
|
" ",
|
|
481
|
-
|
|
486
|
+
d.hintToggle
|
|
482
487
|
] }),
|
|
483
|
-
/* @__PURE__ */
|
|
484
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ j("span", { children: [
|
|
489
|
+
/* @__PURE__ */ A("kbd", {
|
|
485
490
|
className: "vdt-kbd",
|
|
486
|
-
children:
|
|
491
|
+
children: N.alt
|
|
487
492
|
}),
|
|
488
493
|
"+",
|
|
489
|
-
/* @__PURE__ */
|
|
494
|
+
/* @__PURE__ */ A("kbd", {
|
|
490
495
|
className: "vdt-kbd",
|
|
491
|
-
children:
|
|
496
|
+
children: N.shift
|
|
492
497
|
}),
|
|
493
498
|
"+",
|
|
494
|
-
/* @__PURE__ */
|
|
499
|
+
/* @__PURE__ */ A("kbd", {
|
|
495
500
|
className: "vdt-kbd",
|
|
496
501
|
children: "←↑↓→"
|
|
497
502
|
}),
|
|
498
503
|
" ",
|
|
499
|
-
|
|
504
|
+
d.hintDock
|
|
500
505
|
] })
|
|
501
506
|
]
|
|
502
507
|
})
|
|
@@ -504,4 +509,4 @@ var N = {
|
|
|
504
509
|
})
|
|
505
510
|
] });
|
|
506
511
|
};
|
|
507
|
-
export {
|
|
512
|
+
export { L as Console, N as KEY_LABELS };
|