@peasant-labs/fairtrade 0.0.6 → 0.0.7

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 (36) hide show
  1. package/LICENSE +202 -21
  2. package/dist/lib/InUseShell-VRWaysXY.js +2488 -0
  3. package/dist/lib/commons.js +801 -836
  4. package/dist/lib/components.css +1 -1
  5. package/dist/lib/graph.css +1 -1
  6. package/dist/lib/graph.js +684 -285
  7. package/dist/lib/types/CommitGraph.d.ts +12 -3
  8. package/dist/lib/types/MapCanvas.d.ts +45 -2
  9. package/dist/lib/types/ProviderIcon.d.ts +23 -20
  10. package/dist/lib/types/commons/providers.d.ts +7 -8
  11. package/dist/lib/types/commons/types.d.ts +3 -6
  12. package/dist/lib/types/graph/Changes.d.ts +8 -4
  13. package/dist/lib/types/graph/CodeMap.d.ts +17 -1
  14. package/dist/lib/types/graph/CodeMapComposition.d.ts +25 -1
  15. package/dist/lib/types/graph/CodeMapNavigator.d.ts +35 -0
  16. package/dist/lib/types/graph/changeGraph.d.ts +12 -0
  17. package/dist/lib/types/graph/codeMapState.d.ts +136 -0
  18. package/dist/lib/types/graph/index.d.ts +15 -1
  19. package/dist/lib/types/graph/timelineNavigation.d.ts +33 -0
  20. package/dist/lib/types/graph/types.d.ts +67 -440
  21. package/dist/lib/types/index.d.ts +2 -0
  22. package/dist/lib/types/provider-policy.d.ts +27 -0
  23. package/dist/lib/types/transcript/TranscriptViewer.d.ts +1 -1
  24. package/dist/lib/types/transcript/adapter.d.ts +5 -40
  25. package/dist/lib/types/transcript/graph/GraphLegend.d.ts +3 -3
  26. package/dist/lib/types/transcript/graph/GraphTurnNode.d.ts +2 -2
  27. package/dist/lib/types/transcript/index.d.ts +3 -1
  28. package/dist/lib/types/transcript/initial-position.d.ts +80 -0
  29. package/dist/lib/types/transcript/state-capabilities.d.ts +22 -1
  30. package/dist/lib/types/transcript/useTranscriptInitialPosition.d.ts +26 -0
  31. package/dist/lib/types/transcript/view-model.d.ts +16 -16
  32. package/dist/lib/types/transcript/wire-types.d.ts +46 -308
  33. package/dist/lib/{ui-TG4XLhWL.js → ui-CKqVB4x2.js} +3395 -3401
  34. package/dist/lib/ui.js +4 -4
  35. package/package.json +51 -26
  36. package/dist/lib/InUseShell-CjtqHauP.js +0 -1532
package/dist/lib/graph.js CHANGED
@@ -1,28 +1,29 @@
1
- import { d as e, l as t, n, r, s as i, t as a, u as o } from "./InUseShell-CjtqHauP.js";
2
- import { useMemo as s, useRef as c, useState as l } from "react";
3
- import { jsx as u, jsxs as d } from "react/jsx-runtime";
4
- import { Box as f, Check as p, ChevronDown as m, ChevronRight as h, Coins as g, CornerDownRight as _, FileDiff as v, FileText as y, GitMerge as b, Hash as x, MessageSquare as S, RotateCw as C, Share2 as w, Tag as T, TriangleAlert as E, X as D } from "lucide-react";
1
+ import { A as e, C as t, E as n, S as r, T as i, _ as a, b as o, d as s, f as c, g as l, h as u, l as d, m as f, n as p, p as m, r as h, s as g, t as _, u as v, v as y, w as b, x, y as S } from "./InUseShell-VRWaysXY.js";
2
+ import { useMemo as C, useRef as w, useState as T } from "react";
3
+ import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
4
+ import { Box as k, Check as A, ChevronDown as j, ChevronRight as M, Coins as N, CornerDownRight as P, FileCode as F, FileDiff as I, FileText as L, Folder as R, GitMerge as z, Hash as ee, Map as B, MessageSquare as V, RotateCw as H, Search as U, Share2 as te, Tag as W, TriangleAlert as G, X as K } from "lucide-react";
5
+ import { AllChangeBindings as ne, AllDiffLineKinds as re, AllEdgeViolationKinds as ie, AllFileChangeStatuses as ae, AllMapNodeKinds as oe, ChangeBinding as se, DiffLineKind as ce, EdgeViolationKind as le, FileChangeStatus as ue, MapNodeKind as de, isChangeBinding as fe, isDiffLineKind as pe, isEdgeViolationKind as me, isFileChangeStatus as he, isMapNodeKind as ge } from "@peasant-labs/schema";
5
6
  //#region src/ui/graph/changeGraph.js
