@pstdio/ui 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MermaidComponent-D92GMhht.js → MermaidComponent-BTgLnpLA.js} +2 -2
- package/dist/{MermaidComponent-D92GMhht.js.map → MermaidComponent-BTgLnpLA.js.map} +1 -1
- package/dist/chat-ui.js +2 -2
- package/dist/components/list-row/list-row-root-props.d.ts +34 -0
- package/dist/components/tab-strip/window-tabs.d.ts +14 -0
- package/dist/components/tab-strip/window-title-bar.d.ts +6 -0
- package/dist/data-table.js +5 -5
- package/dist/diff.js +496 -492
- package/dist/diff.js.map +1 -1
- package/dist/{edit-mode-data-table-DGgRuSW3.js → edit-mode-data-table-BrydKuMM.js} +4 -4
- package/dist/{edit-mode-data-table-DGgRuSW3.js.map → edit-mode-data-table-BrydKuMM.js.map} +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1111 -1041
- package/dist/index.js.map +1 -1
- package/dist/{kanban-renderer-toolbar-Bl8xXdwU.js → kanban-renderer-toolbar-ebqlG13w.js} +3 -3
- package/dist/{kanban-renderer-toolbar-Bl8xXdwU.js.map → kanban-renderer-toolbar-ebqlG13w.js.map} +1 -1
- package/dist/kanban-renderer.js +5 -5
- package/dist/{lazy-markdown-editor-CCOchoJX.js → lazy-markdown-editor-Obb0M8xc.js} +2 -2
- package/dist/{lazy-markdown-editor-CCOchoJX.js.map → lazy-markdown-editor-Obb0M8xc.js.map} +1 -1
- package/dist/{list-row-DCgdza1i.js → list-row-CRi3Luog.js} +33 -30
- package/dist/list-row-CRi3Luog.js.map +1 -0
- package/dist/{markdown-editor-C4GCyebp.js → markdown-editor-Bj_QX4oN.js} +2 -2
- package/dist/{markdown-editor-C4GCyebp.js.map → markdown-editor-Bj_QX4oN.js.map} +1 -1
- package/dist/{markdown-CASvn1Z2.js → markdown-kuU19Oh3.js} +4 -4
- package/dist/{markdown-CASvn1Z2.js.map → markdown-kuU19Oh3.js.map} +1 -1
- package/dist/monaco-browser-l82HnffN.js +22 -0
- package/dist/monaco-browser-l82HnffN.js.map +1 -0
- package/dist/{param-editor-CkDq623X.js → param-editor-DgzVeyJ0.js} +2 -2
- package/dist/{param-editor-CkDq623X.js.map → param-editor-DgzVeyJ0.js.map} +1 -1
- package/dist/{param-editor-field-DRgbnL7-.js → param-editor-field-BMvuSAP5.js} +3 -3
- package/dist/{param-editor-field-DRgbnL7-.js.map → param-editor-field-BMvuSAP5.js.map} +1 -1
- package/dist/{rich-message-DARuDVOX.js → rich-message-dNYvLDd4.js} +2 -2
- package/dist/{rich-message-DARuDVOX.js.map → rich-message-dNYvLDd4.js.map} +1 -1
- package/dist/rich-text.js +5 -5
- package/dist/theme/primitives/sizes.d.ts +18 -0
- package/dist/theme/recipes/button.d.ts +5 -3
- package/dist/theme/recipes/window-title-bar.d.ts +16 -0
- package/dist/{theme-B-l5_a6F.js → theme-C0empEin.js} +347 -190
- package/dist/theme-C0empEin.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/{tree-list-AlO5ZmxQ.js → tree-list-BHFSyvIZ.js} +2 -2
- package/dist/{tree-list-AlO5ZmxQ.js.map → tree-list-BHFSyvIZ.js.map} +1 -1
- package/package.json +2 -2
- package/dist/list-row-DCgdza1i.js.map +0 -1
- package/dist/monaco-browser-CgvlArN7.js +0 -21
- package/dist/monaco-browser-CgvlArN7.js.map +0 -1
- package/dist/theme-B-l5_a6F.js.map +0 -1
package/dist/diff.js
CHANGED
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { jsx as r, jsxs as G, Fragment as
|
|
1
|
+
import { jsx as r, jsxs as G, Fragment as Et } from "react/jsx-runtime";
|
|
2
2
|
import { c as F } from "react/compiler-runtime";
|
|
3
|
-
import { Editor as
|
|
4
|
-
import { useRef as Z, useEffect as
|
|
5
|
-
import { u as
|
|
6
|
-
import { D as
|
|
7
|
-
import { Box as O, Grid as We, Button as
|
|
8
|
-
import { useVirtualizer as
|
|
9
|
-
import { T as
|
|
10
|
-
import { ChevronRight as Ye, ChevronDown as
|
|
3
|
+
import { Editor as It, DiffEditor as Lt } from "@monaco-editor/react";
|
|
4
|
+
import { useRef as Z, useEffect as oe, lazy as lt, Suspense as ot, useState as X, useLayoutEffect as Ge } from "react";
|
|
5
|
+
import { u as _t } from "./theme-preference-Bpobguh4.js";
|
|
6
|
+
import { D as Tt, b as it, a as st } from "./diff-editor-BnfV8cYB.js";
|
|
7
|
+
import { Box as O, Grid as We, Button as rt, Text as q, Image as Ft, Stack as be, Skeleton as at, IconButton as Ke, Menu as J, Badge as At, Icon as Mt, InputGroup as zt, Input as kt, HStack as Rt, Flex as Bt } from "@chakra-ui/react";
|
|
8
|
+
import { useVirtualizer as Nt, defaultRangeExtractor as Ht } from "@tanstack/react-virtual";
|
|
9
|
+
import { T as Ot, S as qe } from "./browser-storage-DPtOQJx0.js";
|
|
10
|
+
import { ChevronRight as Ye, ChevronDown as $t, Check as dt, Copy as Vt, Settings2 as jt, ListTree as Gt, List as Wt, PanelLeftClose as Kt, PanelLeftOpen as Qt, Rows2 as qt, SquareSplitHorizontal as Ut, ChevronsUpDown as Yt, ChevronsDownUp as Xt, FileText as Jt, Search as Zt } from "lucide-react";
|
|
11
11
|
import { E as Se } from "./empty-state-Bo4HVrgr.js";
|
|
12
|
-
import { L as
|
|
13
|
-
import { T as
|
|
14
|
-
import { create as
|
|
15
|
-
const
|
|
12
|
+
import { L as en, H as ct } from "./list-row-CRi3Luog.js";
|
|
13
|
+
import { T as tn, R as nn } from "./tree-list-BHFSyvIZ.js";
|
|
14
|
+
import { create as ln } from "zustand";
|
|
15
|
+
const on = (n) => {
|
|
16
16
|
let e;
|
|
17
17
|
return () => (e ??= n(), e);
|
|
18
|
-
},
|
|
18
|
+
}, ft = on(() => import("./monaco-browser-l82HnffN.js").then((n) => n.initializeMonaco())), sn = lt(async () => (await ft(), {
|
|
19
|
+
default: It
|
|
20
|
+
})), rn = lt(async () => (await ft(), {
|
|
21
|
+
default: Lt
|
|
22
|
+
})), an = {
|
|
19
23
|
base: "vs-dark",
|
|
20
24
|
inherit: !0,
|
|
21
25
|
rules: [],
|
|
@@ -28,52 +32,52 @@ const tn = (n) => {
|
|
|
28
32
|
"editorIndentGuide.background": "#404040",
|
|
29
33
|
"editorIndentGuide.activeBackground": "#707070"
|
|
30
34
|
}
|
|
31
|
-
},
|
|
35
|
+
}, dn = (n) => typeof n == "object" && n !== null && "base" in n && "colors" in n, ge = "ps-theme", ht = () => {
|
|
32
36
|
const n = F(5), {
|
|
33
37
|
themePreference: e,
|
|
34
38
|
themePreferences: t
|
|
35
|
-
} =
|
|
36
|
-
let
|
|
39
|
+
} = _t();
|
|
40
|
+
let o;
|
|
37
41
|
if (n[0] !== e || n[1] !== t) {
|
|
38
|
-
let
|
|
39
|
-
n[3] !== e ? (
|
|
40
|
-
const s = t.find(
|
|
41
|
-
|
|
42
|
+
let l;
|
|
43
|
+
n[3] !== e ? (l = (i) => i.id === e, n[3] = e, n[4] = l) : l = n[4];
|
|
44
|
+
const s = t.find(l);
|
|
45
|
+
o = dn(s?.monacoTheme) ? s.monacoTheme : an, n[0] = e, n[1] = t, n[2] = o;
|
|
42
46
|
} else
|
|
43
|
-
|
|
44
|
-
return
|
|
45
|
-
},
|
|
47
|
+
o = n[2];
|
|
48
|
+
return o;
|
|
49
|
+
}, ut = (n) => {
|
|
46
50
|
const e = F(5), t = Z(null);
|
|
47
|
-
let
|
|
48
|
-
e[0] !== n ? (
|
|
51
|
+
let o, l;
|
|
52
|
+
e[0] !== n ? (o = () => {
|
|
49
53
|
const i = t.current;
|
|
50
54
|
i && (i.editor.defineTheme(ge, n), i.editor.setTheme(ge));
|
|
51
|
-
},
|
|
55
|
+
}, l = [n], e[0] = n, e[1] = o, e[2] = l) : (o = e[1], l = e[2]), oe(o, l);
|
|
52
56
|
let s;
|
|
53
57
|
return e[3] !== n ? (s = (i) => {
|
|
54
58
|
t.current = i, i.editor.defineTheme(ge, n), i.editor.setTheme(ge);
|
|
55
59
|
}, e[3] = n, e[4] = s) : s = e[4], s;
|
|
56
|
-
},
|
|
60
|
+
}, cn = (n, e) => {
|
|
57
61
|
n.addCommand(e.KeyMod.CtrlCmd | e.KeyCode.KeyS, async () => {
|
|
58
62
|
await n.getAction("editor.action.formatDocument")?.run();
|
|
59
63
|
});
|
|
60
|
-
},
|
|
64
|
+
}, Bl = (n) => {
|
|
61
65
|
const e = F(20), {
|
|
62
66
|
defaultCode: t,
|
|
63
|
-
code:
|
|
64
|
-
showLineNumbers:
|
|
67
|
+
code: o,
|
|
68
|
+
showLineNumbers: l,
|
|
65
69
|
isEditable: s,
|
|
66
70
|
language: i,
|
|
67
71
|
onChange: a,
|
|
68
|
-
disableScroll:
|
|
69
|
-
} = n,
|
|
72
|
+
disableScroll: c
|
|
73
|
+
} = n, f = i === void 0 ? "javascript" : i, p = ht(), u = ut(p);
|
|
70
74
|
let d;
|
|
71
75
|
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
72
76
|
enabled: !1
|
|
73
77
|
}, e[0] = d) : d = e[0];
|
|
74
|
-
const m = !s, D =
|
|
78
|
+
const m = !s, D = l ? "on" : "off";
|
|
75
79
|
let g;
|
|
76
|
-
e[1] !==
|
|
80
|
+
e[1] !== c ? (g = c ? {
|
|
77
81
|
scrollbar: {
|
|
78
82
|
vertical: "hidden",
|
|
79
83
|
horizontal: "hidden",
|
|
@@ -83,7 +87,7 @@ const tn = (n) => {
|
|
|
83
87
|
scrollBeyondLastLine: !1,
|
|
84
88
|
mouseWheelScrollSensitivity: 0,
|
|
85
89
|
overviewRulerLanes: 0
|
|
86
|
-
} : {}, e[1] =
|
|
90
|
+
} : {}, e[1] = c, e[2] = g) : g = e[2];
|
|
87
91
|
let h;
|
|
88
92
|
e[3] !== m || e[4] !== D || e[5] !== g ? (h = {
|
|
89
93
|
tabSize: 2,
|
|
@@ -98,27 +102,27 @@ const tn = (n) => {
|
|
|
98
102
|
e[7] !== a ? (C = (E) => {
|
|
99
103
|
a?.(E || "");
|
|
100
104
|
}, e[7] = a, e[8] = C) : C = e[8];
|
|
101
|
-
let
|
|
102
|
-
e[9] !== u ? (
|
|
105
|
+
let y, P;
|
|
106
|
+
e[9] !== u ? (y = (E) => {
|
|
103
107
|
u(E);
|
|
104
|
-
},
|
|
105
|
-
u(b),
|
|
106
|
-
}, e[9] = u, e[10] =
|
|
108
|
+
}, P = (E, b) => {
|
|
109
|
+
u(b), cn(E, b);
|
|
110
|
+
}, e[9] = u, e[10] = y, e[11] = P) : (y = e[10], P = e[11]);
|
|
107
111
|
let x;
|
|
108
|
-
return e[12] !==
|
|
109
|
-
},
|
|
112
|
+
return e[12] !== o || e[13] !== t || e[14] !== f || e[15] !== S || e[16] !== C || e[17] !== y || e[18] !== P ? (x = /* @__PURE__ */ r(ot, { fallback: null, children: /* @__PURE__ */ r(sn, { width: "100%", height: "100%", language: f, defaultValue: t, value: o, theme: ge, options: S, onChange: C, beforeMount: y, onMount: P }) }), e[12] = o, e[13] = t, e[14] = f, e[15] = S, e[16] = C, e[17] = y, e[18] = P, e[19] = x) : x = e[19], x;
|
|
113
|
+
}, Nl = (n) => {
|
|
110
114
|
const e = F(16), {
|
|
111
115
|
original: t,
|
|
112
|
-
modified:
|
|
113
|
-
showLineNumbers:
|
|
116
|
+
modified: o,
|
|
117
|
+
showLineNumbers: l,
|
|
114
118
|
language: s,
|
|
115
119
|
disableScroll: i
|
|
116
|
-
} = n, a = s === void 0 ? "javascript" : s,
|
|
120
|
+
} = n, a = s === void 0 ? "javascript" : s, c = ht(), f = ut(c);
|
|
117
121
|
let p;
|
|
118
122
|
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = {
|
|
119
123
|
enabled: !1
|
|
120
124
|
}, e[0] = p) : p = e[0];
|
|
121
|
-
const u =
|
|
125
|
+
const u = l ? "on" : "off";
|
|
122
126
|
let d;
|
|
123
127
|
e[1] !== i ? (d = i ? {
|
|
124
128
|
scrollbar: {
|
|
@@ -145,14 +149,14 @@ const tn = (n) => {
|
|
|
145
149
|
}, e[3] = u, e[4] = d, e[5] = m) : m = e[5];
|
|
146
150
|
const D = m;
|
|
147
151
|
let g, h;
|
|
148
|
-
e[6] !==
|
|
149
|
-
|
|
150
|
-
}, h = (C,
|
|
151
|
-
|
|
152
|
-
}, e[6] =
|
|
152
|
+
e[6] !== f ? (g = (C) => {
|
|
153
|
+
f(C);
|
|
154
|
+
}, h = (C, y) => {
|
|
155
|
+
f(y);
|
|
156
|
+
}, e[6] = f, e[7] = g, e[8] = h) : (g = e[7], h = e[8]);
|
|
153
157
|
let S;
|
|
154
|
-
return e[9] !== a || e[10] !==
|
|
155
|
-
},
|
|
158
|
+
return e[9] !== a || e[10] !== o || e[11] !== D || e[12] !== t || e[13] !== g || e[14] !== h ? (S = /* @__PURE__ */ r(ot, { fallback: null, children: /* @__PURE__ */ r(rn, { width: "100%", height: "100%", language: a, original: t, modified: o, theme: ge, options: D, beforeMount: g, onMount: h }) }), e[9] = a, e[10] = o, e[11] = D, e[12] = t, e[13] = g, e[14] = h, e[15] = S) : S = e[15], S;
|
|
159
|
+
}, mt = {
|
|
156
160
|
avif: "image/avif",
|
|
157
161
|
bmp: "image/bmp",
|
|
158
162
|
gif: "image/gif",
|
|
@@ -164,32 +168,32 @@ const tn = (n) => {
|
|
|
164
168
|
tif: "image/tiff",
|
|
165
169
|
tiff: "image/tiff",
|
|
166
170
|
webp: "image/webp"
|
|
167
|
-
},
|
|
171
|
+
}, fn = Object.keys(mt), pt = (n) => {
|
|
168
172
|
const t = (n.split(/[\\/]/).pop() ?? n).split(".").pop();
|
|
169
173
|
return t ? t.toLowerCase() : "";
|
|
170
|
-
},
|
|
171
|
-
const e =
|
|
172
|
-
return
|
|
173
|
-
},
|
|
174
|
+
}, hn = (n) => {
|
|
175
|
+
const e = pt(n);
|
|
176
|
+
return mt[e] ?? null;
|
|
177
|
+
}, un = (n) => hn(n) !== null, mn = 1e3, pn = /* @__PURE__ */ new Set(["bun.lock", "bun.lockb", "package-lock.json", "pnpm-lock.yaml", "yarn.lock"]), gn = /* @__PURE__ */ new Set([...fn, "pdf", "zip", "tar", "gz", "tgz", "rar", "7z", "exe", "dll", "so", "dylib", "wasm", "class", "jar", "mp3", "mp4", "mov", "ogg", "wav", "webm", "flac", "ttf", "otf", "woff", "woff2", "eot"]), gt = (n) => (n.additions ?? 0) + (n.deletions ?? 0), bt = (n) => gt(n) > mn, bn = (n) => {
|
|
174
178
|
const e = n.split(/[\\/]/).pop() ?? n;
|
|
175
|
-
return
|
|
179
|
+
return pn.has(e) || e.endsWith(".min.js") || e.endsWith(".generated.ts");
|
|
176
180
|
}, Ue = (n) => {
|
|
177
|
-
const e =
|
|
178
|
-
return e.length > 0 &&
|
|
179
|
-
}, we =
|
|
181
|
+
const e = pt(n);
|
|
182
|
+
return e.length > 0 && gn.has(e);
|
|
183
|
+
}, we = un, Sn = (n) => {
|
|
180
184
|
const {
|
|
181
185
|
diff: e,
|
|
182
186
|
filePath: t,
|
|
183
|
-
oldContent:
|
|
184
|
-
newContent:
|
|
187
|
+
oldContent: o,
|
|
188
|
+
newContent: l,
|
|
185
189
|
isLargeDiff: s,
|
|
186
190
|
hasOptedIntoLargeDiff: i,
|
|
187
191
|
onShowFullDiff: a,
|
|
188
|
-
diffViewMode:
|
|
189
|
-
buildViewData:
|
|
192
|
+
diffViewMode: c = "unified",
|
|
193
|
+
buildViewData: f
|
|
190
194
|
} = n;
|
|
191
195
|
if (Ue(t)) {
|
|
192
|
-
const u = Xe(
|
|
196
|
+
const u = Xe(o), d = Xe(l);
|
|
193
197
|
return we(t) && (u || d) ? {
|
|
194
198
|
kind: "image",
|
|
195
199
|
filePath: t,
|
|
@@ -204,144 +208,144 @@ const tn = (n) => {
|
|
|
204
208
|
return s && !i ? {
|
|
205
209
|
kind: "placeholder",
|
|
206
210
|
filePath: t,
|
|
207
|
-
renderedLineCount:
|
|
211
|
+
renderedLineCount: gt(e),
|
|
208
212
|
onShowFullDiff: a
|
|
209
213
|
} : {
|
|
210
214
|
kind: "editor",
|
|
211
|
-
diffViewData: (
|
|
212
|
-
original:
|
|
213
|
-
modified:
|
|
215
|
+
diffViewData: (f ?? it)({
|
|
216
|
+
original: o,
|
|
217
|
+
modified: l,
|
|
214
218
|
oldPath: e.oldPath,
|
|
215
219
|
newPath: e.newPath
|
|
216
220
|
}),
|
|
217
|
-
sideBySide:
|
|
221
|
+
sideBySide: c === "split"
|
|
218
222
|
};
|
|
219
223
|
}, Xe = (n) => n.startsWith("data:image/") ? n : "", Je = (n) => {
|
|
220
224
|
const e = F(22), {
|
|
221
225
|
diff: t,
|
|
222
|
-
filePath:
|
|
223
|
-
oldContent:
|
|
226
|
+
filePath: o,
|
|
227
|
+
oldContent: l,
|
|
224
228
|
newContent: s,
|
|
225
229
|
isLargeDiff: i,
|
|
226
230
|
hasOptedIntoLargeDiff: a,
|
|
227
|
-
onShowFullDiff:
|
|
228
|
-
diffViewMode:
|
|
229
|
-
} = n, p =
|
|
231
|
+
onShowFullDiff: c,
|
|
232
|
+
diffViewMode: f
|
|
233
|
+
} = n, p = f === void 0 ? "unified" : f;
|
|
230
234
|
let u;
|
|
231
|
-
e[0] !== t || e[1] !== p || e[2] !==
|
|
235
|
+
e[0] !== t || e[1] !== p || e[2] !== o || e[3] !== a || e[4] !== i || e[5] !== s || e[6] !== l || e[7] !== c ? (u = Sn({
|
|
232
236
|
diff: t,
|
|
233
|
-
filePath:
|
|
234
|
-
oldContent:
|
|
237
|
+
filePath: o,
|
|
238
|
+
oldContent: l,
|
|
235
239
|
newContent: s,
|
|
236
240
|
isLargeDiff: i,
|
|
237
241
|
hasOptedIntoLargeDiff: a,
|
|
238
|
-
onShowFullDiff:
|
|
242
|
+
onShowFullDiff: c,
|
|
239
243
|
diffViewMode: p
|
|
240
|
-
}), e[0] = t, e[1] = p, e[2] =
|
|
244
|
+
}), e[0] = t, e[1] = p, e[2] = o, e[3] = a, e[4] = i, e[5] = s, e[6] = l, e[7] = c, e[8] = u) : u = e[8];
|
|
241
245
|
const d = u;
|
|
242
246
|
let m;
|
|
243
|
-
return e[9] !== t || e[10] !== d.diffViewData || e[11] !== d.filePath || e[12] !== d.isImage || e[13] !== d.kind || e[14] !== d.newSrc || e[15] !== d.oldSrc || e[16] !== d.onShowFullDiff || e[17] !== d.renderedLineCount || e[18] !== d.sideBySide || e[19] !== s || e[20] !==
|
|
244
|
-
},
|
|
247
|
+
return e[9] !== t || e[10] !== d.diffViewData || e[11] !== d.filePath || e[12] !== d.isImage || e[13] !== d.kind || e[14] !== d.newSrc || e[15] !== d.oldSrc || e[16] !== d.onShowFullDiff || e[17] !== d.renderedLineCount || e[18] !== d.sideBySide || e[19] !== s || e[20] !== l ? (m = /* @__PURE__ */ r(O, { bg: "bg", borderBottomRadius: "xs", overflow: "hidden", children: d.kind === "editor" ? /* @__PURE__ */ r(Tt, { original: l, modified: s, oldPath: t.oldPath, newPath: t.newPath, sideBySide: d.sideBySide, data: d.diffViewData }) : d.kind === "image" ? /* @__PURE__ */ r(xn, { oldSrc: d.oldSrc, newSrc: d.newSrc }) : d.kind === "binary" ? /* @__PURE__ */ r(Dn, { isImage: d.isImage }) : /* @__PURE__ */ r(wn, { filePath: d.filePath, renderedLineCount: d.renderedLineCount, onShowFullDiff: d.onShowFullDiff }) }), e[9] = t, e[10] = d.diffViewData, e[11] = d.filePath, e[12] = d.isImage, e[13] = d.kind, e[14] = d.newSrc, e[15] = d.oldSrc, e[16] = d.onShowFullDiff, e[17] = d.renderedLineCount, e[18] = d.sideBySide, e[19] = s, e[20] = l, e[21] = m) : m = e[21], m;
|
|
248
|
+
}, xn = (n) => {
|
|
245
249
|
const e = F(8), {
|
|
246
250
|
oldSrc: t,
|
|
247
|
-
newSrc:
|
|
251
|
+
newSrc: o
|
|
248
252
|
} = n;
|
|
249
|
-
let
|
|
250
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
253
|
+
let l;
|
|
254
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = {
|
|
251
255
|
base: "1fr",
|
|
252
256
|
md: "1fr 1fr"
|
|
253
|
-
}, e[0] =
|
|
257
|
+
}, e[0] = l) : l = e[0];
|
|
254
258
|
let s;
|
|
255
259
|
e[1] !== t ? (s = /* @__PURE__ */ r(Ze, { label: "Old", src: t, fallback: "No old image" }), e[1] = t, e[2] = s) : s = e[2];
|
|
256
260
|
let i;
|
|
257
|
-
e[3] !==
|
|
261
|
+
e[3] !== o ? (i = /* @__PURE__ */ r(Ze, { label: "New", src: o, fallback: "No new image" }), e[3] = o, e[4] = i) : i = e[4];
|
|
258
262
|
let a;
|
|
259
|
-
return e[5] !== s || e[6] !== i ? (a = /* @__PURE__ */ G(We, { templateColumns:
|
|
263
|
+
return e[5] !== s || e[6] !== i ? (a = /* @__PURE__ */ G(We, { templateColumns: l, gap: "sm", p: "sm", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: [
|
|
260
264
|
s,
|
|
261
265
|
i
|
|
262
266
|
] }), e[5] = s, e[6] = i, e[7] = a) : a = e[7], a;
|
|
263
267
|
}, Ze = (n) => {
|
|
264
268
|
const e = F(9), {
|
|
265
269
|
label: t,
|
|
266
|
-
src:
|
|
267
|
-
fallback:
|
|
270
|
+
src: o,
|
|
271
|
+
fallback: l
|
|
268
272
|
} = n;
|
|
269
273
|
let s;
|
|
270
274
|
e[0] !== t ? (s = /* @__PURE__ */ r(q, { px: "xs", py: "2xs", textStyle: "label/S/medium", color: "fg.muted", borderBottom: "1px solid", borderColor: "border.subtle", children: t }), e[0] = t, e[1] = s) : s = e[1];
|
|
271
275
|
let i;
|
|
272
|
-
e[2] !==
|
|
276
|
+
e[2] !== l || e[3] !== t || e[4] !== o ? (i = /* @__PURE__ */ r(O, { display: "grid", placeItems: "center", minH: "180px", p: "sm", children: o ? /* @__PURE__ */ r(Ft, { src: o, alt: `${t} image diff`, maxH: "260px", maxW: "100%", objectFit: "contain" }) : /* @__PURE__ */ r(q, { color: "fg.muted", textStyle: "body/S/regular", children: l }) }), e[2] = l, e[3] = t, e[4] = o, e[5] = i) : i = e[5];
|
|
273
277
|
let a;
|
|
274
278
|
return e[6] !== s || e[7] !== i ? (a = /* @__PURE__ */ G(O, { border: "1px solid", borderColor: "border.subtle", borderRadius: "xs", overflow: "hidden", bg: "bg.subtle", minW: "0", children: [
|
|
275
279
|
s,
|
|
276
280
|
i
|
|
277
281
|
] }), e[6] = s, e[7] = i, e[8] = a) : a = e[8], a;
|
|
278
|
-
},
|
|
282
|
+
}, wn = (n) => {
|
|
279
283
|
const e = F(5), {
|
|
280
284
|
filePath: t,
|
|
281
|
-
onShowFullDiff:
|
|
285
|
+
onShowFullDiff: o
|
|
282
286
|
} = n;
|
|
283
|
-
let
|
|
284
|
-
e[0] !== t || e[1] !==
|
|
287
|
+
let l;
|
|
288
|
+
e[0] !== t || e[1] !== o ? (l = o ? /* @__PURE__ */ r(rt, { size: "xs", variant: "outline", "aria-label": `Render full diff for ${t}`, onClick: o, children: "Show full diff" }) : null, e[0] = t, e[1] = o, e[2] = l) : l = e[2];
|
|
285
289
|
let s;
|
|
286
|
-
return e[3] !==
|
|
287
|
-
},
|
|
290
|
+
return e[3] !== l ? (s = /* @__PURE__ */ r(O, { p: "md", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(Se, { title: "Large diffs are hidden by default", paddingY: "sm", children: l }) }), e[3] = l, e[4] = s) : s = e[4], s;
|
|
291
|
+
}, Dn = (n) => {
|
|
288
292
|
const e = F(2), {
|
|
289
293
|
isImage: t
|
|
290
|
-
} = n,
|
|
291
|
-
let
|
|
292
|
-
return e[0] !==
|
|
293
|
-
},
|
|
294
|
+
} = n, o = t ? "Image diffs are not shown" : "Binary diffs are not shown";
|
|
295
|
+
let l;
|
|
296
|
+
return e[0] !== o ? (l = /* @__PURE__ */ r(O, { p: "md", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(Se, { title: o, paddingY: "sm" }) }), e[0] = o, e[1] = l) : l = e[1], l;
|
|
297
|
+
}, Cn = (n) => {
|
|
294
298
|
const e = F(7), {
|
|
295
299
|
title: t,
|
|
296
|
-
actionLabel:
|
|
297
|
-
isLoadingDiff:
|
|
300
|
+
actionLabel: o,
|
|
301
|
+
isLoadingDiff: l,
|
|
298
302
|
onAction: s
|
|
299
303
|
} = n;
|
|
300
304
|
let i;
|
|
301
|
-
e[0] !==
|
|
305
|
+
e[0] !== o || e[1] !== l || e[2] !== s ? (i = o ? /* @__PURE__ */ r(rt, { size: "xs", variant: "outline", loading: l, onClick: s, children: o }) : null, e[0] = o, e[1] = l, e[2] = s, e[3] = i) : i = e[3];
|
|
302
306
|
let a;
|
|
303
307
|
return e[4] !== i || e[5] !== t ? (a = /* @__PURE__ */ r(O, { bg: "bg", p: "md", borderTop: "1px solid", borderColor: "border.subtle", children: /* @__PURE__ */ r(Se, { title: t, paddingY: "sm", children: i }) }), e[4] = i, e[5] = t, e[6] = a) : a = e[6], a;
|
|
304
|
-
},
|
|
308
|
+
}, yn = ["first", "second", "third"], Pn = () => {
|
|
305
309
|
const n = F(1);
|
|
306
310
|
let e;
|
|
307
|
-
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { h: "280px", bg: "bg", borderTop: "1px solid", borderColor: "border.subtle", p: "xs", gap: "2xs", role: "status", "aria-busy": "true", "aria-label": "Loading diff", children:
|
|
311
|
+
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { h: "280px", bg: "bg", borderTop: "1px solid", borderColor: "border.subtle", p: "xs", gap: "2xs", role: "status", "aria-busy": "true", "aria-label": "Loading diff", children: yn.map(vn) }), n[0] = e) : e = n[0], e;
|
|
308
312
|
};
|
|
309
|
-
function
|
|
310
|
-
return /* @__PURE__ */ r(
|
|
313
|
+
function vn(n) {
|
|
314
|
+
return /* @__PURE__ */ r(at, { h: "20px", w: "full", borderRadius: "xs" }, n);
|
|
311
315
|
}
|
|
312
|
-
const
|
|
316
|
+
const En = (n) => {
|
|
313
317
|
const {
|
|
314
318
|
isLargeDiff: e,
|
|
315
319
|
isGeneratedDiff: t,
|
|
316
|
-
loadError:
|
|
317
|
-
canLoadDiff:
|
|
320
|
+
loadError: o,
|
|
321
|
+
canLoadDiff: l,
|
|
318
322
|
onLoadDiff: s,
|
|
319
323
|
onShowFullDiff: i
|
|
320
324
|
} = n;
|
|
321
|
-
let a = "Diff content is not loaded yet.",
|
|
325
|
+
let a = "Diff content is not loaded yet.", c = l ? "Load diff" : void 0, f = l ? () => {
|
|
322
326
|
s();
|
|
323
327
|
} : void 0;
|
|
324
|
-
return e && (a = "Large diffs are hidden by default",
|
|
328
|
+
return e && (a = "Large diffs are hidden by default", c = l ? "Show full diff" : void 0, f = () => {
|
|
325
329
|
i?.(), s();
|
|
326
|
-
}), t && (a = "Generated diffs are hidden by default",
|
|
330
|
+
}), t && (a = "Generated diffs are hidden by default", c = l ? "Load diff" : void 0, f = l ? () => {
|
|
327
331
|
s();
|
|
328
|
-
} : void 0),
|
|
332
|
+
} : void 0), o && (a = "Diff failed to load. Try again.", c = l ? "Load diff" : void 0, f = l ? () => {
|
|
329
333
|
s();
|
|
330
334
|
} : void 0), {
|
|
331
335
|
title: a,
|
|
332
|
-
actionLabel:
|
|
333
|
-
onAction:
|
|
336
|
+
actionLabel: c,
|
|
337
|
+
onAction: f
|
|
334
338
|
};
|
|
335
|
-
},
|
|
339
|
+
}, In = (n) => {
|
|
336
340
|
const e = F(30), {
|
|
337
341
|
diff: t,
|
|
338
|
-
filePath:
|
|
339
|
-
oldContent:
|
|
342
|
+
filePath: o,
|
|
343
|
+
oldContent: l,
|
|
340
344
|
newContent: s,
|
|
341
345
|
isExpanded: i,
|
|
342
346
|
isLargeDiff: a,
|
|
343
|
-
isGeneratedDiff:
|
|
344
|
-
isBinaryDiff:
|
|
347
|
+
isGeneratedDiff: c,
|
|
348
|
+
isBinaryDiff: f,
|
|
345
349
|
hasDiffContent: p,
|
|
346
350
|
canLoadDiff: u,
|
|
347
351
|
shouldAutoLoadDiff: d,
|
|
@@ -351,116 +355,116 @@ const Dn = (n) => {
|
|
|
351
355
|
hasOptedIntoLargeDiff: h,
|
|
352
356
|
onShowFullDiff: S,
|
|
353
357
|
diffViewMode: C
|
|
354
|
-
} = n,
|
|
358
|
+
} = n, y = C === void 0 ? "unified" : C;
|
|
355
359
|
if (!i)
|
|
356
360
|
return null;
|
|
357
|
-
if (
|
|
361
|
+
if (f) {
|
|
358
362
|
let x;
|
|
359
|
-
return e[0] !== t || e[1] !==
|
|
363
|
+
return e[0] !== t || e[1] !== y || e[2] !== o || e[3] !== h || e[4] !== s || e[5] !== l || e[6] !== S ? (x = /* @__PURE__ */ r(Je, { diff: t, filePath: o, oldContent: l, newContent: s, isLargeDiff: !1, hasOptedIntoLargeDiff: h, onShowFullDiff: S, diffViewMode: y }), e[0] = t, e[1] = y, e[2] = o, e[3] = h, e[4] = s, e[5] = l, e[6] = S, e[7] = x) : x = e[7], x;
|
|
360
364
|
}
|
|
361
365
|
if (!p && !d) {
|
|
362
366
|
let x;
|
|
363
|
-
e[8] !== u || e[9] !==
|
|
367
|
+
e[8] !== u || e[9] !== c || e[10] !== a || e[11] !== m || e[12] !== g || e[13] !== S ? (x = En({
|
|
364
368
|
isLargeDiff: a,
|
|
365
|
-
isGeneratedDiff:
|
|
369
|
+
isGeneratedDiff: c,
|
|
366
370
|
loadError: m,
|
|
367
371
|
canLoadDiff: u,
|
|
368
372
|
onLoadDiff: g,
|
|
369
373
|
onShowFullDiff: S
|
|
370
|
-
}), e[8] = u, e[9] =
|
|
374
|
+
}), e[8] = u, e[9] = c, e[10] = a, e[11] = m, e[12] = g, e[13] = S, e[14] = x) : x = e[14];
|
|
371
375
|
const {
|
|
372
376
|
title: E,
|
|
373
377
|
actionLabel: b,
|
|
374
378
|
onAction: v
|
|
375
379
|
} = x;
|
|
376
380
|
let w;
|
|
377
|
-
return e[15] !== b || e[16] !== D || e[17] !== v || e[18] !== E ? (w = /* @__PURE__ */ r(
|
|
381
|
+
return e[15] !== b || e[16] !== D || e[17] !== v || e[18] !== E ? (w = /* @__PURE__ */ r(Cn, { title: E, actionLabel: b, isLoadingDiff: D, onAction: v }), e[15] = b, e[16] = D, e[17] = v, e[18] = E, e[19] = w) : w = e[19], w;
|
|
378
382
|
}
|
|
379
383
|
if (d) {
|
|
380
384
|
let x;
|
|
381
|
-
return e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ r(
|
|
385
|
+
return e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ r(Pn, {}), e[20] = x) : x = e[20], x;
|
|
382
386
|
}
|
|
383
|
-
let
|
|
384
|
-
return e[21] !== t || e[22] !==
|
|
385
|
-
},
|
|
387
|
+
let P;
|
|
388
|
+
return e[21] !== t || e[22] !== y || e[23] !== o || e[24] !== h || e[25] !== a || e[26] !== s || e[27] !== l || e[28] !== S ? (P = /* @__PURE__ */ r(Je, { diff: t, filePath: o, oldContent: l, newContent: s, isLargeDiff: a, hasOptedIntoLargeDiff: h, onShowFullDiff: S, diffViewMode: y }), e[21] = t, e[22] = y, e[23] = o, e[24] = h, e[25] = a, e[26] = s, e[27] = l, e[28] = S, e[29] = P) : P = e[29], P;
|
|
389
|
+
}, Ln = (n) => {
|
|
386
390
|
const {
|
|
387
391
|
isExpanded: e,
|
|
388
392
|
isSelected: t,
|
|
389
|
-
hasDiffContent:
|
|
390
|
-
isLargeDiff:
|
|
393
|
+
hasDiffContent: o,
|
|
394
|
+
isLargeDiff: l,
|
|
391
395
|
isGeneratedDiff: s,
|
|
392
396
|
isBinaryDiff: i,
|
|
393
397
|
requestedPath: a,
|
|
394
|
-
filePath:
|
|
398
|
+
filePath: c
|
|
395
399
|
} = n;
|
|
396
|
-
return e && t && !
|
|
397
|
-
},
|
|
400
|
+
return e && t && !o && !l && !s && !i && a !== c;
|
|
401
|
+
}, _n = (n) => {
|
|
398
402
|
const {
|
|
399
403
|
requestedPath: e,
|
|
400
404
|
filePath: t,
|
|
401
|
-
hasDiffContent:
|
|
405
|
+
hasDiffContent: o
|
|
402
406
|
} = n;
|
|
403
|
-
return e === t &&
|
|
404
|
-
},
|
|
407
|
+
return e === t && o ? null : e;
|
|
408
|
+
}, Tn = (n) => !we(n), St = (n) => n.newPath || n.oldPath || "unknown", Fn = (n) => {
|
|
405
409
|
const {
|
|
406
410
|
filePath: e,
|
|
407
411
|
isExpanded: t,
|
|
408
|
-
isSelected:
|
|
409
|
-
hasDiffContent:
|
|
412
|
+
isSelected: o,
|
|
413
|
+
hasDiffContent: l,
|
|
410
414
|
isLargeDiff: s,
|
|
411
415
|
isGeneratedDiff: i,
|
|
412
416
|
isBinaryDiff: a,
|
|
413
|
-
onLoadDiff:
|
|
414
|
-
} = n, [
|
|
415
|
-
if (!(!
|
|
417
|
+
onLoadDiff: c
|
|
418
|
+
} = n, [f, p] = X(!1), [u, d] = X(null), [m, D] = X(!1), g = async () => {
|
|
419
|
+
if (!(!c || f)) {
|
|
416
420
|
d(e), D(!1), p(!0);
|
|
417
421
|
try {
|
|
418
|
-
await
|
|
422
|
+
await c(e);
|
|
419
423
|
} catch {
|
|
420
424
|
d(null), D(!0);
|
|
421
425
|
} finally {
|
|
422
426
|
p(!1);
|
|
423
427
|
}
|
|
424
428
|
}
|
|
425
|
-
}, h =
|
|
429
|
+
}, h = Ln({
|
|
426
430
|
isExpanded: t,
|
|
427
|
-
isSelected:
|
|
428
|
-
hasDiffContent:
|
|
431
|
+
isSelected: o,
|
|
432
|
+
hasDiffContent: l,
|
|
429
433
|
isLargeDiff: s,
|
|
430
434
|
isGeneratedDiff: i,
|
|
431
435
|
isBinaryDiff: a,
|
|
432
436
|
requestedPath: u,
|
|
433
437
|
filePath: e
|
|
434
438
|
});
|
|
435
|
-
return
|
|
436
|
-
d((S) =>
|
|
439
|
+
return oe(() => {
|
|
440
|
+
d((S) => _n({
|
|
437
441
|
requestedPath: S,
|
|
438
442
|
filePath: e,
|
|
439
|
-
hasDiffContent:
|
|
443
|
+
hasDiffContent: l
|
|
440
444
|
}));
|
|
441
|
-
}, [e,
|
|
442
|
-
!
|
|
445
|
+
}, [e, l]), oe(() => {
|
|
446
|
+
!c || !h || m || g();
|
|
443
447
|
}), {
|
|
444
|
-
isLoadingDiff:
|
|
448
|
+
isLoadingDiff: f,
|
|
445
449
|
loadError: m,
|
|
446
|
-
shouldAutoLoadDiff: !!
|
|
450
|
+
shouldAutoLoadDiff: !!c && h && !m,
|
|
447
451
|
loadDiff: g
|
|
448
452
|
};
|
|
449
|
-
},
|
|
453
|
+
}, An = (n) => {
|
|
450
454
|
const e = F(44), {
|
|
451
455
|
diff: t,
|
|
452
|
-
isSelected:
|
|
453
|
-
isExpanded:
|
|
456
|
+
isSelected: o,
|
|
457
|
+
isExpanded: l,
|
|
454
458
|
onToggleExpanded: s,
|
|
455
459
|
onSelect: i,
|
|
456
460
|
onLoadDiff: a,
|
|
457
|
-
hasOptedIntoLargeDiff:
|
|
458
|
-
onShowFullDiff:
|
|
461
|
+
hasOptedIntoLargeDiff: c,
|
|
462
|
+
onShowFullDiff: f,
|
|
459
463
|
diffViewMode: p
|
|
460
|
-
} = n, u =
|
|
461
|
-
let g, h, S, C,
|
|
462
|
-
e[0] !== t ? (g =
|
|
463
|
-
const x =
|
|
464
|
+
} = n, u = o === void 0 ? !1 : o, d = l === void 0 ? !0 : l, m = c === void 0 ? !1 : c, D = p === void 0 ? "unified" : p;
|
|
465
|
+
let g, h, S, C, y, P;
|
|
466
|
+
e[0] !== t ? (g = St(t), y = t.oldContent || "", C = t.newContent || "", S = bt(t), h = bn(g), P = Ue(g) && !we(g), e[0] = t, e[1] = g, e[2] = h, e[3] = S, e[4] = C, e[5] = y, e[6] = P) : (g = e[1], h = e[2], S = e[3], C = e[4], y = e[5], P = e[6]);
|
|
467
|
+
const x = P, E = t.oldContent !== void 0 || t.newContent !== void 0, b = S && !m;
|
|
464
468
|
let v;
|
|
465
469
|
e[7] !== x || e[8] !== g || e[9] !== E || e[10] !== d || e[11] !== h || e[12] !== u || e[13] !== a || e[14] !== b ? (v = {
|
|
466
470
|
filePath: g,
|
|
@@ -476,68 +480,68 @@ const Dn = (n) => {
|
|
|
476
480
|
isLoadingDiff: w,
|
|
477
481
|
loadError: I,
|
|
478
482
|
shouldAutoLoadDiff: L,
|
|
479
|
-
loadDiff:
|
|
480
|
-
} =
|
|
483
|
+
loadDiff: M
|
|
484
|
+
} = Fn(v), z = u ? "border.accent" : "border.subtle";
|
|
481
485
|
let T;
|
|
482
486
|
e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = {
|
|
483
487
|
borderColor: "border.accent"
|
|
484
488
|
}, e[16] = T) : T = e[16];
|
|
485
489
|
let _;
|
|
486
|
-
e[17] !== t || e[18] !== d || e[19] !== s ? (_ = /* @__PURE__ */ r(
|
|
490
|
+
e[17] !== t || e[18] !== d || e[19] !== s ? (_ = /* @__PURE__ */ r(Mn, { diff: t, isExpanded: d, onToggleExpanded: s }), e[17] = t, e[18] = d, e[19] = s, e[20] = _) : _ = e[20];
|
|
487
491
|
const A = !!a;
|
|
488
|
-
let R;
|
|
489
|
-
e[21] !== x || e[22] !== t || e[23] !== D || e[24] !== g || e[25] !== E || e[26] !== m || e[27] !== d || e[28] !== h || e[29] !== S || e[30] !== w || e[31] !== z || e[32] !== I || e[33] !== C || e[34] !== P || e[35] !== c || e[36] !== L || e[37] !== A ? (R = /* @__PURE__ */ r(Cn, { diff: t, filePath: g, oldContent: P, newContent: C, isExpanded: d, isLargeDiff: S, isGeneratedDiff: h, isBinaryDiff: x, hasDiffContent: E, canLoadDiff: A, shouldAutoLoadDiff: L, loadError: I, isLoadingDiff: w, onLoadDiff: z, hasOptedIntoLargeDiff: m, onShowFullDiff: c, diffViewMode: D }), e[21] = x, e[22] = t, e[23] = D, e[24] = g, e[25] = E, e[26] = m, e[27] = d, e[28] = h, e[29] = S, e[30] = w, e[31] = z, e[32] = I, e[33] = C, e[34] = P, e[35] = c, e[36] = L, e[37] = A, e[38] = R) : R = e[38];
|
|
490
492
|
let k;
|
|
491
|
-
|
|
493
|
+
e[21] !== x || e[22] !== t || e[23] !== D || e[24] !== g || e[25] !== E || e[26] !== m || e[27] !== d || e[28] !== h || e[29] !== S || e[30] !== w || e[31] !== M || e[32] !== I || e[33] !== C || e[34] !== y || e[35] !== f || e[36] !== L || e[37] !== A ? (k = /* @__PURE__ */ r(In, { diff: t, filePath: g, oldContent: y, newContent: C, isExpanded: d, isLargeDiff: S, isGeneratedDiff: h, isBinaryDiff: x, hasDiffContent: E, canLoadDiff: A, shouldAutoLoadDiff: L, loadError: I, isLoadingDiff: w, onLoadDiff: M, hasOptedIntoLargeDiff: m, onShowFullDiff: f, diffViewMode: D }), e[21] = x, e[22] = t, e[23] = D, e[24] = g, e[25] = E, e[26] = m, e[27] = d, e[28] = h, e[29] = S, e[30] = w, e[31] = M, e[32] = I, e[33] = C, e[34] = y, e[35] = f, e[36] = L, e[37] = A, e[38] = k) : k = e[38];
|
|
494
|
+
let R;
|
|
495
|
+
return e[39] !== i || e[40] !== k || e[41] !== z || e[42] !== _ ? (R = /* @__PURE__ */ G(O, { "data-testid": "diff-card", border: "1px solid", borderColor: z, borderRadius: "xs", overflow: "visible", bg: "bg", width: "100%", maxW: "100%", transition: "border-color 0.14s ease", _hover: T, onClick: i, children: [
|
|
492
496
|
_,
|
|
493
|
-
|
|
494
|
-
] }), e[39] = i, e[40] =
|
|
495
|
-
},
|
|
497
|
+
k
|
|
498
|
+
] }), e[39] = i, e[40] = k, e[41] = z, e[42] = _, e[43] = R) : R = e[43], R;
|
|
499
|
+
}, Mn = (n) => {
|
|
496
500
|
const e = F(58), {
|
|
497
501
|
diff: t,
|
|
498
|
-
isExpanded:
|
|
499
|
-
onToggleExpanded:
|
|
500
|
-
} = n, s =
|
|
501
|
-
let i, a,
|
|
502
|
-
e[0] !== t ? (
|
|
503
|
-
const p =
|
|
502
|
+
isExpanded: o,
|
|
503
|
+
onToggleExpanded: l
|
|
504
|
+
} = n, s = o === void 0 ? !0 : o;
|
|
505
|
+
let i, a, c, f;
|
|
506
|
+
e[0] !== t ? (c = St(t), i = t.additions ?? 0, a = t.deletions ?? 0, f = Tn(c), e[0] = t, e[1] = i, e[2] = a, e[3] = c, e[4] = f) : (i = e[1], a = e[2], c = e[3], f = e[4]);
|
|
507
|
+
const p = f, [u, d] = X(!1), m = Z(null);
|
|
504
508
|
let D, g;
|
|
505
509
|
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = () => () => {
|
|
506
510
|
m.current !== null && window.clearTimeout(m.current);
|
|
507
|
-
}, g = [], e[5] = D, e[6] = g) : (D = e[5], g = e[6]),
|
|
511
|
+
}, g = [], e[5] = D, e[6] = g) : (D = e[5], g = e[6]), oe(D, g);
|
|
508
512
|
let h;
|
|
509
|
-
e[7] !==
|
|
513
|
+
e[7] !== c ? (h = async () => {
|
|
510
514
|
try {
|
|
511
|
-
await navigator.clipboard.writeText(
|
|
515
|
+
await navigator.clipboard.writeText(c), d(!0), m.current !== null && window.clearTimeout(m.current), m.current = window.setTimeout(() => d(!1), 1200);
|
|
512
516
|
} catch {
|
|
513
517
|
d(!1);
|
|
514
518
|
}
|
|
515
|
-
}, e[7] =
|
|
516
|
-
const S = h, C = s ? "1px solid" : "none",
|
|
517
|
-
let
|
|
518
|
-
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
519
|
+
}, e[7] = c, e[8] = h) : h = e[8];
|
|
520
|
+
const S = h, C = s ? "1px solid" : "none", y = s ? "0" : "xs";
|
|
521
|
+
let P;
|
|
522
|
+
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = {
|
|
519
523
|
bg: "bg"
|
|
520
|
-
}, e[9] =
|
|
524
|
+
}, e[9] = P) : P = e[9];
|
|
521
525
|
let x;
|
|
522
|
-
e[10] !==
|
|
526
|
+
e[10] !== l ? (x = () => l?.(), e[10] = l, e[11] = x) : x = e[11];
|
|
523
527
|
const E = s ? "Collapse" : "Expand";
|
|
524
528
|
let b;
|
|
525
|
-
e[12] !==
|
|
526
|
-
U.stopPropagation(),
|
|
527
|
-
}, e[12] =
|
|
529
|
+
e[12] !== l ? (b = (U) => {
|
|
530
|
+
U.stopPropagation(), l?.();
|
|
531
|
+
}, e[12] = l, e[13] = b) : b = e[13];
|
|
528
532
|
let v;
|
|
529
|
-
e[14] !== s ? (v = s ? /* @__PURE__ */ r(
|
|
533
|
+
e[14] !== s ? (v = s ? /* @__PURE__ */ r($t, { size: 16 }) : /* @__PURE__ */ r(Ye, { size: 16 }), e[14] = s, e[15] = v) : v = e[15];
|
|
530
534
|
let w;
|
|
531
535
|
e[16] !== b || e[17] !== v || e[18] !== E ? (w = /* @__PURE__ */ r(Ke, { "aria-label": E, variant: "ghost", size: "2xs", onClick: b, flexShrink: 0, children: v }), e[16] = b, e[17] = v, e[18] = E, e[19] = w) : w = e[19];
|
|
532
536
|
let I;
|
|
533
|
-
e[20] !== t.change || e[21] !== t.newPath || e[22] !== t.oldPath || e[23] !==
|
|
537
|
+
e[20] !== t.change || e[21] !== t.newPath || e[22] !== t.oldPath || e[23] !== c ? (I = t.change === "renamed" ? /* @__PURE__ */ G(q, { as: "span", textStyle: "sm", children: [
|
|
534
538
|
/* @__PURE__ */ r(q, { as: "span", color: "fg.muted", textDecoration: "line-through", mr: "xs", children: t.oldPath }),
|
|
535
539
|
/* @__PURE__ */ r(O, { as: "span", display: "inline-flex", alignItems: "center", verticalAlign: "middle", mr: "xs", children: /* @__PURE__ */ r(Ye, { size: 12 }) }),
|
|
536
540
|
t.newPath
|
|
537
|
-
] }) : t.change === "deleted" ? /* @__PURE__ */ r(q, { as: "span", color: "fg.muted", textDecoration: "line-through", textStyle: "sm", children:
|
|
541
|
+
] }) : t.change === "deleted" ? /* @__PURE__ */ r(q, { as: "span", color: "fg.muted", textDecoration: "line-through", textStyle: "sm", children: c }) : /* @__PURE__ */ r(q, { as: "span", textStyle: "sm", children: c }), e[20] = t.change, e[21] = t.newPath, e[22] = t.oldPath, e[23] = c, e[24] = I) : I = e[24];
|
|
538
542
|
let L;
|
|
539
|
-
e[25] !==
|
|
540
|
-
const
|
|
543
|
+
e[25] !== c || e[26] !== I ? (L = /* @__PURE__ */ r(O, { minW: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", title: c, children: I }), e[25] = c, e[26] = I, e[27] = L) : L = e[27];
|
|
544
|
+
const M = u ? "1" : "0", z = u ? "auto" : "none";
|
|
541
545
|
let T;
|
|
542
546
|
e[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = {
|
|
543
547
|
"[data-testid='diff-card-header']:hover &, [data-testid='diff-card-header']:focus-within &": {
|
|
@@ -546,117 +550,117 @@ const Dn = (n) => {
|
|
|
546
550
|
}
|
|
547
551
|
}, e[28] = T) : T = e[28];
|
|
548
552
|
const _ = u ? "Copied" : "Copy file path", A = u ? "Copied" : "Copy file path";
|
|
549
|
-
let R;
|
|
550
|
-
e[29] !== S ? (R = (U) => {
|
|
551
|
-
U.stopPropagation(), S();
|
|
552
|
-
}, e[29] = S, e[30] = R) : R = e[30];
|
|
553
553
|
let k;
|
|
554
|
-
e[
|
|
554
|
+
e[29] !== S ? (k = (U) => {
|
|
555
|
+
U.stopPropagation(), S();
|
|
556
|
+
}, e[29] = S, e[30] = k) : k = e[30];
|
|
557
|
+
let R;
|
|
558
|
+
e[31] !== u ? (R = u ? /* @__PURE__ */ r(dt, { size: 12 }) : /* @__PURE__ */ r(Vt, { size: 12 }), e[31] = u, e[32] = R) : R = e[32];
|
|
555
559
|
let $;
|
|
556
|
-
e[33] !== A || e[34] !==
|
|
560
|
+
e[33] !== A || e[34] !== k || e[35] !== R ? ($ = /* @__PURE__ */ r(Ke, { "aria-label": A, variant: "ghost", size: "2xs", onClick: k, flexShrink: 0, children: R }), e[33] = A, e[34] = k, e[35] = R, e[36] = $) : $ = e[36];
|
|
557
561
|
let N;
|
|
558
|
-
e[37] !== _ || e[38] !== $ ? (N = /* @__PURE__ */ r(
|
|
562
|
+
e[37] !== _ || e[38] !== $ ? (N = /* @__PURE__ */ r(Ot, { content: _, children: $ }), e[37] = _, e[38] = $, e[39] = N) : N = e[39];
|
|
559
563
|
let B;
|
|
560
|
-
e[40] !==
|
|
564
|
+
e[40] !== M || e[41] !== z || e[42] !== N ? (B = /* @__PURE__ */ r(O, { opacity: M, pointerEvents: z, transition: "opacity 120ms ease", css: T, children: N }), e[40] = M, e[41] = z, e[42] = N, e[43] = B) : B = e[43];
|
|
561
565
|
let V;
|
|
562
566
|
e[44] !== L || e[45] !== B ? (V = /* @__PURE__ */ G(We, { templateColumns: "minmax(0, max-content) auto", alignItems: "center", justifyContent: "start", gap: "2xs", minW: 0, children: [
|
|
563
567
|
L,
|
|
564
568
|
B
|
|
565
569
|
] }), e[44] = L, e[45] = B, e[46] = V) : V = e[46];
|
|
566
570
|
let j;
|
|
567
|
-
e[47] !== i || e[48] !== a || e[49] !== p ? (j = p ? /* @__PURE__ */ r(O, { flexShrink: 0, children: /* @__PURE__ */ r(
|
|
571
|
+
e[47] !== i || e[48] !== a || e[49] !== p ? (j = p ? /* @__PURE__ */ r(O, { flexShrink: 0, children: /* @__PURE__ */ r(st, { variant: "ghost", additions: i, deletions: a }) }) : null, e[47] = i, e[48] = a, e[49] = p, e[50] = j) : j = e[50];
|
|
568
572
|
let W;
|
|
569
|
-
return e[51] !== w || e[52] !== V || e[53] !== j || e[54] !== C || e[55] !==
|
|
573
|
+
return e[51] !== w || e[52] !== V || e[53] !== j || e[54] !== C || e[55] !== y || e[56] !== x ? (W = /* @__PURE__ */ G(We, { "data-testid": "diff-card-header", templateColumns: "auto minmax(0, 1fr) auto", px: "xs", py: "2xs", alignItems: "center", justifyContent: "space-between", borderBottom: C, borderColor: "border.subtle", borderTopRadius: "xs", borderBottomRadius: y, position: "sticky", top: "0", zIndex: "1", bg: "bg", cursor: "pointer", transition: "background 0.14s ease", _hover: P, onClick: x, gap: "sm", children: [
|
|
570
574
|
w,
|
|
571
575
|
V,
|
|
572
576
|
j
|
|
573
|
-
] }), e[51] = w, e[52] = V, e[53] = j, e[54] = C, e[55] =
|
|
574
|
-
},
|
|
577
|
+
] }), e[51] = w, e[52] = V, e[53] = j, e[54] = C, e[55] = y, e[56] = x, e[57] = W) : W = e[57], W;
|
|
578
|
+
}, zn = () => {
|
|
575
579
|
const n = F(1);
|
|
576
580
|
let e;
|
|
577
581
|
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { h: "full", minH: "0", gap: "0", bg: "bg", children: /* @__PURE__ */ r(qe, { flex: "1", minH: "0", contentProps: {
|
|
578
582
|
p: "xs",
|
|
579
583
|
spaceY: "xs"
|
|
580
584
|
}, children: /* @__PURE__ */ r(Se, { title: "No changes detected", description: "Make some changes to see the diff here.", paddingY: "sm" }) }) }), n[0] = e) : e = n[0], e;
|
|
581
|
-
}, Qe = 34,
|
|
585
|
+
}, Qe = 34, kn = 18, Rn = 28, Bn = 34, Nn = 88, Hn = 338, Me = 8, Ae = () => Qe + Nn + Me, On = (n) => {
|
|
582
586
|
const {
|
|
583
587
|
diff: e,
|
|
584
588
|
isCollapsed: t,
|
|
585
|
-
hasOptedIntoLargeDiff:
|
|
586
|
-
diffViewMode:
|
|
589
|
+
hasOptedIntoLargeDiff: o = !1,
|
|
590
|
+
diffViewMode: l = "unified"
|
|
587
591
|
} = n;
|
|
588
|
-
if (t) return
|
|
592
|
+
if (t) return Bn + Me;
|
|
589
593
|
const s = e.oldContent !== void 0 || e.newContent !== void 0, i = e.newPath ?? e.oldPath ?? "";
|
|
590
594
|
if (we(i) && (e.oldContent || e.newContent))
|
|
591
|
-
return Qe +
|
|
592
|
-
if (Ue(i) || !s ||
|
|
595
|
+
return Qe + Hn + Me;
|
|
596
|
+
if (Ue(i) || !s || bt(e) && !o) return Ae();
|
|
593
597
|
const {
|
|
594
598
|
unifiedContentRows: a,
|
|
595
|
-
splitContentRows:
|
|
596
|
-
hunkRows:
|
|
597
|
-
} =
|
|
599
|
+
splitContentRows: c,
|
|
600
|
+
hunkRows: f
|
|
601
|
+
} = it({
|
|
598
602
|
original: e.oldContent ?? "",
|
|
599
603
|
modified: e.newContent ?? "",
|
|
600
604
|
oldPath: e.oldPath,
|
|
601
605
|
newPath: e.newPath
|
|
602
|
-
}), p =
|
|
603
|
-
if (p === 0 &&
|
|
604
|
-
const u = p *
|
|
605
|
-
return Qe + u +
|
|
606
|
-
},
|
|
606
|
+
}), p = l === "split" ? c : a;
|
|
607
|
+
if (p === 0 && f === 0) return Ae();
|
|
608
|
+
const u = p * kn + f * Rn;
|
|
609
|
+
return Qe + u + Me;
|
|
610
|
+
}, $n = (n) => n.newPath ?? n.oldPath ?? "unknown", Vn = 24, jn = (n) => {
|
|
607
611
|
const {
|
|
608
612
|
diffs: e,
|
|
609
613
|
selectedDiffPath: t,
|
|
610
|
-
collapsedPaths:
|
|
611
|
-
expansionCommand:
|
|
614
|
+
collapsedPaths: o,
|
|
615
|
+
expansionCommand: l,
|
|
612
616
|
completedScrollCommandId: s
|
|
613
617
|
} = n;
|
|
614
618
|
let i = t, a = t ? `selected:${t}` : null;
|
|
615
|
-
const
|
|
616
|
-
|
|
619
|
+
const c = l?.action === "expand-selected" ? l.id : null, f = c !== null && s === c;
|
|
620
|
+
l?.action === "expand-selected" && l.path && (i = l.path, a = `command:${l.id}:${l.path}`);
|
|
617
621
|
let p = a;
|
|
618
622
|
if (i && a) {
|
|
619
|
-
const m =
|
|
623
|
+
const m = o.has(i) ? "collapsed" : "expanded";
|
|
620
624
|
p = `${a}:${m}`;
|
|
621
625
|
}
|
|
622
|
-
const u = i ? e.findIndex((m) =>
|
|
626
|
+
const u = i ? e.findIndex((m) => $n(m) === i) : -1, d = u >= 0 && l?.action === "expand-selected" && l.direction === "up" && !f;
|
|
623
627
|
return {
|
|
624
628
|
selectedScrollPath: i,
|
|
625
629
|
selectedScrollKey: p,
|
|
626
|
-
selectedScrollCommandId:
|
|
630
|
+
selectedScrollCommandId: c,
|
|
627
631
|
selectedScrollIndex: u,
|
|
628
632
|
shouldPinSelectedScrollIndex: d,
|
|
629
|
-
hasCompletedSelectedScroll:
|
|
633
|
+
hasCompletedSelectedScroll: f
|
|
630
634
|
};
|
|
631
|
-
},
|
|
635
|
+
}, Gn = (n) => {
|
|
632
636
|
const {
|
|
633
637
|
indexes: e,
|
|
634
638
|
selectedScrollIndex: t,
|
|
635
|
-
shouldPinSelectedScrollIndex:
|
|
639
|
+
shouldPinSelectedScrollIndex: o
|
|
636
640
|
} = n;
|
|
637
|
-
if (!
|
|
638
|
-
const
|
|
639
|
-
length: t -
|
|
640
|
-
}, (i, a) =>
|
|
641
|
+
if (!o || e.includes(t)) return e;
|
|
642
|
+
const l = Math.max(0, t - Vn), s = Array.from({
|
|
643
|
+
length: t - l + 1
|
|
644
|
+
}, (i, a) => l + a);
|
|
641
645
|
return Array.from(/* @__PURE__ */ new Set([...e, ...s])).sort((i, a) => i - a);
|
|
642
|
-
},
|
|
646
|
+
}, Wn = 3, Kn = 12, Qn = (n) => n.newPath ?? n.oldPath ?? "unknown", qn = (n) => {
|
|
643
647
|
const e = F(20), {
|
|
644
648
|
diffs: t,
|
|
645
|
-
selectedDiffPath:
|
|
646
|
-
collapsedPaths:
|
|
649
|
+
selectedDiffPath: o,
|
|
650
|
+
collapsedPaths: l,
|
|
647
651
|
expansionCommand: s,
|
|
648
652
|
scrollRef: i,
|
|
649
653
|
virtualizerRef: a,
|
|
650
|
-
suppressScrollAdjustRef:
|
|
651
|
-
} = n, [
|
|
654
|
+
suppressScrollAdjustRef: c
|
|
655
|
+
} = n, [f, p] = X(null);
|
|
652
656
|
let u;
|
|
653
|
-
e[0] !==
|
|
657
|
+
e[0] !== l || e[1] !== f || e[2] !== t || e[3] !== s || e[4] !== o ? (u = jn({
|
|
654
658
|
diffs: t,
|
|
655
|
-
selectedDiffPath:
|
|
656
|
-
collapsedPaths:
|
|
659
|
+
selectedDiffPath: o,
|
|
660
|
+
collapsedPaths: l,
|
|
657
661
|
expansionCommand: s,
|
|
658
|
-
completedScrollCommandId:
|
|
659
|
-
}), e[0] =
|
|
662
|
+
completedScrollCommandId: f
|
|
663
|
+
}), e[0] = l, e[1] = f, e[2] = t, e[3] = s, e[4] = o, e[5] = u) : u = e[5];
|
|
660
664
|
const {
|
|
661
665
|
selectedScrollPath: d,
|
|
662
666
|
selectedScrollKey: m,
|
|
@@ -665,11 +669,11 @@ const Dn = (n) => {
|
|
|
665
669
|
shouldPinSelectedScrollIndex: h,
|
|
666
670
|
hasCompletedSelectedScroll: S
|
|
667
671
|
} = u;
|
|
668
|
-
let C,
|
|
669
|
-
e[6] !==
|
|
670
|
-
if (!d || !m || S ||
|
|
672
|
+
let C, y;
|
|
673
|
+
e[6] !== l || e[7] !== t || e[8] !== S || e[9] !== i || e[10] !== D || e[11] !== m || e[12] !== d || e[13] !== c || e[14] !== a ? (C = () => {
|
|
674
|
+
if (!d || !m || S || l.has(d))
|
|
671
675
|
return;
|
|
672
|
-
const x = t.findIndex((T) =>
|
|
676
|
+
const x = t.findIndex((T) => Qn(T) === d);
|
|
673
677
|
if (x < 0)
|
|
674
678
|
return;
|
|
675
679
|
const E = a.current, b = i.current;
|
|
@@ -677,23 +681,23 @@ const Dn = (n) => {
|
|
|
677
681
|
return;
|
|
678
682
|
const v = [];
|
|
679
683
|
let w = !1;
|
|
680
|
-
|
|
684
|
+
c.current = !0;
|
|
681
685
|
const I = () => {
|
|
682
|
-
|
|
686
|
+
c.current = !1;
|
|
683
687
|
}, L = () => {
|
|
684
688
|
w = !0, I(), D !== null && p(D);
|
|
685
689
|
};
|
|
686
|
-
let
|
|
687
|
-
const
|
|
690
|
+
let M = 0;
|
|
691
|
+
const z = () => {
|
|
688
692
|
if (!w) {
|
|
689
693
|
if (E.scrollToIndex(x, {
|
|
690
694
|
align: "start"
|
|
691
|
-
}),
|
|
695
|
+
}), M = M + 1, M >= Wn && D !== null) {
|
|
692
696
|
I(), p(D);
|
|
693
697
|
return;
|
|
694
698
|
}
|
|
695
|
-
if (
|
|
696
|
-
v.push(requestAnimationFrame(
|
|
699
|
+
if (M < Kn) {
|
|
700
|
+
v.push(requestAnimationFrame(z));
|
|
697
701
|
return;
|
|
698
702
|
}
|
|
699
703
|
I();
|
|
@@ -703,60 +707,60 @@ const Dn = (n) => {
|
|
|
703
707
|
passive: !0
|
|
704
708
|
}), b.addEventListener("touchmove", L, {
|
|
705
709
|
passive: !0
|
|
706
|
-
}),
|
|
710
|
+
}), z(), () => {
|
|
707
711
|
I(), b.removeEventListener("wheel", L), b.removeEventListener("touchmove", L);
|
|
708
712
|
for (const T of v)
|
|
709
713
|
cancelAnimationFrame(T);
|
|
710
714
|
};
|
|
711
|
-
},
|
|
712
|
-
let
|
|
713
|
-
return e[17] !== g || e[18] !== h ? (
|
|
715
|
+
}, y = [m, d, D, S, t, l, i, a, c], e[6] = l, e[7] = t, e[8] = S, e[9] = i, e[10] = D, e[11] = m, e[12] = d, e[13] = c, e[14] = a, e[15] = C, e[16] = y) : (C = e[15], y = e[16]), Ge(C, y);
|
|
716
|
+
let P;
|
|
717
|
+
return e[17] !== g || e[18] !== h ? (P = {
|
|
714
718
|
selectedScrollIndex: g,
|
|
715
719
|
shouldPinSelectedScrollIndex: h
|
|
716
|
-
}, e[17] = g, e[18] = h, e[19] =
|
|
717
|
-
}, ee = (n) => n.newPath ?? n.oldPath ?? "unknown", et = 10,
|
|
718
|
-
const
|
|
719
|
-
return t >= et ||
|
|
720
|
-
}).map((e) => ee(e))),
|
|
720
|
+
}, e[17] = g, e[18] = h, e[19] = P) : P = e[19], P;
|
|
721
|
+
}, ee = (n) => n.newPath ?? n.oldPath ?? "unknown", et = 10, Un = 100, Yn = (n) => n.length <= et ? /* @__PURE__ */ new Set() : new Set(n.filter((e, t) => {
|
|
722
|
+
const o = (e.additions ?? 0) + (e.deletions ?? 0);
|
|
723
|
+
return t >= et || o > Un;
|
|
724
|
+
}).map((e) => ee(e))), Xn = (n) => new Set(n.map((e) => ee(e))), Jn = (n, e) => {
|
|
721
725
|
const t = new Set(n);
|
|
722
726
|
return t.has(e) ? t.delete(e) : t.add(e), t;
|
|
723
|
-
},
|
|
724
|
-
if (!t || !e.has(t) || !n.some((
|
|
725
|
-
const
|
|
726
|
-
return
|
|
727
|
-
},
|
|
728
|
-
const
|
|
729
|
-
if (!
|
|
730
|
-
return
|
|
731
|
-
const s =
|
|
732
|
-
return s.add(
|
|
727
|
+
}, xt = (n, e, t) => {
|
|
728
|
+
if (!t || !e.has(t) || !n.some((l) => ee(l) === t)) return e;
|
|
729
|
+
const o = new Set(e);
|
|
730
|
+
return o.delete(t), o;
|
|
731
|
+
}, Zn = (n, e, t, o) => {
|
|
732
|
+
const l = xt(n, e, t);
|
|
733
|
+
if (!o || o === t || l.has(o) || !n.some((i) => ee(i) === o))
|
|
734
|
+
return l;
|
|
735
|
+
const s = l === e ? new Set(e) : l;
|
|
736
|
+
return s.add(o), s;
|
|
733
737
|
};
|
|
734
|
-
function
|
|
738
|
+
function el(n) {
|
|
735
739
|
const {
|
|
736
740
|
diffs: e,
|
|
737
741
|
selectedDiffPath: t = null,
|
|
738
|
-
onLoadDiff:
|
|
739
|
-
onSelectDiffPath:
|
|
742
|
+
onLoadDiff: o,
|
|
743
|
+
onSelectDiffPath: l,
|
|
740
744
|
onExpansionStateChange: s,
|
|
741
745
|
expansionCommand: i = null,
|
|
742
746
|
diffViewMode: a = "unified"
|
|
743
|
-
} = n,
|
|
747
|
+
} = n, c = Z(null), f = Z(null), p = Z(null), u = Z(!1), d = Z(null), [m, D] = X(() => Yn(e)), [g, h] = X(() => /* @__PURE__ */ new Set()), {
|
|
744
748
|
selectedScrollIndex: S,
|
|
745
749
|
shouldPinSelectedScrollIndex: C
|
|
746
|
-
} =
|
|
750
|
+
} = qn({
|
|
747
751
|
diffs: e,
|
|
748
752
|
selectedDiffPath: t,
|
|
749
753
|
collapsedPaths: m,
|
|
750
754
|
expansionCommand: i,
|
|
751
|
-
scrollRef:
|
|
755
|
+
scrollRef: c,
|
|
752
756
|
virtualizerRef: p,
|
|
753
757
|
suppressScrollAdjustRef: u
|
|
754
|
-
}),
|
|
758
|
+
}), y = Nt({
|
|
755
759
|
count: e.length,
|
|
756
|
-
getScrollElement: () =>
|
|
760
|
+
getScrollElement: () => c.current,
|
|
757
761
|
estimateSize: (b) => {
|
|
758
762
|
const v = e[b], w = ee(v);
|
|
759
|
-
return
|
|
763
|
+
return On({
|
|
760
764
|
diff: v,
|
|
761
765
|
isCollapsed: m.has(w),
|
|
762
766
|
hasOptedIntoLargeDiff: g.has(w),
|
|
@@ -766,106 +770,106 @@ function Un(n) {
|
|
|
766
770
|
getItemKey: (b) => ee(e[b]),
|
|
767
771
|
overscan: 3,
|
|
768
772
|
rangeExtractor: (b) => {
|
|
769
|
-
const v =
|
|
770
|
-
return
|
|
773
|
+
const v = Ht(b);
|
|
774
|
+
return Gn({
|
|
771
775
|
indexes: v,
|
|
772
776
|
selectedScrollIndex: S,
|
|
773
777
|
shouldPinSelectedScrollIndex: C
|
|
774
778
|
});
|
|
775
779
|
}
|
|
776
780
|
});
|
|
777
|
-
if (
|
|
778
|
-
t && D((b) =>
|
|
781
|
+
if (y.shouldAdjustScrollPositionOnItemSizeChange = (b, v, w) => !w.isScrolling && !u.current, p.current = y, Ge(() => {
|
|
782
|
+
t && D((b) => xt(e, b, t));
|
|
779
783
|
}, [e, t]), Ge(() => {
|
|
780
784
|
if (i) {
|
|
781
785
|
if (i.action === "expand-selected") {
|
|
782
786
|
const b = i.path;
|
|
783
787
|
if (b) {
|
|
784
788
|
const v = d.current;
|
|
785
|
-
d.current = b, D((w) =>
|
|
789
|
+
d.current = b, D((w) => Zn(e, w, b, v));
|
|
786
790
|
}
|
|
787
791
|
return;
|
|
788
792
|
}
|
|
789
|
-
d.current = null, D(i.action === "collapse" ?
|
|
793
|
+
d.current = null, D(i.action === "collapse" ? Xn(e) : /* @__PURE__ */ new Set());
|
|
790
794
|
}
|
|
791
|
-
}, [e, i]),
|
|
795
|
+
}, [e, i]), oe(() => {
|
|
792
796
|
const b = {
|
|
793
797
|
allExpanded: m.size === 0,
|
|
794
798
|
allCollapsed: e.length > 0 && e.every((w) => m.has(ee(w)))
|
|
795
|
-
}, v =
|
|
796
|
-
v?.allExpanded === b.allExpanded && v.allCollapsed === b.allCollapsed || (
|
|
797
|
-
}, [m, e, s]), e.length === 0) return /* @__PURE__ */ r(
|
|
798
|
-
const
|
|
799
|
-
D((v) =>
|
|
799
|
+
}, v = f.current;
|
|
800
|
+
v?.allExpanded === b.allExpanded && v.allCollapsed === b.allCollapsed || (f.current = b, s?.(b));
|
|
801
|
+
}, [m, e, s]), e.length === 0) return /* @__PURE__ */ r(zn, {});
|
|
802
|
+
const P = (b) => {
|
|
803
|
+
D((v) => Jn(v, b));
|
|
800
804
|
}, x = (b) => {
|
|
801
805
|
h((v) => {
|
|
802
806
|
const w = new Set(v);
|
|
803
807
|
return w.add(b), w;
|
|
804
808
|
});
|
|
805
|
-
}, E =
|
|
806
|
-
return /* @__PURE__ */ r(be, { h: "full", minH: "0", gap: "0", bg: "bg", children: /* @__PURE__ */ r(O, { position: "relative", flex: "1", minH: "0", bg: "bg", children: /* @__PURE__ */ r(qe, { position: "absolute", inset: "0", viewportRef:
|
|
809
|
+
}, E = y.getVirtualItems();
|
|
810
|
+
return /* @__PURE__ */ r(be, { h: "full", minH: "0", gap: "0", bg: "bg", children: /* @__PURE__ */ r(O, { position: "relative", flex: "1", minH: "0", bg: "bg", children: /* @__PURE__ */ r(qe, { position: "absolute", inset: "0", viewportRef: c, viewportProps: {
|
|
807
811
|
style: {
|
|
808
812
|
overflowAnchor: "none"
|
|
809
813
|
}
|
|
810
814
|
}, contentProps: {
|
|
811
815
|
p: "xs"
|
|
812
816
|
}, children: /* @__PURE__ */ r(O, { position: "relative", width: "100%", style: {
|
|
813
|
-
height:
|
|
817
|
+
height: y.getTotalSize()
|
|
814
818
|
}, children: E.map((b) => {
|
|
815
819
|
const v = e[b.index], w = ee(v);
|
|
816
|
-
return /* @__PURE__ */ r(O, { "data-index": b.index, ref:
|
|
820
|
+
return /* @__PURE__ */ r(O, { "data-index": b.index, ref: y.measureElement, position: "absolute", left: "0", width: "100%", pb: "xs", style: {
|
|
817
821
|
top: `${b.start}px`
|
|
818
|
-
}, children: /* @__PURE__ */ r(
|
|
822
|
+
}, children: /* @__PURE__ */ r(An, { diff: v, isSelected: t === w, isExpanded: !m.has(w), onToggleExpanded: () => P(w), onSelect: () => l?.(w), onLoadDiff: o, hasOptedIntoLargeDiff: g.has(w), onShowFullDiff: () => x(w), diffViewMode: a }, w) }, b.key);
|
|
819
823
|
}) }) }) }) });
|
|
820
824
|
}
|
|
821
|
-
const
|
|
822
|
-
e.children &&
|
|
823
|
-
}), n),
|
|
825
|
+
const tl = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), wt = (n) => (n.sort((e, t) => e.type !== t.type ? e.type === "folder" ? -1 : 1 : e.name.localeCompare(t.name)), n.forEach((e) => {
|
|
826
|
+
e.children && wt(e.children);
|
|
827
|
+
}), n), Dt = (n) => Array.from(new Set(n.map(tl).filter(Boolean))), nl = (n) => Dt(n).map((e) => ({
|
|
824
828
|
id: `file:${e}`,
|
|
825
829
|
name: e,
|
|
826
830
|
type: "file"
|
|
827
|
-
})).sort((e, t) => e.name.localeCompare(t.name)),
|
|
828
|
-
if (e === "flat") return
|
|
829
|
-
const t = /* @__PURE__ */ new Map(),
|
|
830
|
-
return
|
|
831
|
-
const s =
|
|
831
|
+
})).sort((e, t) => e.name.localeCompare(t.name)), ze = (n, e) => {
|
|
832
|
+
if (e === "flat") return nl(n);
|
|
833
|
+
const t = /* @__PURE__ */ new Map(), o = [];
|
|
834
|
+
return Dt(n).forEach((l) => {
|
|
835
|
+
const s = l.split("/");
|
|
832
836
|
let i = "", a = null;
|
|
833
|
-
s.forEach((
|
|
834
|
-
const p = i ? `${i}/${
|
|
837
|
+
s.forEach((c, f) => {
|
|
838
|
+
const p = i ? `${i}/${c}` : c, u = f === s.length - 1, d = `${u ? "file" : "folder"}:${p}`, m = t.get(d);
|
|
835
839
|
if (m) {
|
|
836
840
|
a = m, i = p;
|
|
837
841
|
return;
|
|
838
842
|
}
|
|
839
843
|
const D = {
|
|
840
844
|
id: d,
|
|
841
|
-
name:
|
|
845
|
+
name: c,
|
|
842
846
|
type: u ? "file" : "folder",
|
|
843
847
|
...u ? {} : {
|
|
844
848
|
children: []
|
|
845
849
|
}
|
|
846
850
|
};
|
|
847
|
-
t.set(d, D), a ? a.children?.push(D) :
|
|
851
|
+
t.set(d, D), a ? a.children?.push(D) : o.push(D), a = D, i = p;
|
|
848
852
|
});
|
|
849
|
-
}),
|
|
853
|
+
}), wt(o);
|
|
850
854
|
}, tt = (n) => {
|
|
851
|
-
const e = [], t = (
|
|
852
|
-
|
|
853
|
-
|
|
855
|
+
const e = [], t = (o) => {
|
|
856
|
+
o.forEach((l) => {
|
|
857
|
+
l.type === "folder" && (e.push(l.id), t(l.children ?? []));
|
|
854
858
|
});
|
|
855
859
|
};
|
|
856
860
|
return t(n), e;
|
|
857
|
-
},
|
|
858
|
-
const e = [], t = (
|
|
859
|
-
|
|
860
|
-
if (
|
|
861
|
-
e.push(
|
|
861
|
+
}, ll = (n) => {
|
|
862
|
+
const e = [], t = (o) => {
|
|
863
|
+
o.forEach((l) => {
|
|
864
|
+
if (l.type === "file") {
|
|
865
|
+
e.push(l.id.replace(/^file:/, ""));
|
|
862
866
|
return;
|
|
863
867
|
}
|
|
864
|
-
t(
|
|
868
|
+
t(l.children ?? []);
|
|
865
869
|
});
|
|
866
870
|
};
|
|
867
871
|
return t(n), e;
|
|
868
|
-
},
|
|
872
|
+
}, ol = (n, e) => e === "flat" ? [...n].sort((t, o) => t.localeCompare(o)) : ll(ze(n, "nested")), il = ln((n) => ({
|
|
869
873
|
isTreePanelOpen: !0,
|
|
870
874
|
viewMode: "nested",
|
|
871
875
|
diffViewMode: "unified",
|
|
@@ -894,9 +898,9 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
|
|
|
894
898
|
expandedFolderIds: new Set(e)
|
|
895
899
|
}),
|
|
896
900
|
toggleFolder: (e) => n((t) => {
|
|
897
|
-
const
|
|
898
|
-
return
|
|
899
|
-
expandedFolderIds:
|
|
901
|
+
const o = new Set(t.expandedFolderIds);
|
|
902
|
+
return o.has(e) ? o.delete(e) : o.add(e), {
|
|
903
|
+
expandedFolderIds: o
|
|
900
904
|
};
|
|
901
905
|
}),
|
|
902
906
|
expandAll: (e) => n({
|
|
@@ -905,65 +909,65 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
|
|
|
905
909
|
collapseAll: () => n({
|
|
906
910
|
expandedFolderIds: /* @__PURE__ */ new Set()
|
|
907
911
|
})
|
|
908
|
-
})),
|
|
912
|
+
})), sl = (n) => {
|
|
909
913
|
const e = F(4);
|
|
910
914
|
let t;
|
|
911
|
-
e[0] !== n.selected ? (t = n.selected ? /* @__PURE__ */ r(
|
|
912
|
-
let
|
|
913
|
-
return e[2] !== t ? (
|
|
915
|
+
e[0] !== n.selected ? (t = n.selected ? /* @__PURE__ */ r(dt, { size: 14 }) : null, e[0] = n.selected, e[1] = t) : t = e[1];
|
|
916
|
+
let o;
|
|
917
|
+
return e[2] !== t ? (o = /* @__PURE__ */ r(O, { w: "14px", flexShrink: 0, display: "flex", justifyContent: "center", children: t }), e[2] = t, e[3] = o) : o = e[3], o;
|
|
914
918
|
}, ne = (n) => {
|
|
915
919
|
const e = F(15), {
|
|
916
920
|
id: t,
|
|
917
|
-
label:
|
|
918
|
-
icon:
|
|
921
|
+
label: o,
|
|
922
|
+
icon: l,
|
|
919
923
|
selected: s,
|
|
920
924
|
disabled: i,
|
|
921
925
|
onActivate: a
|
|
922
|
-
} = n,
|
|
923
|
-
let
|
|
924
|
-
e[0] !== s ? (
|
|
926
|
+
} = n, c = s === void 0 ? void 0 : "menuitemradio";
|
|
927
|
+
let f;
|
|
928
|
+
e[0] !== s ? (f = s === void 0 ? void 0 : /* @__PURE__ */ r(sl, { selected: s }), e[0] = s, e[1] = f) : f = e[1];
|
|
925
929
|
let p;
|
|
926
|
-
e[2] !== i || e[3] !==
|
|
930
|
+
e[2] !== i || e[3] !== l || e[4] !== t || e[5] !== o || e[6] !== a || e[7] !== s || e[8] !== c || e[9] !== f ? (p = /* @__PURE__ */ r(en, { asChild: !0, role: c, "aria-checked": s, variant: "full-width", id: t, icon: l, label: o, disabled: i, isSelected: s, endContent: f, onActivate: a }), e[2] = i, e[3] = l, e[4] = t, e[5] = o, e[6] = a, e[7] = s, e[8] = c, e[9] = f, e[10] = p) : p = e[10];
|
|
927
931
|
let u;
|
|
928
932
|
return e[11] !== i || e[12] !== t || e[13] !== p ? (u = /* @__PURE__ */ r(J.Item, { value: t, disabled: i, asChild: !0, children: p }), e[11] = i, e[12] = t, e[13] = p, e[14] = u) : u = e[14], u;
|
|
929
|
-
},
|
|
933
|
+
}, rl = (n) => {
|
|
930
934
|
const e = F(40), {
|
|
931
935
|
isTreePanelOpen: t,
|
|
932
|
-
hasFilePaths:
|
|
933
|
-
viewMode:
|
|
936
|
+
hasFilePaths: o,
|
|
937
|
+
viewMode: l,
|
|
934
938
|
diffViewMode: s,
|
|
935
939
|
isExpandAllDisabled: i,
|
|
936
940
|
isCollapseAllDisabled: a,
|
|
937
|
-
onToggleTreePanel:
|
|
938
|
-
onViewModeChange:
|
|
941
|
+
onToggleTreePanel: c,
|
|
942
|
+
onViewModeChange: f,
|
|
939
943
|
onDiffViewModeChange: p,
|
|
940
944
|
onExpandAll: u,
|
|
941
945
|
onCollapseAll: d
|
|
942
946
|
} = n;
|
|
943
947
|
let m;
|
|
944
|
-
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ r(J.Trigger, { asChild: !0, children: /* @__PURE__ */ r(Ke, { "aria-label": "Diff view options", variant: "ghost", size: "sm", children: /* @__PURE__ */ r(
|
|
948
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ r(J.Trigger, { asChild: !0, children: /* @__PURE__ */ r(Ke, { "aria-label": "Diff view options", variant: "ghost", size: "sm", children: /* @__PURE__ */ r(jt, { size: 14 }) }) }), e[0] = m) : m = e[0];
|
|
945
949
|
let D;
|
|
946
|
-
e[1] !== t ? (D = t ? /* @__PURE__ */ r(
|
|
950
|
+
e[1] !== t ? (D = t ? /* @__PURE__ */ r(Kt, { size: 14 }) : /* @__PURE__ */ r(Qt, { size: 14 }), e[1] = t, e[2] = D) : D = e[2];
|
|
947
951
|
const g = t ? "Hide file tree" : "Show file tree";
|
|
948
952
|
let h;
|
|
949
|
-
e[3] !==
|
|
953
|
+
e[3] !== c || e[4] !== D || e[5] !== g ? (h = /* @__PURE__ */ r(ne, { id: "toggle-file-tree", icon: D, label: g, onActivate: c }), e[3] = c, e[4] = D, e[5] = g, e[6] = h) : h = e[6];
|
|
950
954
|
let S;
|
|
951
955
|
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ r(J.Separator, {}), e[7] = S) : S = e[7];
|
|
952
956
|
let C;
|
|
953
|
-
e[8] !==
|
|
954
|
-
/* @__PURE__ */ r(ne, { id: "nested", icon: /* @__PURE__ */ r(
|
|
955
|
-
/* @__PURE__ */ r(ne, { id: "flat", icon: /* @__PURE__ */ r(
|
|
957
|
+
e[8] !== o || e[9] !== f || e[10] !== l ? (C = o ? /* @__PURE__ */ G(Et, { children: [
|
|
958
|
+
/* @__PURE__ */ r(ne, { id: "nested", icon: /* @__PURE__ */ r(Gt, { size: 14 }), label: "Nested", selected: l === "nested", onActivate: () => f("nested") }),
|
|
959
|
+
/* @__PURE__ */ r(ne, { id: "flat", icon: /* @__PURE__ */ r(Wt, { size: 14 }), label: "Flat", selected: l === "flat", onActivate: () => f("flat") }),
|
|
956
960
|
/* @__PURE__ */ r(J.Separator, {})
|
|
957
|
-
] }) : null, e[8] =
|
|
958
|
-
let
|
|
959
|
-
e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
960
|
-
const
|
|
961
|
+
] }) : null, e[8] = o, e[9] = f, e[10] = l, e[11] = C) : C = e[11];
|
|
962
|
+
let y;
|
|
963
|
+
e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ r(qt, { size: 14 }), e[12] = y) : y = e[12];
|
|
964
|
+
const P = s === "unified";
|
|
961
965
|
let x;
|
|
962
966
|
e[13] !== p ? (x = () => p("unified"), e[13] = p, e[14] = x) : x = e[14];
|
|
963
967
|
let E;
|
|
964
|
-
e[15] !==
|
|
968
|
+
e[15] !== P || e[16] !== x ? (E = /* @__PURE__ */ r(ne, { id: "unified", icon: y, label: "Unified", selected: P, onActivate: x }), e[15] = P, e[16] = x, e[17] = E) : E = e[17];
|
|
965
969
|
let b;
|
|
966
|
-
e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ r(
|
|
970
|
+
e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ r(Ut, { size: 14 }), e[18] = b) : b = e[18];
|
|
967
971
|
const v = s === "split";
|
|
968
972
|
let w;
|
|
969
973
|
e[19] !== p ? (w = () => p("split"), e[19] = p, e[20] = w) : w = e[20];
|
|
@@ -971,16 +975,16 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
|
|
|
971
975
|
e[21] !== v || e[22] !== w ? (I = /* @__PURE__ */ r(ne, { id: "split", icon: b, label: "Split", selected: v, onActivate: w }), e[21] = v, e[22] = w, e[23] = I) : I = e[23];
|
|
972
976
|
let L;
|
|
973
977
|
e[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ r(J.Separator, {}), e[24] = L) : L = e[24];
|
|
974
|
-
let z;
|
|
975
|
-
e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ r(Qt, { size: 14 }), e[25] = z) : z = e[25];
|
|
976
978
|
let M;
|
|
977
|
-
e[
|
|
979
|
+
e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ r(Yt, { size: 14 }), e[25] = M) : M = e[25];
|
|
980
|
+
let z;
|
|
981
|
+
e[26] !== i || e[27] !== u ? (z = /* @__PURE__ */ r(ne, { id: "expand-all", icon: M, label: "Expand all", disabled: i, onActivate: u }), e[26] = i, e[27] = u, e[28] = z) : z = e[28];
|
|
978
982
|
let T;
|
|
979
|
-
e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ r(
|
|
983
|
+
e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ r(Xt, { size: 14 }), e[29] = T) : T = e[29];
|
|
980
984
|
let _;
|
|
981
985
|
e[30] !== a || e[31] !== d ? (_ = /* @__PURE__ */ r(ne, { id: "collapse-all", icon: T, label: "Collapse all", disabled: a, onActivate: d }), e[30] = a, e[31] = d, e[32] = _) : _ = e[32];
|
|
982
986
|
let A;
|
|
983
|
-
return e[33] !== I || e[34] !==
|
|
987
|
+
return e[33] !== I || e[34] !== z || e[35] !== _ || e[36] !== h || e[37] !== C || e[38] !== E ? (A = /* @__PURE__ */ G(J.Root, { children: [
|
|
984
988
|
m,
|
|
985
989
|
/* @__PURE__ */ r(J.Positioner, { children: /* @__PURE__ */ G(J.Content, { minW: "190px", bg: "bg", p: "0", gap: "0", children: [
|
|
986
990
|
h,
|
|
@@ -989,25 +993,25 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
|
|
|
989
993
|
E,
|
|
990
994
|
I,
|
|
991
995
|
L,
|
|
992
|
-
|
|
996
|
+
z,
|
|
993
997
|
_
|
|
994
998
|
] }) })
|
|
995
|
-
] }), e[33] = I, e[34] =
|
|
996
|
-
},
|
|
999
|
+
] }), e[33] = I, e[34] = z, e[35] = _, e[36] = h, e[37] = C, e[38] = E, e[39] = A) : A = e[39], A;
|
|
1000
|
+
}, al = {
|
|
997
1001
|
added: "A",
|
|
998
1002
|
copied: "C",
|
|
999
1003
|
deleted: "D",
|
|
1000
1004
|
modified: "M",
|
|
1001
1005
|
permissionChange: "M",
|
|
1002
1006
|
renamed: "R"
|
|
1003
|
-
},
|
|
1007
|
+
}, dl = {
|
|
1004
1008
|
added: "green",
|
|
1005
1009
|
copied: "purple",
|
|
1006
1010
|
deleted: "red",
|
|
1007
1011
|
modified: "blue",
|
|
1008
1012
|
permissionChange: "yellow",
|
|
1009
1013
|
renamed: "orange"
|
|
1010
|
-
},
|
|
1014
|
+
}, cl = {
|
|
1011
1015
|
added: {
|
|
1012
1016
|
color: "fg.success",
|
|
1013
1017
|
backgroundColor: "bg.success"
|
|
@@ -1016,18 +1020,18 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
|
|
|
1016
1020
|
color: "fg.error",
|
|
1017
1021
|
backgroundColor: "bg.error"
|
|
1018
1022
|
}
|
|
1019
|
-
},
|
|
1023
|
+
}, fl = (n) => {
|
|
1020
1024
|
const e = F(5), {
|
|
1021
1025
|
change: t
|
|
1022
1026
|
} = n;
|
|
1023
|
-
let
|
|
1024
|
-
e[0] !== t ? (
|
|
1025
|
-
colorPalette:
|
|
1026
|
-
}, e[0] = t, e[1] =
|
|
1027
|
-
const
|
|
1027
|
+
let o;
|
|
1028
|
+
e[0] !== t ? (o = cl[t] ?? {
|
|
1029
|
+
colorPalette: dl[t] ?? "gray"
|
|
1030
|
+
}, e[0] = t, e[1] = o) : o = e[1];
|
|
1031
|
+
const l = o, s = al[t] ?? t;
|
|
1028
1032
|
let i;
|
|
1029
|
-
return e[2] !==
|
|
1030
|
-
},
|
|
1033
|
+
return e[2] !== l || e[3] !== s ? (i = /* @__PURE__ */ r(At, { size: "xs", variant: "subtle", flexShrink: 0, ...l, children: s }), e[2] = l, e[3] = s, e[4] = i) : i = e[4], i;
|
|
1034
|
+
}, hl = (n) => {
|
|
1031
1035
|
const e = n.lastIndexOf("/");
|
|
1032
1036
|
return e < 0 ? {
|
|
1033
1037
|
fileName: n,
|
|
@@ -1036,22 +1040,22 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
|
|
|
1036
1040
|
fileName: n.slice(e + 1),
|
|
1037
1041
|
dirPath: n.slice(0, e)
|
|
1038
1042
|
};
|
|
1039
|
-
},
|
|
1043
|
+
}, ul = (n, e, t) => {
|
|
1040
1044
|
const {
|
|
1041
|
-
fileName:
|
|
1042
|
-
dirPath:
|
|
1043
|
-
} =
|
|
1044
|
-
return e !== "flat" || !
|
|
1045
|
-
/* @__PURE__ */ r(q, { as: "span", color: "fg.default", children:
|
|
1045
|
+
fileName: o,
|
|
1046
|
+
dirPath: l
|
|
1047
|
+
} = hl(t);
|
|
1048
|
+
return e !== "flat" || !l ? n.name : /* @__PURE__ */ G(q, { textStyle: "label/S/regular", truncate: !0, children: [
|
|
1049
|
+
/* @__PURE__ */ r(q, { as: "span", color: "fg.default", children: o }),
|
|
1046
1050
|
" ",
|
|
1047
|
-
/* @__PURE__ */ r(q, { as: "span", color: "fg.muted", children:
|
|
1051
|
+
/* @__PURE__ */ r(q, { as: "span", color: "fg.muted", children: l })
|
|
1048
1052
|
] });
|
|
1049
|
-
},
|
|
1053
|
+
}, Ct = (n) => {
|
|
1050
1054
|
const {
|
|
1051
1055
|
nodes: e,
|
|
1052
1056
|
viewMode: t,
|
|
1053
|
-
onSelectPath:
|
|
1054
|
-
resolveFileIcon:
|
|
1057
|
+
onSelectPath: o,
|
|
1058
|
+
resolveFileIcon: l,
|
|
1055
1059
|
changeByPath: s
|
|
1056
1060
|
} = n;
|
|
1057
1061
|
return e.map((i) => {
|
|
@@ -1060,104 +1064,104 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
|
|
|
1060
1064
|
id: i.id,
|
|
1061
1065
|
label: i.name,
|
|
1062
1066
|
isContainer: !0,
|
|
1063
|
-
children:
|
|
1067
|
+
children: Ct({
|
|
1064
1068
|
nodes: i.children ?? [],
|
|
1065
1069
|
viewMode: t,
|
|
1066
|
-
onSelectPath:
|
|
1067
|
-
resolveFileIcon:
|
|
1070
|
+
onSelectPath: o,
|
|
1071
|
+
resolveFileIcon: l,
|
|
1068
1072
|
changeByPath: s
|
|
1069
1073
|
})
|
|
1070
1074
|
};
|
|
1071
|
-
const a = i.id.replace(/^file:/, ""),
|
|
1072
|
-
icon: /* @__PURE__ */ r(
|
|
1075
|
+
const a = i.id.replace(/^file:/, ""), c = l?.(a) ?? {
|
|
1076
|
+
icon: /* @__PURE__ */ r(Mt, { as: Jt, boxSize: "16px" }),
|
|
1073
1077
|
color: "fg.subtle"
|
|
1074
|
-
},
|
|
1078
|
+
}, f = s?.get(a);
|
|
1075
1079
|
return {
|
|
1076
1080
|
id: i.id,
|
|
1077
|
-
label:
|
|
1078
|
-
icon:
|
|
1079
|
-
iconColor:
|
|
1080
|
-
endContent:
|
|
1081
|
-
onActivate: () =>
|
|
1081
|
+
label: ul(i, t, a),
|
|
1082
|
+
icon: c.icon,
|
|
1083
|
+
iconColor: c.color,
|
|
1084
|
+
endContent: f ? /* @__PURE__ */ r(fl, { change: f }) : void 0,
|
|
1085
|
+
onActivate: () => o(a)
|
|
1082
1086
|
};
|
|
1083
1087
|
});
|
|
1084
|
-
},
|
|
1088
|
+
}, ml = (n) => {
|
|
1085
1089
|
const e = F(23), {
|
|
1086
1090
|
paths: t,
|
|
1087
|
-
selectedPath:
|
|
1088
|
-
viewMode:
|
|
1091
|
+
selectedPath: o,
|
|
1092
|
+
viewMode: l,
|
|
1089
1093
|
searchQuery: s,
|
|
1090
1094
|
expandedFolderIds: i,
|
|
1091
1095
|
onSelectPath: a,
|
|
1092
|
-
onSearchQueryChange:
|
|
1093
|
-
onToggleFolder:
|
|
1096
|
+
onSearchQueryChange: c,
|
|
1097
|
+
onToggleFolder: f,
|
|
1094
1098
|
resolveFileIcon: p,
|
|
1095
1099
|
changeByPath: u
|
|
1096
1100
|
} = n, d = Z(null);
|
|
1097
1101
|
let m;
|
|
1098
|
-
if (e[0] !== u || e[1] !== a || e[2] !== t || e[3] !== p || e[4] !==
|
|
1099
|
-
const E =
|
|
1100
|
-
m =
|
|
1102
|
+
if (e[0] !== u || e[1] !== a || e[2] !== t || e[3] !== p || e[4] !== l) {
|
|
1103
|
+
const E = ze(t, l);
|
|
1104
|
+
m = Ct({
|
|
1101
1105
|
nodes: E,
|
|
1102
|
-
viewMode:
|
|
1106
|
+
viewMode: l,
|
|
1103
1107
|
onSelectPath: a,
|
|
1104
1108
|
resolveFileIcon: p,
|
|
1105
1109
|
changeByPath: u
|
|
1106
|
-
}), e[0] = u, e[1] = a, e[2] = t, e[3] = p, e[4] =
|
|
1110
|
+
}), e[0] = u, e[1] = a, e[2] = t, e[3] = p, e[4] = l, e[5] = m;
|
|
1107
1111
|
} else
|
|
1108
1112
|
m = e[5];
|
|
1109
1113
|
const D = m, g = s.trim() ? "No matching files" : "No changed files";
|
|
1110
1114
|
let h;
|
|
1111
|
-
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ r(
|
|
1115
|
+
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ r(Zt, { size: 14 }), e[6] = h) : h = e[6];
|
|
1112
1116
|
let S;
|
|
1113
|
-
e[7] !==
|
|
1117
|
+
e[7] !== c ? (S = (E) => c(E.target.value), e[7] = c, e[8] = S) : S = e[8];
|
|
1114
1118
|
let C;
|
|
1115
|
-
e[9] !== s || e[10] !== S ? (C = /* @__PURE__ */ r(
|
|
1116
|
-
let
|
|
1117
|
-
e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (
|
|
1119
|
+
e[9] !== s || e[10] !== S ? (C = /* @__PURE__ */ r(ct, { flexShrink: 0, borderBottomWidth: "1px", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(zt, { startElement: h, children: /* @__PURE__ */ r(kt, { size: "sm", variant: "borderless", "aria-label": "Search files", placeholder: "Search files", value: s, onChange: S }) }) }), e[9] = s, e[10] = S, e[11] = C) : C = e[11];
|
|
1120
|
+
let y;
|
|
1121
|
+
e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = {
|
|
1118
1122
|
style: {
|
|
1119
1123
|
overflowX: "hidden"
|
|
1120
1124
|
}
|
|
1121
|
-
}, e[12] =
|
|
1122
|
-
let
|
|
1123
|
-
e[13] !== g || e[14] !== i || e[15] !==
|
|
1125
|
+
}, e[12] = y) : y = e[12];
|
|
1126
|
+
let P;
|
|
1127
|
+
e[13] !== g || e[14] !== i || e[15] !== f || e[16] !== t.length || e[17] !== o || e[18] !== D ? (P = /* @__PURE__ */ r(qe, { flex: "1", minH: "0", minW: "0", bg: "bg", viewportRef: d, viewportProps: y, children: t.length > 0 ? /* @__PURE__ */ r(tn, { sections: [{
|
|
1124
1128
|
id: "files",
|
|
1125
1129
|
nodes: D
|
|
1126
|
-
}], expandedNodeIds: [...i], activeNodeId:
|
|
1130
|
+
}], expandedNodeIds: [...i], activeNodeId: o ? `file:${o}` : null, rowVariant: "tree", onToggleNode: f, virtualize: !0, scrollRef: d }) : /* @__PURE__ */ r(O, { px: "xs", py: "xs", children: /* @__PURE__ */ r(Se, { title: g, size: "sm", textAlign: "left", alignItems: "flex-start" }) }) }), e[13] = g, e[14] = i, e[15] = f, e[16] = t.length, e[17] = o, e[18] = D, e[19] = P) : P = e[19];
|
|
1127
1131
|
let x;
|
|
1128
|
-
return e[20] !== C || e[21] !==
|
|
1132
|
+
return e[20] !== C || e[21] !== P ? (x = /* @__PURE__ */ G(be, { h: "full", minH: "0", minW: "0", w: "full", gap: "0", overflow: "hidden", bg: "bg", children: [
|
|
1129
1133
|
C,
|
|
1130
|
-
|
|
1131
|
-
] }), e[20] = C, e[21] =
|
|
1132
|
-
},
|
|
1134
|
+
P
|
|
1135
|
+
] }), e[20] = C, e[21] = P, e[22] = x) : x = e[22], x;
|
|
1136
|
+
}, le = (n) => n.newPath ?? n.oldPath ?? "unknown", pl = (n) => new Map(n.map((e) => [le(e), e.change])), gl = (n) => n.reduce((e, t) => ({
|
|
1133
1137
|
additions: e.additions + (t.additions ?? 0),
|
|
1134
1138
|
deletions: e.deletions + (t.deletions ?? 0)
|
|
1135
1139
|
}), {
|
|
1136
1140
|
additions: 0,
|
|
1137
1141
|
deletions: 0
|
|
1138
|
-
}),
|
|
1142
|
+
}), bl = (n) => {
|
|
1139
1143
|
const {
|
|
1140
1144
|
diffs: e,
|
|
1141
1145
|
normalizedSearchQuery: t,
|
|
1142
|
-
viewMode:
|
|
1143
|
-
} = n,
|
|
1144
|
-
return [...
|
|
1145
|
-
const
|
|
1146
|
-
return
|
|
1146
|
+
viewMode: o
|
|
1147
|
+
} = n, l = t ? e.filter((a) => le(a).toLowerCase().includes(t)) : e, s = ol(l.map(le), o), i = new Map(s.map((a, c) => [a, c]));
|
|
1148
|
+
return [...l].sort((a, c) => {
|
|
1149
|
+
const f = i.get(le(a)) ?? Number.MAX_SAFE_INTEGER, p = i.get(le(c)) ?? Number.MAX_SAFE_INTEGER;
|
|
1150
|
+
return f - p;
|
|
1147
1151
|
});
|
|
1148
|
-
}, nt = (n, e) => n[0] ?? e[0] ?? null,
|
|
1152
|
+
}, nt = (n, e) => n[0] ?? e[0] ?? null, Sl = ["first", "second", "third"], xl = () => {
|
|
1149
1153
|
const n = F(1);
|
|
1150
1154
|
let e;
|
|
1151
|
-
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { flex: "1", minH: "0", bg: "bg", p: "xs", gap: "xs", role: "status", "aria-busy": "true", "aria-label": "Loading diff panel", children:
|
|
1152
|
-
},
|
|
1155
|
+
return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { flex: "1", minH: "0", bg: "bg", p: "xs", gap: "xs", role: "status", "aria-busy": "true", "aria-label": "Loading diff panel", children: Sl.map(wl) }), n[0] = e) : e = n[0], e;
|
|
1156
|
+
}, Hl = (n) => {
|
|
1153
1157
|
const e = F(109), {
|
|
1154
1158
|
diffs: t,
|
|
1155
|
-
changedFilePaths:
|
|
1156
|
-
defaultSelectedPath:
|
|
1159
|
+
changedFilePaths: o,
|
|
1160
|
+
defaultSelectedPath: l,
|
|
1157
1161
|
loading: s,
|
|
1158
1162
|
onLoadDiff: i,
|
|
1159
1163
|
resolveFileIcon: a
|
|
1160
|
-
} = n,
|
|
1164
|
+
} = n, c = l === void 0 ? null : l, f = s === void 0 ? !1 : s, [p, u] = X(null);
|
|
1161
1165
|
let d;
|
|
1162
1166
|
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
1163
1167
|
allExpanded: !1,
|
|
@@ -1168,8 +1172,8 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
|
|
|
1168
1172
|
viewMode: h,
|
|
1169
1173
|
diffViewMode: S,
|
|
1170
1174
|
searchQuery: C,
|
|
1171
|
-
selectedPath:
|
|
1172
|
-
expandedFolderIds:
|
|
1175
|
+
selectedPath: y,
|
|
1176
|
+
expandedFolderIds: P,
|
|
1173
1177
|
setTreePanelOpen: x,
|
|
1174
1178
|
setViewMode: E,
|
|
1175
1179
|
setDiffViewMode: b,
|
|
@@ -1177,49 +1181,49 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
|
|
|
1177
1181
|
setSelectedPath: w,
|
|
1178
1182
|
setExpandedFolderIds: I,
|
|
1179
1183
|
toggleFolder: L,
|
|
1180
|
-
expandAll:
|
|
1181
|
-
collapseAll:
|
|
1182
|
-
} =
|
|
1183
|
-
let T, _, A,
|
|
1184
|
-
if (e[1] !==
|
|
1185
|
-
const K = t.map(
|
|
1186
|
-
|
|
1184
|
+
expandAll: M,
|
|
1185
|
+
collapseAll: z
|
|
1186
|
+
} = il();
|
|
1187
|
+
let T, _, A, k, R, $, N, B, V, j, W, U, H, ie, De, Y;
|
|
1188
|
+
if (e[1] !== o || e[2] !== c || e[3] !== t || e[4] !== P || e[5] !== f || e[6] !== C || e[7] !== y || e[8] !== h) {
|
|
1189
|
+
const K = t.map(le);
|
|
1190
|
+
k = o ?? K;
|
|
1187
1191
|
const Q = C.trim().toLowerCase();
|
|
1188
|
-
V = Q ?
|
|
1192
|
+
V = Q ? k.filter((xe) => xe.toLowerCase().includes(Q)) : k, N = bl({
|
|
1189
1193
|
diffs: t,
|
|
1190
1194
|
normalizedSearchQuery: Q,
|
|
1191
1195
|
viewMode: h
|
|
1192
1196
|
});
|
|
1193
1197
|
let te;
|
|
1194
|
-
e[25] !== t ? (te =
|
|
1195
|
-
const je =
|
|
1196
|
-
j = h === "nested" ? tt(je) : [], B = V.join("\0"),
|
|
1198
|
+
e[25] !== t ? (te = pl(t), e[25] = t, e[26] = te) : te = e[26], _ = te, $ = N.map(le);
|
|
1199
|
+
const je = ze(V, h);
|
|
1200
|
+
j = h === "nested" ? tt(je) : [], B = V.join("\0"), R = $.join("\0"), H = y ?? c ?? nt($, V), W = N.length > 0, A = Q ? "No matching changes" : "No changes", ie = !f && !W, Y = gl(N), U = j.length > 0 || N.length > 0;
|
|
1197
1201
|
let pe;
|
|
1198
|
-
e[27] !==
|
|
1202
|
+
e[27] !== P ? (pe = (xe) => P.has(xe), e[27] = P, e[28] = pe) : pe = e[28], T = j.every(pe);
|
|
1199
1203
|
let Fe;
|
|
1200
|
-
e[29] !==
|
|
1204
|
+
e[29] !== P ? (Fe = (xe) => !P.has(xe), e[29] = P, e[30] = Fe) : Fe = e[30], De = j.every(Fe), e[1] = o, e[2] = c, e[3] = t, e[4] = P, e[5] = f, e[6] = C, e[7] = y, e[8] = h, e[9] = T, e[10] = _, e[11] = A, e[12] = k, e[13] = R, e[14] = $, e[15] = N, e[16] = B, e[17] = V, e[18] = j, e[19] = W, e[20] = U, e[21] = H, e[22] = ie, e[23] = De, e[24] = Y;
|
|
1201
1205
|
} else
|
|
1202
|
-
T = e[9], _ = e[10], A = e[11],
|
|
1203
|
-
const
|
|
1204
|
-
let Ce,
|
|
1206
|
+
T = e[9], _ = e[10], A = e[11], k = e[12], R = e[13], $ = e[14], N = e[15], B = e[16], V = e[17], j = e[18], W = e[19], U = e[20], H = e[21], ie = e[22], De = e[23], Y = e[24];
|
|
1207
|
+
const yt = De, Pt = N.length === 0 || m.allExpanded, vt = N.length === 0 || m.allCollapsed, ke = !U || T && Pt, Re = !U || yt && vt;
|
|
1208
|
+
let Ce, ye;
|
|
1205
1209
|
e[31] !== B || e[32] !== I || e[33] !== h ? (Ce = () => {
|
|
1206
|
-
const K = B ? B.split("\0") : [], Q =
|
|
1210
|
+
const K = B ? B.split("\0") : [], Q = ze(K, h);
|
|
1207
1211
|
I(h === "nested" ? tt(Q) : []);
|
|
1208
|
-
},
|
|
1209
|
-
let
|
|
1210
|
-
e[36] !==
|
|
1211
|
-
const K =
|
|
1212
|
+
}, ye = [B, I, h], e[31] = B, e[32] = I, e[33] = h, e[34] = Ce, e[35] = ye) : (Ce = e[34], ye = e[35]), oe(Ce, ye);
|
|
1213
|
+
let Pe, ve;
|
|
1214
|
+
e[36] !== R || e[37] !== B || e[38] !== H || e[39] !== w ? (Pe = () => {
|
|
1215
|
+
const K = R ? R.split("\0") : [], Q = B ? B.split("\0") : [];
|
|
1212
1216
|
H && K.includes(H) || w(nt(K, Q));
|
|
1213
|
-
}, ve = [
|
|
1217
|
+
}, ve = [R, B, H, w], e[36] = R, e[37] = B, e[38] = H, e[39] = w, e[40] = Pe, e[41] = ve) : (Pe = e[40], ve = e[41]), oe(Pe, ve);
|
|
1214
1218
|
let Ee;
|
|
1215
|
-
e[42] !==
|
|
1216
|
-
|
|
1217
|
-
}, e[42] =
|
|
1219
|
+
e[42] !== M || e[43] !== j ? (Ee = () => {
|
|
1220
|
+
M(j), u(Dl);
|
|
1221
|
+
}, e[42] = M, e[43] = j, e[44] = Ee) : Ee = e[44];
|
|
1218
1222
|
const Be = Ee;
|
|
1219
1223
|
let Ie;
|
|
1220
|
-
e[45] !==
|
|
1221
|
-
|
|
1222
|
-
}, e[45] =
|
|
1224
|
+
e[45] !== z ? (Ie = () => {
|
|
1225
|
+
z(), u(Cl);
|
|
1226
|
+
}, e[45] = z, e[46] = Ie) : Ie = e[46];
|
|
1223
1227
|
const Ne = Ie;
|
|
1224
1228
|
let Le;
|
|
1225
1229
|
e[47] !== $ || e[48] !== H || e[49] !== w ? (Le = (K) => {
|
|
@@ -1231,67 +1235,67 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
|
|
|
1231
1235
|
path: K
|
|
1232
1236
|
}));
|
|
1233
1237
|
}, e[47] = $, e[48] = H, e[49] = w, e[50] = Le) : Le = e[50];
|
|
1234
|
-
const He = Le, Oe =
|
|
1238
|
+
const He = Le, Oe = k.length > 0;
|
|
1235
1239
|
let se;
|
|
1236
1240
|
e[51] !== g || e[52] !== x ? (se = () => x(!g), e[51] = g, e[52] = x, e[53] = se) : se = e[53];
|
|
1237
1241
|
let re;
|
|
1238
|
-
e[54] !== Ne || e[55] !== S || e[56] !== Be || e[57] !==
|
|
1242
|
+
e[54] !== Ne || e[55] !== S || e[56] !== Be || e[57] !== Re || e[58] !== ke || e[59] !== g || e[60] !== b || e[61] !== E || e[62] !== Oe || e[63] !== se || e[64] !== h ? (re = /* @__PURE__ */ r(rl, { isTreePanelOpen: g, hasFilePaths: Oe, viewMode: h, diffViewMode: S, isExpandAllDisabled: ke, isCollapseAllDisabled: Re, onToggleTreePanel: se, onViewModeChange: E, onDiffViewModeChange: b, onExpandAll: Be, onCollapseAll: Ne }), e[54] = Ne, e[55] = S, e[56] = Be, e[57] = Re, e[58] = ke, e[59] = g, e[60] = b, e[61] = E, e[62] = Oe, e[63] = se, e[64] = h, e[65] = re) : re = e[65];
|
|
1239
1243
|
let ae;
|
|
1240
1244
|
e[66] !== A || e[67] !== ie ? (ae = ie ? /* @__PURE__ */ r(q, { textStyle: "label/S/regular", color: "fg.muted", truncate: !0, children: A }) : null, e[66] = A, e[67] = ie, e[68] = ae) : ae = e[68];
|
|
1241
1245
|
let de;
|
|
1242
|
-
e[69] !== re || e[70] !== ae ? (de = /* @__PURE__ */ G(
|
|
1246
|
+
e[69] !== re || e[70] !== ae ? (de = /* @__PURE__ */ G(Rt, { gap: "xs", minW: "0", children: [
|
|
1243
1247
|
re,
|
|
1244
1248
|
ae
|
|
1245
1249
|
] }), e[69] = re, e[70] = ae, e[71] = de) : de = e[71];
|
|
1246
|
-
let fe;
|
|
1247
|
-
e[72] !== Y.additions || e[73] !== Y.deletions ? (fe = /* @__PURE__ */ r(lt, { variant: "ghost", size: "small", additions: Y.additions, deletions: Y.deletions }), e[72] = Y.additions, e[73] = Y.deletions, e[74] = fe) : fe = e[74];
|
|
1248
1250
|
let ce;
|
|
1249
|
-
e[
|
|
1251
|
+
e[72] !== Y.additions || e[73] !== Y.deletions ? (ce = /* @__PURE__ */ r(st, { variant: "ghost", size: "small", additions: Y.additions, deletions: Y.deletions }), e[72] = Y.additions, e[73] = Y.deletions, e[74] = ce) : ce = e[74];
|
|
1252
|
+
let fe;
|
|
1253
|
+
e[75] !== de || e[76] !== ce ? (fe = /* @__PURE__ */ G(ct, { variant: "main", borderBottomWidth: "1px", borderColor: "border.subtle", bg: "bg", justifyContent: "space-between", children: [
|
|
1250
1254
|
de,
|
|
1251
|
-
|
|
1252
|
-
] }), e[75] = de, e[76] =
|
|
1255
|
+
ce
|
|
1256
|
+
] }), e[75] = de, e[76] = ce, e[77] = fe) : fe = e[77];
|
|
1253
1257
|
let he;
|
|
1254
|
-
e[78] !== p || e[79] !== S || e[80] !== A || e[81] !== N || e[82] !== W || e[83] !==
|
|
1258
|
+
e[78] !== p || e[79] !== S || e[80] !== A || e[81] !== N || e[82] !== W || e[83] !== f || e[84] !== i || e[85] !== H || e[86] !== w ? (he = f ? /* @__PURE__ */ r(xl, {}) : W ? /* @__PURE__ */ r(O, { flex: "1", minH: "0", children: /* @__PURE__ */ r(el, { diffs: N, selectedDiffPath: H, onLoadDiff: i, onSelectDiffPath: w, onExpansionStateChange: D, expansionCommand: p, diffViewMode: S }) }) : /* @__PURE__ */ r(O, { flex: "1", minH: "0", px: "md", py: "lg", display: "flex", alignItems: "center", justifyContent: "center", bg: "bg", children: /* @__PURE__ */ r(Se, { title: A }) }), e[78] = p, e[79] = S, e[80] = A, e[81] = N, e[82] = W, e[83] = f, e[84] = i, e[85] = H, e[86] = w, e[87] = he) : he = e[87];
|
|
1255
1259
|
let _e;
|
|
1256
|
-
e[88] !==
|
|
1257
|
-
|
|
1260
|
+
e[88] !== fe || e[89] !== he ? (_e = /* @__PURE__ */ G(be, { h: "full", minH: "0", minW: "0", flex: "1", bg: "bg", gap: "0", children: [
|
|
1261
|
+
fe,
|
|
1258
1262
|
he
|
|
1259
|
-
] }), e[88] =
|
|
1263
|
+
] }), e[88] = fe, e[89] = he, e[90] = _e) : _e = e[90];
|
|
1260
1264
|
const $e = _e;
|
|
1261
1265
|
let ue;
|
|
1262
|
-
e[91] !== _ || e[92] !==
|
|
1266
|
+
e[91] !== _ || e[92] !== P || e[93] !== V || e[94] !== a || e[95] !== H || e[96] !== C || e[97] !== He || e[98] !== v || e[99] !== L || e[100] !== h ? (ue = /* @__PURE__ */ r(ml, { paths: V, selectedPath: H, viewMode: h, searchQuery: C, expandedFolderIds: P, onSelectPath: He, onSearchQueryChange: v, onToggleFolder: L, resolveFileIcon: a, changeByPath: _ }), e[91] = _, e[92] = P, e[93] = V, e[94] = a, e[95] = H, e[96] = C, e[97] = He, e[98] = v, e[99] = L, e[100] = h, e[101] = ue) : ue = e[101];
|
|
1263
1267
|
const Ve = !g;
|
|
1264
1268
|
let me;
|
|
1265
1269
|
e[102] !== x ? (me = (K) => x(!K), e[102] = x, e[103] = me) : me = e[103];
|
|
1266
1270
|
let Te;
|
|
1267
|
-
return e[104] !== $e || e[105] !== ue || e[106] !== Ve || e[107] !== me ? (Te = /* @__PURE__ */ r(
|
|
1271
|
+
return e[104] !== $e || e[105] !== ue || e[106] !== Ve || e[107] !== me ? (Te = /* @__PURE__ */ r(Bt, { flex: "1", minH: "0", minW: "0", bg: "bg", gap: "0", "data-testid": "diff-viewer", children: /* @__PURE__ */ r(nn, { flex: "1", minH: "0", minW: "0", resizablePanel: ue, contentPanel: $e, collapsed: Ve, defaultSizePx: 288, minSizePx: 224, contentMinSizePx: 320, resizeLabel: "Resize file list panel", onCollapsedChange: me }) }), e[104] = $e, e[105] = ue, e[106] = Ve, e[107] = me, e[108] = Te) : Te = e[108], Te;
|
|
1268
1272
|
};
|
|
1269
|
-
function
|
|
1270
|
-
return /* @__PURE__ */ r(
|
|
1273
|
+
function wl(n) {
|
|
1274
|
+
return /* @__PURE__ */ r(at, { h: "72px", w: "full", flexShrink: "0", borderRadius: "xs" }, n);
|
|
1271
1275
|
}
|
|
1272
|
-
function
|
|
1276
|
+
function Dl(n) {
|
|
1273
1277
|
return {
|
|
1274
1278
|
action: "expand",
|
|
1275
1279
|
id: (n?.id ?? 0) + 1
|
|
1276
1280
|
};
|
|
1277
1281
|
}
|
|
1278
|
-
function
|
|
1282
|
+
function Cl(n) {
|
|
1279
1283
|
return {
|
|
1280
1284
|
action: "collapse",
|
|
1281
1285
|
id: (n?.id ?? 0) + 1
|
|
1282
1286
|
};
|
|
1283
1287
|
}
|
|
1284
1288
|
export {
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1289
|
+
Nl as CodeDiffEditor,
|
|
1290
|
+
Bl as CodeEditor,
|
|
1291
|
+
st as DiffBubble,
|
|
1292
|
+
el as DiffDrawer,
|
|
1293
|
+
Hl as DiffViewer,
|
|
1294
|
+
fl as FileChangeBadge,
|
|
1295
|
+
mn as LARGE_DIFF_LINE_THRESHOLD,
|
|
1292
1296
|
Ue as isBinaryDiffPath,
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1297
|
+
bn as isGeneratedDiffPath,
|
|
1298
|
+
ft as preloadCodeEditor,
|
|
1299
|
+
il as useDiffViewerStore
|
|
1296
1300
|
};
|
|
1297
1301
|
//# sourceMappingURL=diff.js.map
|