@hansenexus/hud 0.6.0 → 0.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/README.md +64 -14
- package/dist/{a11y-B5DUaiCs.js → a11y-BGWw4jBr.js} +14 -2
- package/dist/{a11y-panel-p_t4eD7p.js → a11y-panel-DcfXnPHk.js} +1 -1
- package/dist/{access-D_ewAEJG.d.ts → access-Bc709qpl.d.ts} +1 -1
- package/dist/{access-panel-CEfTr9ZI.js → access-panel-grAsMEDk.js} +1 -1
- package/dist/auto/runtime.d.ts +9 -9
- package/dist/auto.d.ts +2 -2
- package/dist/auto.js +5 -5
- package/dist/{data-panel-BmcHCQnM.js → data-panel-B6WPNmV6.js} +1 -1
- package/dist/{data-store-ChF1td_P.js → data-store-FNTQKMkG.js} +1 -1
- package/dist/{define-hud-CHPedaQ5.d.ts → define-hud-DTv3njuU.d.ts} +15 -5
- package/dist/{design-D0kGgPoP.js → design-BXG1a4we.js} +21 -5
- package/dist/{dispatch-panel-B-xr_Giy.js → dispatch-panel-BDHgMhOk.js} +1 -1
- package/dist/{force-state-panel-_otVYh9i.js → force-state-panel-mu-txJnA.js} +1 -1
- package/dist/{handler-BpVhxEmU.js → handler-BKzaOhlJ.js} +1 -1
- package/dist/{handler-DtYVCZY6.d.ts → handler-DMzSTqyG.d.ts} +1 -1
- package/dist/icons-ByDyNq_E.js +71 -0
- package/dist/{index-BnQ0dTZf.d.ts → index-B1vHAY9p.d.ts} +2 -1
- package/dist/{index-DstI_ike.d.ts → index-BJJoAXJ2.d.ts} +5 -1
- package/dist/{index-BAV_1W8a.d.ts → index-BNoPbSYD.d.ts} +3 -1
- package/dist/{index-CwfX-W87.d.ts → index-BR5OB7DO.d.ts} +3 -0
- package/dist/index-C3wzZS3o.d.ts +116 -0
- package/dist/{index-DcH9V3cU.d.ts → index-CQXiuMZQ.d.ts} +3 -0
- package/dist/{index-Hhh7OXzU.d.ts → index-Caohnz3B.d.ts} +7 -1
- package/dist/{index-ReFbhQ9p.d.ts → index-D-hI-DRJ.d.ts} +5 -0
- package/dist/{index-DqOyNf1u.d.ts → index-DLCSLWW4.d.ts} +4 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1194 -73
- package/dist/{inspect-C9Ft8fqn.js → inspect-CSkm8tn3.js} +14 -2
- package/dist/{inspect-root-BkaupBMp.js → inspect-root-CmiFX0e5.js} +1 -1
- package/dist/next.d.ts +1 -1
- package/dist/{observe-CdDnDBRP.js → observe-CBNLU148.js} +12 -2
- package/dist/{observe-panel-Cgp1M8oT.js → observe-panel-zU5LD-U9.js} +1 -1
- package/dist/{ops-panel-CEqDe_UT.js → ops-panel-DHhAnChL.js} +1 -1
- package/dist/plugins/a11y.d.ts +1 -1
- package/dist/plugins/a11y.js +1 -1
- package/dist/plugins/access/server.d.ts +3 -3
- package/dist/plugins/access/server.js +1 -1
- package/dist/plugins/access.d.ts +5 -2
- package/dist/plugins/access.js +18 -5
- package/dist/plugins/agent/server.js +1 -1
- package/dist/plugins/agent.d.ts +4 -2
- package/dist/plugins/agent.js +6 -3
- package/dist/plugins/capture/server.js +1 -1
- package/dist/plugins/capture.d.ts +2 -2
- package/dist/plugins/capture.js +1 -1
- package/dist/plugins/data/server.d.ts +1 -1
- package/dist/plugins/data/server.js +1 -1
- package/dist/plugins/data.d.ts +1 -1
- package/dist/plugins/data.js +30 -9
- package/dist/plugins/design/server.d.ts +1 -1
- package/dist/plugins/design/server.js +1 -1
- package/dist/plugins/design.d.ts +1 -1
- package/dist/plugins/design.js +1 -1
- package/dist/plugins/inspect.d.ts +1 -1
- package/dist/plugins/inspect.js +1 -1
- package/dist/plugins/observe.d.ts +1 -1
- package/dist/plugins/observe.js +1 -1
- package/dist/plugins/ops/server.d.ts +1 -1
- package/dist/plugins/ops/server.js +1 -1
- package/dist/plugins/ops.d.ts +5 -1
- package/dist/plugins/ops.js +16 -4
- package/dist/plugins/routes/server.js +1 -1
- package/dist/plugins/routes.d.ts +1 -1
- package/dist/plugins/routes.js +3 -1
- package/dist/plugins/seo.d.ts +1 -1
- package/dist/plugins/seo.js +1 -1
- package/dist/plugins/vitals.d.ts +1 -1
- package/dist/plugins/vitals.js +9 -1
- package/dist/{plugins-BZvDqGx5.d.ts → plugins-BZT-1LBe.d.ts} +32 -3
- package/dist/{plugins-DVy_vaYr.js → plugins-CcW_K7c2.js} +9 -1
- package/dist/{poll-CjKsWZi8.js → poll-Dm0OijM4.js} +1 -1
- package/dist/{seo-Dq9q_QkO.js → seo-BnnGq_vj.js} +13 -2
- package/dist/{seo-panel-CfiY-TnT.js → seo-panel-BThx56KM.js} +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/server.js +2 -2
- package/dist/{sessions-panel-COvhPAzv.js → sessions-panel-MknKsTge.js} +1 -1
- package/dist/store.d.ts +1 -1
- package/dist/store.js +1 -1
- package/dist/{unlock-store-4V3vR4Eg.js → unlock-store-CrGXQx1V.js} +1 -1
- package/dist/{variants-panel-BDoSkwBJ.js → variants-panel-B6zWcknV.js} +1 -1
- package/dist/vite.d.ts +2 -2
- package/dist/vite.js +1 -1
- package/package.json +1 -1
- package/dist/index-gCZBO53s.d.ts +0 -73
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { i as
|
|
1
|
+
import { i as hudIcon } from "./icons-ByDyNq_E.js";
|
|
2
|
+
import { i as definePlugin } from "./plugins-CcW_K7c2.js";
|
|
2
3
|
import { a as isRequestError, l as requestBuffer, o as markReplay } from "./requests-BwD6MKEq.js";
|
|
3
4
|
import { t as installCapture } from "./capture-CwrIwLqi.js";
|
|
4
5
|
import { lazy, useEffect, useSyncExternalStore } from "react";
|
|
@@ -85,7 +86,7 @@ async function replay(entry) {
|
|
|
85
86
|
}
|
|
86
87
|
//#endregion
|
|
87
88
|
//#region src/plugins/inspect/index.tsx
|
|
88
|
-
const InspectRoot = lazy(() => import("./inspect-root-
|
|
89
|
+
const InspectRoot = lazy(() => import("./inspect-root-CmiFX0e5.js"));
|
|
89
90
|
const INSPECT_CAPABILITY = "inspect.read";
|
|
90
91
|
/**
|
|
91
92
|
* Data inspector on top of the observe capture: every fetch, XHR and Next
|
|
@@ -122,10 +123,21 @@ function inspect({ ignore, adapters = [] } = {}) {
|
|
|
122
123
|
function Panel() {
|
|
123
124
|
return /* @__PURE__ */ jsx(InspectRoot, { adapters });
|
|
124
125
|
}
|
|
126
|
+
function useInspectBadge() {
|
|
127
|
+
const entries = useRequests();
|
|
128
|
+
const failed = entries.filter(isRequestError).length;
|
|
129
|
+
if (failed > 0) return {
|
|
130
|
+
tone: "poor",
|
|
131
|
+
count: failed
|
|
132
|
+
};
|
|
133
|
+
return { tone: entries.some((entry) => entry.status === void 0) ? "warn" : "good" };
|
|
134
|
+
}
|
|
125
135
|
return definePlugin({
|
|
126
136
|
id: "inspect",
|
|
127
137
|
title: "Inspect",
|
|
128
138
|
capability: INSPECT_CAPABILITY,
|
|
139
|
+
icon: hudIcon("activity"),
|
|
140
|
+
badge: useInspectBadge,
|
|
129
141
|
pill: InspectPill,
|
|
130
142
|
panel: Panel,
|
|
131
143
|
commands: [{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as isRequestError, l as requestBuffer } from "./requests-BwD6MKEq.js";
|
|
2
|
-
import { a as FILTERS, c as setView, i as replayBlocker, l as useRequests, o as REQUESTS_TAB, r as replay, s as matches, u as useView } from "./inspect-
|
|
2
|
+
import { a as FILTERS, c as setView, i as replayBlocker, l as useRequests, o as REQUESTS_TAB, r as replay, s as matches, u as useView } from "./inspect-CSkm8tn3.js";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
//#region src/plugins/inspect/inspect-panel.tsx
|
package/dist/next.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as HudMountProps } from "./define-hud-
|
|
1
|
+
import { r as HudMountProps } from "./define-hud-DTv3njuU.js";
|
|
2
2
|
import { n as hudEnvLabel, r as resolveHudEnv, t as HudEnv } from "./env-CApnbI0r.js";
|
|
3
3
|
import { ComponentType } from "react";
|
|
4
4
|
//#region src/next/loader.d.ts
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { i as
|
|
1
|
+
import { i as hudIcon } from "./icons-ByDyNq_E.js";
|
|
2
|
+
import { i as definePlugin } from "./plugins-CcW_K7c2.js";
|
|
2
3
|
import { _ as captureBuffer, v as isError } from "./requests-BwD6MKEq.js";
|
|
3
4
|
import { t as installCapture } from "./capture-CwrIwLqi.js";
|
|
4
5
|
import { r as startVitals } from "./store-CQqIIKTc.js";
|
|
@@ -44,7 +45,7 @@ function useCapture() {
|
|
|
44
45
|
}
|
|
45
46
|
//#endregion
|
|
46
47
|
//#region src/plugins/observe/index.tsx
|
|
47
|
-
const Panel = lazy(() => import("./observe-panel-
|
|
48
|
+
const Panel = lazy(() => import("./observe-panel-zU5LD-U9.js"));
|
|
48
49
|
const NO_ENV = {};
|
|
49
50
|
const noUser = () => void 0;
|
|
50
51
|
function useErrorCount() {
|
|
@@ -72,9 +73,18 @@ function observe({ env = NO_ENV, useUser = noUser, ignore } = {}) {
|
|
|
72
73
|
useUser
|
|
73
74
|
});
|
|
74
75
|
}
|
|
76
|
+
function useObserveBadge() {
|
|
77
|
+
const errors = useErrorCount();
|
|
78
|
+
return errors > 0 ? {
|
|
79
|
+
tone: "poor",
|
|
80
|
+
count: errors
|
|
81
|
+
} : { tone: "good" };
|
|
82
|
+
}
|
|
75
83
|
return definePlugin({
|
|
76
84
|
id: "observe",
|
|
77
85
|
title: "Observe",
|
|
86
|
+
icon: hudIcon("bug"),
|
|
87
|
+
badge: useObserveBadge,
|
|
78
88
|
pill: ObservePill,
|
|
79
89
|
pillPriority: 20,
|
|
80
90
|
panel: ObservePanel,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as captureBuffer, v as isError } from "./requests-BwD6MKEq.js";
|
|
2
|
-
import { a as useCapture, i as setView, n as FILTERS, o as useView, r as matches } from "./observe-
|
|
2
|
+
import { a as useCapture, i as setView, n as FILTERS, o as useView, r as matches } from "./observe-CBNLU148.js";
|
|
3
3
|
import { VitalsPanel } from "./vitals-panel-BCmMUntW.js";
|
|
4
4
|
import { useEffect, useLayoutEffect, useState, version } from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as stateRating, r as stateLabel, t as CI_POLL_MS } from "./state-CjjZPjPJ.js";
|
|
2
|
-
import { t as usePoll } from "./poll-
|
|
2
|
+
import { t as usePoll } from "./poll-Dm0OijM4.js";
|
|
3
3
|
import { t as TELEMETRY_RANGES } from "./types-B-ulf2Jp.js";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
package/dist/plugins/a11y.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as A11yFinding, c as AxeImpact, i as A11yStatus, n as a11y, o as AXE_URL, r as A11ySnapshot, s as AXE_VERSION, t as A11yOptions } from "../index-
|
|
1
|
+
import { a as A11yFinding, c as AxeImpact, i as A11yStatus, n as a11y, o as AXE_URL, r as A11ySnapshot, s as AXE_VERSION, t as A11yOptions } from "../index-DLCSLWW4.js";
|
|
2
2
|
export { type A11yFinding, A11yOptions, type A11ySnapshot, type A11yStatus, AXE_URL, AXE_VERSION, type AxeImpact, a11y };
|
package/dist/plugins/a11y.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as AXE_VERSION, i as AXE_URL, t as a11y } from "../a11y-
|
|
1
|
+
import { a as AXE_VERSION, i as AXE_URL, t as a11y } from "../a11y-BGWw4jBr.js";
|
|
2
2
|
export { AXE_URL, AXE_VERSION, a11y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as HudCapability } from "../../plugins-BZT-1LBe.js";
|
|
2
2
|
import { t as HudEnv } from "../../env-CApnbI0r.js";
|
|
3
|
-
import { a as signHudUnlockToken, c as CAPABILITY_MATRIX, d as hasCapability, f as isHudVisible, i as resolveHudAccess, l as CapabilityMatrixOverride, n as HudAccess, o as verifyHudUnlockToken, p as isProductionDenied, r as hudRequiresUnlock, s as ACCESS_UNLOCK_CAPABILITY, t as HUD_UNLOCK_COOKIE, u as HUD_CAPABILITIES } from "../../access-
|
|
4
|
-
import { t as HudGuard } from "../../handler-
|
|
3
|
+
import { a as signHudUnlockToken, c as CAPABILITY_MATRIX, d as hasCapability, f as isHudVisible, i as resolveHudAccess, l as CapabilityMatrixOverride, n as HudAccess, o as verifyHudUnlockToken, p as isProductionDenied, r as hudRequiresUnlock, s as ACCESS_UNLOCK_CAPABILITY, t as HUD_UNLOCK_COOKIE, u as HUD_CAPABILITIES } from "../../access-Bc709qpl.js";
|
|
4
|
+
import { t as HudGuard } from "../../handler-DMzSTqyG.js";
|
|
5
5
|
//#region src/plugins/access/server/settings.d.ts
|
|
6
6
|
/** What the server half reads from its environment, per request. */
|
|
7
7
|
interface AccessSettings {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as definePlugin } from "../../plugins-
|
|
1
|
+
import { i as definePlugin } from "../../plugins-CcW_K7c2.js";
|
|
2
2
|
import { n as resolveHudEnv } from "../../env-CaiFPIhF.js";
|
|
3
3
|
import { a as readCookie, c as timingSafeEqual, i as hudUnlockTtlMs, l as verifyHudUnlockToken, n as hudRequiresUnlock, o as resolveHudAccess, r as hudUnlockCookieString, s as signHudUnlockToken, t as HUD_UNLOCK_COOKIE } from "../../access-C7zlaqj6.js";
|
|
4
4
|
import { a as isHudVisible, i as hasCapability, n as CAPABILITY_MATRIX, o as isProductionDenied, r as HUD_CAPABILITIES, s as resolveMatrix, t as ACCESS_UNLOCK_CAPABILITY } from "../../capabilities-rDSKjXpq.js";
|
package/dist/plugins/access.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as CAPABILITY_MATRIX, d as hasCapability, i as resolveHudAccess, l as CapabilityMatrixOverride, n as HudAccess, p as isProductionDenied, r as hudRequiresUnlock, s as ACCESS_UNLOCK_CAPABILITY, u as HUD_CAPABILITIES } from "../access-
|
|
1
|
+
import { a as HudCapability, r as HudBadge, u as HudPluginProps } from "../plugins-BZT-1LBe.js";
|
|
2
|
+
import { c as CAPABILITY_MATRIX, d as hasCapability, i as resolveHudAccess, l as CapabilityMatrixOverride, n as HudAccess, p as isProductionDenied, r as hudRequiresUnlock, s as ACCESS_UNLOCK_CAPABILITY, u as HUD_CAPABILITIES } from "../access-Bc709qpl.js";
|
|
3
3
|
//#region src/plugins/access/access-pill.d.ts
|
|
4
4
|
declare function AccessPill(): import("react").JSX.Element;
|
|
5
|
+
declare function useAccessBadge(): HudBadge;
|
|
5
6
|
//#endregion
|
|
6
7
|
//#region src/plugins/access/unlock-store.d.ts
|
|
7
8
|
type UnlockStatus = "checking" | "locked" | "unlocked" | "unconfigured";
|
|
@@ -29,6 +30,8 @@ export declare function access(options?: AccessOptions): {
|
|
|
29
30
|
readonly id: "access";
|
|
30
31
|
readonly title: "Access";
|
|
31
32
|
readonly capability: "access.unlock";
|
|
33
|
+
readonly icon: import("react").ComponentType;
|
|
34
|
+
readonly badge: typeof useAccessBadge;
|
|
32
35
|
readonly pill: typeof AccessPill;
|
|
33
36
|
readonly pillPriority: 30;
|
|
34
37
|
readonly panel: ({ ctx }: HudPluginProps) => import("react").JSX.Element;
|
package/dist/plugins/access.js
CHANGED
|
@@ -1,22 +1,33 @@
|
|
|
1
|
-
import { i as
|
|
1
|
+
import { i as hudIcon } from "../icons-ByDyNq_E.js";
|
|
2
|
+
import { i as definePlugin } from "../plugins-CcW_K7c2.js";
|
|
2
3
|
import { n as hudRequiresUnlock, o as resolveHudAccess } from "../access-C7zlaqj6.js";
|
|
3
4
|
import { c as toHudEnv, i as hasCapability, n as CAPABILITY_MATRIX, o as isProductionDenied, r as HUD_CAPABILITIES, s as resolveMatrix, t as ACCESS_UNLOCK_CAPABILITY } from "../capabilities-rDSKjXpq.js";
|
|
4
|
-
import { n as useUnlockState, r as useUnlocked } from "../unlock-store-
|
|
5
|
+
import { n as useUnlockState, r as useUnlocked } from "../unlock-store-CrGXQx1V.js";
|
|
5
6
|
import { lazy } from "react";
|
|
6
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
//#region src/plugins/access/access-pill.tsx
|
|
8
|
-
function
|
|
9
|
+
function useAccessState() {
|
|
9
10
|
const { env, status } = useUnlockState();
|
|
10
11
|
const access = resolveHudAccess(env);
|
|
11
12
|
const unlocked = access === "open" || status === "unlocked";
|
|
13
|
+
return {
|
|
14
|
+
unlocked,
|
|
15
|
+
label: access === "open" ? "Open" : unlocked ? "Unlocked" : "Locked"
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function AccessPill() {
|
|
19
|
+
const { label, unlocked } = useAccessState();
|
|
12
20
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
|
|
13
21
|
className: "dot",
|
|
14
22
|
"data-rating": unlocked ? "good" : "poor"
|
|
15
|
-
}),
|
|
23
|
+
}), label] });
|
|
24
|
+
}
|
|
25
|
+
function useAccessBadge() {
|
|
26
|
+
return { tone: useAccessState().unlocked ? "good" : "poor" };
|
|
16
27
|
}
|
|
17
28
|
//#endregion
|
|
18
29
|
//#region src/plugins/access/index.tsx
|
|
19
|
-
const Panel = lazy(() => import("../access-panel-
|
|
30
|
+
const Panel = lazy(() => import("../access-panel-grAsMEDk.js"));
|
|
20
31
|
/**
|
|
21
32
|
* Opt-in for deployed tiers. Without it `defineHud` renders nothing outside
|
|
22
33
|
* development. With it the HUD follows the env ladder: a tier's capability
|
|
@@ -38,6 +49,8 @@ function access(options = {}) {
|
|
|
38
49
|
id: "access",
|
|
39
50
|
title: "Access",
|
|
40
51
|
capability: ACCESS_UNLOCK_CAPABILITY,
|
|
52
|
+
icon: hudIcon("lock"),
|
|
53
|
+
badge: useAccessBadge,
|
|
41
54
|
pill: AccessPill,
|
|
42
55
|
pillPriority: 30,
|
|
43
56
|
panel: AccessPanel,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as definePlugin } from "../../plugins-
|
|
1
|
+
import { i as definePlugin } from "../../plugins-CcW_K7c2.js";
|
|
2
2
|
import { t as refuseCrossSite } from "../../same-origin-BGet22CC.js";
|
|
3
3
|
//#region src/plugins/agent/prompt.ts
|
|
4
4
|
/** The task text every provider receives: grab context first, then the instruction. */
|
package/dist/plugins/agent.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as GrabPayload, t as ComponentHint } from "../payload-MUQ9ciER.js";
|
|
2
|
-
import {
|
|
3
|
-
import "../index-
|
|
2
|
+
import { l as HudPluginContext, u as HudPluginProps } from "../plugins-BZT-1LBe.js";
|
|
3
|
+
import "../index-C3wzZS3o.js";
|
|
4
4
|
import { a as DispatchTargetInfo, i as DispatchReceipt, n as AgentSessionStatus, o as SessionsResponse, r as DispatchBody, t as AgentSession } from "../types-Cxh4twqc.js";
|
|
5
5
|
//#region src/plugins/agent/index.d.ts
|
|
6
6
|
export interface AgentDispatchOptions {
|
|
@@ -20,6 +20,7 @@ export interface AgentDispatchOptions {
|
|
|
20
20
|
export declare function agentDispatch({ componentHints, openOnGrab }?: AgentDispatchOptions): {
|
|
21
21
|
readonly id: "agent-dispatch";
|
|
22
22
|
readonly title: "Dispatch";
|
|
23
|
+
readonly icon: import("react").ComponentType;
|
|
23
24
|
readonly panel: ({ ctx }: HudPluginProps) => import("react").JSX.Element;
|
|
24
25
|
readonly onGrab?: (_payload: GrabPayload, ctx: HudPluginContext) => void;
|
|
25
26
|
};
|
|
@@ -31,6 +32,7 @@ export interface AgentSessionsOptions {
|
|
|
31
32
|
export declare function agentSessions({ intervalMs }?: AgentSessionsOptions): {
|
|
32
33
|
readonly id: "agent-sessions";
|
|
33
34
|
readonly title: "Sessions";
|
|
35
|
+
readonly icon: import("react").ComponentType;
|
|
34
36
|
readonly panel: ({ ctx }: HudPluginProps) => import("react").JSX.Element;
|
|
35
37
|
};
|
|
36
38
|
//#endregion
|
package/dist/plugins/agent.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { i as
|
|
1
|
+
import { i as hudIcon } from "../icons-ByDyNq_E.js";
|
|
2
|
+
import { i as definePlugin } from "../plugins-CcW_K7c2.js";
|
|
2
3
|
import { lazy } from "react";
|
|
3
4
|
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
//#region src/plugins/agent/run-log.ts
|
|
@@ -28,8 +29,8 @@ function createRunLog() {
|
|
|
28
29
|
}
|
|
29
30
|
//#endregion
|
|
30
31
|
//#region src/plugins/agent/index.tsx
|
|
31
|
-
const DispatchPanel = lazy(() => import("../dispatch-panel-
|
|
32
|
-
const SessionsPanel = lazy(() => import("../sessions-panel-
|
|
32
|
+
const DispatchPanel = lazy(() => import("../dispatch-panel-BDHgMhOk.js"));
|
|
33
|
+
const SessionsPanel = lazy(() => import("../sessions-panel-MknKsTge.js"));
|
|
33
34
|
/**
|
|
34
35
|
* Dispatch panel: the last grab plus an instruction, sent to one of the
|
|
35
36
|
* server's providers (`hermes()`, `claudeCode()`). Mount the server half from
|
|
@@ -47,6 +48,7 @@ function agentDispatch({ componentHints, openOnGrab = true } = {}) {
|
|
|
47
48
|
return definePlugin({
|
|
48
49
|
id: "agent-dispatch",
|
|
49
50
|
title: "Dispatch",
|
|
51
|
+
icon: hudIcon("send"),
|
|
50
52
|
panel: Panel,
|
|
51
53
|
...openOnGrab ? { onGrab: (_payload, ctx) => ctx.open() } : {}
|
|
52
54
|
});
|
|
@@ -62,6 +64,7 @@ function agentSessions({ intervalMs = 1e4 } = {}) {
|
|
|
62
64
|
return definePlugin({
|
|
63
65
|
id: "agent-sessions",
|
|
64
66
|
title: "Sessions",
|
|
67
|
+
icon: hudIcon("terminal"),
|
|
65
68
|
panel: Panel
|
|
66
69
|
});
|
|
67
70
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as HUD_HOST_TAG } from "../../marker-uZYPOJ4M.js";
|
|
2
|
-
import { i as definePlugin } from "../../plugins-
|
|
2
|
+
import { i as definePlugin } from "../../plugins-CcW_K7c2.js";
|
|
3
3
|
import { n as CAPTURE_ID, t as CAPTURE_CAPABILITY } from "../../types-DIdPfjtV.js";
|
|
4
4
|
//#region src/plugins/capture/server.ts
|
|
5
5
|
const INSTALL_HINT = "bun add -d playwright && bunx playwright install chromium";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as GrabPayload } from "../payload-MUQ9ciER.js";
|
|
2
|
-
import {
|
|
3
|
-
import "../index-
|
|
2
|
+
import { l as HudPluginContext } from "../plugins-BZT-1LBe.js";
|
|
3
|
+
import "../index-C3wzZS3o.js";
|
|
4
4
|
import { n as ScreenshotRequest, r as ScreenshotResponse, t as CAPTURE_CAPABILITY } from "../types-BIgGf-0C.js";
|
|
5
5
|
//#region src/plugins/capture/index.d.ts
|
|
6
6
|
export interface ScreenshotOptions {
|
package/dist/plugins/capture.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as definePlugin, n as HudApiError } from "../plugins-
|
|
1
|
+
import { i as definePlugin, n as HudApiError } from "../plugins-CcW_K7c2.js";
|
|
2
2
|
import { n as CAPTURE_ID, t as CAPTURE_CAPABILITY } from "../types-DIdPfjtV.js";
|
|
3
3
|
//#region src/plugins/capture/index.tsx
|
|
4
4
|
function failure(error) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as HudRouteContext } from "../../plugins-BZT-1LBe.js";
|
|
2
2
|
import { _ as validateScenarios, a as HudMockRegistry, c as HudMockScenarioInfo, d as MOCK_SCENARIO_ID, f as createMockResolver, g as toMockActive, h as readMockRegistry, i as HudMockNodeStatus, l as MOCKS_COLLECTION, m as parseEndpoint, n as HudMockContext, o as HudMockResolve, p as matchEndpoint, r as HudMockMethod, s as HudMockScenario, t as HudMockActive, u as MOCKS_DOCUMENT } from "../../mocks-CA-wM2SB.js";
|
|
3
3
|
import { c as HudFlagValue, g as serializeFlagOverrides, h as readFlagOverrides, l as flagCookieString, n as FLAGS_STORAGE_KEY, o as HudFlagOverride, r as FLAG_KEY, s as HudFlagScope, t as FLAGS_COOKIE } from "../../flags-DVtaJ8pQ.js";
|
|
4
4
|
import { a as FlagsResponse, c as HudFlagDefinition, d as HudSeedInfo, f as MocksResponse, h as SeedRunResponse, i as FlagOverrideBody, l as HudFlagType, m as RoleSwitchResponse, n as FLAGS_COLLECTION, o as HudAuthUser, p as RoleSwitchBody, r as FLAGS_DOCUMENT, s as HudAuthUserInfo, t as DataStateResponse, u as HudSeed } from "../../types-Dn68psVz.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as definePlugin } from "../../plugins-
|
|
1
|
+
import { i as definePlugin } from "../../plugins-CcW_K7c2.js";
|
|
2
2
|
import { FLAGS_COOKIE, FLAGS_STORAGE_KEY, FLAG_KEY, flagCookieString, isFlagScope, isFlagValue, readFlagOverrides, serializeFlagOverrides } from "../../flags.js";
|
|
3
3
|
import { a as matchEndpoint, c as readMockRegistry, d as validateScenarios, i as createMockResolver, l as scenarioInfo, n as MOCKS_DOCUMENT, o as nodeMockStatus, r as MOCK_SCENARIO_ID, s as parseEndpoint, t as MOCKS_COLLECTION, u as toMockActive } from "../../mocks-ESiRqk9o.js";
|
|
4
4
|
import { t as refuseCrossSite } from "../../same-origin-BGet22CC.js";
|
package/dist/plugins/data.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as HudMockClientStatus, n as data, r as HudMockClientOptions, t as DataOptions } from "../index-
|
|
1
|
+
import { i as HudMockClientStatus, n as data, r as HudMockClientOptions, t as DataOptions } from "../index-BJJoAXJ2.js";
|
|
2
2
|
import { c as HudMockScenarioInfo, i as HudMockNodeStatus, n as HudMockContext, o as HudMockResolve, r as HudMockMethod, s as HudMockScenario, t as HudMockActive } from "../mocks-CA-wM2SB.js";
|
|
3
3
|
import { n as HudMockWorkerModule, r as MockWorkerOptions, t as HudMockWorkerHandle } from "../msw-browser-wjaYgkB7.js";
|
|
4
4
|
import { c as HudFlagValue, h as readFlagOverrides, n as FLAGS_STORAGE_KEY, o as HudFlagOverride, r as FLAG_KEY, s as HudFlagScope, t as FLAGS_COOKIE, u as flagOverride } from "../flags-DVtaJ8pQ.js";
|
package/dist/plugins/data.js
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
import { i as
|
|
1
|
+
import { i as hudIcon } from "../icons-ByDyNq_E.js";
|
|
2
|
+
import { i as definePlugin } from "../plugins-CcW_K7c2.js";
|
|
2
3
|
import { FLAGS_COOKIE, FLAGS_STORAGE_KEY, FLAG_KEY, flagOverride, readFlagOverrides } from "../flags.js";
|
|
3
|
-
import { a as useDataState, o as configureMockClient } from "../data-store-
|
|
4
|
+
import { a as useDataState, o as configureMockClient } from "../data-store-FNTQKMkG.js";
|
|
4
5
|
import { lazy } from "react";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
//#region src/plugins/data/data-pill.tsx
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const state = useDataState(ctx);
|
|
10
|
-
if (state.status !== "ready") return /* @__PURE__ */ jsx(Fragment, { children: "Data" });
|
|
8
|
+
function summarize(state) {
|
|
9
|
+
if (state.status !== "ready") return null;
|
|
11
10
|
const { auth, flags, mocks } = state.data;
|
|
12
11
|
const overridden = flags?.overrides.length ?? 0;
|
|
13
12
|
const mocked = mocks ? Object.keys(mocks.active).length : 0;
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
return {
|
|
14
|
+
who: auth ? auth.current?.label ?? "anonymous" : null,
|
|
15
|
+
overridden,
|
|
16
|
+
mocked,
|
|
17
|
+
busy: Boolean(auth?.current) || overridden > 0 || mocked > 0
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/** The pill item: who the page is signed in as, how many flags are overridden and how many endpoints are mocked. */
|
|
21
|
+
function DataPill({ ctx }) {
|
|
22
|
+
const summary = summarize(useDataState(ctx));
|
|
23
|
+
if (!summary) return /* @__PURE__ */ jsx(Fragment, { children: "Data" });
|
|
24
|
+
const { who, overridden, mocked, busy } = summary;
|
|
16
25
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17
26
|
/* @__PURE__ */ jsx("span", {
|
|
18
27
|
className: "dot",
|
|
@@ -23,9 +32,19 @@ function DataPill({ ctx }) {
|
|
|
23
32
|
mocked > 0 ? ` · ${mocked} mock${mocked === 1 ? "" : "s"}` : ""
|
|
24
33
|
] });
|
|
25
34
|
}
|
|
35
|
+
/** The rail badge: warn while anything is overridden, counting the overrides and mocks. */
|
|
36
|
+
function useDataBadge({ ctx }) {
|
|
37
|
+
const summary = summarize(useDataState(ctx));
|
|
38
|
+
if (!summary) return null;
|
|
39
|
+
const count = summary.overridden + summary.mocked;
|
|
40
|
+
return summary.busy ? {
|
|
41
|
+
tone: "warn",
|
|
42
|
+
...count > 0 ? { count } : {}
|
|
43
|
+
} : { tone: "good" };
|
|
44
|
+
}
|
|
26
45
|
//#endregion
|
|
27
46
|
//#region src/plugins/data/index.tsx
|
|
28
|
-
const Panel = lazy(() => import("../data-panel-
|
|
47
|
+
const Panel = lazy(() => import("../data-panel-B6WPNmV6.js"));
|
|
29
48
|
/**
|
|
30
49
|
* Role switch, feature-flag overrides, seeds and mock scenarios. The pill
|
|
31
50
|
* shows who the page is signed in as, how many flags are overridden and how
|
|
@@ -43,6 +62,8 @@ function data({ mocks } = {}) {
|
|
|
43
62
|
id: "data",
|
|
44
63
|
title: "Data",
|
|
45
64
|
capability: "data.write",
|
|
65
|
+
icon: hudIcon("database"),
|
|
66
|
+
badge: useDataBadge,
|
|
46
67
|
pill: DataPill,
|
|
47
68
|
panel: Panel
|
|
48
69
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as HudRouteContext } from "../../plugins-BZT-1LBe.js";
|
|
2
2
|
import { a as VariantStatus, c as toVariantRecord, i as VariantRecord, n as DecideResponse, o as VariantsListResponse, r as VARIANTS_COLLECTION, s as recordKey, t as DecideBody } from "../../variants-types-CcRf119M.js";
|
|
3
3
|
import { n as DispatchProvider } from "../../types-szkr2QOF.js";
|
|
4
4
|
import { t as HudStore } from "../../types-DaJcsEjO.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as definePlugin } from "../../plugins-
|
|
1
|
+
import { i as definePlugin } from "../../plugins-CcW_K7c2.js";
|
|
2
2
|
import { t as refuseCrossSite } from "../../same-origin-BGet22CC.js";
|
|
3
3
|
import { t as HudStoreError } from "../../types-BIkI-qN8.js";
|
|
4
4
|
//#region src/plugins/design/variants-types.ts
|
package/dist/plugins/design.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as HudGenerateResult, c as HudTokenDescriptor, d as HudTokensAdapter, i as HudGenerateRequest, l as HudTokenGroup, n as tokens, o as HudVariantCategory, r as variants, s as HudVariantsAdapter, t as forceState, u as HudTokenScope } from "../index-
|
|
1
|
+
import { a as HudGenerateResult, c as HudTokenDescriptor, d as HudTokensAdapter, i as HudGenerateRequest, l as HudTokenGroup, n as tokens, o as HudVariantCategory, r as variants, s as HudVariantsAdapter, t as forceState, u as HudTokenScope } from "../index-Caohnz3B.js";
|
|
2
2
|
import { a as formatVariantParam, i as VariantOption, n as VARIANT_PARAM, o as parseVariantParam, r as VariantGroupInfo, t as VARIANT_MARKER } from "../variant-groups-aAIrcNK5.js";
|
|
3
3
|
import { a as VariantStatus, i as VariantRecord, n as DecideResponse, o as VariantsListResponse, t as DecideBody } from "../variants-types-CcRf119M.js";
|
|
4
4
|
import { i as ForcedState, n as FORCE_STATE_MARKER, r as FORCE_STATE_PARAM, t as FORCED_STATES } from "../force-state-CCqoTfVB.js";
|
package/dist/plugins/design.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as FORCE_STATE_MARKER, r as FORCE_STATE_PARAM, t as FORCED_STATES } from "../force-state-BaqWsmrf.js";
|
|
2
|
-
import { n as tokens, r as variants, t as forceState } from "../design-
|
|
2
|
+
import { n as tokens, r as variants, t as forceState } from "../design-BXG1a4we.js";
|
|
3
3
|
import { n as VARIANT_PARAM, o as parseVariantParam, r as formatVariantParam, t as VARIANT_MARKER } from "../variant-groups-TIfO3NIj.js";
|
|
4
4
|
export { FORCED_STATES, FORCE_STATE_MARKER, FORCE_STATE_PARAM, VARIANT_MARKER, VARIANT_PARAM, forceState, formatVariantParam, parseVariantParam, tokens, variants };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as requestBuffer, n as RequestPayload, r as RequestTransport, t as InspectRequest } from "../requests-CJrUf465.js";
|
|
2
2
|
import { t as InspectAdapter } from "../adapter-BYoxPYTI.js";
|
|
3
|
-
import { a as replay, c as isSensitiveKey, d as redactUrl, i as InspectFilter, l as redactBody, n as InspectOptions, o as replayBlocker, r as inspect, s as REDACTED, t as INSPECT_CAPABILITY, u as redactHeaders } from "../index-
|
|
3
|
+
import { a as replay, c as isSensitiveKey, d as redactUrl, i as InspectFilter, l as redactBody, n as InspectOptions, o as replayBlocker, r as inspect, s as REDACTED, t as INSPECT_CAPABILITY, u as redactHeaders } from "../index-BR5OB7DO.js";
|
|
4
4
|
export { INSPECT_CAPABILITY, type InspectAdapter, type InspectFilter, InspectOptions, type InspectRequest, REDACTED, type RequestPayload, type RequestTransport, inspect, isSensitiveKey, redactBody, redactHeaders, redactUrl, replay, replayBlocker, requestBuffer };
|
package/dist/plugins/inspect.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { d as REDACTED, f as isSensitiveKey, h as redactUrl, l as requestBuffer, m as redactHeaders, p as redactBody } from "../requests-BwD6MKEq.js";
|
|
2
|
-
import { i as replayBlocker, n as inspect, r as replay, t as INSPECT_CAPABILITY } from "../inspect-
|
|
2
|
+
import { i as replayBlocker, n as inspect, r as replay, t as INSPECT_CAPABILITY } from "../inspect-CSkm8tn3.js";
|
|
3
3
|
export { INSPECT_CAPABILITY, REDACTED, inspect, isSensitiveKey, redactBody, redactHeaders, redactUrl, replay, replayBlocker, requestBuffer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { a as CaptureOptions, n as RequestPayload, r as RequestTransport, t as InspectRequest } from "../requests-CJrUf465.js";
|
|
2
2
|
import { n as CaptureKind, t as CaptureEntry } from "../capture-buffer-Bbbo6omF.js";
|
|
3
|
-
import { n as observe, r as HudUserInfo, t as ObserveOptions } from "../index-
|
|
3
|
+
import { n as observe, r as HudUserInfo, t as ObserveOptions } from "../index-BNoPbSYD.js";
|
|
4
4
|
export { type CaptureEntry, type CaptureKind, type CaptureOptions, type HudUserInfo, type InspectRequest, ObserveOptions, type RequestPayload, type RequestTransport, observe };
|
package/dist/plugins/observe.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as observe } from "../observe-
|
|
1
|
+
import { t as observe } from "../observe-CBNLU148.js";
|
|
2
2
|
export { observe };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as HudRoutes } from "../../plugins-BZT-1LBe.js";
|
|
2
2
|
import { a as CiSnapshot, c as TelemetryRange, i as CiRun, l as TelemetryResponse, n as CiProvider, o as CiState, r as CiResponse, s as TelemetryProvider, t as CiDeployment, u as TelemetrySnapshot } from "../../types-f3jlNxzw.js";
|
|
3
3
|
//#region src/plugins/ops/errors.d.ts
|
|
4
4
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as definePlugin } from "../../plugins-
|
|
1
|
+
import { i as definePlugin } from "../../plugins-CcW_K7c2.js";
|
|
2
2
|
import { a as OPS_CAPABILITY, n as combineStates } from "../../state-CjjZPjPJ.js";
|
|
3
3
|
import { t as TELEMETRY_RANGES } from "../../types-B-ulf2Jp.js";
|
|
4
4
|
//#region src/plugins/ops/errors.ts
|
package/dist/plugins/ops.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as HudBadge, u as HudPluginProps } from "../plugins-BZT-1LBe.js";
|
|
2
2
|
import { c as TelemetryRange, i as CiRun, l as TelemetryResponse, o as CiState, r as CiResponse, t as CiDeployment } from "../types-f3jlNxzw.js";
|
|
3
3
|
//#region src/plugins/ops/index.d.ts
|
|
4
4
|
declare function OpsPill({ ctx }: HudPluginProps): import("react").JSX.Element;
|
|
5
|
+
/** The CI state as a rail badge: off until the server answers or when no provider is configured. */
|
|
6
|
+
declare function useOpsBadge({ ctx }: HudPluginProps): HudBadge;
|
|
5
7
|
export interface OpsOptions {
|
|
6
8
|
/** Show the CI section and the CI state in the pill. Default true. */
|
|
7
9
|
ci?: boolean;
|
|
@@ -19,8 +21,10 @@ export declare function ops({ ci, telemetry }?: OpsOptions): {
|
|
|
19
21
|
readonly id: "ops";
|
|
20
22
|
readonly title: "Ops";
|
|
21
23
|
readonly capability: "cicd.read";
|
|
24
|
+
readonly icon: import("react").ComponentType;
|
|
22
25
|
readonly panel: ({ ctx }: HudPluginProps) => import("react").JSX.Element;
|
|
23
26
|
readonly pill?: typeof OpsPill;
|
|
27
|
+
readonly badge?: typeof useOpsBadge;
|
|
24
28
|
readonly pillPriority: 10;
|
|
25
29
|
};
|
|
26
30
|
//#endregion
|
package/dist/plugins/ops.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { i as
|
|
1
|
+
import { i as hudIcon } from "../icons-ByDyNq_E.js";
|
|
2
|
+
import { a as ratingTone, i as definePlugin } from "../plugins-CcW_K7c2.js";
|
|
2
3
|
import { a as OPS_CAPABILITY, i as stateRating, r as stateLabel, t as CI_POLL_MS } from "../state-CjjZPjPJ.js";
|
|
3
|
-
import { t as usePoll } from "../poll-
|
|
4
|
+
import { t as usePoll } from "../poll-Dm0OijM4.js";
|
|
4
5
|
import { lazy } from "react";
|
|
5
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
//#region src/plugins/ops/index.tsx
|
|
7
|
-
const Panel = lazy(() => import("../ops-panel-
|
|
8
|
+
const Panel = lazy(() => import("../ops-panel-DHhAnChL.js"));
|
|
8
9
|
function OpsPill({ ctx }) {
|
|
9
10
|
const { data, error } = usePoll(ctx, "/ci", CI_POLL_MS);
|
|
10
11
|
const label = !data && error ? "error" : !data ? "–" : !data.configured ? "off" : stateLabel(data.state);
|
|
@@ -13,6 +14,13 @@ function OpsPill({ ctx }) {
|
|
|
13
14
|
"data-rating": data ? stateRating(data.state) : void 0
|
|
14
15
|
}), `CI ${label}`] });
|
|
15
16
|
}
|
|
17
|
+
/** The CI state as a rail badge: off until the server answers or when no provider is configured. */
|
|
18
|
+
function useOpsBadge({ ctx }) {
|
|
19
|
+
const { data, error } = usePoll(ctx, "/ci", CI_POLL_MS);
|
|
20
|
+
if (!data) return { tone: error ? "poor" : "off" };
|
|
21
|
+
if (!data.configured) return { tone: "off" };
|
|
22
|
+
return { tone: ratingTone(stateRating(data.state)) ?? "off" };
|
|
23
|
+
}
|
|
16
24
|
/**
|
|
17
25
|
* CI and telemetry: the pill shows the CI state of the branch the server runs
|
|
18
26
|
* on, the panel lists recent runs, the deployment (when the CI provider knows
|
|
@@ -32,8 +40,12 @@ function ops({ ci = true, telemetry = true } = {}) {
|
|
|
32
40
|
id: "ops",
|
|
33
41
|
title: "Ops",
|
|
34
42
|
capability: OPS_CAPABILITY,
|
|
43
|
+
icon: hudIcon("git-branch"),
|
|
35
44
|
panel: OpsPanel,
|
|
36
|
-
...ci ? {
|
|
45
|
+
...ci ? {
|
|
46
|
+
pill: OpsPill,
|
|
47
|
+
badge: useOpsBadge
|
|
48
|
+
} : {},
|
|
37
49
|
pillPriority: 10
|
|
38
50
|
});
|
|
39
51
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as definePlugin } from "../../plugins-
|
|
1
|
+
import { i as definePlugin } from "../../plugins-CcW_K7c2.js";
|
|
2
2
|
import { n as ROUTES_ID, t as ROUTES_CAPABILITY } from "../../meta-Bv0sEao3.js";
|
|
3
3
|
import { i as scanRoutes, n as findPages, t as buildUrls } from "../../scan-DzJNXqOk.js";
|
|
4
4
|
//#region src/plugins/routes/server.ts
|
package/dist/plugins/routes.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as RouteUrl, i as RouteSegment, n as ROUTES_ID, o as RoutesResponse, r as RouteEntry, t as ROUTES_CAPABILITY } from "../meta-C_G7MB5w.js";
|
|
2
|
-
import { t as routes } from "../index-
|
|
2
|
+
import { t as routes } from "../index-B1vHAY9p.js";
|
|
3
3
|
export { ROUTES_CAPABILITY, ROUTES_ID, type RouteEntry, type RouteSegment, type RouteUrl, type RoutesResponse, routes };
|
package/dist/plugins/routes.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { i as
|
|
1
|
+
import { i as hudIcon } from "../icons-ByDyNq_E.js";
|
|
2
|
+
import { i as definePlugin, n as HudApiError } from "../plugins-CcW_K7c2.js";
|
|
2
3
|
import { n as ROUTES_ID, t as ROUTES_CAPABILITY } from "../meta-Bv0sEao3.js";
|
|
3
4
|
import { useCallback, useEffect, useState } from "react";
|
|
4
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -209,6 +210,7 @@ function routes() {
|
|
|
209
210
|
id: ROUTES_ID,
|
|
210
211
|
title: "Routes",
|
|
211
212
|
capability: ROUTES_CAPABILITY,
|
|
213
|
+
icon: hudIcon("route"),
|
|
212
214
|
panel: RoutesPanel
|
|
213
215
|
});
|
|
214
216
|
}
|
package/dist/plugins/seo.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SeoLevel, i as SeoGroup, n as SeoSnapshot, o as runSeoChecks, r as SeoCheck, t as seo } from "../index-
|
|
1
|
+
import { a as SeoLevel, i as SeoGroup, n as SeoSnapshot, o as runSeoChecks, r as SeoCheck, t as seo } from "../index-CQXiuMZQ.js";
|
|
2
2
|
export { type SeoCheck, type SeoGroup, type SeoLevel, type SeoSnapshot, runSeoChecks, seo };
|
package/dist/plugins/seo.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as runSeoChecks, t as seo } from "../seo-
|
|
1
|
+
import { a as runSeoChecks, t as seo } from "../seo-BnnGq_vj.js";
|
|
2
2
|
export { runSeoChecks, seo };
|
package/dist/plugins/vitals.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as VitalsSnapshot, i as VitalRating, n as Vital, r as VitalName, t as vitals } from "../index-
|
|
1
|
+
import { a as VitalsSnapshot, i as VitalRating, n as Vital, r as VitalName, t as vitals } from "../index-D-hI-DRJ.js";
|
|
2
2
|
export { type Vital, type VitalName, type VitalRating, type VitalsSnapshot, vitals };
|
package/dist/plugins/vitals.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { i as
|
|
1
|
+
import { i as hudIcon } from "../icons-ByDyNq_E.js";
|
|
2
|
+
import { a as ratingTone, i as definePlugin } from "../plugins-CcW_K7c2.js";
|
|
2
3
|
import { i as useVitals, n as formatVital, r as startVitals } from "../store-CQqIIKTc.js";
|
|
3
4
|
import { lazy, useEffect } from "react";
|
|
4
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -14,11 +15,18 @@ function VitalsPill() {
|
|
|
14
15
|
"data-rating": lcp?.rating
|
|
15
16
|
}), lcp ? `LCP ${formatVital("LCP", lcp.value)}` : "LCP –"] });
|
|
16
17
|
}
|
|
18
|
+
/** The LCP rating as a rail badge; nothing until it is reported. */
|
|
19
|
+
function useVitalsBadge() {
|
|
20
|
+
const tone = ratingTone(useVitals().LCP?.rating);
|
|
21
|
+
return tone ? { tone } : null;
|
|
22
|
+
}
|
|
17
23
|
/** Core Web Vitals: LCP in the pill, all five metrics in the panel. Client only. */
|
|
18
24
|
function vitals() {
|
|
19
25
|
return definePlugin({
|
|
20
26
|
id: "vitals",
|
|
21
27
|
title: "Vitals",
|
|
28
|
+
icon: hudIcon("gauge"),
|
|
29
|
+
badge: useVitalsBadge,
|
|
22
30
|
pill: VitalsPill,
|
|
23
31
|
panel: VitalsPanel
|
|
24
32
|
});
|