@pstdio/ui 0.40.0 → 0.42.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 (108) hide show
  1. package/dist/{MermaidComponent-81jr28u4.js → MermaidComponent-D7vhkpka.js} +3 -3
  2. package/dist/{MermaidComponent-81jr28u4.js.map → MermaidComponent-D7vhkpka.js.map} +1 -1
  3. package/dist/alert-MQ47wy7f.js +388 -0
  4. package/dist/alert-MQ47wy7f.js.map +1 -0
  5. package/dist/chat-ui.d.ts +129 -23
  6. package/dist/chat-ui.js +2596 -1591
  7. package/dist/chat-ui.js.map +1 -1
  8. package/dist/{types-DWA3enV6.d.ts → collection-view-fields-D3cysHNT.d.ts} +87 -37
  9. package/dist/collection-view-grouping-D4nZk8-3.js +90 -0
  10. package/dist/collection-view-grouping-D4nZk8-3.js.map +1 -0
  11. package/dist/collection-view-search-CpjJy76w.js +1973 -0
  12. package/dist/collection-view-search-CpjJy76w.js.map +1 -0
  13. package/dist/collection-view.d.ts +4 -0
  14. package/dist/collection-view.js +2 -0
  15. package/dist/{data-table-stats-row-CpRe_xK2.js → data-table-stats-row-64magT2g.js} +2 -2
  16. package/dist/{data-table-stats-row-CpRe_xK2.js.map → data-table-stats-row-64magT2g.js.map} +1 -1
  17. package/dist/data-table.d.ts +29 -7
  18. package/dist/data-table.js +1043 -878
  19. package/dist/data-table.js.map +1 -1
  20. package/dist/diff-bubble-DewUd_2w.js +61 -0
  21. package/dist/diff-bubble-DewUd_2w.js.map +1 -0
  22. package/dist/{diff-drawer-45rpk3aq.js → diff-drawer-IYpQ-QQK.js} +264 -242
  23. package/dist/diff-drawer-IYpQ-QQK.js.map +1 -0
  24. package/dist/diff-viewer-C-0VAt9P.js +574 -0
  25. package/dist/diff-viewer-C-0VAt9P.js.map +1 -0
  26. package/dist/diff.d.ts +11 -0
  27. package/dist/diff.js +107 -98
  28. package/dist/diff.js.map +1 -1
  29. package/dist/display-sort-control-f3rbILsV.js +588 -0
  30. package/dist/display-sort-control-f3rbILsV.js.map +1 -0
  31. package/dist/drop-indicator-HjlBSIeV.js +27 -0
  32. package/dist/drop-indicator-HjlBSIeV.js.map +1 -0
  33. package/dist/edit-mode-data-table-DnMB2jiy.js +1449 -0
  34. package/dist/edit-mode-data-table-DnMB2jiy.js.map +1 -0
  35. package/dist/host-storage-BIo5azql.js +31 -0
  36. package/dist/host-storage-BIo5azql.js.map +1 -0
  37. package/dist/host-storage-J0089Hyk.d.ts +17 -0
  38. package/dist/{slider-hwHYe98I.js → icon-options-Tt6Wzhtv.js} +86 -201
  39. package/dist/icon-options-Tt6Wzhtv.js.map +1 -0
  40. package/dist/{index-Bfddrlz8.d.ts → index-B79hwNcB.d.ts} +66 -14
  41. package/dist/index-CKsd23jv.d.ts +80 -0
  42. package/dist/{index-CbtbcvKm.d.ts → index-DlmvvQ6x.d.ts} +1 -1
  43. package/dist/index-ICoad2I_.d.ts +282 -0
  44. package/dist/index.d.ts +63 -22
  45. package/dist/index.js +1149 -1054
  46. package/dist/index.js.map +1 -1
  47. package/dist/kanban-renderer.d.ts +3 -326
  48. package/dist/kanban-renderer.js +980 -596
  49. package/dist/kanban-renderer.js.map +1 -1
  50. package/dist/list-row-Z4SHkseA.js +1195 -0
  51. package/dist/list-row-Z4SHkseA.js.map +1 -0
  52. package/dist/markdown-editor-Dd4mor7l.js +3236 -0
  53. package/dist/markdown-editor-Dd4mor7l.js.map +1 -0
  54. package/dist/{mermaid-renderer-DImi0fDp.js → mermaid-renderer-0PmNkOXI.js} +29 -29
  55. package/dist/mermaid-renderer-0PmNkOXI.js.map +1 -0
  56. package/dist/mermaid.js +1 -1
  57. package/dist/number-input-7K66wnSC.js +63 -0
  58. package/dist/number-input-7K66wnSC.js.map +1 -0
  59. package/dist/{param-editor-BQd4AOUP.js → param-editor-Dnix-fJo.js} +2 -2
  60. package/dist/{param-editor-BQd4AOUP.js.map → param-editor-Dnix-fJo.js.map} +1 -1
  61. package/dist/{param-editor-field-BJ_rLUnV.js → param-editor-field-B3vLST-B.js} +1436 -1427
  62. package/dist/param-editor-field-B3vLST-B.js.map +1 -0
  63. package/dist/param-editor.js +4 -3
  64. package/dist/prism-OG4H7Hu4.js +334 -0
  65. package/dist/prism-OG4H7Hu4.js.map +1 -0
  66. package/dist/queued-follow-up-Bj_vtMgd.js +208 -0
  67. package/dist/queued-follow-up-Bj_vtMgd.js.map +1 -0
  68. package/dist/{resource-badge-95WPVlZf.d.ts → resource-badge-nOWPqxFU.d.ts} +1 -0
  69. package/dist/rich-text-BgEnAHr2.js +1160 -0
  70. package/dist/rich-text-BgEnAHr2.js.map +1 -0
  71. package/dist/rich-text.d.ts +2 -2
  72. package/dist/rich-text.js +4 -2
  73. package/dist/style.css +1 -1
  74. package/dist/terminal.d.ts +5 -63
  75. package/dist/terminal.js +102 -122
  76. package/dist/terminal.js.map +1 -1
  77. package/dist/{theme-CbmSEbRF.js → theme-CMJdH59Z.js} +589 -265
  78. package/dist/theme-CMJdH59Z.js.map +1 -0
  79. package/dist/theme-kKuLN2jb.js +80 -0
  80. package/dist/theme-kKuLN2jb.js.map +1 -0
  81. package/dist/theme-preference-BV4cbJNB.js +115 -0
  82. package/dist/theme-preference-BV4cbJNB.js.map +1 -0
  83. package/dist/theme.js +3 -2
  84. package/dist/tree-list-jarhD31R.js +1652 -0
  85. package/dist/tree-list-jarhD31R.js.map +1 -0
  86. package/dist/use-virtualizer-uj43XjBp.js +10 -0
  87. package/dist/use-virtualizer-uj43XjBp.js.map +1 -0
  88. package/dist/{workspace-badge-Brm3Xr3m.d.ts → workspace-badge-BKtB805G.d.ts} +5 -1
  89. package/package.json +8 -4
  90. package/dist/diff-bubble-DZsarmSG.js +0 -61
  91. package/dist/diff-bubble-DZsarmSG.js.map +0 -1
  92. package/dist/diff-drawer-45rpk3aq.js.map +0 -1
  93. package/dist/diff-viewer-BP_mI6Wx.js +0 -558
  94. package/dist/diff-viewer-BP_mI6Wx.js.map +0 -1
  95. package/dist/list-row-uqD-q4gv.js +0 -1018
  96. package/dist/list-row-uqD-q4gv.js.map +0 -1
  97. package/dist/mermaid-renderer-DImi0fDp.js.map +0 -1
  98. package/dist/param-editor-field-BJ_rLUnV.js.map +0 -1
  99. package/dist/prism-BStPsJSB.js +0 -658
  100. package/dist/prism-BStPsJSB.js.map +0 -1
  101. package/dist/rich-text-VYAmEigU.js +0 -6979
  102. package/dist/rich-text-VYAmEigU.js.map +0 -1
  103. package/dist/slider-hwHYe98I.js.map +0 -1
  104. package/dist/theme-CbmSEbRF.js.map +0 -1
  105. package/dist/theme-preference-pzfuK5cH.js +0 -101
  106. package/dist/theme-preference-pzfuK5cH.js.map +0 -1
  107. package/dist/tree-list-BNZwjQZA.js +0 -1616
  108. package/dist/tree-list-BNZwjQZA.js.map +0 -1
@@ -1,20 +1,21 @@
1
1
  import { n as e, t } from "./scroll-area-Cr1lNXAr.js";
