@pstdio/ui 0.39.0 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/{MermaidComponent-81jr28u4.js → MermaidComponent-BCiI63_G.js} +3 -3
  2. package/dist/{MermaidComponent-81jr28u4.js.map → MermaidComponent-BCiI63_G.js.map} +1 -1
  3. package/dist/chat-question-bubble-w2vMbFsS.js +68 -0
  4. package/dist/chat-question-bubble-w2vMbFsS.js.map +1 -0
  5. package/dist/chat-ui.d.ts +94 -17
  6. package/dist/chat-ui.js +2240 -1476
  7. package/dist/chat-ui.js.map +1 -1
  8. package/dist/{data-table-stats-row-CpRe_xK2.js → data-table-stats-row-EiTEONdY.js} +2 -2
  9. package/dist/{data-table-stats-row-CpRe_xK2.js.map → data-table-stats-row-EiTEONdY.js.map} +1 -1
  10. package/dist/data-table.d.ts +27 -7
  11. package/dist/data-table.js +1035 -872
  12. package/dist/data-table.js.map +1 -1
  13. package/dist/diff-bubble-DewUd_2w.js +61 -0
  14. package/dist/diff-bubble-DewUd_2w.js.map +1 -0
  15. package/dist/{diff-drawer-45rpk3aq.js → diff-drawer-BwZBOObe.js} +106 -85
  16. package/dist/diff-drawer-BwZBOObe.js.map +1 -0
  17. package/dist/diff-viewer-kOOd7C7h.js +574 -0
  18. package/dist/diff-viewer-kOOd7C7h.js.map +1 -0
  19. package/dist/diff.d.ts +11 -0
  20. package/dist/diff.js +107 -98
  21. package/dist/diff.js.map +1 -1
  22. package/dist/display-sort-control-DPxc0e5z.js +587 -0
  23. package/dist/display-sort-control-DPxc0e5z.js.map +1 -0
  24. package/dist/{workspace-badge-Brm3Xr3m.d.ts → host-storage-DP0RLj4i.d.ts} +15 -1
  25. package/dist/{index-BfFLdci8.d.ts → index-C9mywhyX.d.ts} +49 -13
  26. package/dist/index-D3UJyWWh.d.ts +501 -0
  27. package/dist/index.d.ts +38 -13
  28. package/dist/index.js +941 -908
  29. package/dist/index.js.map +1 -1
  30. package/dist/kanban-renderer.d.ts +2 -326
  31. package/dist/kanban-renderer.js +991 -610
  32. package/dist/kanban-renderer.js.map +1 -1
  33. package/dist/list-row-DM0DiIrN.js +1167 -0
  34. package/dist/list-row-DM0DiIrN.js.map +1 -0
  35. package/dist/{mermaid-renderer-DImi0fDp.js → mermaid-renderer-0PmNkOXI.js} +29 -29
  36. package/dist/mermaid-renderer-0PmNkOXI.js.map +1 -0
  37. package/dist/mermaid.js +1 -1
  38. package/dist/param-editor.js +2 -3
  39. package/dist/prism-JVIsQMoJ.js +1029 -0
  40. package/dist/prism-JVIsQMoJ.js.map +1 -0
  41. package/dist/{resource-badge-95WPVlZf.d.ts → resource-badge-nOWPqxFU.d.ts} +1 -0
  42. package/dist/rich-text-DM24VNQZ.js +10447 -0
  43. package/dist/rich-text-DM24VNQZ.js.map +1 -0
  44. package/dist/rich-text.d.ts +2 -2
  45. package/dist/rich-text.js +2 -2
  46. package/dist/style.css +1 -1
  47. package/dist/terminal.d.ts +5 -63
  48. package/dist/terminal.js +102 -122
  49. package/dist/terminal.js.map +1 -1
  50. package/dist/{theme-BsOWAIi2.js → theme-at0rtSnX.js} +441 -246
  51. package/dist/theme-at0rtSnX.js.map +1 -0
  52. package/dist/theme-kKuLN2jb.js +80 -0
  53. package/dist/theme-kKuLN2jb.js.map +1 -0
  54. package/dist/theme-preference-BV4cbJNB.js +115 -0
  55. package/dist/theme-preference-BV4cbJNB.js.map +1 -0
  56. package/dist/theme.js +3 -2
  57. package/dist/{tree-list-WhISG-cz.js → tree-list-Cqgl8mnN.js} +400 -377
  58. package/dist/tree-list-Cqgl8mnN.js.map +1 -0
  59. package/package.json +4 -4
  60. package/dist/diff-bubble-DZsarmSG.js +0 -61
  61. package/dist/diff-bubble-DZsarmSG.js.map +0 -1
  62. package/dist/diff-drawer-45rpk3aq.js.map +0 -1
  63. package/dist/diff-viewer-DJ1B5hxL.js +0 -558
  64. package/dist/diff-viewer-DJ1B5hxL.js.map +0 -1
  65. package/dist/list-row-uqD-q4gv.js +0 -1018
  66. package/dist/list-row-uqD-q4gv.js.map +0 -1
  67. package/dist/mermaid-renderer-DImi0fDp.js.map +0 -1
  68. package/dist/param-editor-BQd4AOUP.js +0 -225
  69. package/dist/param-editor-BQd4AOUP.js.map +0 -1
  70. package/dist/param-editor-field-BJ_rLUnV.js +0 -2385
  71. package/dist/param-editor-field-BJ_rLUnV.js.map +0 -1
  72. package/dist/prism-BStPsJSB.js +0 -658
  73. package/dist/prism-BStPsJSB.js.map +0 -1
  74. package/dist/rich-text-VYAmEigU.js +0 -6979
  75. package/dist/rich-text-VYAmEigU.js.map +0 -1
  76. package/dist/slider-hwHYe98I.js +0 -423
  77. package/dist/slider-hwHYe98I.js.map +0 -1
  78. package/dist/theme-BsOWAIi2.js.map +0 -1
  79. package/dist/theme-preference-pzfuK5cH.js +0 -101
  80. package/dist/theme-preference-pzfuK5cH.js.map +0 -1
  81. package/dist/tree-list-WhISG-cz.js.map +0 -1
  82. package/dist/types-DWA3enV6.d.ts +0 -182
