@hansenexus/hud 0.7.0 → 0.9.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 (77) hide show
  1. package/README.md +153 -14
  2. package/dist/{access-Bc709qpl.d.ts → access-CwPCPsv0.d.ts} +1 -1
  3. package/dist/auto/runtime.d.ts +9 -9
  4. package/dist/auto.d.ts +2 -2
  5. package/dist/auto.js +1 -1
  6. package/dist/cli.js +34 -1
  7. package/dist/{define-hud-DTv3njuU.d.ts → define-hud-B0aFXrcK.d.ts} +1 -1
  8. package/dist/{design-BXG1a4we.js → design-BIXY1-Ex.js} +26 -8
  9. package/dist/{force-state-panel-mu-txJnA.js → force-state-panel-D5oDydLs.js} +1 -1
  10. package/dist/{handler-DMzSTqyG.d.ts → handler-BmFhaA2D.d.ts} +1 -1
  11. package/dist/{index-C3wzZS3o.d.ts → index-5B7foZut.d.ts} +2 -2
  12. package/dist/{index-D-hI-DRJ.d.ts → index-B2KCKkN0.d.ts} +1 -1
  13. package/dist/index-B7qaEUgh.d.ts +44 -0
  14. package/dist/{index-CQXiuMZQ.d.ts → index-BGFyuJyN.d.ts} +1 -1
  15. package/dist/{index-Caohnz3B.d.ts → index-BeqWehuh.d.ts} +38 -10
  16. package/dist/{index-BJJoAXJ2.d.ts → index-BqKysxTq.d.ts} +1 -1
  17. package/dist/{index-DLCSLWW4.d.ts → index-D97Fnoie.d.ts} +2 -2
  18. package/dist/{index-BR5OB7DO.d.ts → index-DS0yT0c-.d.ts} +1 -1
  19. package/dist/{index-BNoPbSYD.d.ts → index-DvlCkGB1.d.ts} +1 -1
  20. package/dist/index.d.ts +3 -3
  21. package/dist/index.js +49 -196
  22. package/dist/lanes-panel-Disg54DY.js +395 -0
  23. package/dist/navigation-CX6AXm7H.js +176 -0
  24. package/dist/next/config.cjs +2 -0
  25. package/dist/next/config.d.cts +1 -0
  26. package/dist/next/config.d.ts +1 -0
  27. package/dist/next/config.js +2 -0
  28. package/dist/next.d.ts +4 -1
  29. package/dist/next.js +12 -1
  30. package/dist/obstacles-CCmRFTcZ.js +176 -0
  31. package/dist/plugins/a11y.d.ts +1 -1
  32. package/dist/plugins/access/server.d.ts +3 -3
  33. package/dist/plugins/access.d.ts +2 -2
  34. package/dist/plugins/agent/server.js +1 -1
  35. package/dist/plugins/agent.d.ts +2 -2
  36. package/dist/plugins/capture.d.ts +2 -2
  37. package/dist/plugins/data/server.d.ts +1 -1
  38. package/dist/plugins/data/server.js +1 -1
  39. package/dist/plugins/data.d.ts +1 -1
  40. package/dist/plugins/design/server.d.ts +55 -15
  41. package/dist/plugins/design/server.js +187 -122
  42. package/dist/plugins/design.d.ts +3 -3
  43. package/dist/plugins/design.js +1 -1
  44. package/dist/plugins/inspect.d.ts +1 -1
  45. package/dist/plugins/lanes/server.d.ts +165 -0
  46. package/dist/plugins/lanes/server.js +845 -0
  47. package/dist/plugins/lanes.d.ts +22 -0
  48. package/dist/plugins/lanes.js +30 -0
  49. package/dist/plugins/observe.d.ts +1 -1
  50. package/dist/plugins/ops/server.d.ts +1 -1
  51. package/dist/plugins/ops.d.ts +1 -1
  52. package/dist/plugins/routes/server.d.ts +1 -1
  53. package/dist/plugins/routes.d.ts +3 -3
  54. package/dist/plugins/routes.js +381 -52
  55. package/dist/plugins/seo.d.ts +1 -1
  56. package/dist/plugins/vitals.d.ts +1 -1
  57. package/dist/{plugins-BZT-1LBe.d.ts → plugins-pL2CoWzI.d.ts} +7 -0
  58. package/dist/same-origin-BHuZO1_H.js +36 -0
  59. package/dist/server.d.ts +2 -2
  60. package/dist/store.d.ts +1 -1
  61. package/dist/store.js +1 -1
  62. package/dist/types-BkrkOP3h.js +6 -0
  63. package/dist/types-Dazn3aWZ.d.ts +86 -0
  64. package/dist/{meta-C_G7MB5w.d.ts → types-Dc6JWZR7.d.ts} +6 -6
  65. package/dist/variant-bar-BzZ0ln-C.js +768 -0
  66. package/dist/variant-picks-Byc0hC8a.js +144 -0
  67. package/dist/variants-export-vEtZ-OGC.js +75 -0
  68. package/dist/{variants-panel-B6zWcknV.js → variants-panel-D23v5KIp.js} +71 -54
  69. package/dist/variants-types-BOsZ5fDz.js +65 -0
  70. package/dist/variants-types-VkW7vFZF.d.ts +139 -0
  71. package/dist/variants.d.ts +1 -1
  72. package/dist/variants.js +1 -1
  73. package/dist/vite.d.ts +2 -2
  74. package/package.json +2 -2
  75. package/dist/index-B1vHAY9p.d.ts +0 -20
  76. package/dist/same-origin-BGet22CC.js +0 -21
  77. package/dist/variants-types-CcRf119M.d.ts +0 -63