2
- import { t as n } from "./empty-state-3mVV_pV-.js";
3
- import { t as r } from "./diff-bubble-DZsarmSG.js";
4
- import { a as i, i as a, n as o, o as s, r as c } from "./diff-size-Dydn_Uw5.js";
5
- import { r as l, t as u } from "./diff-editor-CGpeyoCE.js";
6
- import { Box as d, Button as f, Grid as p, IconButton as m, Image as h, Skeleton as g, Stack as _, Text as v } from "@chakra-ui/react";
7
- import { c as y } from "react/compiler-runtime";
8
- import { jsx as b, jsxs as x } from "react/jsx-runtime";
9
- import { useEffect as S, useLayoutEffect as C, useRef as w, useState as T } from "react";
10
- import { Check as E, ChevronDown as D, ChevronRight as O, Copy as k } from "lucide-react";
11
- import { defaultRangeExtractor as A, useVirtualizer as j } from "@tanstack/react-virtual";
2
+ import { t as n } from "./use-virtualizer-uj43XjBp.js";
3
+ import { t as r } from "./empty-state-3mVV_pV-.js";
4
+ import { t as i } from "./diff-bubble-DewUd_2w.js";
5
+ import { a, i as o, n as s, o as c, r as l } from "./diff-size-Dydn_Uw5.js";
6
+ import { r as u, t as d } from "./diff-editor-CGpeyoCE.js";
7
+ import { Box as f, Button as p, Grid as m, IconButton as h, Image as g, Skeleton as _, Stack as v, Text as y } from "@chakra-ui/react";
8
+ import { c as b } from "react/compiler-runtime";
9
+ import { jsx as x, jsxs as S } from "react/jsx-runtime";
10
+ import { useEffect as C, useLayoutEffect as w, useRef as T, useState as E } from "react";
11
+ import { Check as D, ChevronDown as O, ChevronRight as k, Copy as A } from "lucide-react";
12
+ import { defaultRangeExtractor as j } from "@tanstack/react-virtual";
12
13
  //#region src/components/diff-viewer/diff-card-body.tsx