@@ -0,0 +1,61 @@
1
+ import { Span as e } from "@chakra-ui/react";
2
+ import { c as t } from "react/compiler-runtime";
3
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
4
+ //#region src/components/diff-viewer/diff-bubble.tsx
5
+ var i = (i) => {
6
+ let a = t(20), { fileName: o, additions: s, deletions: c, additionsLabel: l, deletionsLabel: u, label: d, variant: f, size: p, onClick: m, onClickFileLink: h } = i, g = f === void 0 ? "outline" : f, _ = (p === void 0 ? "default" : p) === "small", v = _ ? "3xs" : "2xs", y = g === "outline" ? "1px solid" : "none", b = g === "outline" ? v : "2px", x = _ ? "label/S/regular" : void 0, S = m ? "pointer" : "default", C = m ? "bg.muted" : "none", w;
7
+ a[0] === C ? w = a[1] : (w = { background: C }, a[0] = C, a[1] = w);
8
+ let T;
9
+ a[2] !== o || a[3] !== h ? (T = o && /* @__PURE__ */ n(e, {
10
+ display: "inline-block",
11
+ maxW: "24ch",
12
+ truncate: !0,
13
+ mr: "xs",
14
+ title: o,
15
+ onClick: (e) => {
16
+ e.stopPropagation(), h?.();
17
+ },
18
+ cursor: h ? "pointer" : "default",
19
+ _hover: {
20
+ textDecoration: h ? "underline" : "none",
21
+ color: h ? "fg.blue-dark" : "fg.muted"
22
+ },
23
+ children: o
24
+ }), a[2] = o, a[3] = h, a[4] = T) : T = a[4];
25
+ let E = l ?? `+${s}`, D;
26
+ a[5] === E ? D = a[6] : (D = /* @__PURE__ */ n(e, {
27
+ color: "fg.success",
28
+ children: E
29
+ }), a[5] = E, a[6] = D);
30
+ let O = u ?? `-${c}`, k;
31
+ a[7] === O ? k = a[8] : (k = /* @__PURE__ */ n(e, {
32
+ color: "fg.error",
33
+ children: O
34
+ }), a[7] = O, a[8] = k);
35
+ let A;
36
+ return a[9] !== d || a[10] !== m || a[11] !== D || a[12] !== k || a[13] !== y || a[14] !== b || a[15] !== x || a[16] !== S || a[17] !== w || a[18] !== T ? (A = /* @__PURE__ */ r(e, {
37
+ display: "inline-flex",
38
+ alignItems: "center",
39
+ gap: "2xs",
40
+ border: y,
41
+ borderColor: "border.subtle",
42
+ color: "fg.muted",
43
+ paddingX: b,
44
+ paddingY: "1px",
45
+ borderRadius: "xs",
46
+ textStyle: x,
47
+ cursor: S,
48
+ onClick: m,
49
+ _hover: w,
50
+ children: [
51
+ d,
52
+ T,
53
+ D,
54
+ k
55
+ ]
56
+ }), a[9] = d, a[10] = m, a[11] = D, a[12] = k, a[13] = y, a[14] = b, a[15] = x, a[16] = S, a[17] = w, a[18] = T, a[19] = A) : A = a[19], A;
57
+ };
58
+ //#endregion
59
+ export { i as t };
60
+
61
+ //# sourceMappingURL=diff-bubble-DewUd_2w.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff-bubble-DewUd_2w.js","names":["Span","React","ComponentProps","MouseEvent","DiffBubbleProps","Omit","fileName","additions","deletions","additionsLabel","ReactNode","deletionsLabel","label","variant","size","onClick","event","HTMLSpanElement","onClickFileLink","DiffBubble","props","$","_c","t0","t1","undefined","isSmall","outlinePaddingX","t2","t3","t4","t5","t6","t7","background","t8","e","stopPropagation","textDecoration","color","t9","t10","t11","t12","t13","_c","DiffBubble","$","c","t0","t1","props","variant","isSmall","outlinePaddingX","t2","t3","t4","t5","onClick","t6","t7","t8","fileName","onClickFileLink","Span","t9","additionsLabel","additions","t10","t11","deletionsLabel","deletions","t12","t13","label"],"sources":["../src/components/diff-viewer/diff-bubble.tsx"],"sourcesContent":["import { Span } from \"@chakra-ui/react\";\nimport type React from \"react\";\nimport type { ComponentProps, MouseEvent } from \"react\";\n\ninterface DiffBubbleProps extends Omit<ComponentProps<typeof Span>, \"onClick\"> {\n fileName?: string;\n additions: number;\n deletions: number;\n additionsLabel?: React.ReactNode;\n deletionsLabel?: React.ReactNode;\n label?: React.ReactNode;\n variant?: \"outline\" | \"ghost\";\n size?: \"default\" | \"small\";\n onClick?: (event: MouseEvent<HTMLSpanElement>) => void;\n onClickFileLink?: () => void;\n}\n\nexport const DiffBubble = (props: DiffBubbleProps) => {\n const {\n fileName,\n additions,\n deletions,\n additionsLabel,\n deletionsLabel,\n label,\n variant = \"outline\",\n size = \"default\",\n onClick,\n onClickFileLink,\n } = props;\n\n const isSmall = size === \"small\";\n const outlinePaddingX = isSmall ? \"3xs\" : \"2xs\";\n\n return (\n <Span\n display=\"inline-flex\"\n alignItems=\"center\"\n gap={\"2xs\"}\n border={variant === \"outline\" ? \"1px solid\" : \"none\"}\n borderColor=\"border.subtle\"\n color=\"fg.muted\"\n paddingX={variant === \"outline\" ? outlinePaddingX : \"2px\"}\n paddingY=\"1px\"\n borderRadius=\"xs\"\n textStyle={isSmall ? \"label/S/regular\" : undefined}\n cursor={onClick ? \"pointer\" : \"default\"}\n onClick={onClick}\n _hover={{\n background: onClick ? \"bg.muted\" : \"none\",\n }}\n >\n {label}\n {fileName && (\n <Span\n display=\"inline-block\"\n maxW=\"24ch\"\n truncate\n mr=\"xs\"\n title={fileName}\n onClick={(e) => {\n e.stopPropagation();\n onClickFileLink?.();\n }}\n cursor={onClickFileLink ? \"pointer\" : \"default\"}\n _hover={{\n textDecoration: onClickFileLink ? \"underline\" : \"none\",\n color: onClickFileLink ? \"fg.blue-dark\" : \"fg.muted\",\n }}\n >\n {fileName}\n </Span>\n )}\n <Span color=\"fg.success\">{additionsLabel ?? `+${additions}`}</Span>\n <Span color=\"fg.error\">{deletionsLabel ?? `-${deletions}`}</Span>\n </Span>\n );\n};\n"],"mappings":";;;;AAiBA,IAAamB,KAAaC,MAAA;CAAA,IAAAC,IAAAC,EAAA,EAAA,GACxB,EAAAhB,aAAAC,cAAAC,cAAAC,mBAAAE,mBAAAC,UAAAC,SAAAU,GAAAT,MAAAU,GAAAT,YAAAG,uBAWIE,GAJFP,IAAAU,MAAAE,KAAAA,IAAA,YAAAF,GAMFG,KALEF,MAAAC,KAAAA,IAAA,YAAAD,OAKuB,SACzBG,IAAwBD,IAAA,QAAA,OAOZE,IAAAf,MAAY,YAAZ,cAAA,QAGEgB,IAAAhB,MAAY,YAAZc,IAAA,OAGCG,IAAAJ,IAAA,oBAAAD,KAAAA,GACHM,IAAAhB,IAAA,YAAA,WAGMiB,IAAAjB,IAAA,aAAA,QAA6BkB;CAAA,AAAAZ,EAAA,OAAAW,IAC1CC,IAAAZ,EAAA,MAFOY,IAAA,EAAAC,YACMF,EACd,GAACX,EAAA,KAAAW,GAAAX,EAAA,KAAAY;CAAA,IAAAE;CAAA,AAAAd,EAAA,OAAAf,KAAAe,EAAA,OAAAH,KAGAiB,IAAA7B,KACC,kBAAC2D,GAAD;EACU,SAAA;EACH,MAAA;EACL,UAAA;EACG,IAAA;EACI3D,OAAAA;EACE,UAAA8B,MAAA;GAEPlB,AADAkB,EAACC,gBAAiB,GAClBnB,IAAkB;EAAC;EAEb,QAAAA,IAAA,YAAA;EACA,QAAA;GAAAoB,gBACUpB,IAAA,cAAA;GAAsCqB,OAC/CrB,IAAA,iBAAA;EACT;EAECZ,UAAAA;CAhBE,CAAA,GAkBNe,EAAA,KAAAf,GAAAe,EAAA,KAAAH,GAAAG,EAAA,KAAAc,KAAAA,IAAAd,EAAA;CACyB,IAAAmB,IAAA/B,KAAA,IAAsBF,KAAWkC;CAAA,AAAApB,EAAA,OAAAmB,IAAQC,IAAApB,EAAA,MAAnEoB,IAAA,kBAACwB,GAAD;EAAY,OAAA;EAAczB,UAAAA;CAArB,CAAA,GAA8DnB,EAAA,KAAAmB,GAAAnB,EAAA,KAAAoB;CAC3C,IAAAC,IAAA/B,KAAA,IAAsBH,KAAWmC;CAAA,AAAAtB,EAAA,OAAAqB,IAAQC,IAAAtB,EAAA,MAAjEsB,IAAA,kBAACsB,GAAD;EAAY,OAAA;EAAYvB,UAAAA;CAAnB,CAAA,GAA4DrB,EAAA,KAAAqB,GAAArB,EAAA,KAAAsB;CAAA,IAAAC;CAC5D,OAD4DvB,EAAA,OAAAT,KAAAS,EAAA,QAAAN,KAAAM,EAAA,QAAAoB,KAAApB,EAAA,QAAAsB,KAAAtB,EAAA,QAAAO,KAAAP,EAAA,QAAAQ,KAAAR,EAAA,QAAAS,KAAAT,EAAA,QAAAU,KAAAV,EAAA,QAAAY,KAAAZ,EAAA,QAAAc,KAvCnES,IAAA,kBAACqB,GAAD;EACU,SAAA;EACG,YAAA;EACN,KAAA;EACG,QAAArC;EACI,aAAA;EACN,OAAA;EACI,UAAAC;EACD,UAAA;EACI,cAAA;EACF,WAAAC;EACH,QAAAC;EACChB;EACD,QAAAkB;EAbV,UAAA;GAiBGrB;GACAuB;GAoBDM;GACAE;EAvCG;KAwCEtB,EAAA,KAAAT,GAAAS,EAAA,MAAAN,GAAAM,EAAA,MAAAoB,GAAApB,EAAA,MAAAsB,GAAAtB,EAAA,MAAAO,GAAAP,EAAA,MAAAQ,GAAAR,EAAA,MAAAS,GAAAT,EAAA,MAAAU,GAAAV,EAAA,MAAAY,GAAAZ,EAAA,MAAAc,GAAAd,EAAA,MAAAuB,KAAAA,IAAAvB,EAAA,KAxCPuB;AAwCO"}
@@ -1,6 +1,6 @@
1
1
  import { n as e, t } from "./scroll-area-Cr1lNXAr.js";
