@hansenexus/hud 0.1.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 (90) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +48 -0
  3. package/chunk-0cj8dkk7.js +127 -0
  4. package/chunk-1atxwdhw.js +48 -0
  5. package/chunk-24vrg16w.js +39 -0
  6. package/chunk-3j9sm249.js +26 -0
  7. package/chunk-50pq4sg6.js +41 -0
  8. package/chunk-5gtx3pza.js +9 -0
  9. package/chunk-6gw4x08j.js +264 -0
  10. package/chunk-6jt8yg4m.js +117 -0
  11. package/chunk-71se605m.js +85 -0
  12. package/chunk-82nm9wcg.js +316 -0
  13. package/chunk-8tam7r3h.js +68 -0
  14. package/chunk-babjpqkb.js +52 -0
  15. package/chunk-c5y856ad.js +98 -0
  16. package/chunk-ghxh8926.js +172 -0
  17. package/chunk-hc2g0n35.js +24 -0
  18. package/chunk-k0vr8dsy.js +179 -0
  19. package/chunk-k50yfp5d.js +166 -0
  20. package/chunk-kyeb6qeq.js +95 -0
  21. package/chunk-msqkkqw7.js +140 -0
  22. package/chunk-nm82wr8r.js +58 -0
  23. package/chunk-r06bpmy6.js +79 -0
  24. package/chunk-t9eh4t0b.js +89 -0
  25. package/chunk-tf774c4w.js +115 -0
  26. package/chunk-v086j53b.js +19 -0
  27. package/chunk-wspz08q7.js +67 -0
  28. package/chunk-xezxydm3.js +47 -0
  29. package/chunk-xjn0896g.js +574 -0
  30. package/chunk-xztw0xyt.js +113 -0
  31. package/chunk-zzrpd92r.js +172 -0
  32. package/core/access.d.mts +53 -0
  33. package/core/access.js +27 -0
  34. package/core/api-types.d.mts +146 -0
  35. package/core/api-types.js +9 -0
  36. package/core/capabilities.d.mts +27 -0
  37. package/core/capabilities.js +14 -0
  38. package/core/capture-buffer.d.mts +37 -0
  39. package/core/capture-buffer.js +9 -0
  40. package/core/force-state.d.mts +68 -0
  41. package/core/force-state.js +21 -0
  42. package/core/mock-cookie.d.mts +30 -0
  43. package/core/mock-cookie.js +15 -0
  44. package/core/types.d.mts +59 -0
  45. package/core/types.js +9 -0
  46. package/hud-provider.d.mts +38 -0
  47. package/hud-provider.js +15 -0
  48. package/hud.d.mts +15 -0
  49. package/hud.js +18 -0
  50. package/index.d.mts +94 -0
  51. package/index.js +170 -0
  52. package/lazy-panel.d.mts +28 -0
  53. package/lazy-panel.js +11 -0
  54. package/package.json +153 -0
  55. package/panels/cicd-panel.d.mts +9 -0
  56. package/panels/cicd-panel.js +13 -0
  57. package/panels/debug-info-panel.d.mts +21 -0
  58. package/panels/debug-info-panel.js +9 -0
  59. package/panels/dispatch-panel.d.mts +10 -0
  60. package/panels/dispatch-panel.js +14 -0
  61. package/panels/env-info-panel.d.mts +9 -0
  62. package/panels/env-info-panel.js +12 -0
  63. package/panels/feature-flags-panel.d.mts +26 -0
  64. package/panels/feature-flags-panel.js +9 -0
  65. package/panels/force-state-panel.d.mts +11 -0
  66. package/panels/force-state-panel.js +113 -0
  67. package/panels/info-row.d.mts +21 -0
  68. package/panels/info-row.js +14 -0
  69. package/panels/mock-seed-panel.d.mts +15 -0
  70. package/panels/mock-seed-panel.js +14 -0
  71. package/panels/network-console-panel.d.mts +6 -0
  72. package/panels/network-console-panel.js +9 -0
  73. package/panels/role-switcher-panel.d.mts +28 -0
  74. package/panels/role-switcher-panel.js +9 -0
  75. package/panels/sessions-panel.d.mts +6 -0
  76. package/panels/sessions-panel.js +13 -0
  77. package/panels/tokens-panel.d.mts +38 -0
  78. package/panels/tokens-panel.js +9 -0
  79. package/panels/unlock-panel.d.mts +33 -0
  80. package/panels/unlock-panel.js +14 -0
  81. package/panels/variants-panel.d.mts +51 -0
  82. package/panels/variants-panel.js +12 -0
  83. package/panels/vitals-panel.d.mts +11 -0
  84. package/panels/vitals-panel.js +15 -0
  85. package/server/guard.d.mts +42 -0
  86. package/server/guard.js +12 -0
  87. package/server/unlock.d.mts +28 -0
  88. package/server/unlock.js +108 -0
  89. package/state-boundary.d.mts +25 -0
  90. package/state-boundary.js +54 -0
