@hansenexus/hud 0.6.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +172 -25
  2. package/dist/{a11y-B5DUaiCs.js → a11y-BGWw4jBr.js} +14 -2
  3. package/dist/{a11y-panel-p_t4eD7p.js → a11y-panel-DcfXnPHk.js} +1 -1
  4. package/dist/{access-D_ewAEJG.d.ts → access-CwPCPsv0.d.ts} +1 -1
  5. package/dist/{access-panel-CEfTr9ZI.js → access-panel-grAsMEDk.js} +1 -1
  6. package/dist/auto/runtime.d.ts +9 -9
  7. package/dist/auto.d.ts +2 -2
  8. package/dist/auto.js +5 -5
  9. package/dist/cli.js +34 -1
  10. package/dist/{data-panel-BmcHCQnM.js → data-panel-B6WPNmV6.js} +1 -1
  11. package/dist/{data-store-ChF1td_P.js → data-store-FNTQKMkG.js} +1 -1
  12. package/dist/{define-hud-CHPedaQ5.d.ts → define-hud-B0aFXrcK.d.ts} +15 -5
  13. package/dist/{design-D0kGgPoP.js → design-BIXY1-Ex.js} +45 -11
  14. package/dist/{dispatch-panel-B-xr_Giy.js → dispatch-panel-BDHgMhOk.js} +1 -1
  15. package/dist/{force-state-panel-_otVYh9i.js → force-state-panel-D5oDydLs.js} +1 -1
  16. package/dist/{handler-BpVhxEmU.js → handler-BKzaOhlJ.js} +1 -1
  17. package/dist/{handler-DtYVCZY6.d.ts → handler-BmFhaA2D.d.ts} +1 -1
  18. package/dist/icons-ByDyNq_E.js +71 -0
  19. package/dist/index-5B7foZut.d.ts +116 -0
  20. package/dist/{index-ReFbhQ9p.d.ts → index-B2KCKkN0.d.ts} +5 -0
  21. package/dist/index-B7qaEUgh.d.ts +44 -0
  22. package/dist/{index-DcH9V3cU.d.ts → index-BGFyuJyN.d.ts} +3 -0
  23. package/dist/{index-Hhh7OXzU.d.ts → index-BeqWehuh.d.ts} +44 -10
  24. package/dist/{index-DstI_ike.d.ts → index-BqKysxTq.d.ts} +5 -1
  25. package/dist/{index-DqOyNf1u.d.ts → index-D97Fnoie.d.ts} +4 -2
  26. package/dist/{index-CwfX-W87.d.ts → index-DS0yT0c-.d.ts} +3 -0
  27. package/dist/{index-BAV_1W8a.d.ts → index-DvlCkGB1.d.ts} +3 -1
  28. package/dist/index.d.ts +4 -4
  29. package/dist/index.js +1226 -256
  30. package/dist/{inspect-C9Ft8fqn.js → inspect-CSkm8tn3.js} +14 -2
  31. package/dist/{inspect-root-BkaupBMp.js → inspect-root-CmiFX0e5.js} +1 -1
  32. package/dist/navigation-CX6AXm7H.js +176 -0
  33. package/dist/next.d.ts +4 -1
  34. package/dist/next.js +12 -1
  35. package/dist/{observe-CdDnDBRP.js → observe-CBNLU148.js} +12 -2
  36. package/dist/{observe-panel-Cgp1M8oT.js → observe-panel-zU5LD-U9.js} +1 -1
  37. package/dist/obstacles-CCmRFTcZ.js +176 -0
  38. package/dist/{ops-panel-CEqDe_UT.js → ops-panel-DHhAnChL.js} +1 -1
  39. package/dist/plugins/a11y.d.ts +1 -1
  40. package/dist/plugins/a11y.js +1 -1
  41. package/dist/plugins/access/server.d.ts +3 -3
  42. package/dist/plugins/access/server.js +1 -1
  43. package/dist/plugins/access.d.ts +5 -2
  44. package/dist/plugins/access.js +18 -5
  45. package/dist/plugins/agent/server.js +2 -2
  46. package/dist/plugins/agent.d.ts +4 -2
  47. package/dist/plugins/agent.js +6 -3
  48. package/dist/plugins/capture/server.js +1 -1
  49. package/dist/plugins/capture.d.ts +2 -2
  50. package/dist/plugins/capture.js +1 -1
  51. package/dist/plugins/data/server.d.ts +1 -1
  52. package/dist/plugins/data/server.js +2 -2
  53. package/dist/plugins/data.d.ts +1 -1
  54. package/dist/plugins/data.js +30 -9
  55. package/dist/plugins/design/server.d.ts +55 -15
  56. package/dist/plugins/design/server.js +188 -123
  57. package/dist/plugins/design.d.ts +3 -3
  58. package/dist/plugins/design.js +1 -1
  59. package/dist/plugins/inspect.d.ts +1 -1
  60. package/dist/plugins/inspect.js +1 -1
  61. package/dist/plugins/observe.d.ts +1 -1
  62. package/dist/plugins/observe.js +1 -1
  63. package/dist/plugins/ops/server.d.ts +1 -1
  64. package/dist/plugins/ops/server.js +1 -1
  65. package/dist/plugins/ops.d.ts +5 -1
  66. package/dist/plugins/ops.js +16 -4
  67. package/dist/plugins/routes/server.d.ts +1 -1
  68. package/dist/plugins/routes/server.js +1 -1
  69. package/dist/plugins/routes.d.ts +3 -3
  70. package/dist/plugins/routes.js +384 -53
  71. package/dist/plugins/seo.d.ts +1 -1
  72. package/dist/plugins/seo.js +1 -1
  73. package/dist/plugins/vitals.d.ts +1 -1
  74. package/dist/plugins/vitals.js +9 -1
  75. package/dist/{plugins-DVy_vaYr.js → plugins-CcW_K7c2.js} +9 -1
  76. package/dist/{plugins-BZvDqGx5.d.ts → plugins-pL2CoWzI.d.ts} +39 -3
  77. package/dist/{poll-CjKsWZi8.js → poll-Dm0OijM4.js} +1 -1
  78. package/dist/same-origin-BHuZO1_H.js +36 -0
  79. package/dist/{seo-Dq9q_QkO.js → seo-BnnGq_vj.js} +13 -2
  80. package/dist/{seo-panel-CfiY-TnT.js → seo-panel-BThx56KM.js} +1 -1
  81. package/dist/server.d.ts +2 -2
  82. package/dist/server.js +2 -2
  83. package/dist/{sessions-panel-COvhPAzv.js → sessions-panel-MknKsTge.js} +1 -1
  84. package/dist/store.d.ts +1 -1
  85. package/dist/store.js +2 -2
  86. package/dist/{meta-C_G7MB5w.d.ts → types-Dc6JWZR7.d.ts} +6 -6
  87. package/dist/{unlock-store-4V3vR4Eg.js → unlock-store-CrGXQx1V.js} +1 -1
  88. package/dist/variant-bar-BzZ0ln-C.js +768 -0
  89. package/dist/variant-picks-Byc0hC8a.js +144 -0
  90. package/dist/variants-export-vEtZ-OGC.js +75 -0
  91. package/dist/{variants-panel-BDoSkwBJ.js → variants-panel-D23v5KIp.js} +72 -55
  92. package/dist/variants-types-BOsZ5fDz.js +65 -0
  93. package/dist/variants-types-VkW7vFZF.d.ts +139 -0
  94. package/dist/variants.d.ts +1 -1
  95. package/dist/variants.js +1 -1
  96. package/dist/vite.d.ts +2 -2
  97. package/dist/vite.js +1 -1
  98. package/package.json +1 -1
  99. package/dist/index-BnQ0dTZf.d.ts +0 -19
  100. package/dist/index-gCZBO53s.d.ts +0 -73
  101. package/dist/same-origin-BGet22CC.js +0 -21
  102. package/dist/variants-types-CcRf119M.d.ts +0 -63