2
2
  import { t as n } from "./empty-state-3mVV_pV-.js";
3
- import { t as r } from "./diff-bubble-DZsarmSG.js";
3
+ import { t as r } from "./diff-bubble-DewUd_2w.js";
4
4
  import { a as i, i as a, n as o, o as s, r as c } from "./diff-size-Dydn_Uw5.js";
5
5
  import { r as l, t as u } from "./diff-editor-CGpeyoCE.js";
6
6
  import { Box as d, Button as f, Grid as p, IconButton as m, Image as h, Skeleton as g, Stack as _, Text as v } from "@chakra-ui/react";
@@ -41,7 +41,7 @@ var M = (e) => {
41
41
  sideBySide: f === "split"
42
42
  };
43
43
  }, N = (e) => e.startsWith("data:image/") ? e : "", P = (e) => {
44
- let t = y(22), { diff: n, filePath: r, oldContent: i, newContent: a, isLargeDiff: o, hasOptedIntoLargeDiff: s, onShowFullDiff: c, diffViewMode: l } = e, f = l === void 0 ? "unified" : l, p;
44
+ let t = y(33), { diff: n, filePath: r, oldContent: i, newContent: a, isLargeDiff: o, hasOptedIntoLargeDiff: s, onShowFullDiff: c, diffViewMode: l } = e, f = l === void 0 ? "unified" : l, p;
45
45
  t[0] !== n || t[1] !== f || t[2] !== r || t[3] !== s || t[4] !== o || t[5] !== a || t[6] !== i || t[7] !== c ? (p = M({
46
46
  diff: n,
47
47
  filePath: r,
@@ -53,26 +53,39 @@ var M = (e) => {
53
53
  diffViewMode: f
54
54
  }), t[0] = n, t[1] = f, t[2] = r, t[3] = s, t[4] = o, t[5] = a, t[6] = i, t[7] = c, t[8] = p) : p = t[8];
55
55
  let m = p, h;
56
- return t[9] !== n || t[10] !== m.diffViewData || t[11] !== m.filePath || t[12] !== m.isImage || t[13] !== m.kind || t[14] !== m.newSrc || t[15] !== m.oldSrc || t[16] !== m.onShowFullDiff || t[17] !== m.renderedLineCount || t[18] !== m.sideBySide || t[19] !== a || t[20] !== i ? (h = /* @__PURE__ */ b(d, {
56
+ t[9] !== n || t[10] !== m.diffViewData || t[11] !== m.kind || t[12] !== m.sideBySide || t[13] !== a || t[14] !== i ? (h = m.kind === "editor" && /* @__PURE__ */ b(u, {
57
+ original: i,
58
+ modified: a,
59
+ oldPath: n.oldPath,
60
+ newPath: n.newPath,
61
+ sideBySide: m.sideBySide,
62
+ data: m.diffViewData
63
+ }), t[9] = n, t[10] = m.diffViewData, t[11] = m.kind, t[12] = m.sideBySide, t[13] = a, t[14] = i, t[15] = h) : h = t[15];
64
+ let g;
65
+ t[16] !== m.kind || t[17] !== m.newSrc || t[18] !== m.oldSrc ? (g = m.kind === "image" && /* @__PURE__ */ b(F, {
66
+ oldSrc: m.oldSrc,
67
+ newSrc: m.newSrc
68
+ }), t[16] = m.kind, t[17] = m.newSrc, t[18] = m.oldSrc, t[19] = g) : g = t[19];
69
+ let _;
70
+ t[20] !== m.isImage || t[21] !== m.kind ? (_ = m.kind === "binary" && /* @__PURE__ */ b(R, { isImage: m.isImage }), t[20] = m.isImage, t[21] = m.kind, t[22] = _) : _ = t[22];
71
+ let v;
72
+ t[23] !== m.filePath || t[24] !== m.kind || t[25] !== m.onShowFullDiff || t[26] !== m.renderedLineCount ? (v = m.kind === "placeholder" && /* @__PURE__ */ b(L, {
73
+ filePath: m.filePath,
74
+ renderedLineCount: m.renderedLineCount,
75
+ onShowFullDiff: m.onShowFullDiff
76
+ }), t[23] = m.filePath, t[24] = m.kind, t[25] = m.onShowFullDiff, t[26] = m.renderedLineCount, t[27] = v) : v = t[27];
77
+ let S;
78
+ return t[28] !== h || t[29] !== g || t[30] !== _ || t[31] !== v ? (S = /* @__PURE__ */ x(d, {
57
79
  bg: "bg",
58
80
  borderBottomRadius: "xs",
59
81
  overflow: "hidden",
60
- children: m.kind === "editor" ? /* @__PURE__ */ b(u, {
61
- original: i,
62
- modified: a,
63
- oldPath: n.oldPath,
64
- newPath: n.newPath,
65
- sideBySide: m.sideBySide,
66
- data: m.diffViewData
67
- }) : m.kind === "image" ? /* @__PURE__ */ b(F, {
68
- oldSrc: m.oldSrc,
69
- newSrc: m.newSrc
70
- }) : m.kind === "binary" ? /* @__PURE__ */ b(R, { isImage: m.isImage }) : /* @__PURE__ */ b(L, {
71
- filePath: m.filePath,
72
- renderedLineCount: m.renderedLineCount,
73
- onShowFullDiff: m.onShowFullDiff
74
- })
75
- }), t[9] = n, t[10] = m.diffViewData, t[11] = m.filePath, t[12] = m.isImage, t[13] = m.kind, t[14] = m.newSrc, t[15] = m.oldSrc, t[16] = m.onShowFullDiff, t[17] = m.renderedLineCount, t[18] = m.sideBySide, t[19] = a, t[20] = i, t[21] = h) : h = t[21], h;
82
+ children: [
83
+ h,
84
+ g,
85
+ _,
86
+ v
87
+ ]
88
+ }), t[28] = h, t[29] = g, t[30] = _, t[31] = v, t[32] = S) : S = t[32], S;
76
89
  }, F = (e) => {
77
90
  let t = y(8), { oldSrc: n, newSrc: r } = e, i;
78
91
  t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = {
@@ -231,7 +244,7 @@ var U = (e) => {
231
244
  actionLabel: c,
232
245
  onAction: l
233
246
  };
234
- }, ee = (e) => {
247
+ }, W = (e) => {
235
248
  let t = y(30), { diff: n, filePath: r, oldContent: i, newContent: a, isExpanded: o, isLargeDiff: s, isGeneratedDiff: c, isBinaryDiff: l, hasDiffContent: u, canLoadDiff: d, shouldAutoLoadDiff: f, loadError: p, isLoadingDiff: m, onLoadDiff: h, hasOptedIntoLargeDiff: g, onShowFullDiff: _, diffViewMode: v } = e, x = v === void 0 ? "unified" : v;
236
249
  if (!o) return null;
237
250
  if (l) {
@@ -280,13 +293,13 @@ var U = (e) => {
280
293
  onShowFullDiff: _,
281
294
  diffViewMode: x
282
295
  }), t[21] = n, t[22] = x, t[23] = r, t[24] = g, t[25] = s, t[26] = a, t[27] = i, t[28] = _, t[29] = S) : S = t[29], S;
283
- }, te = (e) => {
296
+ }, G = (e) => {
284
297
  let { isExpanded: t, isSelected: n, hasDiffContent: r, isLargeDiff: i, isGeneratedDiff: a, isBinaryDiff: o, requestedPath: s, filePath: c } = e;
285
298
  return t && n && !r && !i && !a && !o && s !== c;
286
- }, W = (e) => {
299
+ }, ee = (e) => {
287
300
  let { requestedPath: t, filePath: n, hasDiffContent: r } = e;
288
301
  return t === n && r ? null : t;
289
- }, ne = (e) => !i(e), re = (e) => e.newPath || e.oldPath || "unknown", ie = (e) => {
302
+ }, te = (e) => !i(e), ne = (e) => e.newPath || e.oldPath || "unknown", re = (e) => {
290
303
  let { filePath: t, isExpanded: n, isSelected: r, hasDiffContent: i, isLargeDiff: a, isGeneratedDiff: o, isBinaryDiff: s, onLoadDiff: c } = e, [l, u] = T(!1), [d, f] = T(null), [p, m] = T(!1), h = async () => {
291
304
  if (c && !l) {
292
305
  f(t), m(!1), u(!0);
@@ -298,7 +311,7 @@ var U = (e) => {
298
311
  u(!1);
299
312
  }
300
313
  }
301
- }, g = te({
314
+ }, g = G({
302
315
  isExpanded: n,
303
316
  isSelected: r,
304
317
  hasDiffContent: i,
@@ -309,7 +322,7 @@ var U = (e) => {
309
322
  filePath: t
310
323
  });
311
324
  return S(() => {
312
- f((e) => W({
325
+ f((e) => ee({
313
326
  requestedPath: e,
314
327
  filePath: t,
315
328
  hasDiffContent: i
@@ -322,9 +335,9 @@ var U = (e) => {
322
335
  shouldAutoLoadDiff: !!c && g && !p,
323
336
  loadDiff: h
324
337
  };
325
- }, ae = (e) => {
338
+ }, ie = (e) => {
326
339
  let t = y(44), { diff: n, isSelected: r, isExpanded: o, onToggleExpanded: l, onSelect: u, onLoadDiff: f, hasOptedIntoLargeDiff: p, onShowFullDiff: m, diffViewMode: h } = e, g = r !== void 0 && r, _ = o === void 0 || o, v = p !== void 0 && p, S = h === void 0 ? "unified" : h, C, w, T, E, D, O;
327
- t[0] === n ? (C = t[1], w = t[2], T = t[3], E = t[4], D = t[5], O = t[6]) : (C = re(n), D = n.oldContent || "", E = n.newContent || "", T = s(n), w = a(C), O = c(C) && !i(C), t[0] = n, t[1] = C, t[2] = w, t[3] = T, t[4] = E, t[5] = D, t[6] = O);
340
+ t[0] === n ? (C = t[1], w = t[2], T = t[3], E = t[4], D = t[5], O = t[6]) : (C = ne(n), D = n.oldContent || "", E = n.newContent || "", T = s(n), w = a(C), O = c(C) && !i(C), t[0] = n, t[1] = C, t[2] = w, t[3] = T, t[4] = E, t[5] = D, t[6] = O);
328
341
  let k = O, A = n.oldContent !== void 0 || n.newContent !== void 0, j = T && !v, M;
329
342
  t[7] !== k || t[8] !== C || t[9] !== A || t[10] !== _ || t[11] !== w || t[12] !== g || t[13] !== f || t[14] !== j ? (M = {
330
343
  filePath: C,
@@ -336,16 +349,16 @@ var U = (e) => {
336
349
  isBinaryDiff: k,
337
350
  onLoadDiff: f
338
351
  }, t[7] = k, t[8] = C, t[9] = A, t[10] = _, t[11] = w, t[12] = g, t[13] = f, t[14] = j, t[15] = M) : M = t[15];
339
- let { isLoadingDiff: N, loadError: P, shouldAutoLoadDiff: F, loadDiff: I } = ie(M), L = g ? "border.accent" : "border.subtle", R;
352
+ let { isLoadingDiff: N, loadError: P, shouldAutoLoadDiff: F, loadDiff: I } = re(M), L = g ? "border.accent" : "border.subtle", R;
340
353
  t[16] === Symbol.for("react.memo_cache_sentinel") ? (R = { borderColor: "border.accent" }, t[16] = R) : R = t[16];
341
354
  let z;
342
- t[17] !== n || t[18] !== _ || t[19] !== l ? (z = /* @__PURE__ */ b(G, {
355
+ t[17] !== n || t[18] !== _ || t[19] !== l ? (z = /* @__PURE__ */ b(ae, {
343
356
  diff: n,
344
357
  isExpanded: _,
345
358
  onToggleExpanded: l
346
359
  }), t[17] = n, t[18] = _, t[19] = l, t[20] = z) : z = t[20];
347
360
  let B = !!f, V;
348
- t[21] !== k || t[22] !== n || t[23] !== S || t[24] !== C || t[25] !== A || t[26] !== v || t[27] !== _ || t[28] !== w || t[29] !== T || t[30] !== N || t[31] !== I || t[32] !== P || t[33] !== E || t[34] !== D || t[35] !== m || t[36] !== F || t[37] !== B ? (V = /* @__PURE__ */ b(ee, {
361
+ t[21] !== k || t[22] !== n || t[23] !== S || t[24] !== C || t[25] !== A || t[26] !== v || t[27] !== _ || t[28] !== w || t[29] !== T || t[30] !== N || t[31] !== I || t[32] !== P || t[33] !== E || t[34] !== D || t[35] !== m || t[36] !== F || t[37] !== B ? (V = /* @__PURE__ */ b(W, {
349
362
  diff: n,
350
363
  filePath: C,
351
364
  oldContent: D,
@@ -379,9 +392,9 @@ var U = (e) => {
379
392
  onClick: u,
380
393
  children: [z, V]
381
394
  }), t[39] = u, t[40] = V, t[41] = L, t[42] = z, t[43] = H) : H = t[43], H;
382
- }, G = (t) => {
383
- let n = y(58), { diff: i, isExpanded: a, onToggleExpanded: o } = t, s = a === void 0 || a, c, l, u, f;
384
- n[0] === i ? (c = n[1], l = n[2], u = n[3], f = n[4]) : (u = re(i), c = i.additions ?? 0, l = i.deletions ?? 0, f = ne(u), n[0] = i, n[1] = c, n[2] = l, n[3] = u, n[4] = f);
395
+ }, ae = (t) => {
396
+ let n = y(65), { diff: i, isExpanded: a, onToggleExpanded: o } = t, s = a === void 0 || a, c, l, u, f;
397
+ n[0] === i ? (c = n[1], l = n[2], u = n[3], f = n[4]) : (u = ne(i), c = i.additions ?? 0, l = i.deletions ?? 0, f = te(u), n[0] = i, n[1] = c, n[2] = l, n[3] = u, n[4] = f);
385
398
  let h = f, [g, _] = T(!1), C = w(null), A, j;
386
399
  n[5] === Symbol.for("react.memo_cache_sentinel") ? (A = () => () => {
387
400
  C.current !== null && window.clearTimeout(C.current);
@@ -414,7 +427,7 @@ var U = (e) => {
414
427
  children: B
415
428
  }), n[16] = z, n[17] = B, n[18] = R, n[19] = V) : V = n[19];
416
429
  let H;
417
- n[20] !== i.change || n[21] !== i.newPath || n[22] !== i.oldPath || n[23] !== u ? (H = i.change === "renamed" ? /* @__PURE__ */ x(v, {
430
+ n[20] !== i.change || n[21] !== i.newPath || n[22] !== i.oldPath ? (H = i.change === "renamed" && /* @__PURE__ */ x(v, {
418
431
  as: "span",
419
432
  textStyle: "sm",
420
433
  children: [
@@ -435,79 +448,87 @@ var U = (e) => {
435
448
  }),
436
449
  i.newPath
437
450
  ]
438
- }) : i.change === "deleted" ? /* @__PURE__ */ b(v, {
451
+ }), n[20] = i.change, n[21] = i.newPath, n[22] = i.oldPath, n[23] = H) : H = n[23];
452
+ let U;
453
+ n[24] !== i.change || n[25] !== u ? (U = i.change === "deleted" && /* @__PURE__ */ b(v, {
439
454
  as: "span",
440
455
  color: "fg.muted",
441
456
  textDecoration: "line-through",
442
457
  textStyle: "sm",
443
458
  children: u
444
- }) : /* @__PURE__ */ b(v, {
459
+ }), n[24] = i.change, n[25] = u, n[26] = U) : U = n[26];
460
+ let W;
461
+ n[27] !== i.change || n[28] !== u ? (W = i.change !== "renamed" && i.change !== "deleted" && /* @__PURE__ */ b(v, {
445
462
  as: "span",
446
463
  textStyle: "sm",
447
464
  children: u
448
- }), n[20] = i.change, n[21] = i.newPath, n[22] = i.oldPath, n[23] = u, n[24] = H) : H = n[24];
449
- let U;
450
- n[25] !== u || n[26] !== H ? (U = /* @__PURE__ */ b(d, {
465
+ }), n[27] = i.change, n[28] = u, n[29] = W) : W = n[29];
466
+ let G;
467
+ n[30] !== u || n[31] !== H || n[32] !== U || n[33] !== W ? (G = /* @__PURE__ */ x(d, {
451
468
  minW: 0,
452
469
  overflow: "hidden",
453
470
  textOverflow: "ellipsis",
454
471
  whiteSpace: "nowrap",
455
472
  title: u,
456
- children: H
457
- }), n[25] = u, n[26] = H, n[27] = U) : U = n[27];
458
- let ee = g ? "1" : "0", te = g ? "auto" : "none", W;
459
- n[28] === Symbol.for("react.memo_cache_sentinel") ? (W = { "[data-testid='diff-card-header']:hover &, [data-testid='diff-card-header']:focus-within &": {
473
+ children: [
474
+ H,
475
+ U,
476
+ W
477
+ ]
478
+ }), n[30] = u, n[31] = H, n[32] = U, n[33] = W, n[34] = G) : G = n[34];
479
+ let ee = g ? "1" : "0", re = g ? "auto" : "none", ie;
480
+ n[35] === Symbol.for("react.memo_cache_sentinel") ? (ie = { "[data-testid='diff-card-header']:hover &, [data-testid='diff-card-header']:focus-within &": {
460
481
  opacity: 1,
461
482
  pointerEvents: "auto"
462
- } }, n[28] = W) : W = n[28];
463
- let ie = g ? "Copied" : "Copy file path", ae = g ? "Copied" : "Copy file path", G;
464
- n[29] === N ? G = n[30] : (G = (e) => {
483
+ } }, n[35] = ie) : ie = n[35];
484
+ let ae = g ? "Copied" : "Copy file path", oe = g ? "Copied" : "Copy file path", K;
485
+ n[36] === N ? K = n[37] : (K = (e) => {
465
486
  e.stopPropagation(), N();
466
- }, n[29] = N, n[30] = G);
467
- let K;
468
- n[31] === g ? K = n[32] : (K = b(g ? E : k, { size: 12 }), n[31] = g, n[32] = K);
487
+ }, n[36] = N, n[37] = K);
469
488
  let q;
470
- n[33] !== ae || n[34] !== G || n[35] !== K ? (q = /* @__PURE__ */ b(m, {
471
- "aria-label": ae,
489
+ n[38] === g ? q = n[39] : (q = b(g ? E : k, { size: 12 }), n[38] = g, n[39] = q);
490
+ let J;
491
+ n[40] !== oe || n[41] !== K || n[42] !== q ? (J = /* @__PURE__ */ b(m, {
492
+ "aria-label": oe,
472
493
  variant: "ghost",
473
494
  size: "2xs",
474
- onClick: G,
495
+ onClick: K,
475
496
  flexShrink: 0,
476
- children: K
477
- }), n[33] = ae, n[34] = G, n[35] = K, n[36] = q) : q = n[36];
478
- let J;
479
- n[37] !== ie || n[38] !== q ? (J = /* @__PURE__ */ b(e, {
480
- content: ie,
481
497
  children: q
482
- }), n[37] = ie, n[38] = q, n[39] = J) : J = n[39];
498
+ }), n[40] = oe, n[41] = K, n[42] = q, n[43] = J) : J = n[43];
483
499
  let Y;
484
- n[40] !== ee || n[41] !== te || n[42] !== J ? (Y = /* @__PURE__ */ b(d, {
485
- opacity: ee,
486
- pointerEvents: te,
487
- transition: "opacity 120ms ease",
488
- css: W,
500
+ n[44] !== ae || n[45] !== J ? (Y = /* @__PURE__ */ b(e, {
501
+ content: ae,
489
502
  children: J
490
- }), n[40] = ee, n[41] = te, n[42] = J, n[43] = Y) : Y = n[43];
503
+ }), n[44] = ae, n[45] = J, n[46] = Y) : Y = n[46];
491
504
  let X;
492
- n[44] !== U || n[45] !== Y ? (X = /* @__PURE__ */ x(p, {
505
+ n[47] !== ee || n[48] !== re || n[49] !== Y ? (X = /* @__PURE__ */ b(d, {
506
+ opacity: ee,
507
+ pointerEvents: re,
508
+ transition: "opacity 120ms ease",
509
+ css: ie,
510
+ children: Y
511
+ }), n[47] = ee, n[48] = re, n[49] = Y, n[50] = X) : X = n[50];
512
+ let Z;
513
+ n[51] !== G || n[52] !== X ? (Z = /* @__PURE__ */ x(p, {
493
514
  templateColumns: "minmax(0, max-content) auto",
494
515
  alignItems: "center",
495
516
  justifyContent: "start",
496
517
  gap: "2xs",
497
518
  minW: 0,
498
- children: [U, Y]
499
- }), n[44] = U, n[45] = Y, n[46] = X) : X = n[46];
500
- let Z;
501
- n[47] !== c || n[48] !== l || n[49] !== h ? (Z = h ? /* @__PURE__ */ b(d, {
519
+ children: [G, X]
520
+ }), n[51] = G, n[52] = X, n[53] = Z) : Z = n[53];
521
+ let Q;
522
+ n[54] !== c || n[55] !== l || n[56] !== h ? (Q = h ? /* @__PURE__ */ b(d, {
502
523
  flexShrink: 0,
503
524
  children: /* @__PURE__ */ b(r, {
504
525
  variant: "ghost",
505
526
  additions: c,
506
527
  deletions: l
507
528
  })
508
- }) : null, n[47] = c, n[48] = l, n[49] = h, n[50] = Z) : Z = n[50];
509
- let Q;
510
- return n[51] !== V || n[52] !== X || n[53] !== Z || n[54] !== P || n[55] !== F || n[56] !== L ? (Q = /* @__PURE__ */ x(p, {
529
+ }) : null, n[54] = c, n[55] = l, n[56] = h, n[57] = Q) : Q = n[57];
530
+ let se;
531
+ return n[58] !== V || n[59] !== Z || n[60] !== Q || n[61] !== P || n[62] !== F || n[63] !== L ? (se = /* @__PURE__ */ x(p, {
511
532
  "data-testid": "diff-card-header",
512
533
  templateColumns: "auto minmax(0, 1fr) auto",
513
534
  px: "xs",
@@ -529,11 +550,11 @@ var U = (e) => {
529
550
  gap: "sm",
530
551
  children: [
531
552
  V,
532
- X,
533
- Z
553
+ Z,
554
+ Q
534
555
  ]
535
- }), n[51] = V, n[52] = X, n[53] = Z, n[54] = P, n[55] = F, n[56] = L, n[57] = Q) : Q = n[57], Q;
536
- }, K = () => {
556
+ }), n[58] = V, n[59] = Z, n[60] = Q, n[61] = P, n[62] = F, n[63] = L, n[64] = se) : se = n[64], se;
557
+ }, oe = () => {
537
558
  let e = y(1), r;
538
559
  return e[0] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ b(_, {
539
560
  h: "full",
@@ -554,20 +575,20 @@ var U = (e) => {
554
575
  })
555
576
  })
556
577
  }), e[0] = r) : r = e[0], r;
557
- }, q = 34, J = 18, Y = 28, X = 8, Z = () => 130, Q = (e) => {
578
+ }, K = 34, q = 18, J = 28, Y = 8, X = () => 130, Z = (e) => {
558
579
  let { diff: t, isCollapsed: n, hasOptedIntoLargeDiff: r = !1, diffViewMode: a = "unified" } = e;
559
580
  if (n) return 42;
560
581
  let o = t.oldContent !== void 0 || t.newContent !== void 0, u = t.newPath ?? t.oldPath ?? "";
561
582
  if (i(u) && (t.oldContent || t.newContent)) return 380;
562
- if (c(u) || !o || s(t) && !r) return Z();
583
+ if (c(u) || !o || s(t) && !r) return X();
563
584
  let { unifiedContentRows: d, splitContentRows: f, hunkRows: p } = l({
564
585
  original: t.oldContent ?? "",
565
586
  modified: t.newContent ?? "",
566
587
  oldPath: t.oldPath,
567
588
  newPath: t.newPath
568
589
  }), m = a === "split" ? f : d;
569
- return m === 0 && p === 0 ? Z() : q + (m * J + p * Y) + X;
570
- }, oe = (e) => e.newPath ?? e.oldPath ?? "unknown", se = 24, ce = (e) => {
590
+ return m === 0 && p === 0 ? X() : K + (m * q + p * J) + Y;
591
+ }, Q = (e) => e.newPath ?? e.oldPath ?? "unknown", se = 24, ce = (e) => {
571
592
  let { diffs: t, selectedDiffPath: n, collapsedPaths: r, expansionCommand: i, completedScrollCommandId: a } = e, o = n, s = n ? `selected:${n}` : null, c = i?.action === "expand-selected" ? i.id : null, l = c !== null && a === c;
572
593
  i?.action === "expand-selected" && i.path && (o = i.path, s = `command:${i.id}:${i.path}`);
573
594
  let u = s;
@@ -575,7 +596,7 @@ var U = (e) => {
575
596
  let e = r.has(o) ? "collapsed" : "expanded";
576
597
  u = `${s}:${e}`;
577
598
  }
578
- let d = o ? t.findIndex((e) => oe(e) === o) : -1, f = d >= 0 && i?.action === "expand-selected" && i.direction === "up" && !l;
599
+ let d = o ? t.findIndex((e) => Q(e) === o) : -1, f = d >= 0 && i?.action === "expand-selected" && i.direction === "up" && !l;
579
600
  return {
580
601
  selectedScrollPath: o,
581
602
  selectedScrollKey: u,
@@ -674,7 +695,7 @@ function xe(e) {
674
695
  getScrollElement: () => l.current,
675
696
  estimateSize: (e) => {
676
697
  let t = n[e], r = $(t);
677
- return Q({
698
+ return Z({
678
699
  diff: t,
679
700
  isCollapsed: h.has(r),
680
701
  hasOptedIntoLargeDiff: v.has(r),
@@ -713,7 +734,7 @@ function xe(e) {
713
734
  h,
714
735
  n,
715
736
  o
716
- ]), n.length === 0) return /* @__PURE__ */ b(K, {});
737
+ ]), n.length === 0) return /* @__PURE__ */ b(oe, {});
717
738
  let O = (e) => {
718
739
  g((t) => ve(t, e));
719
740
  }, k = (e) => {
@@ -752,7 +773,7 @@ function xe(e) {
752
773
  width: "100%",
753
774
  pb: "xs",
754
775
  style: { top: `${e.start}px` },
755
- children: /* @__PURE__ */ b(ae, {
776
+ children: /* @__PURE__ */ b(ie, {
756
777
  diff: t,
757
778
  isSelected: r === o,
758
779
  isExpanded: !h.has(o),
@@ -773,4 +794,4 @@ function xe(e) {
773
794
  //#endregion
774
795
  export { xe as DiffDrawer };
775
796
 
776
- //# sourceMappingURL=diff-drawer-45rpk3aq.js.map
797
+ //# sourceMappingURL=diff-drawer-BwZBOObe.js.map