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