@@ -1,4 +1,4 @@
1
- import { a as HudHttpMethod, o as HudPlugin, r as HudCapability } from "./plugins-BZvDqGx5.js";
1
+ import { a as HudCapability, c as HudPlugin, s as HudHttpMethod } from "./plugins-pL2CoWzI.js";
2
2
  //#region src/server/handler.d.ts
3
3
  /**
4
4
  * Decides whether a request may reach a plugin route. Return a `Response` to
@@ -0,0 +1,71 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ //#region src/core/icons.tsx
3
+ /**
4
+ * The rail's icon set: lucide shapes as path data, one `<symbol>` each in a
5
+ * sprite the shell renders once inside its shadow root. No icon library: the
6
+ * core budget is 40 KB gzip and a plugin's icon is one `<use>`.
7
+ */
8
+ const HUD_ICON_PATHS = {
9
+ bug: "m8 2 1.88 1.88M14.12 3.88 16 2M9 7.13v-1a3.003 3.003 0 1 1 6 0v1M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6M12 20v-9M6.53 9C4.6 8.8 3 7.1 3 5M6 13H2M3 21c0-2.1 1.7-3.9 3.8-4M20.97 5c0 2.1-1.6 3.8-3.5 4M22 13h-4M17.2 17c2.1.1 3.8 1.9 3.8 4",
10
+ database: "M3 5a9 3 0 1 0 18 0 9 3 0 1 0-18 0M3 5v14a9 3 0 0 0 18 0V5M3 12a9 3 0 0 0 18 0",
11
+ "git-branch": "M6 3v12M18 9a9 9 0 0 1-9 9M21 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0M9 18a3 3 0 1 1-6 0 3 3 0 0 1 6 0",
12
+ send: "M14.5 10.5 22 3M22 3l-7 19-4-8.5L2 9z",
13
+ terminal: "m4 17 6-6-6-6M12 19h8",
14
+ palette: "M13.5 6.5h.01M17.5 10.5h.01M8.5 7.5h.01M6.5 12.5h.01M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.9 0 1.6-.7 1.6-1.6 0-.4-.2-.8-.4-1.1-.3-.3-.4-.7-.4-1.1 0-.9.7-1.6 1.6-1.6H16c3.3 0 6-2.7 6-6 0-4.9-4.5-8.6-10-8.6",
15
+ layers: "m12 2 9 4.5-9 4.5-9-4.5zM3 12l9 4.5 9-4.5M3 17l9 4.5 9-4.5",
16
+ toggle: "M8 6h8a6 6 0 0 1 0 12H8A6 6 0 0 1 8 6zM19 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0",
17
+ crosshair: "M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0M12 3v4M12 17v4M3 12h4M17 12h4",
18
+ ellipsis: "M6 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0M13 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0M20 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0",
19
+ plug: "M12 22v-5M9 8V2M15 8V2M18 8H6v5a6 6 0 0 0 12 0V8z",
20
+ gauge: "m12 14 4-4M3.34 19a10 10 0 1 1 17.32 0",
21
+ lock: "M7 11V7a5 5 0 0 1 10 0v4M5 11h14v10H5z",
22
+ search: "m21 21-4.35-4.35M17 11a6 6 0 1 1-12 0 6 6 0 0 1 12 0",
23
+ accessibility: "M17 4a1 1 0 1 1-2 0 1 1 0 0 1 2 0m1 15 1-7-6 1M5 8l3-3 5.5 3-2.36 3.5M4.24 14.5a5 5 0 0 0 6.88 6M13.76 17.5a5 5 0 0 0-6.88-6",
24
+ activity: "M22 12h-4l-3 9L9 3l-3 9H2",
25
+ route: "M9 19a3 3 0 1 1-6 0 3 3 0 0 1 6 0M21 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",
26
+ wrench: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94z",
27
+ x: "M18 6 6 18M6 6l12 12",
28
+ grip: "M10 6h.01M14 6h.01M10 12h.01M14 12h.01M10 18h.01M14 18h.01",
29
+ "chevron-up": "m18 15-6-6-6 6",
30
+ "chevron-down": "m6 9 6 6 6-6",
31
+ eye: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12zM15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0",
32
+ "eye-off": "M10.7 5.1A10 10 0 0 1 12 5c6.5 0 10 7 10 7a17 17 0 0 1-2.3 3.2M6.6 6.6A16 16 0 0 0 2 12s3.5 7 10 7a10 10 0 0 0 5.4-1.6M2 2l20 20M9.9 9.9a3 3 0 1 0 4.2 4.2"
33
+ };
34
+ const HUD_ICON_NAMES = Object.keys(HUD_ICON_PATHS);
35
+ const symbolId = (name) => `hud-i-${name}`;
36
+ /** The sprite: every icon as a `<symbol>`, rendered once by the shell. */
37
+ function IconSprite() {
38
+ return /* @__PURE__ */ jsxs("svg", {
39
+ "aria-hidden": "true",
40
+ style: { display: "none" },
41
+ children: [/* @__PURE__ */ jsx("title", { children: "HUD icons" }), HUD_ICON_NAMES.map((name) => /* @__PURE__ */ jsx("symbol", {
42
+ id: symbolId(name),
43
+ viewBox: "0 0 24 24",
44
+ children: /* @__PURE__ */ jsx("path", { d: HUD_ICON_PATHS[name] })
45
+ }, name))]
46
+ });
47
+ }
48
+ /** One icon from the sprite. `<use>` resolves the id inside the shadow root. */
49
+ function HudIconGlyph({ name }) {
50
+ return /* @__PURE__ */ jsx("svg", {
51
+ className: "icon",
52
+ "aria-hidden": "true",
53
+ children: /* @__PURE__ */ jsx("use", { href: `#${symbolId(name)}` })
54
+ });
55
+ }
56
+ const components = /* @__PURE__ */ new Map();
57
+ /**
58
+ * A plugin `icon` from the built-in set: `definePlugin({ icon: hudIcon("database") })`.
59
+ * The same name returns the same component, so plugin objects stay comparable.
60
+ */
61
+ function hudIcon(name) {
62
+ let found = components.get(name);
63
+ if (!found) {
64
+ found = () => /* @__PURE__ */ jsx(HudIconGlyph, { name });
65
+ found.displayName = `HudIcon(${name})`;
66
+ components.set(name, found);
67
+ }
68
+ return found;
69
+ }
70
+ //#endregion
71
+ export { hudIcon as i, HudIconGlyph as n, IconSprite as r, HUD_ICON_NAMES as t };
@@ -0,0 +1,116 @@
1
+ import { a as HudCapability, c as HudPlugin } from "./plugins-pL2CoWzI.js";
2
+ import { o as HudDock } from "./define-hud-B0aFXrcK.js";
3
+ import { ComponentType, ReactNode } from "react";
4
+ //#region src/core/grabber/outline.d.ts
5
+ interface ElementOutlineProps {
6
+ /** The element to outline; `null` renders nothing. */
7
+ element: Element | null;
8
+ label: string;
9
+ /** Called on Escape, on a pointer press outside the overlay's own root, or once the element leaves the DOM. */
10
+ onDismiss: () => void;
11
+ /** Scroll the element into view when it changes. Default true. */
12
+ reveal?: boolean;
13
+ }
14
+ /**
15
+ * Outlines one element with the grabber's overlay without entering grab mode:
16
+ * findings in a panel point at the page this way. The box follows scrolling
17
+ * and resizes; the outline goes away on Escape, on a press on the page, or
18
+ * when the element is removed.
19
+ */
20
+ declare function ElementOutline({ element, label, onDismiss, reveal }: ElementOutlineProps): import("react").JSX.Element;
21
+ //#endregion
22
+ //#region src/core/grabber/picker.d.ts
23
+ interface PickPoint {
24
+ clientX: number;
25
+ clientY: number;
26
+ }
27
+ interface ElementPickerProps {
28
+ active: boolean;
29
+ onPick: (element: Element, point: PickPoint) => void;
30
+ onCancel: () => void;
31
+ /** Banner text while active. */
32
+ hint?: string;
33
+ /** Label next to the hover outline. Default: the tag name. */
34
+ describe?: (element: Element) => string;
35
+ /** Extra elements to leave alone, on top of the picker's own shadow host. */
36
+ ignore?: (element: Element) => boolean;
37
+ }
38
+ /**
39
+ * Styles for the picker overlay. The picker renders where it is mounted, so
40
+ * the caller puts these into the same (shadow) root. Colours fall back when
41
+ * the `--hud-*` tokens are absent.
42
+ */
43
+ declare const PICKER_CSS = "\n.grab-layer { position: fixed; inset: 0; pointer-events: none; }\n.grab-hint {\n position: fixed;\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n padding: 3px 12px;\n border-radius: 0 0 6px 6px;\n white-space: nowrap;\n background: var(--hud-accent, #0369a1);\n color: var(--hud-accent-fg, #ffffff);\n font: 600 11px/1.5 var(--hud-mono, ui-monospace, monospace);\n}\n.grab-outline {\n position: fixed;\n border: 1.5px solid var(--hud-accent, #0369a1);\n background: color-mix(in srgb, var(--hud-accent, #0369a1) 8%, transparent);\n border-radius: 3px;\n}\n.grab-label {\n position: fixed;\n max-width: min(480px, calc(100vw - 8px));\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n padding: 1px 6px;\n border-radius: 3px;\n background: var(--hud-accent, #0369a1);\n color: var(--hud-accent-fg, #ffffff);\n font: 600 10px/1.6 var(--hud-mono, ui-monospace, monospace);\n}\n";
44
+ /**
45
+ * Click-to-pick controller: crosshair, hover outline with a label, the next
46
+ * click picks, Escape cancels. Events inside the picker's own shadow host
47
+ * (the HUD's pill and panels) pass through untouched, so panels stay usable
48
+ * and mounted during a grab.
49
+ */
50
+ declare function ElementPicker({ active, onPick, onCancel, hint, describe, ignore }: ElementPickerProps): import("react").JSX.Element;
51
+ //#endregion
52
+ //#region src/core/icons.d.ts
53
+ /**
54
+ * The rail's icon set: lucide shapes as path data, one `<symbol>` each in a
55
+ * sprite the shell renders once inside its shadow root. No icon library: the
56
+ * core budget is 40 KB gzip and a plugin's icon is one `<use>`.
57
+ */
58
+ declare const HUD_ICON_PATHS: {
59
+ readonly bug: "m8 2 1.88 1.88M14.12 3.88 16 2M9 7.13v-1a3.003 3.003 0 1 1 6 0v1M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6M12 20v-9M6.53 9C4.6 8.8 3 7.1 3 5M6 13H2M3 21c0-2.1 1.7-3.9 3.8-4M20.97 5c0 2.1-1.6 3.8-3.5 4M22 13h-4M17.2 17c2.1.1 3.8 1.9 3.8 4";
60
+ readonly database: "M3 5a9 3 0 1 0 18 0 9 3 0 1 0-18 0M3 5v14a9 3 0 0 0 18 0V5M3 12a9 3 0 0 0 18 0";
61
+ readonly "git-branch": "M6 3v12M18 9a9 9 0 0 1-9 9M21 6a3 3 0 1 1-6 0 3 3 0 0 1 6 0M9 18a3 3 0 1 1-6 0 3 3 0 0 1 6 0";
62
+ readonly send: "M14.5 10.5 22 3M22 3l-7 19-4-8.5L2 9z";
63
+ readonly terminal: "m4 17 6-6-6-6M12 19h8";
64
+ readonly palette: "M13.5 6.5h.01M17.5 10.5h.01M8.5 7.5h.01M6.5 12.5h.01M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.9 0 1.6-.7 1.6-1.6 0-.4-.2-.8-.4-1.1-.3-.3-.4-.7-.4-1.1 0-.9.7-1.6 1.6-1.6H16c3.3 0 6-2.7 6-6 0-4.9-4.5-8.6-10-8.6";
65
+ readonly layers: "m12 2 9 4.5-9 4.5-9-4.5zM3 12l9 4.5 9-4.5M3 17l9 4.5 9-4.5";
66
+ readonly toggle: "M8 6h8a6 6 0 0 1 0 12H8A6 6 0 0 1 8 6zM19 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0";
67
+ readonly crosshair: "M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0M12 3v4M12 17v4M3 12h4M17 12h4";
68
+ readonly ellipsis: "M6 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0M13 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0M20 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0";
69
+ readonly plug: "M12 22v-5M9 8V2M15 8V2M18 8H6v5a6 6 0 0 0 12 0V8z";
70
+ readonly gauge: "m12 14 4-4M3.34 19a10 10 0 1 1 17.32 0";
71
+ readonly lock: "M7 11V7a5 5 0 0 1 10 0v4M5 11h14v10H5z";
72
+ readonly search: "m21 21-4.35-4.35M17 11a6 6 0 1 1-12 0 6 6 0 0 1 12 0";
73
+ readonly accessibility: "M17 4a1 1 0 1 1-2 0 1 1 0 0 1 2 0m1 15 1-7-6 1M5 8l3-3 5.5 3-2.36 3.5M4.24 14.5a5 5 0 0 0 6.88 6M13.76 17.5a5 5 0 0 0-6.88-6";
74
+ readonly activity: "M22 12h-4l-3 9L9 3l-3 9H2";
75
+ readonly route: "M9 19a3 3 0 1 1-6 0 3 3 0 0 1 6 0M21 5a3 3 0 1 1-6 0 3 3 0 0 1 6 0M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15";
76
+ readonly wrench: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94z";
77
+ readonly x: "M18 6 6 18M6 6l12 12";
78
+ readonly grip: "M10 6h.01M14 6h.01M10 12h.01M14 12h.01M10 18h.01M14 18h.01";
79
+ readonly "chevron-up": "m18 15-6-6-6 6";
80
+ readonly "chevron-down": "m6 9 6 6 6-6";
81
+ readonly eye: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12zM15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0";
82
+ readonly "eye-off": "M10.7 5.1A10 10 0 0 1 12 5c6.5 0 10 7 10 7a17 17 0 0 1-2.3 3.2M6.6 6.6A16 16 0 0 0 2 12s3.5 7 10 7a10 10 0 0 0 5.4-1.6M2 2l20 20M9.9 9.9a3 3 0 1 0 4.2 4.2";
83
+ };
84
+ type HudIconName = keyof typeof HUD_ICON_PATHS;
85
+ declare const HUD_ICON_NAMES: readonly HudIconName[];
86
+ /**
87
+ * A plugin `icon` from the built-in set: `definePlugin({ icon: hudIcon("database") })`.
88
+ * The same name returns the same component, so plugin objects stay comparable.
89
+ */
90
+ declare function hudIcon(name: HudIconName): ComponentType;
91
+ //#endregion
92
+ //#region src/shell/hud.d.ts
93
+ interface HudProps {
94
+ /** App slug: labels the dock and keys the persisted layout. */
95
+ appSlug: string;
96
+ /** Label of the env chip. Default "DEV". */
97
+ envLabel?: string;
98
+ /** Client halves of the plugins, in dock order. Keep the array stable across renders. */
99
+ plugins?: readonly HudPlugin[];
100
+ /** Base path of the plugin routes. Default "/api/hud". */
101
+ apiBase?: string;
102
+ /** Capability check. Default: grant all (core assumes development). Keep it stable. */
103
+ can?: (capability: HudCapability) => boolean;
104
+ /** The edge rail (default) or the horizontal corner pill. */
105
+ dock?: HudDock;
106
+ }
107
+ /**
108
+ * The HUD shell: a shadow-rooted dock (rail or pill) and floating panels.
109
+ *
110
+ * It renders unconditionally. Keeping it out of production builds is the
111
+ * loader's job, at the import site, so a bundler can drop the whole module
112
+ * (see `@hansenexus/hud/next`).
113
+ */
114
+ declare function Hud({ appSlug, envLabel, plugins, apiBase, can, dock }: HudProps): import("react").JSX.Element;
115
+ //#endregion
116
+ export { hudIcon as a, PICKER_CSS as c, ElementOutlineProps as d, HudIconName as i, PickPoint as l, HudProps as n, ElementPicker as o, HUD_ICON_NAMES as r, ElementPickerProps as s, Hud as t, ElementOutline as u };
@@ -1,3 +1,4 @@
1
+ import { r as HudBadge } from "./plugins-pL2CoWzI.js";
1
2
  import { Metric } from "web-vitals";
