@hansenexus/hud 0.1.1 → 0.3.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 +106 -25
- package/dist/define-hud-BHQR8Lbv.d.ts +31 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +1198 -0
- package/dist/next.d.ts +48 -0
- package/dist/next.js +77 -0
- package/dist/plugins/vitals.d.ts +25 -0
- package/dist/plugins/vitals.js +109 -0
- package/dist/plugins-1QmTmZyL.d.ts +76 -0
- package/dist/plugins-CzUiTn_r.js +68 -0
- package/dist/server.d.ts +39 -0
- package/dist/server.js +106 -0
- package/package.json +55 -133
- package/chunk-20zke7cs.js +0 -574
- package/chunk-24vrg16w.js +0 -39
- package/chunk-50pq4sg6.js +0 -41
- package/chunk-5gtx3pza.js +0 -9
- package/chunk-6cdpasm9.js +0 -79
- package/chunk-6jt8yg4m.js +0 -117
- package/chunk-6ngkpwz7.js +0 -127
- package/chunk-71se605m.js +0 -85
- package/chunk-82nm9wcg.js +0 -316
- package/chunk-9hw5r9y1.js +0 -67
- package/chunk-c5y856ad.js +0 -98
- package/chunk-edq4jqch.js +0 -89
- package/chunk-emfnvz4p.js +0 -166
- package/chunk-h0hmjdqa.js +0 -264
- package/chunk-hc2g0n35.js +0 -24
- package/chunk-hex3wqag.js +0 -179
- package/chunk-kvxve0hx.js +0 -140
- package/chunk-kyeb6qeq.js +0 -95
- package/chunk-mz55rvw3.js +0 -172
- package/chunk-nm82wr8r.js +0 -58
- package/chunk-q15xwpy8.js +0 -48
- package/chunk-q96mkjve.js +0 -68
- package/chunk-tczzx083.js +0 -26
- package/chunk-tf774c4w.js +0 -115
- package/chunk-v086j53b.js +0 -19
- package/chunk-vjh0d29g.js +0 -52
- package/chunk-xezxydm3.js +0 -47
- package/chunk-xztw0xyt.js +0 -113
- package/chunk-yn1d38pb.js +0 -172
- package/core/access.d.mts +0 -53
- package/core/access.js +0 -27
- package/core/api-types.d.mts +0 -146
- package/core/api-types.js +0 -9
- package/core/capabilities.d.mts +0 -27
- package/core/capabilities.js +0 -14
- package/core/capture-buffer.d.mts +0 -37
- package/core/capture-buffer.js +0 -9
- package/core/force-state.d.mts +0 -68
- package/core/force-state.js +0 -21
- package/core/mock-cookie.d.mts +0 -30
- package/core/mock-cookie.js +0 -15
- package/core/types.d.mts +0 -59
- package/core/types.js +0 -9
- package/hud-provider.d.mts +0 -38
- package/hud-provider.js +0 -15
- package/hud.d.mts +0 -15
- package/hud.js +0 -18
- package/index.d.mts +0 -94
- package/index.js +0 -170
- package/lazy-panel.d.mts +0 -28
- package/lazy-panel.js +0 -11
- package/panels/cicd-panel.d.mts +0 -9
- package/panels/cicd-panel.js +0 -13
- package/panels/debug-info-panel.d.mts +0 -21
- package/panels/debug-info-panel.js +0 -9
- package/panels/dispatch-panel.d.mts +0 -10
- package/panels/dispatch-panel.js +0 -14
- package/panels/env-info-panel.d.mts +0 -9
- package/panels/env-info-panel.js +0 -12
- package/panels/feature-flags-panel.d.mts +0 -26
- package/panels/feature-flags-panel.js +0 -9
- package/panels/force-state-panel.d.mts +0 -11
- package/panels/force-state-panel.js +0 -113
- package/panels/info-row.d.mts +0 -21
- package/panels/info-row.js +0 -14
- package/panels/mock-seed-panel.d.mts +0 -15
- package/panels/mock-seed-panel.js +0 -14
- package/panels/network-console-panel.d.mts +0 -6
- package/panels/network-console-panel.js +0 -9
- package/panels/role-switcher-panel.d.mts +0 -28
- package/panels/role-switcher-panel.js +0 -9
- package/panels/sessions-panel.d.mts +0 -6
- package/panels/sessions-panel.js +0 -13
- package/panels/tokens-panel.d.mts +0 -38
- package/panels/tokens-panel.js +0 -9
- package/panels/unlock-panel.d.mts +0 -33
- package/panels/unlock-panel.js +0 -14
- package/panels/variants-panel.d.mts +0 -51
- package/panels/variants-panel.js +0 -12
- package/panels/vitals-panel.d.mts +0 -11
- package/panels/vitals-panel.js +0 -15
- package/server/guard.d.mts +0 -42
- package/server/guard.js +0 -12
- package/server/unlock.d.mts +0 -28
- package/server/unlock.js +0 -108
- package/state-boundary.d.mts +0 -25
- package/state-boundary.js +0 -54
package/index.js
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DebugInfoPanel
|
|
3
|
-
} from "./chunk-q96mkjve.js";
|
|
4
|
-
import {
|
|
5
|
-
NetworkConsolePanel
|
|
6
|
-
} from "./chunk-tf774c4w.js";
|
|
7
|
-
import {
|
|
8
|
-
VariantsPanel
|
|
9
|
-
} from "./chunk-emfnvz4p.js";
|
|
10
|
-
import {
|
|
11
|
-
TokensPanel
|
|
12
|
-
} from "./chunk-nm82wr8r.js";
|
|
13
|
-
import {
|
|
14
|
-
CicdPanel
|
|
15
|
-
} from "./chunk-mz55rvw3.js";
|
|
16
|
-
import {
|
|
17
|
-
RoleSwitcherPanel
|
|
18
|
-
} from "./chunk-6jt8yg4m.js";
|
|
19
|
-
import {
|
|
20
|
-
FeatureFlagsPanel
|
|
21
|
-
} from "./chunk-71se605m.js";
|
|
22
|
-
import {
|
|
23
|
-
EnvInfoPanel
|
|
24
|
-
} from "./chunk-6ngkpwz7.js";
|
|
25
|
-
import {
|
|
26
|
-
SessionsPanel
|
|
27
|
-
} from "./chunk-edq4jqch.js";
|
|
28
|
-
import {
|
|
29
|
-
DispatchPanel
|
|
30
|
-
} from "./chunk-h0hmjdqa.js";
|
|
31
|
-
import {
|
|
32
|
-
MockSeedPanel
|
|
33
|
-
} from "./chunk-hex3wqag.js";
|
|
34
|
-
import {
|
|
35
|
-
bridgeFetch,
|
|
36
|
-
getBridgeInfo,
|
|
37
|
-
resetBridgeInfo
|
|
38
|
-
} from "./chunk-50pq4sg6.js";
|
|
39
|
-
import {
|
|
40
|
-
Hud,
|
|
41
|
-
buildAnchor,
|
|
42
|
-
buildAnchorSelector,
|
|
43
|
-
buildDispatchPayload,
|
|
44
|
-
installCapture,
|
|
45
|
-
matchComponentHints,
|
|
46
|
-
uninstallCapture
|
|
47
|
-
} from "./chunk-20zke7cs.js";
|
|
48
|
-
import {
|
|
49
|
-
cancelGrab,
|
|
50
|
-
clearGrabbedPayload,
|
|
51
|
-
completeGrab,
|
|
52
|
-
getGrabberState,
|
|
53
|
-
startGrab,
|
|
54
|
-
subscribeGrabber
|
|
55
|
-
} from "./chunk-82nm9wcg.js";
|
|
56
|
-
import {
|
|
57
|
-
CaptureBuffer,
|
|
58
|
-
captureBuffer
|
|
59
|
-
} from "./chunk-24vrg16w.js";
|
|
60
|
-
import {
|
|
61
|
-
VitalsPanel,
|
|
62
|
-
getVitalsSnapshot
|
|
63
|
-
} from "./chunk-yn1d38pb.js";
|
|
64
|
-
import {
|
|
65
|
-
usePoll
|
|
66
|
-
} from "./chunk-xezxydm3.js";
|
|
67
|
-
import {
|
|
68
|
-
HudUnlockPanel,
|
|
69
|
-
useHudUnlock
|
|
70
|
-
} from "./chunk-kvxve0hx.js";
|
|
71
|
-
import {
|
|
72
|
-
HUD_UNLOCK_COOKIE,
|
|
73
|
-
hudRequiresUnlock,
|
|
74
|
-
hudUnlockTtlMs,
|
|
75
|
-
resolveHudAccess
|
|
76
|
-
} from "./chunk-6cdpasm9.js";
|
|
77
|
-
import {
|
|
78
|
-
HudProvider,
|
|
79
|
-
useHud,
|
|
80
|
-
useHudSafe,
|
|
81
|
-
useRegisterHudPanels
|
|
82
|
-
} from "./chunk-9hw5r9y1.js";
|
|
83
|
-
import {
|
|
84
|
-
hudLazyPanel
|
|
85
|
-
} from "./chunk-tczzx083.js";
|
|
86
|
-
import {
|
|
87
|
-
InfoRow,
|
|
88
|
-
LoadingSpinner,
|
|
89
|
-
PanelSection,
|
|
90
|
-
ShortcutRow
|
|
91
|
-
} from "./chunk-kyeb6qeq.js";
|
|
92
|
-
import"./chunk-xztw0xyt.js";
|
|
93
|
-
import {
|
|
94
|
-
CAPABILITY_MATRIX,
|
|
95
|
-
hasCapability,
|
|
96
|
-
isHudVisible,
|
|
97
|
-
resolveHudEnv
|
|
98
|
-
} from "./chunk-vjh0d29g.js";
|
|
99
|
-
import {
|
|
100
|
-
HUD_BUNDLE_MARKER,
|
|
101
|
-
HUD_CAPABILITIES
|
|
102
|
-
} from "./chunk-v086j53b.js";
|
|
103
|
-
import {
|
|
104
|
-
HUD_MOCK_COOKIE,
|
|
105
|
-
hudMockCookieString,
|
|
106
|
-
isHudMockEnabled,
|
|
107
|
-
readHudMockCookie,
|
|
108
|
-
setHudMockCookie
|
|
109
|
-
} from "./chunk-hc2g0n35.js";
|
|
110
|
-
import"./chunk-5gtx3pza.js";
|
|
111
|
-
export {
|
|
112
|
-
useRegisterHudPanels,
|
|
113
|
-
usePoll,
|
|
114
|
-
useHudUnlock,
|
|
115
|
-
useHudSafe,
|
|
116
|
-
useHud,
|
|
117
|
-
uninstallCapture,
|
|
118
|
-
subscribeGrabber,
|
|
119
|
-
startGrab,
|
|
120
|
-
setHudMockCookie,
|
|
121
|
-
resolveHudEnv,
|
|
122
|
-
resolveHudAccess,
|
|
123
|
-
resetBridgeInfo,
|
|
124
|
-
readHudMockCookie,
|
|
125
|
-
matchComponentHints,
|
|
126
|
-
isHudVisible,
|
|
127
|
-
isHudMockEnabled,
|
|
128
|
-
installCapture,
|
|
129
|
-
hudUnlockTtlMs,
|
|
130
|
-
hudRequiresUnlock,
|
|
131
|
-
hudMockCookieString,
|
|
132
|
-
hudLazyPanel,
|
|
133
|
-
hasCapability,
|
|
134
|
-
getVitalsSnapshot,
|
|
135
|
-
getGrabberState,
|
|
136
|
-
getBridgeInfo,
|
|
137
|
-
completeGrab,
|
|
138
|
-
clearGrabbedPayload,
|
|
139
|
-
captureBuffer,
|
|
140
|
-
cancelGrab,
|
|
141
|
-
buildDispatchPayload,
|
|
142
|
-
buildAnchorSelector,
|
|
143
|
-
buildAnchor,
|
|
144
|
-
bridgeFetch,
|
|
145
|
-
VitalsPanel,
|
|
146
|
-
VariantsPanel,
|
|
147
|
-
TokensPanel,
|
|
148
|
-
ShortcutRow,
|
|
149
|
-
SessionsPanel,
|
|
150
|
-
RoleSwitcherPanel,
|
|
151
|
-
PanelSection,
|
|
152
|
-
NetworkConsolePanel,
|
|
153
|
-
MockSeedPanel,
|
|
154
|
-
LoadingSpinner,
|
|
155
|
-
InfoRow,
|
|
156
|
-
HudUnlockPanel,
|
|
157
|
-
HudProvider,
|
|
158
|
-
Hud,
|
|
159
|
-
HUD_UNLOCK_COOKIE,
|
|
160
|
-
HUD_MOCK_COOKIE,
|
|
161
|
-
HUD_CAPABILITIES,
|
|
162
|
-
HUD_BUNDLE_MARKER,
|
|
163
|
-
FeatureFlagsPanel,
|
|
164
|
-
EnvInfoPanel,
|
|
165
|
-
DispatchPanel,
|
|
166
|
-
DebugInfoPanel,
|
|
167
|
-
CicdPanel,
|
|
168
|
-
CaptureBuffer,
|
|
169
|
-
CAPABILITY_MATRIX
|
|
170
|
-
};
|
package/lazy-panel.d.mts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ComponentType } from 'react';
|
|
2
|
-
import { HudPanel, HudEnv } from './core/types.mjs';
|
|
3
|
-
import 'lucide-react';
|
|
4
|
-
|
|
5
|
-
type HudPanelMeta = Omit<HudPanel, "content">;
|
|
6
|
-
/**
|
|
7
|
-
* Declare a panel whose code is only fetched where its capability is granted.
|
|
8
|
-
*
|
|
9
|
-
* The provider already drops panels the tier denies, but that happens at
|
|
10
|
-
* render, and the panel's module is still in the graph, so an observe-only
|
|
11
|
-
* production hud downloads the dispatch, seed and impersonation panels it can
|
|
12
|
-
* never open. Returning `null` here instead keeps `lazy()`'s `import()`
|
|
13
|
-
* unreached, so the bundler emits those panels as separate chunks and the
|
|
14
|
-
* browser never asks for them.
|
|
15
|
-
*
|
|
16
|
-
* Callers spread the result and filter: the array shape stays declarative.
|
|
17
|
-
*
|
|
18
|
-
* ```tsx
|
|
19
|
-
* const PANELS = [
|
|
20
|
-
* { id: "env", ..., content: <EnvInfoPanel /> },
|
|
21
|
-
* hudLazyPanel(HUD_ENV, { id: "dispatch", ..., capability: "dispatch.hermes" },
|
|
22
|
-
* () => import("@hn-monorepo/hud/panels/dispatch-panel").then((m) => m.DispatchPanel)),
|
|
23
|
-
* ].filter((panel): panel is HudPanel => panel !== null);
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
declare function hudLazyPanel(meta: HudPanelMeta, load: () => Promise<ComponentType>, env?: HudEnv): HudPanel | null;
|
|
27
|
-
|
|
28
|
-
export { type HudPanelMeta, hudLazyPanel };
|
package/lazy-panel.js
DELETED
package/panels/cicd-panel.d.mts
DELETED
package/panels/cicd-panel.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CicdPanel
|
|
3
|
-
} from "../chunk-mz55rvw3.js";
|
|
4
|
-
import"../chunk-xezxydm3.js";
|
|
5
|
-
import"../chunk-9hw5r9y1.js";
|
|
6
|
-
import"../chunk-kyeb6qeq.js";
|
|
7
|
-
import"../chunk-xztw0xyt.js";
|
|
8
|
-
import"../chunk-vjh0d29g.js";
|
|
9
|
-
import"../chunk-v086j53b.js";
|
|
10
|
-
import"../chunk-5gtx3pza.js";
|
|
11
|
-
export {
|
|
12
|
-
CicdPanel
|
|
13
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
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 };
|
|
@@ -1,10 +0,0 @@
|
|
|
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 };
|
package/panels/dispatch-panel.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DispatchPanel
|
|
3
|
-
} from "../chunk-h0hmjdqa.js";
|
|
4
|
-
import"../chunk-50pq4sg6.js";
|
|
5
|
-
import"../chunk-82nm9wcg.js";
|
|
6
|
-
import"../chunk-9hw5r9y1.js";
|
|
7
|
-
import"../chunk-kyeb6qeq.js";
|
|
8
|
-
import"../chunk-xztw0xyt.js";
|
|
9
|
-
import"../chunk-vjh0d29g.js";
|
|
10
|
-
import"../chunk-v086j53b.js";
|
|
11
|
-
import"../chunk-5gtx3pza.js";
|
|
12
|
-
export {
|
|
13
|
-
DispatchPanel
|
|
14
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
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 };
|
package/panels/env-info-panel.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
EnvInfoPanel
|
|
3
|
-
} from "../chunk-6ngkpwz7.js";
|
|
4
|
-
import"../chunk-9hw5r9y1.js";
|
|
5
|
-
import"../chunk-kyeb6qeq.js";
|
|
6
|
-
import"../chunk-xztw0xyt.js";
|
|
7
|
-
import"../chunk-vjh0d29g.js";
|
|
8
|
-
import"../chunk-v086j53b.js";
|
|
9
|
-
import"../chunk-5gtx3pza.js";
|
|
10
|
-
export {
|
|
11
|
-
EnvInfoPanel
|
|
12
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
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 };
|
|
@@ -1,11 +0,0 @@
|
|
|
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 };
|
|
@@ -1,113 +0,0 @@
|
|
|
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
|
-
};
|
package/panels/info-row.d.mts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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 };
|
package/panels/info-row.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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 };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MockSeedPanel
|
|
3
|
-
} from "../chunk-hex3wqag.js";
|
|
4
|
-
import"../chunk-50pq4sg6.js";
|
|
5
|
-
import"../chunk-9hw5r9y1.js";
|
|
6
|
-
import"../chunk-kyeb6qeq.js";
|
|
7
|
-
import"../chunk-xztw0xyt.js";
|
|
8
|
-
import"../chunk-vjh0d29g.js";
|
|
9
|
-
import"../chunk-v086j53b.js";
|
|
10
|
-
import"../chunk-hc2g0n35.js";
|
|
11
|
-
import"../chunk-5gtx3pza.js";
|
|
12
|
-
export {
|
|
13
|
-
MockSeedPanel
|
|
14
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
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 };
|
package/panels/sessions-panel.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SessionsPanel
|
|
3
|
-
} from "../chunk-edq4jqch.js";
|
|
4
|
-
import"../chunk-50pq4sg6.js";
|
|
5
|
-
import"../chunk-9hw5r9y1.js";
|
|
6
|
-
import"../chunk-kyeb6qeq.js";
|
|
7
|
-
import"../chunk-xztw0xyt.js";
|
|
8
|
-
import"../chunk-vjh0d29g.js";
|
|
9
|
-
import"../chunk-v086j53b.js";
|
|
10
|
-
import"../chunk-5gtx3pza.js";
|
|
11
|
-
export {
|
|
12
|
-
SessionsPanel
|
|
13
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
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 };
|