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