2
3
  //#region src/plugins/vitals/vitals-panel.d.ts
3
4
  declare function VitalsPanel(): import("react").JSX.Element;
@@ -14,10 +15,14 @@ type VitalsSnapshot = Partial<Record<VitalName, Vital>>;
14
15
  //#endregion
15
16
  //#region src/plugins/vitals/index.d.ts
16
17
  declare function VitalsPill(): import("react").JSX.Element;
18
+ /** The LCP rating as a rail badge; nothing until it is reported. */
19
+ declare function useVitalsBadge(): HudBadge | null;
17
20
  /** Core Web Vitals: LCP in the pill, all five metrics in the panel. Client only. */
18
21
  declare function vitals(): {
19
22
  readonly id: "vitals";
20
23
  readonly title: "Vitals";
24
+ readonly icon: import("react").ComponentType;
25
+ readonly badge: typeof useVitalsBadge;
21
26
  readonly pill: typeof VitalsPill;
22
27
  readonly panel: import("react").LazyExoticComponent<typeof VitalsPanel>;
23
28
  };
@@ -0,0 +1,44 @@
1
+ import { l as HudPluginContext, u as HudPluginProps } from "./plugins-pL2CoWzI.js";
2
+ import "./index-5B7foZut.js";
3
+ //#region src/plugins/routes/index.d.ts
4
+ interface RoutesOptions {
5
+ /**
6
+ * Shortcut of the "Go to route" command, which opens the panel with the
7
+ * filter focused and its text selected. Default `mod+shift+r`.
8
+ */
9
+ shortcut?: string;
10
+ /**
11
+ * Path globs listed first, above the groups: `["/*\/dev/*"]` pins every dev
12
+ * page. `*` matches within a segment, `**` across segments. Rows pinned from
13
+ * the panel join them, kept per app in `localStorage`.
14
+ */
15
+ pinned?: readonly string[];
16
+ /**
17
+ * How a row navigates. Default: Next's router (`window.next.router.push`)
18
+ * when the page has one, else `location.assign`.
19
+ */
20
+ navigate?: (url: string) => void;
21
+ }
22
+ /**
23
+ * Route index and quick switcher: every page of the app's `app/` tree,
24
+ * dynamic segments filled from the fixtures the server half knows, pinned
25
+ * and recent routes first, one keystroke away. Client half; the scanner lives
26
+ * in `@hansenexus/hud/plugins/routes/server`, which also feeds the `hud sweep`
27
+ * CLI.
28
+ */
29
+ declare function routes({ shortcut, pinned, navigate }?: RoutesOptions): {
30
+ readonly id: "routes";
31
+ readonly title: "Routes";
32
+ readonly capability: "routes.read";
33
+ readonly icon: import("react").ComponentType;
34
+ readonly badge: ({ ctx }: HudPluginProps) => null;
35
+ readonly panel: ({ ctx }: HudPluginProps) => import("react").JSX.Element;
36
+ readonly commands: readonly [{
37
+ readonly id: "go";
38
+ readonly title: "Go to route";
39
+ readonly shortcut: string;
40
+ readonly run: (ctx: HudPluginContext) => void;
41
+ }];
42
+ };
43
+ //#endregion
44
+ export { routes as n, RoutesOptions as t };
@@ -1,3 +1,4 @@
1
+ import { r as HudBadge } from "./plugins-pL2CoWzI.js";
1
2
  //#region src/plugins/seo/seo-panel.d.ts
