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