6
- var O = 6e4, k = 60 * O, A = 24 * k, j = 7 * A;
7
- function M(e, t) {
7
+ var q = 6e4, J = 60 * q, Y = 24 * J, _e = 7 * Y;
8
+ function X(e, t) {
8
9
  if (e == null) return "";
9
10
  let n = Math.max(0, t - e);
10
- return n < k ? `${Math.max(1, Math.floor(n / O))}m ago` : n < A ? `${Math.floor(n / k)}h ago` : n < j ? `${Math.floor(n / A)}d ago` : `${Math.floor(n / j)}wk ago`;
11
+ return n < J ? `${Math.max(1, Math.floor(n / q))}m ago` : n < Y ? `${Math.floor(n / J)}h ago` : n < _e ? `${Math.floor(n / Y)}d ago` : `${Math.floor(n / _e)}wk ago`;
11
12
  }
12
- function N(e, { nowMs: t }) {
13
- let n = e.recentCommits ?? [], r = e.changes ?? [], i = e.defaultBranch, a = r.filter((e) => !e.merged).slice().sort((e, t) => P(t) - P(e) || e.branch.localeCompare(t.branch)), o = r.filter((e) => e.merged && !e.reverted), s = r.filter((e) => e.merged && e.reverted), c = new Map(o.filter((e) => e.mergeCommitHash).map((e) => [e.mergeCommitHash, e])), l = a.map((e, t) => ({
13
+ function ve(e, { nowMs: t }) {
14
+ let n = e.recentCommits ?? [], r = e.changes ?? [], i = e.defaultBranch, a = e.sessions ?? [], o = new Map(a.map((e) => [e.sessionId, e])), s = new Set(n.flatMap((e) => e.sessionIds ?? [])), c = r.filter((e) => !e.merged).slice().sort((e, t) => ye(t) - ye(e) || e.branch.localeCompare(t.branch)), l = r.filter((e) => e.merged && !e.reverted), u = r.filter((e) => e.merged && e.reverted), d = new Map(l.filter((e) => e.mergeCommitHash).map((e) => [e.mergeCommitHash, e])), f = c.map((e, t) => ({
14
15
  change: e,
15
16
  lane: t + 1,
16
17
  baseHash: e.baseHash,
17
18
  tipMs: e.tipCommitMs ?? null
18
- })), u = [], d = /* @__PURE__ */ new Set(), f = (e) => {
19
- for (let n of l) {
20
- if (d.has(n.lane)) continue;
19
+ })), p = [], m = /* @__PURE__ */ new Set(), h = (e) => {
20
+ for (let n of f) {
21
+ if (m.has(n.lane)) continue;
21
22
  let r = n.tipMs;
22
23
  if (!(r == null ? e === null : e !== null && r >= e)) continue;
23
- d.add(n.lane);
24
+ m.add(n.lane);
24
25
  let i = n.change;
25
- u.push({
26
+ p.push({
26
27
  id: `tip:${i.branch}`,
27
28
  lane: n.lane,
28
29
  parents: n.baseHash ? [n.baseHash] : [],
@@ -30,94 +31,161 @@ function N(e, { nowMs: t }) {
30
31
  branch: i.branch,
31
32
  session: (i.sessionCount ?? 0) > 0,
32
33
  tip: !0,
33
- time: M(n.tipMs, t)
34
+ time: X(n.tipMs, t)
34
35
  });
35
36
  }
36
37
  };
37
- return f(null), n.forEach((e, r) => {
38
- f(e.timeMs ?? -Infinity);
39
- let a = n[r + 1], o = a ? [a.hash] : [], s = c.get(e.hash);
40
- s && o.push(`tip:${s.branch}`), u.push({
38
+ h(null), n.forEach((e, r) => {
39
+ h(e.timeMs ?? -Infinity);
40
+ let a = n[r + 1], s = a ? [a.hash] : [], c = d.get(e.hash);
41
+ c && s.push(`tip:${c.branch}`), p.push({
41
42
  id: e.hash,
42
43
  lane: 0,
43
- parents: o,
44
+ parents: s,
44
45
  message: e.subject,
45
46
  branch: i,
46
47
  session: e.hasSession,
47
- merged: s ? !0 : void 0,
48
- time: M(e.timeMs, t)
48
+ sessionRefs: (e.sessionIds ?? []).flatMap((e) => {
49
+ let t = o.get(e);
50
+ return t ? [t] : [];
51
+ }),
52
+ merged: c ? !0 : void 0,
53
+ time: X(e.timeMs, t)
49
54
  });
50
- }), f(-Infinity), {
51
- commits: u,
52
- reverted: s.map((e) => ({
53
- branch: e.branch,
54
- mergedAtMs: e.mergedAtMs ?? null,
55
- when: M(e.mergedAtMs, t)
56
- })),
57
- openCount: a.length,
58
- mergedCount: o.length + s.length
55
+ }), h(-Infinity);
56
+ let g = u.map((e) => ({
57
+ branch: e.branch,
58
+ mergedAtMs: e.mergedAtMs ?? null,
59
+ when: X(e.mergedAtMs, t)
60
+ })), _ = a.filter((e) => e.hasCommitBinding === !0 && !s.has(e.sessionId));
61
+ return {
62
+ commits: p,
63
+ reverted: g,
64
+ openCount: c.length,
65
+ mergedCount: l.length + u.length,
66
+ unlinkedSessions: a.filter((e) => e.hasCommitBinding === !1 || e.hasCommitBinding === void 0 && !s.has(e.sessionId)),
67
+ outsideWindowSessions: _
59
68
  };
60
69
  }
61
- function P(e) {
70
+ function ye(e) {
62
71
  return e.tipCommitMs ?? Infinity;
63
72
  }
64
73
  //#endregion
65
74
  //#region src/ui/graph/Changes.jsx
66
- function F({ payload: t, projectLabel: n, selectedId: r, onSelectChange: i, onOpenMap: a, hasMore: o = !1, onShowOlder: c, nowMs: l }) {
67
- let p = l ?? Date.now(), { commits: m, reverted: h, openCount: g, mergedCount: _ } = s(() => N(t, { nowMs: p }), [t, p]), v = t.defaultBranch;
68
- return /* @__PURE__ */ d("div", {
75
+ function be({ payload: t, projectLabel: r, selectedId: i, onNavigate: a, onSelectChange: o, onOpenMap: s, hasMore: c = !1, onShowOlder: l, onOpenSession: u, nowMs: d }) {
76
+ let f = d ?? Date.now(), { commits: p, reverted: m, unlinkedSessions: h, outsideWindowSessions: g, openCount: _, mergedCount: v } = C(() => ve(t, { nowMs: f }), [t, f]), y = t.defaultBranch;
77
+ return /* @__PURE__ */ O("div", {
69
78
  className: "gmp-root gmp-changes-root",
70
- children: [/* @__PURE__ */ d("div", {
79
+ children: [/* @__PURE__ */ O("div", {
71
80
  className: "gmp-changes-head",
72
- children: [/* @__PURE__ */ d("div", { children: [n && /* @__PURE__ */ d("span", {
81
+ children: [/* @__PURE__ */ O("div", { children: [r && /* @__PURE__ */ O("span", {
73
82
  className: "label",
74
- children: ["lines of work · ", n]
75
- }), /* @__PURE__ */ d("div", {
83
+ children: ["lines of work · ", r]
84
+ }), /* @__PURE__ */ O("div", {
76
85
  className: "gmp-changes-sub mono",
77
86
  children: [
78
- v ? `default branch ${v} · ` : "",
79
- g,
80
- " open · ",
87
+ y ? `default branch ${y} · ` : "",
81
88
  _,
89
+ " open · ",
90
+ v,
82
91
  " merged"
83
92
  ]
84
- })] }), /* @__PURE__ */ d("button", {
93
+ })] }), /* @__PURE__ */ O("button", {
85
94
  type: "button",
86
95
  className: "btn btn-secondary btn-sm",
87
- onClick: () => a?.(),
88
- children: [/* @__PURE__ */ u(f, {
96
+ onClick: () => {
97
+ a ? a({ type: "open-map" }) : s?.();
98
+ },
99
+ children: [/* @__PURE__ */ D(k, {
89
100
  size: 14,
90
101
  "aria-hidden": "true"
91
102
  }), " open the map"]
92
103
  })]
93
- }), /* @__PURE__ */ d("div", {
104
+ }), /* @__PURE__ */ O("div", {
94
105
  className: "gmp-changes-body",
95
106
  children: [
96
- /* @__PURE__ */ u(e, {
107
+ /* @__PURE__ */ D(n, {
97
108
  className: "gmp-cg",
98
- commits: m,
99
- selectedId: r,
109
+ commits: p,
110
+ selectedId: i,
100
111
  label: "default-branch commit history",
101
- onSelect: (e) => i?.(e),
102
- hasMore: o,
103
- onShowOlder: c
112
+ onNavigate: a,
113
+ onSelect: (e) => o?.(e),
114
+ onOpenSession: u,
115
+ hasMore: c,
116
+ onShowOlder: l
117
+ }),
118
+ h.length > 0 && /* @__PURE__ */ O("section", {
119
+ className: "gmp-unlinked-sessions",
120
+ "aria-labelledby": "gmp-unlinked-sessions-heading",
121
+ children: [/* @__PURE__ */ D("h2", {
122
+ id: "gmp-unlinked-sessions-heading",
123
+ className: "sb-head gmp-unlinked-sessions-head",
124
+ children: "sessions not linked to a commit"
125
+ }), /* @__PURE__ */ D("div", {
126
+ className: "gmp-unlinked-sessions-list",
127
+ children: h.map((t) => /* @__PURE__ */ O("button", {
128
+ type: "button",
129
+ className: "gmp-unlinked-session",
130
+ onClick: () => {
131
+ a ? a({
132
+ type: "open-session",
133
+ sessionId: t.sessionId,
134
+ source: { kind: "unlinked" }
135
+ }) : u?.(t.sessionId);
136
+ },
137
+ children: [/* @__PURE__ */ D(e, { harness: t.harness }), /* @__PURE__ */ D("span", { children: t.title || t.sessionId })]
138
+ }, t.sessionId))
139
+ })]
140
+ }),
141
+ g.length > 0 && /* @__PURE__ */ O("section", {
142
+ className: "gmp-unlinked-sessions",
143
+ "aria-labelledby": "gmp-outside-window-sessions-heading",
144
+ children: [/* @__PURE__ */ D("h2", {
145
+ id: "gmp-outside-window-sessions-heading",
146
+ className: "sb-head gmp-unlinked-sessions-head",
147
+ children: "sessions linked outside this visible commit window"
148
+ }), /* @__PURE__ */ D("div", {
149
+ className: "gmp-unlinked-sessions-list",
150
+ children: g.map((t) => /* @__PURE__ */ O("button", {
151
+ type: "button",
152
+ className: "gmp-unlinked-session",
153
+ onClick: () => {
154
+ a ? a({
155
+ type: "open-session",
156
+ sessionId: t.sessionId,
157
+ source: { kind: "outside-window" }
158
+ }) : u?.(t.sessionId);
159
+ },
160
+ children: [/* @__PURE__ */ D(e, { harness: t.harness }), /* @__PURE__ */ D("span", { children: t.title || t.sessionId })]
161
+ }, t.sessionId))
162
+ })]
104
163
  }),
105
- h.length > 0 && /* @__PURE__ */ d("div", {
164
+ m.length > 0 && /* @__PURE__ */ O("div", {
106
165
  className: "gmp-merged-sec",
107
- children: [/* @__PURE__ */ u("div", {
166
+ children: [/* @__PURE__ */ D("div", {
108
167
  className: "sb-head gmp-merged-head",
109
168
  children: "already merged in"
110
- }), /* @__PURE__ */ u("div", {
169
+ }), /* @__PURE__ */ D("div", {
111
170
  className: "gmp-merged-list",
112
- children: h.map((e) => /* @__PURE__ */ d("button", {
171
+ children: m.map((e) => /* @__PURE__ */ O("button", {
113
172
  type: "button",
114
173
  className: "gmp-merged-chip gmp-merged-revert",
115
- onClick: () => i?.({
116
- id: `revert:${e.branch}`,
117
- branch: e.branch
118
- }),
174
+ onClick: () => {
175
+ let t = {
176
+ id: `revert:${e.branch}`,
177
+ branch: e.branch
178
+ };
179
+ a ? a({
180
+ type: "open-change",
181
+ change: {
182
+ id: t.id,
183
+ branch: t.branch
184
+ }
185
+ }) : o?.(t);
186
+ },
119
187
  children: [
120
- /* @__PURE__ */ u(b, {
188
+ /* @__PURE__ */ D(z, {
121
189
  size: 13,
122
190
  "aria-hidden": "true"
123
191
  }),
@@ -129,12 +197,12 @@ function F({ payload: t, projectLabel: n, selectedId: r, onSelectChange: i, onOp
129
197
  }, e.branch))
130
198
  })]
131
199
  }),
132
- /* @__PURE__ */ d("div", {
200
+ /* @__PURE__ */ O("div", {
133
201
  className: "gmp-changes-legend",
134
202
  children: [
135
- /* @__PURE__ */ d("span", {
203
+ /* @__PURE__ */ O("span", {
136
204
  className: "gmp-legend-item",
137
- children: [/* @__PURE__ */ u("span", {
205
+ children: [/* @__PURE__ */ D("span", {
138
206
  className: "cg-dot cg-dot-filled",
139
207
  style: {
140
208
  width: 9,
@@ -143,9 +211,9 @@ function F({ payload: t, projectLabel: n, selectedId: r, onSelectChange: i, onOp
143
211
  "aria-hidden": "true"
144
212
  }), " commit with a recorded session"]
145
213
  }),
146
- /* @__PURE__ */ d("span", {
214
+ /* @__PURE__ */ O("span", {
147
215
  className: "gmp-legend-item",
148
- children: [/* @__PURE__ */ u("span", {
216
+ children: [/* @__PURE__ */ D("span", {
149
217
  className: "cg-dot cg-dot-hollow",
150
218
  style: {
151
219
  width: 9,
@@ -154,7 +222,7 @@ function F({ payload: t, projectLabel: n, selectedId: r, onSelectChange: i, onOp
154
222
  "aria-hidden": "true"
155
223
  }), " no session captured"]
156
224
  }),
157
- /* @__PURE__ */ u("span", {
225
+ /* @__PURE__ */ D("span", {
158
226
  className: "gmp-legend-item gmp-legend-dim",
159
227
  children: "a filled dot also flies a sparkle · select a commit to open it"
160
228
  })
@@ -166,29 +234,29 @@ function F({ payload: t, projectLabel: n, selectedId: r, onSelectChange: i, onOp
166
234
  }
167
235
  //#endregion
168
236
  //#region src/ui/graph/ChangeDetail.jsx
169
- var I = {
237
+ var xe = {
170
238
  M: "changed",
171
239
  A: "added",
172
240
  D: "deleted",
173
241
  R: "renamed"
174
- }, L = {
242
+ }, Se = {
175
243
  A: "chip-ok",
176
244
  M: "",
177
245
  D: "chip-err",
178
246
  R: "chip-warn"
179
- }, R = {
247
+ }, Ce = {
180
248
  context: "ctx",
181
249
  add: "add",
182
250
  del: "del"
183
251
  };
184
- function z(e) {
252
+ function we(e) {
185
253
  let t = (e.split("/").pop() ?? e).replace(/[-_]+/g, " ").trim();
186
254
  return t.charAt(0).toUpperCase() + t.slice(1);
187
255
  }
188
- var B = (e) => e >= 1e3 ? `≈${(e / 1e3).toFixed(1)}k` : String(e);
189
- function V(e) {
256
+ var Te = (e) => e >= 1e3 ? `≈${(e / 1e3).toFixed(1)}k` : String(e);
257
+ function Ee(e) {
190
258
  let t = e.oldStart, n = e.newStart, r = e.lines.map((e) => {
191
- let r = R[e.kind] ?? "ctx";
259
+ let r = Ce[e.kind] ?? "ctx";
192
260
  return r === "add" ? {
193
261
  type: r,
194
262
  newNo: n++,
@@ -209,107 +277,109 @@ function V(e) {
209
277
  lines: r
210
278
  };
211
279
  }
212
- function H({ file: e, diff: t, open: n, onToggle: r }) {
213
- let i = e.status, a = t ? new Set(t.hunks.map((e) => e.sessionId).filter(Boolean)).size : null;
214
- return /* @__PURE__ */ d("div", {
280
+ function De({ file: e, diff: n, open: r, onToggle: a }) {
281
+ n && t(n);
282
+ let o = e.status, s = n ? new Set(n.hunks.map((e) => e.sessionId).filter(Boolean)).size : null;
283
+ return /* @__PURE__ */ O("div", {
215
284
  className: "gmp-file",
216
- children: [/* @__PURE__ */ d("button", {
285
+ children: [/* @__PURE__ */ O("button", {
217
286
  type: "button",
218
287
  className: "gmp-file-head",
219
- "aria-expanded": n,
220
- onClick: r,
288
+ "aria-expanded": r,
289
+ onClick: a,
221
290
  children: [
222
- u(n ? m : h, {
291
+ D(r ? j : M, {
223
292
  size: 14,
224
293
  "aria-hidden": "true"
225
294
  }),
226
- /* @__PURE__ */ u("span", {
295
+ /* @__PURE__ */ D("span", {
227
296
  className: "mono gmp-file-path",
228
297
  children: e.path
229
298
  }),
230
- /* @__PURE__ */ u("span", {
231
- className: "chip gmp-file-status " + (L[i] ?? ""),
232
- children: I[i] ?? i
299
+ /* @__PURE__ */ D("span", {
300
+ className: "chip gmp-file-status " + (Se[o] ?? ""),
301
+ children: xe[o] ?? o
233
302
  }),
234
- a != null && a > 0 && /* @__PURE__ */ d("span", {
303
+ s != null && s > 0 && /* @__PURE__ */ O("span", {
235
304
  className: "gmp-file-convos metaitem",
236
305
  children: [
237
- /* @__PURE__ */ u(S, {
306
+ /* @__PURE__ */ D(V, {
238
307
  size: 13,
239
308
  "aria-hidden": "true"
240
309
  }),
241
310
  " ",
242
- /* @__PURE__ */ u("span", {
311
+ /* @__PURE__ */ D("span", {
243
312
  className: "tnum",
244
- children: a
313
+ children: s
245
314
  })
246
315
  ]
247
316
  })
248
317
  ]
249
- }), n && /* @__PURE__ */ u("div", {
318
+ }), r && /* @__PURE__ */ D("div", {
250
319
  className: "gmp-file-body",
251
- children: t ? t.error ? /* @__PURE__ */ u("p", {
320
+ children: n ? n.error ? /* @__PURE__ */ D("p", {
252
321
  className: "gmp-diff-state gmp-diff-error mono",
253
- children: t.error
254
- }) : t.binary ? /* @__PURE__ */ u("p", {
322
+ children: n.error
323
+ }) : n.binary ? /* @__PURE__ */ D("p", {
255
324
  className: "gmp-diff-state mono",
256
325
  children: "binary file — no textual diff."
257
- }) : t.hunks.length === 0 ? /* @__PURE__ */ u("p", {
326
+ }) : n.hunks.length === 0 ? /* @__PURE__ */ D("p", {
258
327
  className: "gmp-diff-state mono",
259
328
  children: "no line changes."
260
- }) : t.hunks.map((e, n) => /* @__PURE__ */ d("div", {
329
+ }) : n.hunks.map((e, t) => /* @__PURE__ */ O("div", {
261
330
  className: "gmp-hunk",
262
331
  children: [
263
- e.sessionTitle && /* @__PURE__ */ d("div", {
332
+ e.sessionTitle && /* @__PURE__ */ O("div", {
264
333
  className: "gmp-hunk-attrib",
265
334
  children: [
266
- /* @__PURE__ */ u(_, {
335
+ /* @__PURE__ */ D(P, {
267
336
  size: 13,
268
337
  "aria-hidden": "true"
269
338
  }),
270
- /* @__PURE__ */ u("span", {
339
+ /* @__PURE__ */ D("span", {
271
340
  className: "gmp-hunk-from",
272
341
  children: "from"
273
342
  }),
274
- /* @__PURE__ */ u("span", {
343
+ /* @__PURE__ */ D("span", {
275
344
  className: "gmp-hunk-link",
276
345
  children: e.sessionTitle
277
346
  }),
278
- e.sessionId && /* @__PURE__ */ u("span", {
347
+ e.sessionId && /* @__PURE__ */ D("span", {
279
348
  className: "mono gmp-hunk-hash",
280
349
  children: e.sessionId.slice(0, 7)
281
350
  })
282
351
  ]
283
352
  }),
284
- /* @__PURE__ */ u(o, {
353
+ /* @__PURE__ */ D(i, {
285
354
  file: "",
286
- hunks: [V(e)],
355
+ hunks: [Ee(e)],
287
356
  className: "gmp-hunk-diff"
288
357
  }),
289
- t.truncated && n === t.hunks.length - 1 && /* @__PURE__ */ u("p", {
358
+ n.truncated && t === n.hunks.length - 1 && /* @__PURE__ */ D("p", {
290
359
  className: "gmp-diff-state mono",
291
360
  children: "diff truncated (file exceeds the size cap)."
292
361
  })
293
362
  ]
294
- }, n)) : /* @__PURE__ */ u("p", {
363
+ }, t)) : /* @__PURE__ */ D("p", {
295
364
  className: "gmp-diff-state mono",
296
365
  children: "loading diff…"
297
366
  })
298
367
  })]
299
368
  });
300
369
  }
301
- function U({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotation: i, onRemoveAnnotation: a, onOpenMap: o, onShare: s, onCopyRecap: m, initialOpenFiles: _ = {} }) {
302
- let [b, S] = l(_), [O, k] = l(null), [A, j] = l(!1), [M, N] = l(""), P = c({}), F = c(null), I = n ?? z(e.branch), L = e.work.length, R = e.newEdges.length, V = e.removedEdges.length, U = (e) => S((t) => ({
370
+ function Oe({ payload: e, getDiff: t, title: n, annotation: i = "", onSaveAnnotation: a, onRemoveAnnotation: o, onOpenMap: s, onShare: c, onCopyRecap: l, initialOpenFiles: u = {} }) {
371
+ r(e);
372
+ let [d, f] = T(u), [p, m] = T(null), [h, g] = T(!1), [_, v] = T(""), y = w({}), b = w(null), x = n ?? we(e.branch), S = e.work.length, C = e.newEdges.length, E = e.removedEdges.length, j = (e) => f((t) => ({
303
373
  ...t,
304
374
  [e]: !t[e]
305
375
  }));
306
- function W(e, t) {
307
- if (k(e), t) {
308
- S((e) => ({
376
+ function P(e, t) {
377
+ if (m(e), t) {
378
+ f((e) => ({
309
379
  ...e,
310
380
  [t]: !0
311
381
  }));
312
- let e = P.current[t], n = F.current;
382
+ let e = y.current[t], n = b.current;
313
383
  if (e && n) {
314
384
  let t = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
315
385
  n.scrollTo({
@@ -319,106 +389,106 @@ function U({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotat
319
389
  }
320
390
  }
321
391
  }
322
- function G(e) {
392
+ function F(e) {
323
393
  e.preventDefault();
324
- let t = M.trim();
325
- t && i?.(t), j(!1), N("");
394
+ let t = _.trim();
395
+ t && a?.(t), g(!1), v("");
326
396
  }
327
- let K = e.files[0]?.path;
328
- return /* @__PURE__ */ d("div", {
397
+ let R = e.files[0]?.path;
398
+ return /* @__PURE__ */ O("div", {
329
399
  className: "gmp-root gmp-detail-root",
330
- ref: F,
400
+ ref: b,
331
401
  children: [
332
- /* @__PURE__ */ d("div", {
402
+ /* @__PURE__ */ O("div", {
333
403
  className: "gmp-detail-head",
334
404
  children: [
335
- /* @__PURE__ */ d("div", {
405
+ /* @__PURE__ */ O("div", {
336
406
  className: "crumb",
337
407
  children: [
338
408
  "review ",
339
- /* @__PURE__ */ u(h, {
409
+ /* @__PURE__ */ D(M, {
340
410
  size: 13,
341
411
  "aria-hidden": "true"
342
412
  }),
343
413
  " ",
344
414
  e.defaultBranch,
345
415
  " ",
346
- /* @__PURE__ */ u(h, {
416
+ /* @__PURE__ */ D(M, {
347
417
  size: 13,
348
418
  "aria-hidden": "true"
349
419
  }),
350
420
  " ",
351
- /* @__PURE__ */ u("span", {
421
+ /* @__PURE__ */ D("span", {
352
422
  className: "cur",
353
423
  children: e.branch
354
424
  })
355
425
  ]
356
426
  }),
357
- /* @__PURE__ */ u("div", {
427
+ /* @__PURE__ */ D("div", {
358
428
  className: "gmp-detail-title",
359
- children: I
429
+ children: x
360
430
  }),
361
- /* @__PURE__ */ d("p", {
431
+ /* @__PURE__ */ O("p", {
362
432
  className: "gmp-caption",
363
433
  children: [
364
434
  "this line of work touched",
365
435
  " ",
366
- /* @__PURE__ */ d("button", {
436
+ /* @__PURE__ */ O("button", {
367
437
  type: "button",
368
- className: "gmp-frag" + (O === "files" ? " gmp-frag-on" : ""),
369
- onClick: () => W("files", K),
438
+ className: "gmp-frag" + (p === "files" ? " gmp-frag-on" : ""),
439
+ onClick: () => P("files", R),
370
440
  children: [e.filesChanged, " files"]
371
441
  }),
372
442
  " ",
373
443
  "across",
374
444
  " ",
375
- /* @__PURE__ */ d("button", {
445
+ /* @__PURE__ */ O("button", {
376
446
  type: "button",
377
- className: "gmp-frag" + (O === "conversations" ? " gmp-frag-on" : ""),
378
- onClick: () => W("conversations"),
379
- children: [L, " conversations"]
447
+ className: "gmp-frag" + (p === "conversations" ? " gmp-frag-on" : ""),
448
+ onClick: () => P("conversations"),
449
+ children: [S, " conversations"]
380
450
  }),
381
451
  ", reshaping",
382
452
  " ",
383
- /* @__PURE__ */ d("button", {
453
+ /* @__PURE__ */ O("button", {
384
454
  type: "button",
385
- className: "gmp-frag" + (O === "conn" ? " gmp-frag-on" : ""),
386
- onClick: () => W("conn"),
455
+ className: "gmp-frag" + (p === "conn" ? " gmp-frag-on" : ""),
456
+ onClick: () => P("conn"),
387
457
  children: [
388
458
  "+",
389
- R,
459
+ C,
390
460
  "/−",
391
- V,
461
+ E,
392
462
  " connections"
393
463
  ]
394
464
  }),
395
465
  "."
396
466
  ]
397
467
  }),
398
- /* @__PURE__ */ u("span", {
468
+ /* @__PURE__ */ D("span", {
399
469
  className: "gmp-caption-hint mono",
400
470
  children: "click any number to jump to its proof"
401
471
  })
402
472
  ]
403
473
  }),
404
- (e.frictions.length > 0 || e.violations.length > 0) && /* @__PURE__ */ d("div", {
474
+ (e.frictions.length > 0 || e.violations.length > 0) && /* @__PURE__ */ O("div", {
405
475
  className: "gmp-signals",
406
- children: [e.frictions.map((e, t) => /* @__PURE__ */ d("span", {
476
+ children: [e.frictions.map((e, t) => /* @__PURE__ */ O("span", {
407
477
  className: "gmp-signal",
408
478
  children: [
409
- /* @__PURE__ */ u(C, {
479
+ /* @__PURE__ */ D(H, {
410
480
  size: 14,
411
481
  "aria-hidden": "true"
412
482
  }),
413
483
  " ",
414
484
  e.label,
415
485
  " · ",
416
- /* @__PURE__ */ u("span", {
486
+ /* @__PURE__ */ D("span", {
417
487
  className: "mono",
418
488
  children: e.file
419
489
  }),
420
490
  " ",
421
- /* @__PURE__ */ d("b", {
491
+ /* @__PURE__ */ O("b", {
422
492
  className: "tnum",
423
493
  children: [e.count, "×"]
424
494
  }),
@@ -426,15 +496,15 @@ function U({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotat
426
496
  e.sessions,
427
497
  " conversations"
428
498
  ]
429
- }, t)), e.violations.length > 0 && /* @__PURE__ */ d("span", {
499
+ }, t)), e.violations.length > 0 && /* @__PURE__ */ O("span", {
430
500
  className: "gmp-signal gmp-signal-warn",
431
501
  children: [
432
- /* @__PURE__ */ u(E, {
502
+ /* @__PURE__ */ D(G, {
433
503
  size: 14,
434
504
  "aria-hidden": "true"
435
505
  }),
436
506
  " ",
437
- /* @__PURE__ */ u("b", {
507
+ /* @__PURE__ */ D("b", {
438
508
  className: "tnum",
439
509
  children: e.violations.length
440
510
  }),
@@ -442,13 +512,13 @@ function U({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotat
442
512
  ]
443
513
  })]
444
514
  }),
445
- /* @__PURE__ */ d("div", {
515
+ /* @__PURE__ */ O("div", {
446
516
  className: "gmp-totals",
447
517
  children: [
448
- /* @__PURE__ */ d("span", {
518
+ /* @__PURE__ */ O("span", {
449
519
  className: "metaitem tnum",
450
520
  children: [
451
- /* @__PURE__ */ u(v, {
521
+ /* @__PURE__ */ D(I, {
452
522
  size: 14,
453
523
  "aria-hidden": "true"
454
524
  }),
@@ -457,37 +527,37 @@ function U({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotat
457
527
  " files touched"
458
528
  ]
459
529
  }),
460
- /* @__PURE__ */ d("span", {
530
+ /* @__PURE__ */ O("span", {
461
531
  className: "metaitem tnum",
462
532
  children: [
463
- /* @__PURE__ */ d("span", {
533
+ /* @__PURE__ */ O("span", {
464
534
  className: "gmp-add",
465
- children: ["+", R]
535
+ children: ["+", C]
466
536
  }),
467
537
  "/",
468
- /* @__PURE__ */ d("span", {
538
+ /* @__PURE__ */ O("span", {
469
539
  className: "gmp-del",
470
- children: ["−", V]
540
+ children: ["−", E]
471
541
  }),
472
542
  " connections"
473
543
  ]
474
544
  }),
475
- /* @__PURE__ */ d("span", {
545
+ /* @__PURE__ */ O("span", {
476
546
  className: "metaitem tnum",
477
547
  children: [
478
- /* @__PURE__ */ u(x, {
548
+ /* @__PURE__ */ D(ee, {
479
549
  size: 14,
480
550
  "aria-hidden": "true"
481
551
  }),
482
552
  " ai wrote ",
483
- B(e.outputTokens),
553
+ Te(Number(e.outputTokens)),
484
554
  " tokens"
485
555
  ]
486
556
  }),
487
- e.costUsd != null && /* @__PURE__ */ d("span", {
557
+ e.costUsd != null && /* @__PURE__ */ O("span", {
488
558
  className: "metaitem tnum",
489
559
  children: [
490
- /* @__PURE__ */ u(g, {
560
+ /* @__PURE__ */ D(N, {
491
561
  size: 14,
492
562
  "aria-hidden": "true"
493
563
  }),
@@ -497,97 +567,97 @@ function U({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotat
497
567
  })
498
568
  ]
499
569
  }),
500
- /* @__PURE__ */ d("div", {
570
+ /* @__PURE__ */ O("div", {
501
571
  className: "gmp-detail-sec",
502
- children: [/* @__PURE__ */ u("div", {
572
+ children: [/* @__PURE__ */ D("div", {
503
573
  className: "sb-head gmp-detail-sechead",
504
574
  children: "files changed · click a path to open its diff"
505
- }), /* @__PURE__ */ u("div", {
575
+ }), /* @__PURE__ */ D("div", {
506
576
  className: "gmp-files",
507
- children: e.files.map((e) => /* @__PURE__ */ u("div", {
577
+ children: e.files.map((e) => /* @__PURE__ */ D("div", {
508
578
  ref: (t) => {
509
- P.current[e.path] = t;
579
+ y.current[e.path] = t;
510
580
  },
511
- children: /* @__PURE__ */ u(H, {
581
+ children: /* @__PURE__ */ D(De, {
512
582
  file: e,
513
- diff: b[e.path] ? t?.(e) : void 0,
514
- open: !!b[e.path],
515
- onToggle: () => U(e.path)
583
+ diff: d[e.path] ? t?.(e) : void 0,
584
+ open: !!d[e.path],
585
+ onToggle: () => j(e.path)
516
586
  })
517
587
  }, e.path))
518
588
  })]
519
589
  }),
520
- /* @__PURE__ */ d("div", {
590
+ /* @__PURE__ */ O("div", {
521
591
  className: "gmp-detail-sec",
522
- children: [/* @__PURE__ */ u("div", {
592
+ children: [/* @__PURE__ */ D("div", {
523
593
  className: "sb-head gmp-detail-sechead",
524
594
  children: "your annotation"
525
- }), /* @__PURE__ */ d("div", {
595
+ }), /* @__PURE__ */ O("div", {
526
596
  className: "gmp-annot",
527
597
  children: [
528
- r && /* @__PURE__ */ d("span", {
598
+ i && /* @__PURE__ */ O("span", {
529
599
  className: "gmp-label-chip gmp-annot-chip",
530
600
  children: [
531
- /* @__PURE__ */ u(T, {
601
+ /* @__PURE__ */ D(W, {
532
602
  size: 12,
533
603
  "aria-hidden": "true"
534
604
  }),
535
605
  " ",
536
- r,
537
- /* @__PURE__ */ u("button", {
606
+ i,
607
+ /* @__PURE__ */ D("button", {
538
608
  type: "button",
539
609
  className: "gmp-annot-x",
540
610
  "aria-label": "remove annotation",
541
- onClick: () => a?.(),
542
- children: /* @__PURE__ */ u(D, {
611
+ onClick: () => o?.(),
612
+ children: /* @__PURE__ */ D(K, {
543
613
  size: 11,
544
614
  "aria-hidden": "true"
545
615
  })
546
616
  })
547
617
  ]
548
618
  }),
549
- /* @__PURE__ */ d("button", {
619
+ /* @__PURE__ */ O("button", {
550
620
  type: "button",
551
621
  className: "gmp-annot-add",
552
- "aria-expanded": A,
553
- onClick: () => j((e) => !e),
622
+ "aria-expanded": h,
623
+ onClick: () => g((e) => !e),
554
624
  children: [
555
- /* @__PURE__ */ u(T, {
625
+ /* @__PURE__ */ D(W, {
556
626
  size: 13,
557
627
  "aria-hidden": "true"
558
628
  }),
559
629
  " ",
560
- r ? "change label" : "add a label"
630
+ i ? "change label" : "add a label"
561
631
  ]
562
632
  }),
563
- A && /* @__PURE__ */ d("form", {
633
+ h && /* @__PURE__ */ O("form", {
564
634
  className: "gmp-annot-pop",
565
- onSubmit: G,
635
+ onSubmit: F,
566
636
  children: [
567
- /* @__PURE__ */ u("span", {
637
+ /* @__PURE__ */ D("span", {
568
638
  className: "label",
569
639
  children: "user.custom_label"
570
640
  }),
571
- /* @__PURE__ */ u("input", {
641
+ /* @__PURE__ */ D("input", {
572
642
  className: "input",
573
643
  type: "text",
574
644
  autoFocus: !0,
575
- value: M,
576
- onChange: (e) => N(e.target.value),
645
+ value: _,
646
+ onChange: (e) => v(e.target.value),
577
647
  placeholder: "e.g. good handoff",
578
648
  "aria-label": "annotation value"
579
649
  }),
580
- /* @__PURE__ */ d("div", {
650
+ /* @__PURE__ */ O("div", {
581
651
  className: "gmp-annot-pop-foot",
582
- children: [/* @__PURE__ */ u("button", {
652
+ children: [/* @__PURE__ */ D("button", {
583
653
  type: "button",
584
654
  className: "btn btn-ghost btn-sm",
585
- onClick: () => j(!1),
655
+ onClick: () => g(!1),
586
656
  children: "cancel"
587
- }), /* @__PURE__ */ d("button", {
657
+ }), /* @__PURE__ */ O("button", {
588
658
  type: "submit",
589
659
  className: "btn btn-primary btn-sm",
590
- children: [/* @__PURE__ */ u(p, {
660
+ children: [/* @__PURE__ */ D(A, {
591
661
  size: 13,
592
662
  "aria-hidden": "true"
593
663
  }), " save"]
@@ -598,42 +668,42 @@ function U({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotat
598
668
  ]
599
669
  })]
600
670
  }),
601
- /* @__PURE__ */ d("div", {
671
+ /* @__PURE__ */ O("div", {
602
672
  className: "gmp-exits",
603
673
  children: [
604
- /* @__PURE__ */ d("button", {
674
+ /* @__PURE__ */ O("button", {
605
675
  type: "button",
606
676
  className: "btn btn-secondary btn-sm",
607
- onClick: () => o?.(),
608
- children: [/* @__PURE__ */ u(f, {
677
+ onClick: () => s?.(),
678
+ children: [/* @__PURE__ */ D(k, {
609
679
  size: 14,
610
680
  "aria-hidden": "true"
611
681
  }), " see this work on the code map"]
612
682
  }),
613
- /* @__PURE__ */ d("button", {
683
+ /* @__PURE__ */ O("button", {
614
684
  type: "button",
615
685
  className: "btn btn-secondary btn-sm",
616
- onClick: () => s?.(),
686
+ onClick: () => c?.(),
617
687
  children: [
618
- /* @__PURE__ */ u(w, {
688
+ /* @__PURE__ */ D(te, {
619
689
  size: 14,
620
690
  "aria-hidden": "true"
621
691
  }),
622
692
  " share ",
623
- L,
693
+ S,
624
694
  " conversations…"
625
695
  ]
626
696
  }),
627
- /* @__PURE__ */ d("button", {
697
+ /* @__PURE__ */ O("button", {
628
698
  type: "button",
629
699
  className: "btn btn-secondary btn-sm",
630
- onClick: () => m?.(),
631
- children: [/* @__PURE__ */ u(y, {
700
+ onClick: () => l?.(),
701
+ children: [/* @__PURE__ */ D(L, {
632
702
  size: 14,
633
703
  "aria-hidden": "true"
634
704
  }), " copy recap"]
635
705
  }),
636
- /* @__PURE__ */ d("code", {
706
+ /* @__PURE__ */ O("code", {
637
707
  className: "gmp-gitdiff mono",
638
708
  children: [
639
709
  "git diff ",
@@ -644,7 +714,7 @@ function U({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotat
644
714
  })
645
715
  ]
646
716
  }),
647
- /* @__PURE__ */ u("p", {
717
+ /* @__PURE__ */ D("p", {
648
718
  className: "gmp-boundary mono",
649
719
  children: "shows what changed and the recorded work behind it, not whether the change is correct or secure."
650
720
  })
@@ -653,57 +723,77 @@ function U({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotat
653
723
  }
654
724
  //#endregion
655
725
  //#region src/ui/graph/CodeMap.jsx
656
- var W = Object.freeze({
726
+ var ke = Object.freeze({
657
727
  project: "overview",
658
728
  package: "folders",
659
729
  file: "files"
660
- }), G = Object.freeze({
730
+ }), Ae = Object.freeze({
661
731
  overview: "project",
662
732
  folders: "package",
663
733
  files: "file"
664
734
  });
665
- function K({ payload: e, zoom: n, onZoomChange: r, selectedId: i, onSelect: a, onExpand: o, highlightedIds: l, nodeDeltas: d, structureEdgeDeltas: f, height: p = 520, ariaLabel: m = "code map", className: h = "" }) {
666
- let g = s(() => {
735
+ function je({ payload: e, zoom: t, onZoomChange: n, selectedId: r, onSelect: i, onExpand: a, highlightedIds: o, nodeDeltas: s, structureEdgeDeltas: u, height: p = 520, ariaLabel: h = "code map", className: g = "", viewport: _, onViewportChange: v, state: y, onStateChange: b }) {
736
+ let x = C(() => {
667
737
  let t = /* @__PURE__ */ new Map();
668
738
  for (let n of e?.nodes ?? []) t.set(n.id, n);
669
739
  return t;
670
- }, [e?.nodes]), _ = s(() => q(e), [e]), v = W[n?.level ?? "package"] ?? "folders", y = n?.expanded ?? [], b = n?.level !== void 0, x = c(v);
671
- return b && (x.current = v), /* @__PURE__ */ u(t, {
672
- data: _,
673
- grain: v,
674
- expandedIds: y,
675
- selectedId: i,
676
- highlightedIds: l,
677
- nodeDeltas: d,
678
- edgeDeltas: f,
679
- onSelect: (e) => a?.(e, e ? g.get(e) ?? null : null),
680
- onExpand: o,
740
+ }, [e?.nodes]), S = C(() => y === void 0 ? null : m(y), [y]), T = C(() => S ? f(e, S) : null, [e, S]), E = C(() => Me(e && {
741
+ ...e,
742
+ nodes: T?.canvas.allNodes ?? e.nodes
743
+ }), [e, T?.canvas.allNodes]), O = T ? ke[T.canvas.grain] ?? "folders" : ke[t?.level ?? "package"], k = T?.canvas.expandedIds ?? t?.expanded, A = w(O);
744
+ A.current = O;
745
+ function j(e) {
746
+ if (!S) return;
747
+ let t = l(S, e);
748
+ c(S, t) || b?.(t);
749
+ }
750
+ return /* @__PURE__ */ D(d, {
751
+ data: E,
752
+ grain: O,
753
+ expandedIds: k,
754
+ visibleIds: T?.canvas.visibleIds,
755
+ hierarchy: T?.canvas.hierarchy,
756
+ selectedId: T ? T.canvas.selectedId : r,
757
+ highlightedIds: o,
758
+ nodeDeltas: s,
759
+ edgeDeltas: u,
760
+ onSelect: (e) => {
761
+ i?.(e, e ? x.get(e) ?? null : null);
762
+ },
763
+ onExpand: a,
681
764
  onGrainChange: (e) => {
682
- x.current = e, r?.({
683
- level: G[e] ?? "package",
765
+ A.current = e, n?.({
766
+ level: Ae[e] ?? "package",
684
767
  expanded: []
685
768
  });
686
769
  },
687
770
  onExpandedIdsChange: (e) => {
688
- r?.({
689
- level: G[x.current] ?? "package",
771
+ n?.({
772
+ level: Ae[A.current] ?? "package",
690
773
  expanded: e
691
774
  });
692
775
  },
693
776
  height: p,
694
- ariaLabel: m,
695
- className: h
777
+ ariaLabel: h,
778
+ className: g,
779
+ viewport: T ? T.canvas.viewport : _,
780
+ onViewportChange: (e) => {
781
+ v?.(e);
782
+ },
783
+ onStateAction: S ? j : void 0,
784
+ canonicalControlled: S !== null
696
785
  });
697
786
  }
698
- function q(e) {
699
- let t = e?.nodes ?? [], n = Y(e?.violations ?? []);
787
+ function Me(e) {
788
+ e && b(e);
789
+ let t = e?.nodes ?? [], n = Pe(e?.violations ?? []);
700
790
  return {
701
791
  nodes: t.map((e) => ({
702
792
  id: e.id,
703
793
  label: e.name || e.id,
704
794
  kind: e.kind === "file" ? "file" : "folder",
705
795
  loc: e.loc ?? 0,
706
- coverage: J(e.recordedFiles, e.totalFiles),
796
+ coverage: Ne(e.recordedFiles, e.totalFiles),
707
797
  parent: e.parent || void 0,
708
798
  violations: n.get(e.id) ?? 0,
709
799
  layer: e.layer,
@@ -717,86 +807,380 @@ function q(e) {
717
807
  }))
718
808
  };
719
809
  }
720
- function J(e, t) {
810
+ function Ne(e, t) {
721
811
  let n = Number(t) || 0;
722
812
  if (n <= 0) return 0;
723
813
  let r = Math.max(0, Math.min(1, (Number(e) || 0) / n));
724
814
  return Math.max(0, Math.min(4, Math.round(r * 4)));
725
815
  }
726
- function Y(e) {
816
+ function Pe(e) {
727
817
  let t = /* @__PURE__ */ new Map();
728
- for (let n of e) X(t, n.from), X(t, n.to);
818
+ for (let n of e) Fe(t, n.from), Fe(t, n.to);
729
819
  return t;
730
820
  }
731
- function X(e, t) {
821
+ function Fe(e, t) {
732
822
  t && e.set(t, (e.get(t) ?? 0) + 1);
733
823
  }
734
824
  //#endregion
825
+ //#region src/ui/graph/CodeMapNavigator.jsx
826
+ function Ie({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsChange: r, selectedId: i = null, onSelect: a, focusedId: o, onFocusChange: s, filter: c = "", onFilterChange: l, onOpenMap: u, onStateAction: d, ariaLabel: p = "code map navigator" }) {
827
+ let [h, g] = T(() => /* @__PURE__ */ new Set()), [_, v] = T(null), y = n === void 0 ? h : new Set(n), b = o === void 0 ? _ : o, x = w(/* @__PURE__ */ new Map()), S = C(() => f(e, m({
828
+ grain: t,
829
+ expandedIds: Array.from(y),
830
+ selectedId: i,
831
+ navigatorFocusedId: b,
832
+ navigatorFilter: c
833
+ })), [
834
+ e,
835
+ t,
836
+ Re(y),
837
+ i,
838
+ b,
839
+ c
840
+ ]), k = S.rows, A = S.focusedId, j = S.selected, N = j ? k.find((e) => e.node.id === j.id) : null, P = !!N?.canExpand && !N.forcedOpen;
841
+ function F(e) {
842
+ n === void 0 && g(e), d?.({
843
+ type: "set-expanded",
844
+ ids: Array.from(e)
845
+ }), r?.(Array.from(e));
846
+ }
847
+ function I(e) {
848
+ let t = new Set(y);
849
+ t.has(e) ? t.delete(e) : t.add(e), F(t);
850
+ }
851
+ function L(e) {
852
+ o === void 0 && v(e), d?.({
853
+ type: "focus",
854
+ id: e
855
+ }), s?.(e), x.current.get(e)?.focus();
856
+ }
857
+ function R(e) {
858
+ o === void 0 && v(e.id), x.current.get(e.id)?.focus(), d?.({
859
+ type: "select",
860
+ id: e.id
861
+ }), s?.(e.id), a?.(e.id, e);
862
+ }
863
+ function z(e, t) {
864
+ let n = k[t];
865
+ if (!n) return;
866
+ let { node: r } = n, i = null;
867
+ if (e.key === "ArrowDown") i = k[Math.min(t + 1, k.length - 1)]?.node.id;
868
+ else if (e.key === "ArrowUp") i = k[Math.max(t - 1, 0)]?.node.id;
869
+ else if (e.key === "Home") i = k[0]?.node.id;
870
+ else if (e.key === "End") i = k[k.length - 1]?.node.id;
871
+ else if (e.key === "ArrowRight" && (n.canExpand || n.forcedOpen)) n.forcedOpen || n.expanded ? i = n.childIds[0] ?? null : y.has(r.id) || I(r.id);
872
+ else if (e.key === "ArrowLeft") !n.forcedOpen && n.canExpand && n.expanded ? I(r.id) : i = n.parentId;
873
+ else if (e.key === "Enter" || e.key === " ") {
874
+ R(r), e.preventDefault();
875
+ return;
876
+ } else return;
877
+ e.preventDefault(), i && L(i);
878
+ }
879
+ return /* @__PURE__ */ O("section", {
880
+ className: "gmp-navigator",
881
+ "aria-label": p,
882
+ children: [
883
+ /* @__PURE__ */ O("header", {
884
+ className: "gmp-navigator-head",
885
+ children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
886
+ className: "gmp-navigator-kicker",
887
+ children: "browse the codebase"
888
+ }), /* @__PURE__ */ D("p", {
889
+ className: "gmp-navigator-note",
890
+ children: "choose an area for its recorded work, then open the spatial map when relationships matter"
891
+ })] }), /* @__PURE__ */ O("label", {
892
+ className: "gmp-navigator-search",
893
+ children: [
894
+ /* @__PURE__ */ D(U, { "aria-hidden": "true" }),
895
+ /* @__PURE__ */ D("span", {
896
+ className: "mc-sr",
897
+ children: "filter code areas"
898
+ }),
899
+ /* @__PURE__ */ D("input", {
900
+ value: c,
901
+ onChange: (e) => {
902
+ d?.({
903
+ type: "set-filter",
904
+ filter: e.target.value
905
+ }), l?.(e.target.value);
906
+ },
907
+ placeholder: "filter paths"
908
+ })
909
+ ]
910
+ })]
911
+ }),
912
+ S.staleSelectedId ? /* @__PURE__ */ O("p", {
913
+ className: "gmp-navigator-missing",
914
+ role: "status",
915
+ children: [
916
+ "the selected code area is not present in this map.",
917
+ " ",
918
+ /* @__PURE__ */ D("button", {
919
+ type: "button",
920
+ onClick: () => {
921
+ d?.({ type: "clear-selection" }), a?.(null, null);
922
+ },
923
+ children: "clear selection"
924
+ })
925
+ ]
926
+ }) : null,
927
+ /* @__PURE__ */ O("div", {
928
+ className: "gmp-navigator-body",
929
+ children: [/* @__PURE__ */ D("div", {
930
+ role: "tree",
931
+ "aria-label": "code areas",
932
+ className: "gmp-navigator-tree",
933
+ "data-grain": t,
934
+ children: k.length === 0 ? /* @__PURE__ */ D("p", {
935
+ className: "gmp-navigator-empty",
936
+ role: "status",
937
+ children: "no code areas match this filter"
938
+ }) : k.map((e, t) => {
939
+ let n = e.canExpand || e.forcedOpen, r = e.expanded, a = A === e.node.id;
940
+ return /* @__PURE__ */ D(Le, {
941
+ row: e,
942
+ hasChildren: n,
943
+ isExpanded: r,
944
+ selected: i === e.node.id,
945
+ tabbable: a,
946
+ setRef: (t) => {
947
+ t ? x.current.set(e.node.id, t) : x.current.delete(e.node.id);
948
+ },
949
+ onFocus: () => {
950
+ o === void 0 && v(e.node.id);
951
+ },
952
+ onSelect: () => R(e.node),
953
+ onToggle: () => {
954
+ e.forcedOpen || I(e.node.id);
955
+ },
956
+ onKeyDown: (e) => z(e, t)
957
+ }, e.node.id);
958
+ })
959
+ }), /* @__PURE__ */ D("aside", {
960
+ className: "gmp-navigator-actions",
961
+ "aria-label": "selected code area",
962
+ children: j ? /* @__PURE__ */ O(E, { children: [
963
+ /* @__PURE__ */ D("p", {
964
+ className: "gmp-navigator-selected",
965
+ children: j.name || j.id
966
+ }),
967
+ /* @__PURE__ */ D("p", {
968
+ className: "gmp-navigator-selected-path",
969
+ children: j.id
970
+ }),
971
+ P ? /* @__PURE__ */ O("button", {
972
+ type: "button",
973
+ className: "gmp-navigator-action",
974
+ onClick: () => I(j.id),
975
+ children: [/* @__PURE__ */ D(M, { "aria-hidden": "true" }), y.has(j.id) ? "hide children" : "show children"]
976
+ }) : null,
977
+ /* @__PURE__ */ O("button", {
978
+ type: "button",
979
+ className: "gmp-navigator-action gmp-navigator-action--primary",
980
+ onClick: () => {
981
+ d?.({
982
+ type: "open-in-map",
983
+ id: j.id
984
+ }), u?.(j.id);
985
+ },
986
+ children: [/* @__PURE__ */ D(B, { "aria-hidden": "true" }), " open in map"]
987
+ })
988
+ ] }) : /* @__PURE__ */ D("p", {
989
+ className: "gmp-navigator-empty",
990
+ children: "select an area to see its recorded work and map context"
991
+ })
992
+ })]
993
+ })
994
+ ]
995
+ });
996
+ }
997
+ function Le({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, setRef: a, onFocus: o, onSelect: s, onToggle: c, onKeyDown: l }) {
998
+ return /* @__PURE__ */ O("div", {
999
+ role: "none",
1000
+ className: "gmp-navigator-row-wrap",
1001
+ "data-selected": r,
1002
+ style: { "--gmp-tree-depth": e.depth },
1003
+ children: [t ? /* @__PURE__ */ D("button", {
1004
+ type: "button",
1005
+ className: "gmp-navigator-disclosure",
1006
+ tabIndex: -1,
1007
+ "aria-label": `${n ? "hide" : "show"} children for ${e.node.name || e.node.id}`,
1008
+ "aria-expanded": n,
1009
+ "aria-disabled": e.forcedOpen ? "true" : void 0,
1010
+ onKeyDown: (e) => e.stopPropagation(),
1011
+ onClick: (t) => {
1012
+ t.stopPropagation(), e.forcedOpen || c();
1013
+ },
1014
+ children: /* @__PURE__ */ D(M, {
1015
+ className: "gmp-navigator-chevron",
1016
+ "aria-hidden": "true"
1017
+ })
1018
+ }) : /* @__PURE__ */ D("span", {
1019
+ className: "gmp-navigator-disclosure-placeholder",
1020
+ "aria-hidden": "true"
1021
+ }), /* @__PURE__ */ O("div", {
1022
+ ref: a,
1023
+ role: "treeitem",
1024
+ "aria-level": e.depth + 1,
1025
+ "aria-selected": r,
1026
+ "aria-expanded": t ? n : void 0,
1027
+ tabIndex: i ? 0 : -1,
1028
+ className: "gmp-navigator-row",
1029
+ onFocus: o,
1030
+ onClick: s,
1031
+ onDoubleClick: () => {
1032
+ t && !e.forcedOpen && c();
1033
+ },
1034
+ onKeyDown: l,
1035
+ children: [
1036
+ e.node.kind === "file" ? /* @__PURE__ */ D(F, { "aria-hidden": "true" }) : /* @__PURE__ */ D(R, { "aria-hidden": "true" }),
1037
+ /* @__PURE__ */ D("span", {
1038
+ className: "gmp-navigator-path",
1039
+ children: e.node.name || e.node.id
1040
+ }),
1041
+ /* @__PURE__ */ O("span", {
1042
+ className: "gmp-navigator-meta",
1043
+ children: [/* @__PURE__ */ O("span", { children: [ze(e.node.loc ?? 0), " lines"] }), /* @__PURE__ */ D("span", { children: Be(e.node.recordedFiles, e.node.totalFiles) })]
1044
+ })
1045
+ ]
1046
+ })]
1047
+ });
1048
+ }
1049
+ function Re(e) {
1050
+ return Array.from(e).sort().join("\0");
1051
+ }
1052
+ function ze(e) {
1053
+ return new Intl.NumberFormat("en", {
1054
+ notation: "compact",
1055
+ maximumFractionDigits: 1
1056
+ }).format(Number(e) || 0);
1057
+ }
1058
+ function Be(e, t) {
1059
+ let n = Number(t) || 0;
1060
+ return n <= 0 ? "no coverage data" : `${Math.round((Number(e) || 0) / n * 100)}% recorded`;
1061
+ }
1062
+ //#endregion
735
1063
  //#region src/ui/graph/CodeMapComposition.jsx
736
- function Z({ payload: e, zoom: t, onZoomChange: n, selectedId: r, onSelect: a, onExpand: o, highlightedIds: s, nodeDeltas: c, structureEdgeDeltas: l, height: f = 480, ariaLabel: p = "code map", canvasSlot: m, rail: h, toolbar: g, sheetTitle: _ = "code area", sheetMeta: v, railSide: y = "right", legend: b, canvasWrapperClassName: x = "", canvasWrapperStyle: S, className: C = "" }) {
737
- return /* @__PURE__ */ u("div", {
738
- className: ["gmp-root", C].filter(Boolean).join(" "),
739
- children: /* @__PURE__ */ d(i, {
740
- toolbar: g,
1064
+ function Ve({ payload: e, zoom: t, onZoomChange: n, selectedId: r, onSelect: i, onExpand: a, highlightedIds: o, nodeDeltas: s, structureEdgeDeltas: u, height: d = 480, ariaLabel: f = "code map", canvasSlot: p, rail: h, toolbar: _, sheetTitle: v = "code area", sheetMeta: y, railSide: b = "right", legend: x, canvasWrapperClassName: S = "", canvasWrapperStyle: w, className: k = "", presentation: A = "canvas", navigatorSlot: j, onPresentationChange: M, viewport: N, onViewportChange: P, state: F, defaultState: I, onStateChange: L }) {
1065
+ let R = F !== void 0 || I !== void 0, [z, ee] = T(() => m(I)), B = C(() => R ? m(F ?? z) : null, [
1066
+ R,
1067
+ F,
1068
+ z
1069
+ ]), V = B?.presentation ?? A;
1070
+ function H(e, t) {
1071
+ F === void 0 && ee(e), L?.(e), t?.(e);
1072
+ }
1073
+ function U(e, t) {
1074
+ if (!B) return;
1075
+ let n = l(B, e);
1076
+ c(B, n) || H(n, t);
1077
+ }
1078
+ let te = R || M ? /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ O("div", {
1079
+ className: "gmp-presentation-switch",
1080
+ role: "group",
1081
+ "aria-label": "code map view",
1082
+ children: [/* @__PURE__ */ D("button", {
1083
+ type: "button",
1084
+ "aria-pressed": V === "navigator",
1085
+ onClick: () => R ? U({
1086
+ type: "set-presentation",
1087
+ presentation: "navigator"
1088
+ }, () => M?.("navigator")) : M?.("navigator"),
1089
+ children: V === "canvas" ? "back to browse" : "browse"
1090
+ }), /* @__PURE__ */ D("button", {
1091
+ type: "button",
1092
+ "aria-pressed": V === "canvas",
1093
+ onClick: () => R ? U({
1094
+ type: "set-presentation",
1095
+ presentation: "canvas"
1096
+ }, () => M?.("canvas")) : M?.("canvas"),
1097
+ children: "spatial map"
1098
+ })]
1099
+ }), _] }) : _, W = p ?? /* @__PURE__ */ D(je, {
1100
+ payload: e,
1101
+ zoom: B ? {
1102
+ level: B.grain,
1103
+ expanded: B.expandedIds
1104
+ } : t,
1105
+ onZoomChange: n,
1106
+ selectedId: B ? B.selectedId : r,
1107
+ onSelect: i,
1108
+ onExpand: a,
1109
+ highlightedIds: o,
1110
+ nodeDeltas: s,
1111
+ structureEdgeDeltas: u,
1112
+ height: d,
1113
+ ariaLabel: f,
1114
+ viewport: B ? B.viewport ?? void 0 : N,
1115
+ onViewportChange: P,
1116
+ state: B ?? void 0,
1117
+ onStateChange: B ? (e) => H(e) : void 0
1118
+ }), G = j ?? (B && e ? /* @__PURE__ */ D(Ie, {
1119
+ payload: e,
1120
+ grain: B.grain,
1121
+ expandedIds: B.expandedIds,
1122
+ selectedId: B.selectedId,
1123
+ focusedId: B.navigatorFocusedId,
1124
+ filter: B.navigatorFilter,
1125
+ onStateAction: (t) => U(t, () => {
1126
+ t.type === "select" ? i?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null) : t.type === "clear-selection" ? i?.(null, null) : t.type === "set-expanded" ? n?.({
1127
+ level: B.grain,
1128
+ expanded: Array.from(t.ids)
1129
+ }) : t.type === "open-in-map" && (i?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null), M?.("canvas"));
1130
+ }),
1131
+ ariaLabel: `browse ${f}`
1132
+ }) : null), K = V === "navigator" && G !== null;
1133
+ return /* @__PURE__ */ D("div", {
1134
+ className: ["gmp-root", k].filter(Boolean).join(" "),
1135
+ children: /* @__PURE__ */ O(g, {
1136
+ toolbar: te,
741
1137
  rail: h,
742
- sheetTitle: _,
743
- sheetMeta: v,
744
- railSide: y,
745
- children: [/* @__PURE__ */ u("div", {
746
- className: ["gmp-map-canvas-region", x].filter(Boolean).join(" "),
747
- style: S,
1138
+ sheetTitle: v,
1139
+ sheetMeta: y,
1140
+ railSide: b,
1141
+ children: [/* @__PURE__ */ D("div", {
1142
+ className: ["gmp-map-canvas-region", S].filter(Boolean).join(" "),
1143
+ style: w,
748
1144
  "data-testid": "gmp-map-canvas-region",
749
- children: m ?? /* @__PURE__ */ u(K, {
750
- payload: e,
751
- zoom: t,
752
- onZoomChange: n,
753
- selectedId: r,
754
- onSelect: a,
755
- onExpand: o,
756
- highlightedIds: s,
757
- nodeDeltas: c,
758
- structureEdgeDeltas: l,
759
- height: f,
760
- ariaLabel: p
761
- })
762
- }), b !== !1 && (b ?? /* @__PURE__ */ u(Q, {}))]
1145
+ children: K ? G : W
1146
+ }), !K && x !== !1 && (x ?? /* @__PURE__ */ D(He, {}))]
763
1147
  })
764
1148
  });
765
1149
  }
766
- function Q() {
767
- return /* @__PURE__ */ d("p", {
1150
+ function He() {
1151
+ return /* @__PURE__ */ O("p", {
768
1152
  className: "gmp-map-legend",
769
1153
  children: [
770
- /* @__PURE__ */ d("span", {
1154
+ /* @__PURE__ */ O("span", {
771
1155
  className: "gmp-legend-item",
772
- children: [/* @__PURE__ */ u("span", {
1156
+ children: [/* @__PURE__ */ D("span", {
773
1157
  className: "gmp-map-swatch",
774
1158
  "aria-hidden": "true"
775
1159
  }), " code area (folder or file)"]
776
1160
  }),
777
- /* @__PURE__ */ d("span", {
1161
+ /* @__PURE__ */ O("span", {
778
1162
  className: "gmp-legend-item gmp-legend-dim",
779
- children: [/* @__PURE__ */ u("span", {
1163
+ children: [/* @__PURE__ */ D("span", {
780
1164
  className: "gmp-map-swatch gmp-map-swatch--empty",
781
1165
  "aria-hidden": "true"
782
1166
  }), " no saved conversation behind it"]
783
1167
  }),
784
- /* @__PURE__ */ u("span", {
1168
+ /* @__PURE__ */ D("span", {
785
1169
  className: "gmp-legend-item gmp-legend-dim",
786
1170
  children: "brighter = more of it built with AI on record"
787
1171
  }),
788
- /* @__PURE__ */ d("span", {
1172
+ /* @__PURE__ */ O("span", {
789
1173
  className: "gmp-legend-item gmp-legend-dim",
790
- children: [/* @__PURE__ */ u("span", {
1174
+ children: [/* @__PURE__ */ D("span", {
791
1175
  className: "gmp-map-swatch gmp-map-swatch--edge",
792
1176
  "aria-hidden": "true"
793
1177
  }), " one area uses another"]
794
1178
  }),
795
- /* @__PURE__ */ u("span", {
1179
+ /* @__PURE__ */ D("span", {
796
1180
  className: "gmp-legend-item gmp-map-legend-danger",
797
1181
  children: "⚠ tangle — two areas that depend on each other"
798
1182
  }),
799
- /* @__PURE__ */ u("span", {
1183
+ /* @__PURE__ */ D("span", {
800
1184
  className: "gmp-legend-item gmp-legend-dim",
801
1185
  children: "double-click a folder to open its files"
802
1186
  })
@@ -804,20 +1188,35 @@ function Q() {
804
1188
  });
805
1189
  }
806
1190
  //#endregion
807
- //#region src/ui/graph/types.js
808
- var $ = Object.freeze([
809
- "module",
810
- "package",
811
- "file"
812
- ]), ee = Object.freeze(["bound", "candidate"]), te = Object.freeze(["cycle", "wrong_way"]), ne = Object.freeze([
813
- "M",
814
- "A",
815
- "D",
816
- "R"
817
- ]), re = Object.freeze([
818
- "context",
819
- "add",
820
- "del"
821
- ]);
1191
+ //#region src/ui/graph/timelineNavigation.js
1192
+ function Z(e) {
1193
+ return typeof e == "object" && !!e && !Array.isArray(e);
1194
+ }
1195
+ function Q(e, t) {
1196
+ let n = Object.keys(e).sort();
1197
+ return n.length === t.length && t.slice().sort().every((e, t) => e === n[t]);
1198
+ }
1199
+ function $(e) {
1200
+ return typeof e == "string" && e.length > 0;
1201
+ }
1202
+ function Ue(e) {
1203
+ return e === null || $(e);
1204
+ }
1205
+ function We(e) {
1206
+ let t = !1;
1207
+ if (Z(e) && typeof e.type == "string" && (e.type === "open-change" && Q(e, ["type", "change"]) && Z(e.change) ? t = Q(e.change, ["id", "branch"]) && $(e.change.id) && Ue(e.change.branch) : e.type === "open-session" && Q(e, [
1208
+ "type",
1209
+ "sessionId",
1210
+ "source"
1211
+ ]) && $(e.sessionId) && Z(e.source) ? e.source.kind === "commit" && Q(e.source, ["kind", "commit"]) && Z(e.source.commit) ? t = Q(e.source.commit, ["id", "branch"]) && $(e.source.commit.id) && Ue(e.source.commit.branch) : (e.source.kind === "unlinked" || e.source.kind === "outside-window") && Q(e.source, ["kind"]) && (t = !0) : (e.type === "open-map" || e.type === "show-older") && Q(e, ["type"]) && (t = !0)), !t) throw TypeError([
1212
+ "Timeline navigation action rejected.",
1213
+ "What went wrong: the value is not an exact supported TimelineNavigationAction.",
1214
+ "Why it happened: an untyped caller supplied an unknown action, missing context, or extra fields.",
1215
+ "Where: assertTimelineNavigationAction in @peasant-labs/fairtrade/graph.",
1216
+ "When: while crossing a JavaScript timeline-navigation boundary.",
1217
+ "What it means: the host cannot safely choose a route for this user gesture.",
1218
+ "How to fix: emit one documented open-change, open-session, open-map, or show-older action with its exact required fields."
1219
+ ].join("\n"));
1220
+ }
822
1221
  //#endregion
823
- export { ee as CHANGE_BINDINGS, U as ChangeDetail, F as Changes, K as CodeMap, Z as CodeMapComposition, re as DIFF_LINE_KINDS, Q as DefaultMapLegend, te as EDGE_VIOLATION_KINDS, ne as FILE_CHANGE_STATUSES, a as GRAPH_APP_SECTIONS, n as GraphAppShell, r as GraphSectionNav, $ as MAP_NODE_KINDS, N as buildChangesGraph, q as codeMapPayloadToMapData, M as humanizeAge };
1222
+ export { ne as AllChangeBindings, re as AllDiffLineKinds, ie as AllEdgeViolationKinds, ae as AllFileChangeStatuses, oe as AllMapNodeKinds, a as CHANGE_BINDINGS, v as CODE_MAP_STATE_VERSION, s as CODE_MAP_VIEWPORT_SCALE, se as ChangeBinding, Oe as ChangeDetail, be as Changes, je as CodeMap, Ve as CodeMapComposition, Ie as CodeMapNavigator, y as DIFF_LINE_KINDS, He as DefaultMapLegend, ce as DiffLineKind, S as EDGE_VIOLATION_KINDS, le as EdgeViolationKind, o as FILE_CHANGE_STATUSES, ue as FileChangeStatus, _ as GRAPH_APP_SECTIONS, p as GraphAppShell, h as GraphSectionNav, x as MAP_NODE_KINDS, de as MapNodeKind, r as assertChangeDetailPayloadEnums, t as assertChangeDiffPayloadEnums, b as assertCodeMapPayloadEnums, We as assertTimelineNavigationAction, ve as buildChangesGraph, Me as codeMapPayloadToMapData, c as codeMapStatesEqual, m as createCodeMapState, f as deriveCodeMapView, X as humanizeAge, fe as isChangeBinding, u as isCodeMapViewportScale, pe as isDiffLineKind, me as isEdgeViolationKind, he as isFileChangeStatus, ge as isMapNodeKind, l as reduceCodeMapState };