2
3
  /** Every check grouped, worst level first in the summary; head changes re-check automatically. */
3
4
  declare function SeoPanel(): import("react").JSX.Element;
@@ -36,6 +37,8 @@ interface SeoSnapshot {
36
37
  declare function seo(): {
37
38
  readonly id: "seo";
38
39
  readonly title: "SEO";
40
+ readonly icon: import("react").ComponentType;
41
+ readonly badge: () => HudBadge | null;
39
42
  readonly pill: () => import("react").JSX.Element;
40
43
  readonly panel: import("react").LazyExoticComponent<typeof SeoPanel>;
41
44
  readonly commands: readonly [{
@@ -1,4 +1,4 @@
1
- import { c as HudPluginProps } from "./plugins-BZvDqGx5.js";
1
+ import { r as HudBadge, u as HudPluginProps } from "./plugins-pL2CoWzI.js";
2
2
  //#region src/plugins/design/force-state-panel.d.ts
3
3
  /**
4
4
  * Toggles every mounted `StateBoundary` between its real state and a forced
@@ -13,6 +13,8 @@ declare function ForceStatePanel(): import("react").JSX.Element;
13
13
  * core `.dot`, since the plugin stylesheet only loads with the panel.
14
14
  */
15
15
  declare function ForceStatePill(): import("react").JSX.Element;
16
+ /** The rail badge: the forced count, nothing while no boundary is forced. */
17
+ declare function useForceStateBadge(): HudBadge | null;
16
18
  //#endregion
17
19
  //#region src/plugins/design/tokens.d.ts
18
20
  interface HudTokenDescriptor {
@@ -43,6 +45,16 @@ interface HudTokensAdapter {
43
45
  sourceHint?: string;
44
46
  }
45
47
  //#endregion
48
+ //#region src/plugins/design/variant-pages.d.ts
49
+ /** One stop of the variant bar: a page with a `VariantGroup` on it. */
50
+ interface HudVariantPage {
51
+ /** The `VariantGroup` id the page decides. */
52
+ group: string;
53
+ label: string;
54
+ /** Where the page is: `/pricing`, `#/settings` or `/app#/settings`. */
55
+ href: string;
56
+ }
57
+ //#endregion
46
58
  //#region src/plugins/design/variants-panel.d.ts
47
59
  interface HudVariantCategory {
48
60
  id: string;
@@ -72,7 +84,7 @@ interface HudGenerateResult {
72
84
  */
73
85
  interface HudVariantsAdapter {
74
86
  /** The categories, or a loader the panel calls each time it opens. */
75
- categories: readonly HudVariantCategory[] | (() => Promise<readonly HudVariantCategory[]>);
87
+ categories?: readonly HudVariantCategory[] | (() => Promise<readonly HudVariantCategory[]>);
76
88
  /** Deep link to the full review dashboard, where voting happens. */
77
89
  reviewHref?: string;
78
90
  /** Deep link for one category's drill-in page. */
@@ -95,19 +107,39 @@ interface HudVariantsAdapter {
95
107
  declare function tokens(adapter: HudTokensAdapter): {
96
108
  readonly id: "tokens";
97
109
  readonly title: "Tokens";
110
+ readonly icon: import("react").ComponentType;
98
111
  readonly panel: () => import("react").JSX.Element;
99
112
  };
113
+ interface HudVariantsOptions extends HudVariantsAdapter {
114
+ /**
115
+ * The pages with a `VariantGroup`, in the order the owner walks them. With
116
+ * them the variant bar shows at the bottom of the screen, in development
117
+ * builds only. Keep the array stable.
118
+ */
119
+ pages?: readonly HudVariantPage[];
120
+ /** How the bar goes to a page. Default: Next's router when the page has one, else a full load. */
121
+ navigate?: (href: string) => void;
122
+ }
100
123
  /**
101
124
  * The page's live variant groups (`VariantGroup` from `@hansenexus/hud/variants`)
102
- * with a switcher, agent scores from the storage seam and Decide, which
103
- * needs `variants.decide` and `variantsServer()` from
104
- * `@hansenexus/hud/plugins/design/server`. An adapter adds the app's own
105
- * variant registry and the generate-brief queue (`variants.generate`). Client only.
125
+ * with a switcher and agent scores from the storage seam. `pages` adds the
126
+ * variant bar, which steps through them and records picks and notes. Picks
127
+ * need `variants.decide` and `variantsServer()` from
128
+ * `@hansenexus/hud/plugins/design/server`. The adapter fields add the app's
129
+ * own variant registry and the generate-brief queue (`variants.generate`).
130
+ * Client only.
106
131
  */
107
- declare function variants(adapter?: HudVariantsAdapter): {
108
- readonly id: "variants";
109
- readonly title: "Variants";
132
+ declare function variants(options?: HudVariantsOptions): {
133
+ id: string;
134
+ title: string;
135
+ icon: import("react").ComponentType;
136
+ panel: ({ ctx }: HudPluginProps) => import("react").JSX.Element;
137
+ } | {
138
+ readonly id: string;
139
+ readonly title: string;
140
+ readonly icon: import("react").ComponentType;
110
141
  readonly panel: ({ ctx }: HudPluginProps) => import("react").JSX.Element;
142
+ readonly overlay: ({ ctx }: HudPluginProps) => import("react").JSX.Element;
111
143
  };
112
144
  /**
113
145
  * Forces the page's `StateBoundary`s (`@hansenexus/hud/state-boundary`) to
@@ -117,6 +149,8 @@ declare function forceState(): {
117
149
  readonly id: "states";
118
150
  readonly title: "States";
119
151
  readonly capability: "state.force";
152
+ readonly icon: import("react").ComponentType;
153
+ readonly badge: typeof useForceStateBadge;
120
154
  readonly pill: typeof ForceStatePill;
121
155
  readonly panel: import("react").LazyExoticComponent<typeof ForceStatePanel>;
122
156
  readonly commands: readonly [{
@@ -126,4 +160,4 @@ declare function forceState(): {
126
160
  }];
127
161
  };
128
162
  //#endregion
129
- export { HudGenerateResult as a, HudTokenDescriptor as c, HudTokensAdapter as d, HudGenerateRequest as i, HudTokenGroup as l, tokens as n, HudVariantCategory as o, variants as r, HudVariantsAdapter as s, forceState as t, HudTokenScope as u };
163
+ export { HudGenerateRequest as a, HudVariantsAdapter as c, HudTokenGroup as d, HudTokenScope as f, variants as i, HudVariantPage as l, forceState as n, HudGenerateResult as o, HudTokensAdapter as p, tokens as r, HudVariantCategory as s, HudVariantsOptions as t, HudTokenDescriptor as u };
@@ -1,4 +1,4 @@
1
- import { c as HudPluginProps } from "./plugins-BZvDqGx5.js";
1
+ import { r as HudBadge, u as HudPluginProps } from "./plugins-pL2CoWzI.js";
2
2
  import { s as HudMockScenario } from "./mocks-CA-wM2SB.js";
3
3
  import { n as HudMockWorkerModule, r as MockWorkerOptions } from "./msw-browser-wjaYgkB7.js";
4
4
  //#region src/plugins/data/data-panel.d.ts
@@ -14,6 +14,8 @@ declare function DataPanel({ ctx }: HudPluginProps): import("react").JSX.Element
14
14
  //#region src/plugins/data/data-pill.d.ts
15
15
  /** The pill item: who the page is signed in as, how many flags are overridden and how many endpoints are mocked. */
16
16
  declare function DataPill({ ctx }: HudPluginProps): import("react").JSX.Element;
17
+ /** The rail badge: warn while anything is overridden, counting the overrides and mocks. */
18
+ declare function useDataBadge({ ctx }: HudPluginProps): HudBadge | null;
17
19
  //#endregion
18
20
  //#region src/plugins/data/mocks-client.d.ts
19
21
  /** `data({ mocks })`: the scenarios and how to start the browser's MSW worker. */
@@ -59,6 +61,8 @@ declare function data({ mocks }?: DataOptions): {
59
61
  readonly id: "data";
60
62
  readonly title: "Data";
61
63
  readonly capability: "data.write";
64
+ readonly icon: import("react").ComponentType;
65
+ readonly badge: typeof useDataBadge;
62
66
  readonly pill: typeof DataPill;
63
67
  readonly panel: import("react").LazyExoticComponent<typeof DataPanel>;
64
68
  };
@@ -1,5 +1,5 @@
1
- import { c as HudPluginProps, s as HudPluginContext } from "./plugins-BZvDqGx5.js";
2
- import "./index-gCZBO53s.js";
1
+ import { l as HudPluginContext, r as HudBadge, u as HudPluginProps } from "./plugins-pL2CoWzI.js";
2
+ import "./index-5B7foZut.js";
3
3
  //#region src/plugins/a11y/axe.d.ts
4
4
  type AxeImpact = "critical" | "serious" | "moderate" | "minor";
5
5
  /** Element path as axe reports it: selectors per shadow-DOM or frame hop. */
@@ -53,6 +53,8 @@ type A11yOptions = A11yRunOptions;
53
53
  declare function a11y(options?: A11yOptions): {
54
54
  readonly id: "a11y";
55
55
  readonly title: "A11y";
56
+ readonly icon: import("react").ComponentType;
57
+ readonly badge: () => HudBadge | null;
56
58
  readonly pill: () => import("react").JSX.Element;
57
59
  readonly panel: ({ ctx }: HudPluginProps) => import("react").JSX.Element;
58
60
  readonly commands: readonly [{
@@ -1,3 +1,4 @@
1
+ import { r as HudBadge } from "./plugins-pL2CoWzI.js";
1
2
  import { a as CaptureOptions, t as InspectRequest } from "./requests-CJrUf465.js";
2
3
  import { t as InspectAdapter } from "./adapter-BYoxPYTI.js";
3
4
  //#region src/plugins/observe/redact.d.ts
@@ -60,6 +61,8 @@ declare function inspect({ ignore, adapters }?: InspectOptions): {
60
61
  readonly id: "inspect";
61
62
  readonly title: "Inspect";
62
63
  readonly capability: "inspect.read";
64
+ readonly icon: import("react").ComponentType;
65
+ readonly badge: () => HudBadge;
63
66
  readonly pill: () => import("react").JSX.Element;
64
67
  readonly panel: () => import("react").JSX.Element;
65
68
  readonly commands: readonly [{
@@ -1,4 +1,4 @@
1
- import { c as HudPluginProps } from "./plugins-BZvDqGx5.js";
1
+ import { r as HudBadge, u as HudPluginProps } from "./plugins-pL2CoWzI.js";
2
2
  import { a as CaptureOptions } from "./requests-CJrUf465.js";
3
3
  //#region src/plugins/observe/info-tab.d.ts
4
4
  /** The signed-in user as the app knows it. Every field is optional. */
@@ -30,6 +30,8 @@ interface ObserveOptions extends CaptureOptions {
30
30
  declare function observe({ env, useUser, ignore }?: ObserveOptions): {
31
31
  readonly id: "observe";
32
32
  readonly title: "Observe";
33
+ readonly icon: import("react").ComponentType;
34
+ readonly badge: () => HudBadge;
33
35
  readonly pill: () => import("react").JSX.Element;
34
36
  readonly pillPriority: 20;
35
37
  readonly panel: ({ ctx }: HudPluginProps) => import("react").JSX.Element;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as GrabScreenshotImage, i as GrabScreenshot, n as GrabAnchor, o as matchComponentHints, r as GrabPayload, s as GrabComponent, t as ComponentHint } from "./payload-MUQ9ciER.js";
2
- import { _ as useGrab, c as HudPluginProps, f as PinEdge, g as HudHighlight, h as HudGrabState, i as HudCommand, m as HudGrab, n as HudApiError, o as HudPlugin, p as definePlugin, r as HudCapability, s as HudPluginContext, t as HudAccessControl } from "./plugins-BZvDqGx5.js";
3
- import { i as defineHud, n as HudAutoPlugins, r as HudMountProps, t as DefineHudOptions } from "./define-hud-CHPedaQ5.js";
4
- import { a as PICKER_CSS, c as ElementOutlineProps, i as ElementPickerProps, n as HudProps, o as PickPoint, r as ElementPicker, s as ElementOutline, t as Hud } from "./index-gCZBO53s.js";
2
+ import { _ as HudGrab, a as HudCapability, b as useGrab, c as HudPlugin, g as ratingTone, h as definePlugin, i as HudBadgeTone, l as HudPluginContext, m as PinEdge, n as HudApiError, o as HudCommand, r as HudBadge, t as HudAccessControl, u as HudPluginProps, v as HudGrabState, y as HudHighlight } from "./plugins-pL2CoWzI.js";
3
+ import { a as DockSide, i as defineHud, n as HudAutoPlugins, o as HudDock, r as HudMountProps, t as DefineHudOptions } from "./define-hud-B0aFXrcK.js";
4
+ import { a as hudIcon, c as PICKER_CSS, d as ElementOutlineProps, i as HudIconName, l as PickPoint, n as HudProps, o as ElementPicker, r as HUD_ICON_NAMES, s as ElementPickerProps, t as Hud, u as ElementOutline } from "./index-5B7foZut.js";
5
5
  import { n as HUD_HOST_TAG, t as HUD_DEV_MARKER } from "./marker-CMrvxPmS.js";
6
- export { type ComponentHint, type DefineHudOptions, ElementOutline, type ElementOutlineProps, ElementPicker, type ElementPickerProps, type GrabAnchor, type GrabComponent, type GrabPayload, type GrabScreenshot, type GrabScreenshotImage, HUD_DEV_MARKER, HUD_HOST_TAG, Hud, type HudAccessControl, HudApiError, type HudAutoPlugins, type HudCapability, type HudCommand, type HudGrab, type HudGrabState, type HudHighlight, type HudMountProps, type HudPlugin, type HudPluginContext, type HudPluginProps, type HudProps, PICKER_CSS, type PickPoint, type PinEdge, defineHud, definePlugin, matchComponentHints, useGrab };
6
+ export { type ComponentHint, type DefineHudOptions, type DockSide, ElementOutline, type ElementOutlineProps, ElementPicker, type ElementPickerProps, type GrabAnchor, type GrabComponent, type GrabPayload, type GrabScreenshot, type GrabScreenshotImage, HUD_DEV_MARKER, HUD_HOST_TAG, HUD_ICON_NAMES, Hud, type HudAccessControl, HudApiError, type HudAutoPlugins, type HudBadge, type HudBadgeTone, type HudCapability, type HudCommand, type HudDock, type HudGrab, type HudGrabState, type HudHighlight, type HudIconName, type HudMountProps, type HudPlugin, type HudPluginContext, type HudPluginProps, type HudProps, PICKER_CSS, type PickPoint, type PinEdge, defineHud, definePlugin, hudIcon, matchComponentHints, ratingTone, useGrab };