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