package/dist/store.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as HudCapability, p as HudRoutes } from "./plugins-BZT-1LBe.js";
1
+ import { a as HudCapability, p as HudRoutes } from "./plugins-pL2CoWzI.js";
2
2
  import { a as STORE_COLLECTION, c as assertId, i as HudStoreValue, l as assertValue, n as HudStoreEntry, o as STORE_ID, r as HudStoreError, s as assertCollection, t as HudStore, u as isStoreValue } from "./types-DaJcsEjO.js";
3
3
  //#region src/store/file.d.ts
4
4
  interface FileStoreOptions {
package/dist/store.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { i as definePlugin } from "./plugins-CcW_K7c2.js";
2
- import { t as refuseCrossSite } from "./same-origin-BGet22CC.js";
2
+ import { t as refuseCrossSite } from "./same-origin-BHuZO1_H.js";
3
3
  import { a as assertId, i as assertCollection, n as STORE_COLLECTION, o as assertValue, r as STORE_ID, s as isStoreValue, t as HudStoreError } from "./types-BIkI-qN8.js";
4
4
  import { t as file } from "./file-xdSaQ2uR.js";
5
5
  //#region src/store/http.ts
@@ -0,0 +1,6 @@
1
+ //#region src/plugins/lanes/types.ts
2
+ /** Wire types shared by the `lanes` plugin's client and server halves. */
3
+ const LANES_ID = "lanes";
4
+ const LANES_CAPABILITY = "lanes.preview";
5
+ //#endregion
6
+ export { LANES_ID as n, LANES_CAPABILITY as t };
@@ -0,0 +1,86 @@
1
+ //#region src/plugins/lanes/types.d.ts
2
+ declare const LANES_CAPABILITY = "lanes.preview";
3
+ /** One dev server listening in a lane. */
4
+ interface LaneServer {
5
+ port: number;
6
+ pid: number;
7
+ /** Preview URL on the box's tailnet name, e.g. `http://box.ts.example.dev:5173/`. */
8
+ url: string;
9
+ /** Bound to 127.0.0.1 or ::1 only: the tailnet URL will not answer. */
10
+ loopback?: boolean;
11
+ }
12
+ /** The session working in a lane, from the box's session ledger. */
13
+ interface LaneWorker {
14
+ sid: string;
15
+ state: string;
16
+ /** Whether a terminal exists to type a comment into (`lane-runtime terminal list`). */
17
+ reachable?: boolean;
18
+ }
19
+ /** One lane on the box, as `GET <apiBase>/lanes/lanes` lists it. */
20
+ interface LaneInfo {
21
+ /** Folder name, `<repo>-issue-<N>-<slug>`. */
22
+ lane: string;
23
+ repo: string;
24
+ issue?: number;
25
+ branch?: string;
26
+ servers: LaneServer[];
27
+ worker?: LaneWorker;
28
+ /** The lane this HUD's own dev server runs in. */
29
+ current?: boolean;
30
+ /** Whether the lane has a `dev` script, so Start can run. */
31
+ startable: boolean;
32
+ }
33
+ interface LanesResponse {
34
+ /** The box's tailnet name; null when it is unknown (links then fall back to the page's host). */
35
+ host: string | null;
36
+ lanes: LaneInfo[];
37
+ }
38
+ type StartResponse = {
39
+ ok: true;
40
+ lane: string;
41
+ port: number;
42
+ url: string;
43
+ log?: string;
44
+ } | {
45
+ ok: false;
46
+ error: string;
47
+ };
48
+ /** `POST <apiBase>/lanes/comment`. */
49
+ interface CommentBody {
50
+ lane: string;
51
+ text: string;
52
+ /** The page the comment is about. */
53
+ url?: string;
54
+ viewport?: {
55
+ width: number;
56
+ height: number;
57
+ };
58
+ }
59
+ /** `POST <apiBase>/lanes/screenshot`: the page to render and the width it is viewed at. */
60
+ interface ShotBody {
61
+ lane: string;
62
+ url: string;
63
+ viewport: {
64
+ width: number;
65
+ height: number;
66
+ };
67
+ /** Optional words sent with the picture. */
68
+ text?: string;
69
+ }
70
+ /** What happened to a comment or screenshot, step by step. */
71
+ interface Delivery {
72
+ ok: boolean;
73
+ /** The ledger event that records it (`ledger:<to sid>:<event id>`), when written. */
74
+ ref?: string;
75
+ /** Typed into the worker's terminal. */
76
+ delivered: boolean;
77
+ /** PR comment URL, for a screenshot posted to the lane's PR. */
78
+ prComment?: string;
79
+ /** Where the PNG was saved on the box, for a screenshot. */
80
+ file?: string;
81
+ /** Why a step did not happen; the others may still have. */
82
+ notes: string[];
83
+ error?: string;
84
+ }
85
+ //#endregion
86
+ export { LaneServer as a, ShotBody as c, LaneInfo as i, StartResponse as l, Delivery as n, LaneWorker as o, LANES_CAPABILITY as r, LanesResponse as s, CommentBody as t };
@@ -1,3 +1,8 @@
1
+ //#region src/plugins/routes/meta.d.ts
2
+ /** Shared by both halves, so client and server gate on the same capability. */
3
+ declare const ROUTES_ID = "routes";
4
+ declare const ROUTES_CAPABILITY = "routes.read";
5
+ //#endregion
1
6
  //#region src/plugins/routes/types.d.ts
2
7
  /** One dynamic segment of a route pattern. */
3
8
  interface RouteSegment {
@@ -41,9 +46,4 @@ interface RoutesResponse {
41
46
  routes: RouteEntry[];
42
47
  }
43
48
  //#endregion
44
- //#region src/plugins/routes/meta.d.ts
45
- /** Shared by both halves, so client and server gate on the same capability. */
46
- declare const ROUTES_ID = "routes";
47
- declare const ROUTES_CAPABILITY = "routes.read";
48
- //#endregion
49
- export { RouteUrl as a, RouteSegment as i, ROUTES_ID as n, RoutesResponse as o, RouteEntry as r, ROUTES_CAPABILITY as t };
49
+ export { ROUTES_CAPABILITY as a, RoutesResponse as i, RouteSegment as n, ROUTES_ID as o, RouteUrl as r, RouteEntry as t };