13
14
  var M = (e) => {
14
- let { diff: t, filePath: n, oldContent: r, newContent: a, isLargeDiff: s, hasOptedIntoLargeDiff: u, onShowFullDiff: d, diffViewMode: f = "unified", buildViewData: p } = e;
15
- if (c(n)) {
16
- let e = N(r), t = N(a);
17
- return i(n) && (e || t) ? {
15
+ let { diff: t, filePath: n, oldContent: r, newContent: i, isLargeDiff: o, hasOptedIntoLargeDiff: c, onShowFullDiff: d, diffViewMode: f = "unified", buildViewData: p } = e;
16
+ if (l(n)) {
17
+ let e = N(r), t = N(i);
18
+ return a(n) && (e || t) ? {
18
19
  kind: "image",
19
20
  filePath: n,
20
21
  oldSrc: e,
@@ -22,27 +23,27 @@ var M = (e) => {
22
23
  } : {
23
24
  kind: "binary",
24
25
  filePath: n,
25
- isImage: i(n)
26
+ isImage: a(n)
26
27
  };
27
28
  }
28
- return s && !u ? {
29
+ return o && !c ? {
29
30
  kind: "placeholder",
30
31
  filePath: n,
31
- renderedLineCount: o(t),
32
+ renderedLineCount: s(t),
32
33
  onShowFullDiff: d
33
34
  } : {
34
35
  kind: "editor",
35
- diffViewData: (p ?? l)({
36
+ diffViewData: (p ?? u)({
36
37
  original: r,
37
- modified: a,
38
+ modified: i,
38
39
  oldPath: t.oldPath,
39
40
  newPath: t.newPath
40
41
  }),
41
42
  sideBySide: f === "split"
42
43
  };
43
44
  }, N = (e) => e.startsWith("data:image/") ? e : "", P = (e) => {
44
- let t = y(22), { diff: n, filePath: r, oldContent: i, newContent: a, isLargeDiff: o, hasOptedIntoLargeDiff: s, onShowFullDiff: c, diffViewMode: l } = e, f = l === void 0 ? "unified" : l, p;
45
- t[0] !== n || t[1] !== f || t[2] !== r || t[3] !== s || t[4] !== o || t[5] !== a || t[6] !== i || t[7] !== c ? (p = M({
45
+ let t = b(33), { diff: n, filePath: r, oldContent: i, newContent: a, isLargeDiff: o, hasOptedIntoLargeDiff: s, onShowFullDiff: c, diffViewMode: l } = e, u = l === void 0 ? "unified" : l, p;
46
+ t[0] !== n || t[1] !== u || t[2] !== r || t[3] !== s || t[4] !== o || t[5] !== a || t[6] !== i || t[7] !== c ? (p = M({
46
47
  diff: n,
47
48
  filePath: r,
48
49
  oldContent: i,
@@ -50,49 +51,62 @@ var M = (e) => {
50
51
  isLargeDiff: o,
51
52
  hasOptedIntoLargeDiff: s,
52
53
  onShowFullDiff: c,
53
- diffViewMode: f
54
- }), t[0] = n, t[1] = f, t[2] = r, t[3] = s, t[4] = o, t[5] = a, t[6] = i, t[7] = c, t[8] = p) : p = t[8];
54
+ diffViewMode: u
55
+ }), t[0] = n, t[1] = u, t[2] = r, t[3] = s, t[4] = o, t[5] = a, t[6] = i, t[7] = c, t[8] = p) : p = t[8];
55
56
  let m = p, h;
56
- return t[9] !== n || t[10] !== m.diffViewData || t[11] !== m.filePath || t[12] !== m.isImage || t[13] !== m.kind || t[14] !== m.newSrc || t[15] !== m.oldSrc || t[16] !== m.onShowFullDiff || t[17] !== m.renderedLineCount || t[18] !== m.sideBySide || t[19] !== a || t[20] !== i ? (h = /* @__PURE__ */ b(d, {
57
+ t[9] !== n || t[10] !== m.diffViewData || t[11] !== m.kind || t[12] !== m.sideBySide || t[13] !== a || t[14] !== i ? (h = m.kind === "editor" && /* @__PURE__ */ x(d, {
58
+ original: i,
59
+ modified: a,
60
+ oldPath: n.oldPath,
61
+ newPath: n.newPath,
62
+ sideBySide: m.sideBySide,
63
+ data: m.diffViewData
64
+ }), t[9] = n, t[10] = m.diffViewData, t[11] = m.kind, t[12] = m.sideBySide, t[13] = a, t[14] = i, t[15] = h) : h = t[15];
65
+ let g;
66
+ t[16] !== m.kind || t[17] !== m.newSrc || t[18] !== m.oldSrc ? (g = m.kind === "image" && /* @__PURE__ */ x(F, {
67
+ oldSrc: m.oldSrc,
68
+ newSrc: m.newSrc
69
+ }), t[16] = m.kind, t[17] = m.newSrc, t[18] = m.oldSrc, t[19] = g) : g = t[19];
70
+ let _;
71
+ t[20] !== m.isImage || t[21] !== m.kind ? (_ = m.kind === "binary" && /* @__PURE__ */ x(R, { isImage: m.isImage }), t[20] = m.isImage, t[21] = m.kind, t[22] = _) : _ = t[22];
72
+ let v;
73
+ t[23] !== m.filePath || t[24] !== m.kind || t[25] !== m.onShowFullDiff || t[26] !== m.renderedLineCount ? (v = m.kind === "placeholder" && /* @__PURE__ */ x(L, {
74
+ filePath: m.filePath,
75
+ renderedLineCount: m.renderedLineCount,
76
+ onShowFullDiff: m.onShowFullDiff
77
+ }), t[23] = m.filePath, t[24] = m.kind, t[25] = m.onShowFullDiff, t[26] = m.renderedLineCount, t[27] = v) : v = t[27];
78
+ let y;
79
+ return t[28] !== h || t[29] !== g || t[30] !== _ || t[31] !== v ? (y = /* @__PURE__ */ S(f, {
57
80
  bg: "bg",
58
81
  borderBottomRadius: "xs",
59
82
  overflow: "hidden",
60
- children: m.kind === "editor" ? /* @__PURE__ */ b(u, {
61
- original: i,
62
- modified: a,
63
- oldPath: n.oldPath,
64
- newPath: n.newPath,
65
- sideBySide: m.sideBySide,
66
- data: m.diffViewData
67
- }) : m.kind === "image" ? /* @__PURE__ */ b(F, {
68
- oldSrc: m.oldSrc,
69
- newSrc: m.newSrc
70
- }) : m.kind === "binary" ? /* @__PURE__ */ b(R, { isImage: m.isImage }) : /* @__PURE__ */ b(L, {
71
- filePath: m.filePath,
72
- renderedLineCount: m.renderedLineCount,
73
- onShowFullDiff: m.onShowFullDiff
74
- })
75
- }), t[9] = n, t[10] = m.diffViewData, t[11] = m.filePath, t[12] = m.isImage, t[13] = m.kind, t[14] = m.newSrc, t[15] = m.oldSrc, t[16] = m.onShowFullDiff, t[17] = m.renderedLineCount, t[18] = m.sideBySide, t[19] = a, t[20] = i, t[21] = h) : h = t[21], h;
83
+ children: [
84
+ h,
85
+ g,
86
+ _,
87
+ v
88
+ ]
89
+ }), t[28] = h, t[29] = g, t[30] = _, t[31] = v, t[32] = y) : y = t[32], y;
76
90
  }, F = (e) => {
77
- let t = y(8), { oldSrc: n, newSrc: r } = e, i;
91
+ let t = b(8), { oldSrc: n, newSrc: r } = e, i;
78
92
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = {
79
93
  base: "1fr",
80
94
  md: "1fr 1fr"
81
95
  }, t[0] = i) : i = t[0];
82
96
  let a;
83
- t[1] === n ? a = t[2] : (a = /* @__PURE__ */ b(I, {
97
+ t[1] === n ? a = t[2] : (a = /* @__PURE__ */ x(I, {
84
98
  label: "Old",
85
99
  src: n,
86
100
  fallback: "No old image"
87
101
  }), t[1] = n, t[2] = a);
88
102
  let o;
89
- t[3] === r ? o = t[4] : (o = /* @__PURE__ */ b(I, {
103
+ t[3] === r ? o = t[4] : (o = /* @__PURE__ */ x(I, {
90
104
  label: "New",
91
105
  src: r,
92
106
  fallback: "No new image"
93
107
  }), t[3] = r, t[4] = o);
94
108
  let s;
95
- return t[5] !== a || t[6] !== o ? (s = /* @__PURE__ */ x(p, {
109
+ return t[5] !== a || t[6] !== o ? (s = /* @__PURE__ */ S(m, {
96
110
  templateColumns: i,
97
111
  gap: "sm",
98
112
  p: "sm",
@@ -102,8 +116,8 @@ var M = (e) => {
102
116
  children: [a, o]
103
117
  }), t[5] = a, t[6] = o, t[7] = s) : s = t[7], s;
104
118
  }, I = (e) => {
105
- let t = y(9), { label: n, src: r, fallback: i } = e, a;
106
- t[0] === n ? a = t[1] : (a = /* @__PURE__ */ b(v, {
119
+ let t = b(9), { label: n, src: r, fallback: i } = e, a;
120
+ t[0] === n ? a = t[1] : (a = /* @__PURE__ */ x(y, {
107
121
  px: "xs",
108
122
  py: "2xs",
109
123
  textStyle: "label/S/medium",
@@ -113,25 +127,25 @@ var M = (e) => {
113
127
  children: n
114
128
  }), t[0] = n, t[1] = a);
115
129
  let o;
116
- t[2] !== i || t[3] !== n || t[4] !== r ? (o = /* @__PURE__ */ b(d, {
130
+ t[2] !== i || t[3] !== n || t[4] !== r ? (o = /* @__PURE__ */ x(f, {
117
131
  display: "grid",
118
132
  placeItems: "center",
119
133
  minH: "180px",
120
134
  p: "sm",
121
- children: r ? /* @__PURE__ */ b(h, {
135
+ children: r ? /* @__PURE__ */ x(g, {
122
136
  src: r,
123
137
  alt: `${n} image diff`,
124
138
  maxH: "260px",
125
139
  maxW: "100%",
126
140
  objectFit: "contain"
127
- }) : /* @__PURE__ */ b(v, {
141
+ }) : /* @__PURE__ */ x(y, {
128
142
  color: "fg.muted",
129
143
  textStyle: "body/S/regular",
130
144
  children: i
131
145
  })
132
146
  }), t[2] = i, t[3] = n, t[4] = r, t[5] = o) : o = t[5];
133
147
  let s;
134
- return t[6] !== a || t[7] !== o ? (s = /* @__PURE__ */ x(d, {
148
+ return t[6] !== a || t[7] !== o ? (s = /* @__PURE__ */ S(f, {
135
149
  border: "1px solid",
136
150
  borderColor: "border.subtle",
137
151
  borderRadius: "xs",
@@ -141,41 +155,41 @@ var M = (e) => {
141
155
  children: [a, o]
142
156
  }), t[6] = a, t[7] = o, t[8] = s) : s = t[8], s;
143
157
  }, L = (e) => {
144
- let t = y(5), { filePath: r, onShowFullDiff: i } = e, a;
145
- t[0] !== r || t[1] !== i ? (a = i ? /* @__PURE__ */ b(f, {
158
+ let t = b(5), { filePath: n, onShowFullDiff: i } = e, a;
159
+ t[0] !== n || t[1] !== i ? (a = i ? /* @__PURE__ */ x(p, {
146
160
  size: "xs",
147
161
  variant: "outline",
148
- "aria-label": `Render full diff for ${r}`,
162
+ "aria-label": `Render full diff for ${n}`,
149
163
  onClick: i,
150
164
  children: "Show full diff"
151
- }) : null, t[0] = r, t[1] = i, t[2] = a) : a = t[2];
165
+ }) : null, t[0] = n, t[1] = i, t[2] = a) : a = t[2];
152
166
  let o;
153
- return t[3] === a ? o = t[4] : (o = /* @__PURE__ */ b(d, {
167
+ return t[3] === a ? o = t[4] : (o = /* @__PURE__ */ x(f, {
154
168
  p: "md",
155
169
  borderTop: "1px solid",
156
170
  borderColor: "border.subtle",
157
171
  bg: "bg",
158
- children: /* @__PURE__ */ b(n, {
172
+ children: /* @__PURE__ */ x(r, {
159
173
  title: "Large diffs are hidden by default",
160
174
  paddingY: "sm",
161
175
  children: a
162
176
  })
163
177
  }), t[3] = a, t[4] = o), o;
164
178
  }, R = (e) => {
165
- let t = y(2), { isImage: r } = e, i = r ? "Image diffs are not shown" : "Binary diffs are not shown", a;
166
- return t[0] === i ? a = t[1] : (a = /* @__PURE__ */ b(d, {
179
+ let t = b(2), { isImage: n } = e, i = n ? "Image diffs are not shown" : "Binary diffs are not shown", a;
180
+ return t[0] === i ? a = t[1] : (a = /* @__PURE__ */ x(f, {
167
181
  p: "md",
168
182
  borderTop: "1px solid",
169
183
  borderColor: "border.subtle",
170
184
  bg: "bg",
171
- children: /* @__PURE__ */ b(n, {
185
+ children: /* @__PURE__ */ x(r, {
172
186
  title: i,
173
187
  paddingY: "sm"
174
188
  })
175
189
  }), t[0] = i, t[1] = a), a;
176
190
  }, z = (e) => {
177
- let t = y(7), { title: r, actionLabel: i, isLoadingDiff: a, onAction: o } = e, s;
178
- t[0] !== i || t[1] !== a || t[2] !== o ? (s = i ? /* @__PURE__ */ b(f, {
191
+ let t = b(7), { title: n, actionLabel: i, isLoadingDiff: a, onAction: o } = e, s;
192
+ t[0] !== i || t[1] !== a || t[2] !== o ? (s = i ? /* @__PURE__ */ x(p, {
179
193
  size: "xs",
180
194
  variant: "outline",
181
195
  loading: a,
@@ -183,24 +197,24 @@ var M = (e) => {
183
197
  children: i
184
198
  }) : null, t[0] = i, t[1] = a, t[2] = o, t[3] = s) : s = t[3];
185
199
  let c;
186
- return t[4] !== s || t[5] !== r ? (c = /* @__PURE__ */ b(d, {
200
+ return t[4] !== s || t[5] !== n ? (c = /* @__PURE__ */ x(f, {
187
201
  bg: "bg",
188
202
  p: "md",
189
203
  borderTop: "1px solid",
190
204
  borderColor: "border.subtle",
191
- children: /* @__PURE__ */ b(n, {
192
- title: r,
205
+ children: /* @__PURE__ */ x(r, {
206
+ title: n,
193
207
  paddingY: "sm",
194
208
  children: s
195
209
  })
196
- }), t[4] = s, t[5] = r, t[6] = c) : c = t[6], c;
210
+ }), t[4] = s, t[5] = n, t[6] = c) : c = t[6], c;
197
211
  }, B = [
198
212
  "first",
199
213
  "second",
200
214
  "third"
201
215
  ], V = () => {
202
- let e = y(1), t;
203
- return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ b(_, {
216
+ let e = b(1), t;
217
+ return e[0] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ x(v, {
204
218
  h: "280px",
205
219
  bg: "bg",
206
220
  borderTop: "1px solid",
@@ -214,7 +228,7 @@ var M = (e) => {
214
228
  }), e[0] = t) : t = e[0], t;
215
229
  };
216
230
  function H(e) {
217
- return /* @__PURE__ */ b(g, {
231
+ return /* @__PURE__ */ x(_, {
218
232
  h: "20px",
219
233
  w: "full",
220
234
  borderRadius: "xs"
@@ -231,12 +245,12 @@ var U = (e) => {
231
245
  actionLabel: c,
232
246
  onAction: l
233
247
  };
234
- }, ee = (e) => {
235
- let t = y(30), { diff: n, filePath: r, oldContent: i, newContent: a, isExpanded: o, isLargeDiff: s, isGeneratedDiff: c, isBinaryDiff: l, hasDiffContent: u, canLoadDiff: d, shouldAutoLoadDiff: f, loadError: p, isLoadingDiff: m, onLoadDiff: h, hasOptedIntoLargeDiff: g, onShowFullDiff: _, diffViewMode: v } = e, x = v === void 0 ? "unified" : v;
248
+ }, W = (e) => {
249
+ let t = b(30), { diff: n, filePath: r, oldContent: i, newContent: a, isExpanded: o, isLargeDiff: s, isGeneratedDiff: c, isBinaryDiff: l, hasDiffContent: u, canLoadDiff: d, shouldAutoLoadDiff: f, loadError: p, isLoadingDiff: m, onLoadDiff: h, hasOptedIntoLargeDiff: g, onShowFullDiff: _, diffViewMode: v } = e, y = v === void 0 ? "unified" : v;
236
250
  if (!o) return null;
237
251
  if (l) {
238
252
  let e;
239
- return t[0] !== n || t[1] !== x || t[2] !== r || t[3] !== g || t[4] !== a || t[5] !== i || t[6] !== _ ? (e = /* @__PURE__ */ b(P, {
253
+ return t[0] !== n || t[1] !== y || t[2] !== r || t[3] !== g || t[4] !== a || t[5] !== i || t[6] !== _ ? (e = /* @__PURE__ */ x(P, {
240
254
  diff: n,
241
255
  filePath: r,
242
256
  oldContent: i,
@@ -244,8 +258,8 @@ var U = (e) => {
244
258
  isLargeDiff: !1,
245
259
  hasOptedIntoLargeDiff: g,
246
260
  onShowFullDiff: _,
247
- diffViewMode: x
248
- }), t[0] = n, t[1] = x, t[2] = r, t[3] = g, t[4] = a, t[5] = i, t[6] = _, t[7] = e) : e = t[7], e;
261
+ diffViewMode: y
262
+ }), t[0] = n, t[1] = y, t[2] = r, t[3] = g, t[4] = a, t[5] = i, t[6] = _, t[7] = e) : e = t[7], e;
249
263
  }
250
264
  if (!u && !f) {
251
265
  let e;
@@ -258,7 +272,7 @@ var U = (e) => {
258
272
  onShowFullDiff: _
259
273
  }), t[8] = d, t[9] = c, t[10] = s, t[11] = p, t[12] = h, t[13] = _, t[14] = e) : e = t[14];
260
274
  let { title: n, actionLabel: r, onAction: i } = e, a;
261
- return t[15] !== r || t[16] !== m || t[17] !== i || t[18] !== n ? (a = /* @__PURE__ */ b(z, {
275
+ return t[15] !== r || t[16] !== m || t[17] !== i || t[18] !== n ? (a = /* @__PURE__ */ x(z, {
262
276
  title: n,
263
277
  actionLabel: r,
264
278
  isLoadingDiff: m,
@@ -267,10 +281,10 @@ var U = (e) => {
267
281
  }
268
282
  if (f) {
269
283
  let e;
270
- return t[20] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ b(V, {}), t[20] = e) : e = t[20], e;
284
+ return t[20] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ x(V, {}), t[20] = e) : e = t[20], e;
271
285
  }
272
286
  let S;
273
- return t[21] !== n || t[22] !== x || t[23] !== r || t[24] !== g || t[25] !== s || t[26] !== a || t[27] !== i || t[28] !== _ ? (S = /* @__PURE__ */ b(P, {
287
+ return t[21] !== n || t[22] !== y || t[23] !== r || t[24] !== g || t[25] !== s || t[26] !== a || t[27] !== i || t[28] !== _ ? (S = /* @__PURE__ */ x(P, {
274
288
  diff: n,
275
289
  filePath: r,
276
290
  oldContent: i,
@@ -278,16 +292,16 @@ var U = (e) => {
278
292
  isLargeDiff: s,
279
293
  hasOptedIntoLargeDiff: g,
280
294
  onShowFullDiff: _,
281
- diffViewMode: x
282
- }), t[21] = n, t[22] = x, t[23] = r, t[24] = g, t[25] = s, t[26] = a, t[27] = i, t[28] = _, t[29] = S) : S = t[29], S;
283
- }, te = (e) => {
295
+ diffViewMode: y
296
+ }), t[21] = n, t[22] = y, t[23] = r, t[24] = g, t[25] = s, t[26] = a, t[27] = i, t[28] = _, t[29] = S) : S = t[29], S;
297
+ }, G = (e) => {
284
298
  let { isExpanded: t, isSelected: n, hasDiffContent: r, isLargeDiff: i, isGeneratedDiff: a, isBinaryDiff: o, requestedPath: s, filePath: c } = e;
285
299
  return t && n && !r && !i && !a && !o && s !== c;
286
- }, W = (e) => {
300
+ }, ee = (e) => {
287
301
  let { requestedPath: t, filePath: n, hasDiffContent: r } = e;
288
302
  return t === n && r ? null : t;
289
- }, ne = (e) => !i(e), re = (e) => e.newPath || e.oldPath || "unknown", ie = (e) => {
290
- let { filePath: t, isExpanded: n, isSelected: r, hasDiffContent: i, isLargeDiff: a, isGeneratedDiff: o, isBinaryDiff: s, onLoadDiff: c } = e, [l, u] = T(!1), [d, f] = T(null), [p, m] = T(!1), h = async () => {
303
+ }, te = (e) => !a(e), ne = (e) => e.newPath || e.oldPath || "unknown", re = (e) => {
304
+ let { filePath: t, isExpanded: n, isSelected: r, hasDiffContent: i, isLargeDiff: a, isGeneratedDiff: o, isBinaryDiff: s, onLoadDiff: c } = e, [l, u] = E(!1), [d, f] = E(null), [p, m] = E(!1), h = async () => {
291
305
  if (c && !l) {
292
306
  f(t), m(!1), u(!0);
293
307
  try {
@@ -298,7 +312,7 @@ var U = (e) => {
298
312
  u(!1);
299
313
  }
300
314
  }
301
- }, g = te({
315
+ }, g = G({
302
316
  isExpanded: n,
303
317
  isSelected: r,
304
318
  hasDiffContent: i,
@@ -308,13 +322,13 @@ var U = (e) => {
308
322
  requestedPath: d,
309
323
  filePath: t
310
324
  });
311
- return S(() => {
312
- f((e) => W({
325
+ return C(() => {
326
+ f((e) => ee({
313
327
  requestedPath: e,
314
328
  filePath: t,
315
329
  hasDiffContent: i
316
330
  }));
317
- }, [t, i]), S(() => {
331
+ }, [t, i]), C(() => {
318
332
  c && g && !p && h();
319
333
  }), {
320
334
  isLoadingDiff: l,
@@ -322,11 +336,11 @@ var U = (e) => {
322
336
  shouldAutoLoadDiff: !!c && g && !p,
323
337
  loadDiff: h
324
338
  };
325
- }, ae = (e) => {
326
- let t = y(44), { diff: n, isSelected: r, isExpanded: o, onToggleExpanded: l, onSelect: u, onLoadDiff: f, hasOptedIntoLargeDiff: p, onShowFullDiff: m, diffViewMode: h } = e, g = r !== void 0 && r, _ = o === void 0 || o, v = p !== void 0 && p, S = h === void 0 ? "unified" : h, C, w, T, E, D, O;
327
- t[0] === n ? (C = t[1], w = t[2], T = t[3], E = t[4], D = t[5], O = t[6]) : (C = re(n), D = n.oldContent || "", E = n.newContent || "", T = s(n), w = a(C), O = c(C) && !i(C), t[0] = n, t[1] = C, t[2] = w, t[3] = T, t[4] = E, t[5] = D, t[6] = O);
339
+ }, ie = (e) => {
340
+ let t = b(44), { diff: n, isSelected: r, isExpanded: i, onToggleExpanded: s, onSelect: u, onLoadDiff: d, hasOptedIntoLargeDiff: p, onShowFullDiff: m, diffViewMode: h } = e, g = r !== void 0 && r, _ = i === void 0 || i, v = p !== void 0 && p, y = h === void 0 ? "unified" : h, C, w, T, E, D, O;
341
+ t[0] === n ? (C = t[1], w = t[2], T = t[3], E = t[4], D = t[5], O = t[6]) : (C = ne(n), D = n.oldContent || "", E = n.newContent || "", T = c(n), w = o(C), O = l(C) && !a(C), t[0] = n, t[1] = C, t[2] = w, t[3] = T, t[4] = E, t[5] = D, t[6] = O);
328
342
  let k = O, A = n.oldContent !== void 0 || n.newContent !== void 0, j = T && !v, M;
329
- t[7] !== k || t[8] !== C || t[9] !== A || t[10] !== _ || t[11] !== w || t[12] !== g || t[13] !== f || t[14] !== j ? (M = {
343
+ t[7] !== k || t[8] !== C || t[9] !== A || t[10] !== _ || t[11] !== w || t[12] !== g || t[13] !== d || t[14] !== j ? (M = {
330
344
  filePath: C,
331
345
  isExpanded: _,
332
346
  isSelected: g,
@@ -334,18 +348,18 @@ var U = (e) => {
334
348
  isLargeDiff: j,
335
349
  isGeneratedDiff: w,
336
350
  isBinaryDiff: k,
337
- onLoadDiff: f
338
- }, t[7] = k, t[8] = C, t[9] = A, t[10] = _, t[11] = w, t[12] = g, t[13] = f, t[14] = j, t[15] = M) : M = t[15];
339
- let { isLoadingDiff: N, loadError: P, shouldAutoLoadDiff: F, loadDiff: I } = ie(M), L = g ? "border.accent" : "border.subtle", R;
351
+ onLoadDiff: d
352
+ }, t[7] = k, t[8] = C, t[9] = A, t[10] = _, t[11] = w, t[12] = g, t[13] = d, t[14] = j, t[15] = M) : M = t[15];
353
+ let { isLoadingDiff: N, loadError: P, shouldAutoLoadDiff: F, loadDiff: I } = re(M), L = g ? "border.accent" : "border.subtle", R;
340
354
  t[16] === Symbol.for("react.memo_cache_sentinel") ? (R = { borderColor: "border.accent" }, t[16] = R) : R = t[16];
341
355
  let z;
342
- t[17] !== n || t[18] !== _ || t[19] !== l ? (z = /* @__PURE__ */ b(G, {
356
+ t[17] !== n || t[18] !== _ || t[19] !== s ? (z = /* @__PURE__ */ x(ae, {
343
357
  diff: n,
344
358
  isExpanded: _,
345
- onToggleExpanded: l
346
- }), t[17] = n, t[18] = _, t[19] = l, t[20] = z) : z = t[20];
347
- let B = !!f, V;
348
- t[21] !== k || t[22] !== n || t[23] !== S || t[24] !== C || t[25] !== A || t[26] !== v || t[27] !== _ || t[28] !== w || t[29] !== T || t[30] !== N || t[31] !== I || t[32] !== P || t[33] !== E || t[34] !== D || t[35] !== m || t[36] !== F || t[37] !== B ? (V = /* @__PURE__ */ b(ee, {
359
+ onToggleExpanded: s
360
+ }), t[17] = n, t[18] = _, t[19] = s, t[20] = z) : z = t[20];
361
+ let B = !!d, V;
362
+ t[21] !== k || t[22] !== n || t[23] !== y || t[24] !== C || t[25] !== A || t[26] !== v || t[27] !== _ || t[28] !== w || t[29] !== T || t[30] !== N || t[31] !== I || t[32] !== P || t[33] !== E || t[34] !== D || t[35] !== m || t[36] !== F || t[37] !== B ? (V = /* @__PURE__ */ x(W, {
349
363
  diff: n,
350
364
  filePath: C,
351
365
  oldContent: D,
@@ -362,10 +376,10 @@ var U = (e) => {
362
376
  onLoadDiff: I,
363
377
  hasOptedIntoLargeDiff: v,
364
378
  onShowFullDiff: m,
365
- diffViewMode: S
366
- }), t[21] = k, t[22] = n, t[23] = S, t[24] = C, t[25] = A, t[26] = v, t[27] = _, t[28] = w, t[29] = T, t[30] = N, t[31] = I, t[32] = P, t[33] = E, t[34] = D, t[35] = m, t[36] = F, t[37] = B, t[38] = V) : V = t[38];
379
+ diffViewMode: y
380
+ }), t[21] = k, t[22] = n, t[23] = y, t[24] = C, t[25] = A, t[26] = v, t[27] = _, t[28] = w, t[29] = T, t[30] = N, t[31] = I, t[32] = P, t[33] = E, t[34] = D, t[35] = m, t[36] = F, t[37] = B, t[38] = V) : V = t[38];
367
381
  let H;
368
- return t[39] !== u || t[40] !== V || t[41] !== L || t[42] !== z ? (H = /* @__PURE__ */ x(d, {
382
+ return t[39] !== u || t[40] !== V || t[41] !== L || t[42] !== z ? (H = /* @__PURE__ */ S(f, {
369
383
  "data-testid": "diff-card",
370
384
  border: "1px solid",
371
385
  borderColor: L,
@@ -379,17 +393,17 @@ var U = (e) => {
379
393
  onClick: u,
380
394
  children: [z, V]
381
395
  }), t[39] = u, t[40] = V, t[41] = L, t[42] = z, t[43] = H) : H = t[43], H;
382
- }, G = (t) => {
383
- let n = y(58), { diff: i, isExpanded: a, onToggleExpanded: o } = t, s = a === void 0 || a, c, l, u, f;
384
- n[0] === i ? (c = n[1], l = n[2], u = n[3], f = n[4]) : (u = re(i), c = i.additions ?? 0, l = i.deletions ?? 0, f = ne(u), n[0] = i, n[1] = c, n[2] = l, n[3] = u, n[4] = f);
385
- let h = f, [g, _] = T(!1), C = w(null), A, j;
386
- n[5] === Symbol.for("react.memo_cache_sentinel") ? (A = () => () => {
387
- C.current !== null && window.clearTimeout(C.current);
388
- }, j = [], n[5] = A, n[6] = j) : (A = n[5], j = n[6]), S(A, j);
396
+ }, ae = (t) => {
397
+ let n = b(65), { diff: r, isExpanded: a, onToggleExpanded: o } = t, s = a === void 0 || a, c, l, u, d;
398
+ n[0] === r ? (c = n[1], l = n[2], u = n[3], d = n[4]) : (u = ne(r), c = r.additions ?? 0, l = r.deletions ?? 0, d = te(u), n[0] = r, n[1] = c, n[2] = l, n[3] = u, n[4] = d);
399
+ let p = d, [g, _] = E(!1), v = T(null), w, j;
400
+ n[5] === Symbol.for("react.memo_cache_sentinel") ? (w = () => () => {
401
+ v.current !== null && window.clearTimeout(v.current);
402
+ }, j = [], n[5] = w, n[6] = j) : (w = n[5], j = n[6]), C(w, j);
389
403
  let M;
390
404
  n[7] === u ? M = n[8] : (M = async () => {
391
405
  try {
392
- await navigator.clipboard.writeText(u), _(!0), C.current !== null && window.clearTimeout(C.current), C.current = window.setTimeout(() => _(!1), 1200);
406
+ await navigator.clipboard.writeText(u), _(!0), v.current !== null && window.clearTimeout(v.current), v.current = window.setTimeout(() => _(!1), 1200);
393
407
  } catch {
394
408
  _(!1);
395
409
  }
@@ -403,9 +417,9 @@ var U = (e) => {
403
417
  e.stopPropagation(), o?.();
404
418
  }, n[12] = o, n[13] = z);
405
419
  let B;
406
- n[14] === s ? B = n[15] : (B = b(s ? D : O, { size: 16 }), n[14] = s, n[15] = B);
420
+ n[14] === s ? B = n[15] : (B = x(s ? O : k, { size: 16 }), n[14] = s, n[15] = B);
407
421
  let V;
408
- n[16] !== z || n[17] !== B || n[18] !== R ? (V = /* @__PURE__ */ b(m, {
422
+ n[16] !== z || n[17] !== B || n[18] !== R ? (V = /* @__PURE__ */ x(h, {
409
423
  "aria-label": R,
410
424
  variant: "ghost",
411
425
  size: "2xs",
@@ -414,100 +428,108 @@ var U = (e) => {
414
428
  children: B
415
429
  }), n[16] = z, n[17] = B, n[18] = R, n[19] = V) : V = n[19];
416
430
  let H;
417
- n[20] !== i.change || n[21] !== i.newPath || n[22] !== i.oldPath || n[23] !== u ? (H = i.change === "renamed" ? /* @__PURE__ */ x(v, {
431
+ n[20] !== r.change || n[21] !== r.newPath || n[22] !== r.oldPath ? (H = r.change === "renamed" && /* @__PURE__ */ S(y, {
418
432
  as: "span",
419
433
  textStyle: "sm",
420
434
  children: [
421
- /* @__PURE__ */ b(v, {
435
+ /* @__PURE__ */ x(y, {
422
436
  as: "span",
423
437
  color: "fg.muted",
424
438
  textDecoration: "line-through",
425
439
  mr: "xs",
426
- children: i.oldPath
440
+ children: r.oldPath
427
441
  }),
428
- /* @__PURE__ */ b(d, {
442
+ /* @__PURE__ */ x(f, {
429
443
  as: "span",
430
444
  display: "inline-flex",
431
445
  alignItems: "center",
432
446
  verticalAlign: "middle",
433
447
  mr: "xs",
434
- children: /* @__PURE__ */ b(O, { size: 12 })
448
+ children: /* @__PURE__ */ x(k, { size: 12 })
435
449
  }),
436
- i.newPath
450
+ r.newPath
437
451
  ]
438
- }) : i.change === "deleted" ? /* @__PURE__ */ b(v, {
452
+ }), n[20] = r.change, n[21] = r.newPath, n[22] = r.oldPath, n[23] = H) : H = n[23];
453
+ let U;
454
+ n[24] !== r.change || n[25] !== u ? (U = r.change === "deleted" && /* @__PURE__ */ x(y, {
439
455
  as: "span",
440
456
  color: "fg.muted",
441
457
  textDecoration: "line-through",
442
458
  textStyle: "sm",
443
459
  children: u
444
- }) : /* @__PURE__ */ b(v, {
460
+ }), n[24] = r.change, n[25] = u, n[26] = U) : U = n[26];
461
+ let W;
462
+ n[27] !== r.change || n[28] !== u ? (W = r.change !== "renamed" && r.change !== "deleted" && /* @__PURE__ */ x(y, {
445
463
  as: "span",
446
464
  textStyle: "sm",
447
465
  children: u
448
- }), n[20] = i.change, n[21] = i.newPath, n[22] = i.oldPath, n[23] = u, n[24] = H) : H = n[24];
449
- let U;
450
- n[25] !== u || n[26] !== H ? (U = /* @__PURE__ */ b(d, {
466
+ }), n[27] = r.change, n[28] = u, n[29] = W) : W = n[29];
467
+ let G;
468
+ n[30] !== u || n[31] !== H || n[32] !== U || n[33] !== W ? (G = /* @__PURE__ */ S(f, {
451
469
  minW: 0,
452
470
  overflow: "hidden",
453
471
  textOverflow: "ellipsis",
454
472
  whiteSpace: "nowrap",
455
473
  title: u,
456
- children: H
457
- }), n[25] = u, n[26] = H, n[27] = U) : U = n[27];
458
- let ee = g ? "1" : "0", te = g ? "auto" : "none", W;
459
- n[28] === Symbol.for("react.memo_cache_sentinel") ? (W = { "[data-testid='diff-card-header']:hover &, [data-testid='diff-card-header']:focus-within &": {
474
+ children: [
475
+ H,
476
+ U,
477
+ W
478
+ ]
479
+ }), n[30] = u, n[31] = H, n[32] = U, n[33] = W, n[34] = G) : G = n[34];
480
+ let ee = g ? "1" : "0", re = g ? "auto" : "none", ie;
481
+ n[35] === Symbol.for("react.memo_cache_sentinel") ? (ie = { "[data-testid='diff-card-header']:hover &, [data-testid='diff-card-header']:focus-within &": {
460
482
  opacity: 1,
461
483
  pointerEvents: "auto"
462
- } }, n[28] = W) : W = n[28];
463
- let ie = g ? "Copied" : "Copy file path", ae = g ? "Copied" : "Copy file path", G;
464
- n[29] === N ? G = n[30] : (G = (e) => {
484
+ } }, n[35] = ie) : ie = n[35];
485
+ let ae = g ? "Copied" : "Copy file path", oe = g ? "Copied" : "Copy file path", K;
486
+ n[36] === N ? K = n[37] : (K = (e) => {
465
487
  e.stopPropagation(), N();
466
- }, n[29] = N, n[30] = G);
467
- let K;
468
- n[31] === g ? K = n[32] : (K = b(g ? E : k, { size: 12 }), n[31] = g, n[32] = K);
488
+ }, n[36] = N, n[37] = K);
469
489
  let q;
470
- n[33] !== ae || n[34] !== G || n[35] !== K ? (q = /* @__PURE__ */ b(m, {
471
- "aria-label": ae,
490
+ n[38] === g ? q = n[39] : (q = x(g ? D : A, { size: 12 }), n[38] = g, n[39] = q);
491
+ let J;
492
+ n[40] !== oe || n[41] !== K || n[42] !== q ? (J = /* @__PURE__ */ x(h, {
493
+ "aria-label": oe,
472
494
  variant: "ghost",
473
495
  size: "2xs",
474
- onClick: G,
496
+ onClick: K,
475
497
  flexShrink: 0,
476
- children: K
477
- }), n[33] = ae, n[34] = G, n[35] = K, n[36] = q) : q = n[36];
478
- let J;
479
- n[37] !== ie || n[38] !== q ? (J = /* @__PURE__ */ b(e, {
480
- content: ie,
481
498
  children: q
482
- }), n[37] = ie, n[38] = q, n[39] = J) : J = n[39];
499
+ }), n[40] = oe, n[41] = K, n[42] = q, n[43] = J) : J = n[43];
483
500
  let Y;
484
- n[40] !== ee || n[41] !== te || n[42] !== J ? (Y = /* @__PURE__ */ b(d, {
485
- opacity: ee,
486
- pointerEvents: te,
487
- transition: "opacity 120ms ease",
488
- css: W,
501
+ n[44] !== ae || n[45] !== J ? (Y = /* @__PURE__ */ x(e, {
502
+ content: ae,
489
503
  children: J
490
- }), n[40] = ee, n[41] = te, n[42] = J, n[43] = Y) : Y = n[43];
504
+ }), n[44] = ae, n[45] = J, n[46] = Y) : Y = n[46];
491
505
  let X;
492
- n[44] !== U || n[45] !== Y ? (X = /* @__PURE__ */ x(p, {
506
+ n[47] !== ee || n[48] !== re || n[49] !== Y ? (X = /* @__PURE__ */ x(f, {
507
+ opacity: ee,
508
+ pointerEvents: re,
509
+ transition: "opacity 120ms ease",
510
+ css: ie,
511
+ children: Y
512
+ }), n[47] = ee, n[48] = re, n[49] = Y, n[50] = X) : X = n[50];
513
+ let Z;
514
+ n[51] !== G || n[52] !== X ? (Z = /* @__PURE__ */ S(m, {
493
515
  templateColumns: "minmax(0, max-content) auto",
494
516
  alignItems: "center",
495
517
  justifyContent: "start",
496
518
  gap: "2xs",
497
519
  minW: 0,
498
- children: [U, Y]
499
- }), n[44] = U, n[45] = Y, n[46] = X) : X = n[46];
500
- let Z;
501
- n[47] !== c || n[48] !== l || n[49] !== h ? (Z = h ? /* @__PURE__ */ b(d, {
520
+ children: [G, X]
521
+ }), n[51] = G, n[52] = X, n[53] = Z) : Z = n[53];
522
+ let Q;
523
+ n[54] !== c || n[55] !== l || n[56] !== p ? (Q = p ? /* @__PURE__ */ x(f, {
502
524
  flexShrink: 0,
503
- children: /* @__PURE__ */ b(r, {
525
+ children: /* @__PURE__ */ x(i, {
504
526
  variant: "ghost",
505
527
  additions: c,
506
528
  deletions: l
507
529
  })
508
- }) : null, n[47] = c, n[48] = l, n[49] = h, n[50] = Z) : Z = n[50];
509
- let Q;
510
- return n[51] !== V || n[52] !== X || n[53] !== Z || n[54] !== P || n[55] !== F || n[56] !== L ? (Q = /* @__PURE__ */ x(p, {
530
+ }) : null, n[54] = c, n[55] = l, n[56] = p, n[57] = Q) : Q = n[57];
531
+ let se;
532
+ return n[58] !== V || n[59] !== Z || n[60] !== Q || n[61] !== P || n[62] !== F || n[63] !== L ? (se = /* @__PURE__ */ S(m, {
511
533
  "data-testid": "diff-card-header",
512
534
  templateColumns: "auto minmax(0, 1fr) auto",
513
535
  px: "xs",
@@ -529,45 +551,45 @@ var U = (e) => {
529
551
  gap: "sm",
530
552
  children: [
531
553
  V,
532
- X,
533
- Z
554
+ Z,
555
+ Q
534
556
  ]
535
- }), n[51] = V, n[52] = X, n[53] = Z, n[54] = P, n[55] = F, n[56] = L, n[57] = Q) : Q = n[57], Q;
536
- }, K = () => {
537
- let e = y(1), r;
538
- return e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ b(_, {
557
+ }), n[58] = V, n[59] = Z, n[60] = Q, n[61] = P, n[62] = F, n[63] = L, n[64] = se) : se = n[64], se;
558
+ }, oe = () => {
559
+ let e = b(1), n;
560
+ return e[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ x(v, {
539
561
  h: "full",
540
562
  minH: "0",
541
563
  gap: "0",
542
564
  bg: "bg",
543
- children: /* @__PURE__ */ b(t, {
565
+ children: /* @__PURE__ */ x(t, {
544
566
  flex: "1",
545
567
  minH: "0",
546
568
  contentProps: {
547
569
  p: "xs",
548
570
  spaceY: "xs"
549
571
  },
550
- children: /* @__PURE__ */ b(n, {
572
+ children: /* @__PURE__ */ x(r, {
551
573
  title: "No changes detected",
552
574
  description: "Make some changes to see the diff here.",
553
575
  paddingY: "sm"
554
576
  })
555
577
  })
556
- }), e[0] = r) : r = e[0], r;
557
- }, q = 34, J = 18, Y = 28, X = 8, Z = () => 130, Q = (e) => {
558
- let { diff: t, isCollapsed: n, hasOptedIntoLargeDiff: r = !1, diffViewMode: a = "unified" } = e;
578
+ }), e[0] = n) : n = e[0], n;
579
+ }, K = 34, q = 18, J = 28, Y = 8, X = () => 130, Z = (e) => {
580
+ let { diff: t, isCollapsed: n, hasOptedIntoLargeDiff: r = !1, diffViewMode: i = "unified" } = e;
559
581
  if (n) return 42;
560
- let o = t.oldContent !== void 0 || t.newContent !== void 0, u = t.newPath ?? t.oldPath ?? "";
561
- if (i(u) && (t.oldContent || t.newContent)) return 380;
562
- if (c(u) || !o || s(t) && !r) return Z();
563
- let { unifiedContentRows: d, splitContentRows: f, hunkRows: p } = l({
582
+ let o = t.oldContent !== void 0 || t.newContent !== void 0, s = t.newPath ?? t.oldPath ?? "";
583
+ if (a(s) && (t.oldContent || t.newContent)) return 380;
584
+ if (l(s) || !o || c(t) && !r) return X();
585
+ let { unifiedContentRows: d, splitContentRows: f, hunkRows: p } = u({
564
586
  original: t.oldContent ?? "",
565
587
  modified: t.newContent ?? "",
566
588
  oldPath: t.oldPath,
567
589
  newPath: t.newPath
568
- }), m = a === "split" ? f : d;
569
- return m === 0 && p === 0 ? Z() : q + (m * J + p * Y) + X;
570
- }, oe = (e) => e.newPath ?? e.oldPath ?? "unknown", se = 24, ce = (e) => {
590
+ }), m = i === "split" ? f : d;
591
+ return m === 0 && p === 0 ? X() : K + (m * q + p * J) + Y;
592
+ }, Q = (e) => e.newPath ?? e.oldPath ?? "unknown", se = 24, ce = (e) => {
571
593
  let { diffs: t, selectedDiffPath: n, collapsedPaths: r, expansionCommand: i, completedScrollCommandId: a } = e, o = n, s = n ? `selected:${n}` : null, c = i?.action === "expand-selected" ? i.id : null, l = c !== null && a === c;
572
594
  i?.action === "expand-selected" && i.path && (o = i.path, s = `command:${i.id}:${i.path}`);
573
595
  let u = s;
@@ -575,7 +597,7 @@ var U = (e) => {
575
597
  let e = r.has(o) ? "collapsed" : "expanded";
576
598
  u = `${s}:${e}`;
577
599
  }
578
- let d = o ? t.findIndex((e) => oe(e) === o) : -1, f = d >= 0 && i?.action === "expand-selected" && i.direction === "up" && !l;
600
+ let d = o ? t.findIndex((e) => Q(e) === o) : -1, f = d >= 0 && i?.action === "expand-selected" && i.direction === "up" && !l;
579
601
  return {
580
602
  selectedScrollPath: o,
581
603
  selectedScrollKey: u,
@@ -590,7 +612,7 @@ var U = (e) => {
590
612
  let i = Math.max(0, n - se), a = Array.from({ length: n - i + 1 }, (e, t) => i + t);
591
613
  return Array.from(/* @__PURE__ */ new Set([...t, ...a])).sort((e, t) => e - t);
592
614
  }, ue = 3, de = 12, fe = (e) => e.newPath ?? e.oldPath ?? "unknown", pe = (e) => {
593
- let t = y(20), { diffs: n, selectedDiffPath: r, collapsedPaths: i, expansionCommand: a, scrollRef: o, virtualizerRef: s, suppressScrollAdjustRef: c } = e, [l, u] = T(null), d;
615
+ let t = b(20), { diffs: n, selectedDiffPath: r, collapsedPaths: i, expansionCommand: a, scrollRef: o, virtualizerRef: s, suppressScrollAdjustRef: c } = e, [l, u] = E(null), d;
594
616
  t[0] !== i || t[1] !== l || t[2] !== n || t[3] !== a || t[4] !== r ? (d = ce({
595
617
  diffs: n,
596
618
  selectedDiffPath: r,
@@ -598,7 +620,7 @@ var U = (e) => {
598
620
  expansionCommand: a,
599
621
  completedScrollCommandId: l
600
622
  }), t[0] = i, t[1] = l, t[2] = n, t[3] = a, t[4] = r, t[5] = d) : d = t[5];
601
- let { selectedScrollPath: f, selectedScrollKey: p, selectedScrollCommandId: m, selectedScrollIndex: h, shouldPinSelectedScrollIndex: g, hasCompletedSelectedScroll: _ } = d, v, b;
623
+ let { selectedScrollPath: f, selectedScrollKey: p, selectedScrollCommandId: m, selectedScrollIndex: h, shouldPinSelectedScrollIndex: g, hasCompletedSelectedScroll: _ } = d, v, y;
602
624
  t[6] !== i || t[7] !== n || t[8] !== _ || t[9] !== o || t[10] !== m || t[11] !== p || t[12] !== f || t[13] !== c || t[14] !== s ? (v = () => {
603
625
  if (!f || !p || _ || i.has(f)) return;
604
626
  let e = n.findIndex((e) => fe(e) === f);
@@ -628,7 +650,7 @@ var U = (e) => {
628
650
  d(), r.removeEventListener("wheel", h), r.removeEventListener("touchmove", h);
629
651
  for (let e of a) cancelAnimationFrame(e);
630
652
  };
631
- }, b = [
653
+ }, y = [
632
654
  p,
633
655
  f,
634
656
  m,
@@ -638,7 +660,7 @@ var U = (e) => {
638
660
  o,
639
661
  s,
640
662
  c
641
- ], t[6] = i, t[7] = n, t[8] = _, t[9] = o, t[10] = m, t[11] = p, t[12] = f, t[13] = c, t[14] = s, t[15] = v, t[16] = b) : (v = t[15], b = t[16]), C(v, b);
663
+ ], t[6] = i, t[7] = n, t[8] = _, t[9] = o, t[10] = m, t[11] = p, t[12] = f, t[13] = c, t[14] = s, t[15] = v, t[16] = y) : (v = t[15], y = t[16]), w(v, y);
642
664
  let x;
643
665
  return t[17] !== h || t[18] !== g ? (x = {
644
666
  selectedScrollIndex: h,
@@ -661,108 +683,108 @@ var U = (e) => {
661
683
  return a.add(r), a;
662
684
  };
663
685
  function xe(e) {
664
- let { diffs: n, selectedDiffPath: r = null, onLoadDiff: i, onSelectDiffPath: a, onExpansionStateChange: o, expansionCommand: s = null, diffViewMode: c = "unified" } = e, l = w(null), u = w(null), f = w(null), p = w(!1), m = w(null), [h, g] = T(() => ge(n)), [v, y] = T(() => /* @__PURE__ */ new Set()), { selectedScrollIndex: x, shouldPinSelectedScrollIndex: E } = pe({
665
- diffs: n,
666
- selectedDiffPath: r,
667
- collapsedPaths: h,
668
- expansionCommand: s,
669
- scrollRef: l,
670
- virtualizerRef: f,
671
- suppressScrollAdjustRef: p
672
- }), D = j({
673
- count: n.length,
674
- getScrollElement: () => l.current,
686
+ let { diffs: r, selectedDiffPath: i = null, onLoadDiff: a, onSelectDiffPath: o, onExpansionStateChange: s, expansionCommand: c = null, diffViewMode: l = "unified" } = e, u = T(null), d = T(null), p = T(null), m = T(!1), h = T(null), [g, _] = E(() => ge(r)), [y, b] = E(() => /* @__PURE__ */ new Set()), { selectedScrollIndex: S, shouldPinSelectedScrollIndex: D } = pe({
687
+ diffs: r,
688
+ selectedDiffPath: i,
689
+ collapsedPaths: g,
690
+ expansionCommand: c,
691
+ scrollRef: u,
692
+ virtualizerRef: p,
693
+ suppressScrollAdjustRef: m
694
+ }), O = n({
695
+ count: r.length,
696
+ getScrollElement: () => u.current,
675
697
  estimateSize: (e) => {
676
- let t = n[e], r = $(t);
677
- return Q({
698
+ let t = r[e], n = $(t);
699
+ return Z({
678
700
  diff: t,
679
- isCollapsed: h.has(r),
680
- hasOptedIntoLargeDiff: v.has(r),
681
- diffViewMode: c
701
+ isCollapsed: g.has(n),
702
+ hasOptedIntoLargeDiff: y.has(n),
703
+ diffViewMode: l
682
704
  });
683
705
  },
684
- getItemKey: (e) => $(n[e]),
706
+ getItemKey: (e) => $(r[e]),
685
707
  overscan: 3,
686
708
  rangeExtractor: (e) => le({
687
- indexes: A(e),
688
- selectedScrollIndex: x,
689
- shouldPinSelectedScrollIndex: E
709
+ indexes: j(e),
710
+ selectedScrollIndex: S,
711
+ shouldPinSelectedScrollIndex: D
690
712
  })
691
713
  });
692
- if (D.shouldAdjustScrollPositionOnItemSizeChange = (e, t, n) => !n.isScrolling && !p.current, f.current = D, C(() => {
693
- r && g((e) => ye(n, e, r));
694
- }, [n, r]), C(() => {
695
- if (s) {
696
- if (s.action === "expand-selected") {
697
- let e = s.path;
714
+ if (O.shouldAdjustScrollPositionOnItemSizeChange = (e, t, n) => !n.isScrolling && !m.current, p.current = O, w(() => {
715
+ i && _((e) => ye(r, e, i));
716
+ }, [r, i]), w(() => {
717
+ if (c) {
718
+ if (c.action === "expand-selected") {
719
+ let e = c.path;
698
720
  if (e) {
699
- let t = m.current;
700
- m.current = e, g((r) => be(n, r, e, t));
721
+ let t = h.current;
722
+ h.current = e, _((n) => be(r, n, e, t));
701
723
  }
702
724
  return;
703
725
  }
704
- m.current = null, g(s.action === "collapse" ? _e(n) : /* @__PURE__ */ new Set());
726
+ h.current = null, _(c.action === "collapse" ? _e(r) : /* @__PURE__ */ new Set());
705
727
  }
706
- }, [n, s]), S(() => {
728
+ }, [r, c]), C(() => {
707
729
  let e = {
708
- allExpanded: h.size === 0,
709
- allCollapsed: n.length > 0 && n.every((e) => h.has($(e)))
710
- }, t = u.current;
711
- (t?.allExpanded !== e.allExpanded || t.allCollapsed !== e.allCollapsed) && (u.current = e, o?.(e));
730
+ allExpanded: g.size === 0,
731
+ allCollapsed: r.length > 0 && r.every((e) => g.has($(e)))
732
+ }, t = d.current;
733
+ (t?.allExpanded !== e.allExpanded || t.allCollapsed !== e.allCollapsed) && (d.current = e, s?.(e));
712
734
  }, [
713
- h,
714
- n,
715
- o
716
- ]), n.length === 0) return /* @__PURE__ */ b(K, {});
717
- let O = (e) => {
718
- g((t) => ve(t, e));
719
- }, k = (e) => {
720
- y((t) => {
735
+ g,
736
+ r,
737
+ s
738
+ ]), r.length === 0) return /* @__PURE__ */ x(oe, {});
739
+ let k = (e) => {
740
+ _((t) => ve(t, e));
741
+ }, A = (e) => {
742
+ b((t) => {
721
743
  let n = new Set(t);
722
744
  return n.add(e), n;
723
745
  });
724
- }, M = D.getVirtualItems();
725
- return /* @__PURE__ */ b(_, {
746
+ }, M = O.getVirtualItems();
747
+ return /* @__PURE__ */ x(v, {
726
748
  h: "full",
727
749
  minH: "0",
728
750
  gap: "0",
729
751
  bg: "bg",
730
- children: /* @__PURE__ */ b(d, {
752
+ children: /* @__PURE__ */ x(f, {
731
753
  position: "relative",
732
754
  flex: "1",
733
755
  minH: "0",
734
756
  bg: "bg",
735
- children: /* @__PURE__ */ b(t, {
757
+ children: /* @__PURE__ */ x(t, {
736
758
  position: "absolute",
737
759
  inset: "0",
738
- viewportRef: l,
760
+ viewportRef: u,
739
761
  viewportProps: { style: { overflowAnchor: "none" } },
740
762
  contentProps: { p: "xs" },
741
- children: /* @__PURE__ */ b(d, {
763
+ children: /* @__PURE__ */ x(f, {
742
764
  position: "relative",
743
765
  width: "100%",
744
- style: { height: D.getTotalSize() },
766
+ style: { height: O.getTotalSize() },
745
767
  children: M.map((e) => {
746
- let t = n[e.index], o = $(t);
747
- return /* @__PURE__ */ b(d, {
768
+ let t = r[e.index], n = $(t);
769
+ return /* @__PURE__ */ x(f, {
748
770
  "data-index": e.index,
749
- ref: D.measureElement,
771
+ ref: O.measureElement,
750
772
  position: "absolute",
751
773
  left: "0",
752
774
  width: "100%",
753
775
  pb: "xs",
754
776
  style: { top: `${e.start}px` },
755
- children: /* @__PURE__ */ b(ae, {
777
+ children: /* @__PURE__ */ x(ie, {
756
778
  diff: t,
757
- isSelected: r === o,
758
- isExpanded: !h.has(o),
759
- onToggleExpanded: () => O(o),
760
- onSelect: () => a?.(o),
761
- onLoadDiff: i,
762
- hasOptedIntoLargeDiff: v.has(o),
763
- onShowFullDiff: () => k(o),
764
- diffViewMode: c
765
- }, o)
779
+ isSelected: i === n,
780
+ isExpanded: !g.has(n),
781
+ onToggleExpanded: () => k(n),
782
+ onSelect: () => o?.(n),
783
+ onLoadDiff: a,
784
+ hasOptedIntoLargeDiff: y.has(n),
785
+ onShowFullDiff: () => A(n),
786
+ diffViewMode: l
787
+ }, n)
766
788
  }, e.key);
767
789
  })
768
790
  })
@@ -773,4 +795,4 @@ function xe(e) {
773
795
  //#endregion
774
796
  export { xe as DiffDrawer };
775
797
 
776
- //# sourceMappingURL=diff-drawer-45rpk3aq.js.map
798
+ //# sourceMappingURL=diff-drawer-IYpQ-QQK.js.map