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