package/package.json ADDED
@@ -0,0 +1,153 @@
1
+ {
2
+ "name": "@hansenexus/hud",
3
+ "version": "0.1.0",
4
+ "description": "Dev HUD for React apps: drawer, panels, capability-gated access.",
5
+ "license": "MIT",
6
+ "files": [
7
+ "**/*.js",
8
+ "**/*.d.mts",
9
+ "README.md",
10
+ "LICENSE"
11
+ ],
12
+ "type": "module",
13
+ "sideEffects": false,
14
+ "exports": {
15
+ ".": {
16
+ "types": "./index.d.mts",
17
+ "import": "./index.js"
18
+ },
19
+ "./hud": {
20
+ "types": "./hud.d.mts",
21
+ "import": "./hud.js"
22
+ },
23
+ "./hud-provider": {
24
+ "types": "./hud-provider.d.mts",
25
+ "import": "./hud-provider.js"
26
+ },
27
+ "./lazy-panel": {
28
+ "types": "./lazy-panel.d.mts",
29
+ "import": "./lazy-panel.js"
30
+ },
31
+ "./state-boundary": {
32
+ "types": "./state-boundary.d.mts",
33
+ "import": "./state-boundary.js"
34
+ },
35
+ "./core/mock-cookie": {
36
+ "types": "./core/mock-cookie.d.mts",
37
+ "import": "./core/mock-cookie.js"
38
+ },
39
+ "./core/api-types": {
40
+ "types": "./core/api-types.d.mts",
41
+ "import": "./core/api-types.js"
42
+ },
43
+ "./core/capabilities": {
44
+ "types": "./core/capabilities.d.mts",
45
+ "import": "./core/capabilities.js"
46
+ },
47
+ "./core/capture-buffer": {
48
+ "types": "./core/capture-buffer.d.mts",
49
+ "import": "./core/capture-buffer.js"
50
+ },
51
+ "./core/types": {
52
+ "types": "./core/types.d.mts",
53
+ "import": "./core/types.js"
54
+ },
55
+ "./core/access": {
56
+ "types": "./core/access.d.mts",
57
+ "import": "./core/access.js"
58
+ },
59
+ "./core/force-state": {
60
+ "types": "./core/force-state.d.mts",
61
+ "import": "./core/force-state.js"
62
+ },
63
+ "./panels/tokens-panel": {
64
+ "types": "./panels/tokens-panel.d.mts",
65
+ "import": "./panels/tokens-panel.js"
66
+ },
67
+ "./panels/force-state-panel": {
68
+ "types": "./panels/force-state-panel.d.mts",
69
+ "import": "./panels/force-state-panel.js"
70
+ },
71
+ "./panels/role-switcher-panel": {
72
+ "types": "./panels/role-switcher-panel.d.mts",
73
+ "import": "./panels/role-switcher-panel.js"
74
+ },
75
+ "./panels/debug-info-panel": {
76
+ "types": "./panels/debug-info-panel.d.mts",
77
+ "import": "./panels/debug-info-panel.js"
78
+ },
79
+ "./panels/sessions-panel": {
80
+ "types": "./panels/sessions-panel.d.mts",
81
+ "import": "./panels/sessions-panel.js"
82
+ },
83
+ "./panels/network-console-panel": {
84
+ "types": "./panels/network-console-panel.d.mts",
85
+ "import": "./panels/network-console-panel.js"
86
+ },
87
+ "./panels/feature-flags-panel": {
88
+ "types": "./panels/feature-flags-panel.d.mts",
89
+ "import": "./panels/feature-flags-panel.js"
90
+ },
91
+ "./panels/mock-seed-panel": {
92
+ "types": "./panels/mock-seed-panel.d.mts",
93
+ "import": "./panels/mock-seed-panel.js"
94
+ },
95
+ "./panels/vitals-panel": {
96
+ "types": "./panels/vitals-panel.d.mts",
97
+ "import": "./panels/vitals-panel.js"
98
+ },
99
+ "./panels/info-row": {
100
+ "types": "./panels/info-row.d.mts",
101
+ "import": "./panels/info-row.js"
102
+ },
103
+ "./panels/cicd-panel": {
104
+ "types": "./panels/cicd-panel.d.mts",
105
+ "import": "./panels/cicd-panel.js"
106
+ },
107
+ "./panels/variants-panel": {
108
+ "types": "./panels/variants-panel.d.mts",
109
+ "import": "./panels/variants-panel.js"
110
+ },
111
+ "./panels/unlock-panel": {
112
+ "types": "./panels/unlock-panel.d.mts",
113
+ "import": "./panels/unlock-panel.js"
114
+ },
115
+ "./panels/env-info-panel": {
116
+ "types": "./panels/env-info-panel.d.mts",
117
+ "import": "./panels/env-info-panel.js"
118
+ },
119
+ "./panels/dispatch-panel": {
120
+ "types": "./panels/dispatch-panel.d.mts",
121
+ "import": "./panels/dispatch-panel.js"
122
+ },
123
+ "./server/guard": {
124
+ "types": "./server/guard.d.mts",
125
+ "import": "./server/guard.js"
126
+ },
127
+ "./server/unlock": {
128
+ "types": "./server/unlock.d.mts",
129
+ "import": "./server/unlock.js"
130
+ }
131
+ },
132
+ "dependencies": {
133
+ "@radix-ui/react-slot": "^1.2.4",
134
+ "@radix-ui/react-switch": "^1.2.6",
135
+ "@radix-ui/react-tooltip": "^1.2.8",
136
+ "class-variance-authority": "^0.7.1",
137
+ "clsx": "^2.1.1",
138
+ "lucide-react": "^0.563.0",
139
+ "motion": "^12.29.2",
140
+ "tailwind-merge": "^3.4.0",
141
+ "web-vitals": "^5.2.0"
142
+ },
143
+ "peerDependencies": {
144
+ "next": ">=15",
145
+ "react": "^19.2.0",
146
+ "react-dom": "^19.2.0"
147
+ },
148
+ "peerDependenciesMeta": {
149
+ "next": {
150
+ "optional": true
151
+ }
152
+ }
153
+ }
@@ -0,0 +1,9 @@
1
+ import * as react from 'react';
2
+
3
+ /**
4
+ * CI/CD + deploy state via the hud hub: the deployed image plus recent
5
+ * GitHub Actions runs, each row labelled with its source.
6
+ */
7
+ declare function CicdPanel(): react.JSX.Element | null;
8
+
9
+ export { CicdPanel };
@@ -0,0 +1,13 @@
1
+ import {
2
+ CicdPanel
3
+ } from "../chunk-zzrpd92r.js";
4
+ import"../chunk-xezxydm3.js";
5
+ import"../chunk-wspz08q7.js";
6
+ import"../chunk-kyeb6qeq.js";
7
+ import"../chunk-xztw0xyt.js";
8
+ import"../chunk-babjpqkb.js";
9
+ import"../chunk-v086j53b.js";
10
+ import"../chunk-5gtx3pza.js";
11
+ export {
12
+ CicdPanel
13
+ };
@@ -0,0 +1,21 @@
1
+ import * as react from 'react';
2
+
3
+ interface HudUserInfo {
4
+ name?: string;
5
+ email?: string;
6
+ id?: string;
7
+ role?: string;
8
+ /** App-specific extras (organization, tier, locale, …). */
9
+ extra?: Record<string, string>;
10
+ }
11
+ interface DebugInfoPanelProps {
12
+ user?: HudUserInfo;
13
+ isLoading?: boolean;
14
+ }
15
+ /**
16
+ * Session + environment snapshot. Harvested from nexus-lms' dev toolbar and
17
+ * genericized: the app feeds its user via props instead of app hooks.
18
+ */
19
+ declare function DebugInfoPanel({ user, isLoading }: DebugInfoPanelProps): react.JSX.Element;
20
+
21
+ export { DebugInfoPanel, type DebugInfoPanelProps, type HudUserInfo };
@@ -0,0 +1,9 @@
1
+ import {
2
+ DebugInfoPanel
3
+ } from "../chunk-8tam7r3h.js";
4
+ import"../chunk-kyeb6qeq.js";
5
+ import"../chunk-xztw0xyt.js";
6
+ import"../chunk-5gtx3pza.js";
7
+ export {
8
+ DebugInfoPanel
9
+ };
@@ -0,0 +1,10 @@
1
+ import * as react from 'react';
2
+
3
+ /**
4
+ * Element grabber → agent dispatch. Local Claude runs go through docket via
5
+ * the bridge (no second dispatcher); queue markers are the human-in-loop
6
+ * fallback; Hermes goes through the console hub.
7
+ */
8
+ declare function DispatchPanel(): react.JSX.Element;
9
+
10
+ export { DispatchPanel };
@@ -0,0 +1,14 @@
1
+ import {
2
+ DispatchPanel
3
+ } from "../chunk-6gw4x08j.js";
4
+ import"../chunk-50pq4sg6.js";
5
+ import"../chunk-82nm9wcg.js";
6
+ import"../chunk-wspz08q7.js";
7
+ import"../chunk-kyeb6qeq.js";
8
+ import"../chunk-xztw0xyt.js";
9
+ import"../chunk-babjpqkb.js";
10
+ import"../chunk-v086j53b.js";
11
+ import"../chunk-5gtx3pza.js";
12
+ export {
13
+ DispatchPanel
14
+ };
@@ -0,0 +1,9 @@
1
+ import * as react from 'react';
2
+
3
+ /**
4
+ * What runs here right now: app, resolved hud env, build context, and the
5
+ * live capability matrix column — the canonical first tab of every hud.
6
+ */
7
+ declare function EnvInfoPanel(): react.JSX.Element;
8
+
9
+ export { EnvInfoPanel };
@@ -0,0 +1,12 @@
1
+ import {
2
+ EnvInfoPanel
3
+ } from "../chunk-0cj8dkk7.js";
4
+ import"../chunk-wspz08q7.js";
5
+ import"../chunk-kyeb6qeq.js";
6
+ import"../chunk-xztw0xyt.js";
7
+ import"../chunk-babjpqkb.js";
8
+ import"../chunk-v086j53b.js";
9
+ import"../chunk-5gtx3pza.js";
10
+ export {
11
+ EnvInfoPanel
12
+ };
@@ -0,0 +1,26 @@
1
+ import * as react from 'react';
2
+
3
+ interface HudFlagDescriptor {
4
+ id: string;
5
+ label: string;
6
+ description?: string;
7
+ category?: string;
8
+ defaultValue: boolean;
9
+ enabled: boolean;
10
+ }
11
+ interface HudFlagsAdapter {
12
+ flags: HudFlagDescriptor[];
13
+ isLoading?: boolean;
14
+ onToggle: (flagId: string) => Promise<void> | void;
15
+ }
16
+ /**
17
+ * Feature-flag switches over an app-provided adapter. Harvested from
18
+ * nexus-lms' dev toolbar; the per-app FLAG_REGISTRY + admin hook moved
19
+ * behind `HudFlagsAdapter` (flag registries are still per-app — see the
20
+ * hud plan's deferred consolidation item).
21
+ */
22
+ declare function FeatureFlagsPanel({ adapter }: {
23
+ adapter: HudFlagsAdapter;
24
+ }): react.JSX.Element;
25
+
26
+ export { FeatureFlagsPanel, type HudFlagDescriptor, type HudFlagsAdapter };
@@ -0,0 +1,9 @@
1
+ import {
2
+ FeatureFlagsPanel
3
+ } from "../chunk-71se605m.js";
4
+ import"../chunk-kyeb6qeq.js";
5
+ import"../chunk-xztw0xyt.js";
6
+ import"../chunk-5gtx3pza.js";
7
+ export {
8
+ FeatureFlagsPanel
9
+ };
@@ -0,0 +1,11 @@
1
+ import * as react from 'react';
2
+
3
+ /**
4
+ * Toggles every mounted state boundary (`StateBoundary` from
5
+ * `@hn-monorepo/hud/state-boundary`) between its real state and a forced
6
+ * loading, empty or error. Toggles live in memory: a reload returns every
7
+ * boundary to auto, so a forgotten toggle cannot outlive the tab's page.
8
+ */
9
+ declare function ForceStatePanel(): react.JSX.Element;
10
+
11
+ export { ForceStatePanel };
@@ -0,0 +1,113 @@
1
+ import {
2
+ InfoRow,
3
+ PanelSection
4
+ } from "../chunk-kyeb6qeq.js";
5
+ import {
6
+ Badge,
7
+ Button
8
+ } from "../chunk-xztw0xyt.js";
9
+ import {
10
+ FORCED_STATES,
11
+ FORCE_STATE_PARAM,
12
+ getForceStateStore,
13
+ resolveForcedState
14
+ } from "../chunk-c5y856ad.js";
15
+ import"../chunk-5gtx3pza.js";
16
+
17
+ // panels/force-state-panel.tsx
18
+ import { Layers } from "lucide-react";
19
+ import { useSyncExternalStore } from "react";
20
+ import { jsx, jsxs } from "react/jsx-runtime";
21
+ "use client";
22
+ var CHOICES = [null, ...FORCED_STATES];
23
+ function subscribe(listener) {
24
+ return getForceStateStore().subscribe(listener);
25
+ }
26
+ function getSnapshot() {
27
+ return getForceStateStore().getSnapshot();
28
+ }
29
+ function ForceStatePanel() {
30
+ const store = getForceStateStore();
31
+ const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
32
+ const hasOverrides = Object.keys(snapshot.overrides).length > 0;
33
+ return /* @__PURE__ */ jsxs("div", {
34
+ className: "space-y-4 p-3",
35
+ "data-hud-force-state": "",
36
+ children: [
37
+ /* @__PURE__ */ jsxs(PanelSection, {
38
+ icon: Layers,
39
+ title: "State boundaries",
40
+ children: [
41
+ snapshot.boundaries.length === 0 ? /* @__PURE__ */ jsx("p", {
42
+ className: "px-2 text-[10px] text-muted-foreground",
43
+ children: "No state boundary on this page. Wrap a query branch in StateBoundary to list it here."
44
+ }) : snapshot.boundaries.map((boundary) => {
45
+ const override = snapshot.overrides[boundary.id] ?? null;
46
+ const effective = resolveForcedState(snapshot, boundary);
47
+ return /* @__PURE__ */ jsxs("div", {
48
+ className: "space-y-1 px-2 py-1",
49
+ children: [
50
+ /* @__PURE__ */ jsxs("div", {
51
+ className: "flex items-center justify-between gap-2",
52
+ children: [
53
+ /* @__PURE__ */ jsxs("span", {
54
+ className: "truncate font-mono text-[10px]",
55
+ children: [
56
+ boundary.parentId ? "↳ " : "",
57
+ boundary.id
58
+ ]
59
+ }),
60
+ /* @__PURE__ */ jsx(Badge, {
61
+ variant: effective ? "default" : "outline",
62
+ className: "text-[9px]",
63
+ children: effective ?? "real"
64
+ })
65
+ ]
66
+ }),
67
+ /* @__PURE__ */ jsx("div", {
68
+ className: "flex gap-1",
69
+ children: CHOICES.map((choice) => /* @__PURE__ */ jsx(Button, {
70
+ size: "xs",
71
+ variant: override === choice ? "default" : "outline",
72
+ className: "h-6 flex-1 px-1 text-[10px]",
73
+ onClick: () => store.force(boundary.id, choice),
74
+ children: choice ?? "auto"
75
+ }, choice ?? "auto"))
76
+ })
77
+ ]
78
+ }, boundary.id);
79
+ }),
80
+ hasOverrides && /* @__PURE__ */ jsx(Button, {
81
+ size: "xs",
82
+ variant: "ghost",
83
+ className: "h-6 w-full text-[10px]",
84
+ onClick: () => store.clearOverrides(),
85
+ children: "Reset all to auto"
86
+ })
87
+ ]
88
+ }),
89
+ /* @__PURE__ */ jsxs(PanelSection, {
90
+ title: "URL param",
91
+ children: [
92
+ /* @__PURE__ */ jsx(InfoRow, {
93
+ label: `?${FORCE_STATE_PARAM}=`,
94
+ value: snapshot.param ? `${snapshot.param.target ? `${snapshot.param.target}:` : ""}${snapshot.param.state}` : "not set"
95
+ }),
96
+ /* @__PURE__ */ jsxs("p", {
97
+ className: "px-2 text-[10px] text-muted-foreground",
98
+ children: [
99
+ "?",
100
+ FORCE_STATE_PARAM,
101
+ "=loading|empty|error forces the top-level boundaries; ?",
102
+ FORCE_STATE_PARAM,
103
+ "=<id>:error targets one. A panel toggle wins over the param."
104
+ ]
105
+ })
106
+ ]
107
+ })
108
+ ]
109
+ });
110
+ }
111
+ export {
112
+ ForceStatePanel
113
+ };
@@ -0,0 +1,21 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { LucideIcon } from 'lucide-react';
4
+
5
+ declare function PanelSection({ icon: Icon, title, children, }: {
6
+ icon?: LucideIcon;
7
+ title: string;
8
+ children: ReactNode;
9
+ }): react.JSX.Element;
10
+ declare function InfoRow({ label, value, copyable, }: {
11
+ label: string;
12
+ value: string;
13
+ copyable?: boolean;
14
+ }): react.JSX.Element;
15
+ declare function ShortcutRow({ keys, label }: {
16
+ keys: string[];
17
+ label: string;
18
+ }): react.JSX.Element;
19
+ declare function LoadingSpinner(): react.JSX.Element;
20
+
21
+ export { InfoRow, LoadingSpinner, PanelSection, ShortcutRow };
@@ -0,0 +1,14 @@
1
+ import {
2
+ InfoRow,
3
+ LoadingSpinner,
4
+ PanelSection,
5
+ ShortcutRow
6
+ } from "../chunk-kyeb6qeq.js";
7
+ import"../chunk-xztw0xyt.js";
8
+ import"../chunk-5gtx3pza.js";
9
+ export {
10
+ ShortcutRow,
11
+ PanelSection,
12
+ LoadingSpinner,
13
+ InfoRow
14
+ };
@@ -0,0 +1,15 @@
1
+ import * as react from 'react';
2
+ import { HudSeedDescriptor } from '../core/api-types.mjs';
3
+
4
+ /**
5
+ * Runtime mock toggle + data seeding. The mock switch writes the `hud-mock`
6
+ * cookie and reloads — the server layout re-reads it and passes `forceMock`
7
+ * into the app's ConvexClientProvider, so SSR and client always agree. Seeds
8
+ * run on the dev machine through the bridge (`bunx convex run`), which keeps
9
+ * remote-refusal guardrails in seed functions intact.
10
+ */
11
+ declare function MockSeedPanel({ seeds }: {
12
+ seeds?: HudSeedDescriptor[];
13
+ }): react.JSX.Element;
14
+
15
+ export { MockSeedPanel };
@@ -0,0 +1,14 @@
1
+ import {
2
+ MockSeedPanel
3
+ } from "../chunk-k0vr8dsy.js";
4
+ import"../chunk-50pq4sg6.js";
5
+ import"../chunk-wspz08q7.js";
6
+ import"../chunk-kyeb6qeq.js";
7
+ import"../chunk-xztw0xyt.js";
8
+ import"../chunk-hc2g0n35.js";
9
+ import"../chunk-babjpqkb.js";
10
+ import"../chunk-v086j53b.js";
11
+ import"../chunk-5gtx3pza.js";
12
+ export {
13
+ MockSeedPanel
14
+ };
@@ -0,0 +1,6 @@
1
+ import * as react from 'react';
2
+
3
+ /** Console + fetch + long-task capture (ring buffer, newest last). */
4
+ declare function NetworkConsolePanel(): react.JSX.Element;
5
+
6
+ export { NetworkConsolePanel };
@@ -0,0 +1,9 @@
1
+ import {
2
+ NetworkConsolePanel
3
+ } from "../chunk-tf774c4w.js";
4
+ import"../chunk-24vrg16w.js";
5
+ import"../chunk-xztw0xyt.js";
6
+ import"../chunk-5gtx3pza.js";
7
+ export {
8
+ NetworkConsolePanel
9
+ };
@@ -0,0 +1,28 @@
1
+ import * as react from 'react';
2
+
3
+ interface HudRoleDescriptor {
4
+ id: string;
5
+ label: string;
6
+ /** Hierarchy level shown as "Lvl n"; omit to hide. */
7
+ level?: number;
8
+ /** Badge classes for the current-role chip (tone is app-specific). */
9
+ badgeClassName?: string;
10
+ }
11
+ interface HudRoleAdapter {
12
+ roles: HudRoleDescriptor[];
13
+ currentRoleId?: string;
14
+ currentUserLabel?: string;
15
+ isLoading?: boolean;
16
+ /** Perform the switch (Convex mutation, dev-login POST, …). May throw. */
17
+ onSwitch: (roleId: string) => Promise<void> | void;
18
+ }
19
+ /**
20
+ * Role switcher over an app-provided adapter. Harvested from nexus-lms'
21
+ * dev toolbar; the Convex mutation moved behind `onSwitch` so any auth
22
+ * backend (or dev-routes' `useDevRoleLogin`) can drive it.
23
+ */
24
+ declare function RoleSwitcherPanel({ adapter }: {
25
+ adapter: HudRoleAdapter;
26
+ }): react.JSX.Element;
27
+
28
+ export { type HudRoleAdapter, type HudRoleDescriptor, RoleSwitcherPanel };
@@ -0,0 +1,9 @@
1
+ import {
2
+ RoleSwitcherPanel
3
+ } from "../chunk-6jt8yg4m.js";
4
+ import"../chunk-kyeb6qeq.js";
5
+ import"../chunk-xztw0xyt.js";
6
+ import"../chunk-5gtx3pza.js";
7
+ export {
8
+ RoleSwitcherPanel
9
+ };
@@ -0,0 +1,6 @@
1
+ import * as react from 'react';
2
+
3
+ /** Active Claude Code sessions on this machine, via the local bridge. */
4
+ declare function SessionsPanel(): react.JSX.Element;
5
+
6
+ export { SessionsPanel };
@@ -0,0 +1,13 @@
1
+ import {
2
+ SessionsPanel
3
+ } from "../chunk-t9eh4t0b.js";
4
+ import"../chunk-50pq4sg6.js";
5
+ import"../chunk-wspz08q7.js";
6
+ import"../chunk-kyeb6qeq.js";
7
+ import"../chunk-xztw0xyt.js";
8
+ import"../chunk-babjpqkb.js";
9
+ import"../chunk-v086j53b.js";
10
+ import"../chunk-5gtx3pza.js";
11
+ export {
12
+ SessionsPanel
13
+ };
@@ -0,0 +1,38 @@
1
+ import * as react from 'react';
2
+
3
+ interface HudTokenDescriptor {
4
+ /** CSS custom property, including the leading dashes (e.g. --bauhaus-primary-ink). */
5
+ cssVar: string;
6
+ /** Short display label; defaults to the var name without its prefix. */
7
+ label?: string;
8
+ }
9
+ interface HudTokenGroup {
10
+ label: string;
11
+ tokens: HudTokenDescriptor[];
12
+ /**
13
+ * Scope attribute the design system hangs its tokens on, with optional
14
+ * value — e.g. { attribute: "data-bauhaus" } or
15
+ * { attribute: "data-direction", value: "glass-vercel" }. Rendered onto the
16
+ * group's swatch container so scoped var() lookups resolve. Omit for
17
+ * :root-scoped systems.
18
+ */
19
+ scope?: {
20
+ attribute: string;
21
+ value?: string;
22
+ };
23
+ }
24
+ interface HudTokensAdapter {
25
+ groups: HudTokenGroup[];
26
+ /** Where the tokens live, shown as a hint (e.g. packages/ui/styles/bauhaus-tokens.css). */
27
+ sourceHint?: string;
28
+ }
29
+ /**
30
+ * Live design-token swatches: each tile paints `var(<token>)` inside the
31
+ * group's scope attribute, so what renders IS the resolved value in the
32
+ * current theme — no hardcoded copies to drift. Click copies the var name.
33
+ */
34
+ declare function TokensPanel({ adapter }: {
35
+ adapter: HudTokensAdapter;
36
+ }): react.JSX.Element;
37
+
38
+ export { type HudTokenDescriptor, type HudTokenGroup, type HudTokensAdapter, TokensPanel };
@@ -0,0 +1,9 @@
1
+ import {
2
+ TokensPanel
3
+ } from "../chunk-nm82wr8r.js";
4
+ import"../chunk-kyeb6qeq.js";
5
+ import"../chunk-xztw0xyt.js";
6
+ import"../chunk-5gtx3pza.js";
7
+ export {
8
+ TokensPanel
9
+ };
@@ -0,0 +1,33 @@
1
+ import * as react from 'react';
2
+ import { HudAccess } from '../core/access.mjs';
3
+ import { HudEnv } from '../core/types.mjs';
4
+ import 'lucide-react';
5
+
6
+ type HudUnlockState = "checking" | "locked" | "unlocked" | "unconfigured";
7
+ /**
8
+ * Unlock state for a deployed hud.
9
+ *
10
+ * The browser never sees the password or the token: the cookie is httpOnly
11
+ * and only the server can judge it, so this hook asks `${apiBase}/unlock`
12
+ * rather than reading anything locally. On a tier that needs no unlock it
13
+ * settles on `unlocked` without a request.
14
+ */
15
+ declare function useHudUnlock(apiBase: string, access: HudAccess): {
16
+ state: HudUnlockState;
17
+ error: string | null;
18
+ unlock: (password: string) => Promise<boolean>;
19
+ };
20
+ interface HudUnlockPanelProps {
21
+ env: HudEnv;
22
+ state: HudUnlockState;
23
+ error: string | null;
24
+ onUnlock: (password: string) => Promise<boolean>;
25
+ }
26
+ /**
27
+ * The only panel a locked deployed hud shows. Everything else, including
28
+ * the read-only production panels, stays behind it, because the panels
29
+ * themselves fetch from `/api/hud/*` routes that would refuse anyway.
30
+ */
31
+ declare function HudUnlockPanel({ env, state, error, onUnlock }: HudUnlockPanelProps): react.JSX.Element;
32
+
33
+ export { HudUnlockPanel, type HudUnlockPanelProps, type HudUnlockState, useHudUnlock };