@dendelion/paper-camp 0.18.0 → 0.18.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.
Files changed (27) hide show
  1. package/dist/app/assets/{index-Db-zMFvA.js → index-0_VbynEu.js} +2 -2
  2. package/dist/app/assets/{index-Db-zMFvA.js.map → index-0_VbynEu.js.map} +1 -1
  3. package/dist/app/assets/{index-B_KrbzkW.js → index-Bm61MVP8.js} +2 -2
  4. package/dist/app/assets/{index-B_KrbzkW.js.map → index-Bm61MVP8.js.map} +1 -1
  5. package/dist/app/assets/index-CHYyIAaz.js +6 -0
  6. package/dist/app/assets/index-CHYyIAaz.js.map +1 -0
  7. package/dist/app/assets/{index-Dw1f2idP.js → index-DNRXB82k.js} +2 -2
  8. package/dist/app/assets/{index-Dw1f2idP.js.map → index-DNRXB82k.js.map} +1 -1
  9. package/dist/app/assets/{index-UPIRvQZS.js → index-Dz77-ZQi.js} +2 -2
  10. package/dist/app/assets/{index-UPIRvQZS.js.map → index-Dz77-ZQi.js.map} +1 -1
  11. package/dist/app/assets/{index-BiMhnqOS.js → index-NfzGv6aM.js} +2 -2
  12. package/dist/app/assets/{index-BiMhnqOS.js.map → index-NfzGv6aM.js.map} +1 -1
  13. package/dist/app/assets/{index-2KbxO2gv.js → index-pnCSf_Qk.js} +2 -2
  14. package/dist/app/assets/{index-2KbxO2gv.js.map → index-pnCSf_Qk.js.map} +1 -1
  15. package/dist/app/assets/{main-CfeIUKG-.js → main-AfQrNPNu.js} +44 -44
  16. package/dist/app/assets/main-AfQrNPNu.js.map +1 -0
  17. package/dist/app/assets/{sidebar-section-Lss_HMtQ.js → sidebar-section-AupYBPL3.js} +2 -2
  18. package/dist/app/assets/{sidebar-section-Lss_HMtQ.js.map → sidebar-section-AupYBPL3.js.map} +1 -1
  19. package/dist/app/index.html +1 -1
  20. package/dist/app/toolbar.js +2955 -2927
  21. package/dist/app/toolbar.js.map +1 -1
  22. package/dist/cli/index.js +3828 -3821
  23. package/dist/cli/index.js.map +1 -1
  24. package/package.json +1 -1
  25. package/dist/app/assets/index-DahTzD09.js +0 -6
  26. package/dist/app/assets/index-DahTzD09.js.map +0 -1
  27. package/dist/app/assets/main-CfeIUKG-.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dendelion/paper-camp",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "Local-first, AI-native project management with retro aesthetics",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.12.1",
@@ -1,6 +0,0 @@
1
- import{j as e,g as b,a as k,u as d,r as h,a1 as F,c as P,a2 as S,a3 as C,w as y,E,a4 as $,$ as A,J as v,a5 as D,a6 as I,a7 as z,p as B}from"./main-CfeIUKG-.js";function L(s){if(!s)return[];const t=(s.endsWith(`
2
- `)?s.slice(0,-1):s).split(`
3
- `),a=[];let l=null;for(const i of t){if(i.startsWith("@@ ")){l={header:i,lines:[]},a.push(l);continue}l&&(i.startsWith("+")?l.lines.push({type:"add",text:i.slice(1)}):i.startsWith("-")?l.lines.push({type:"remove",text:i.slice(1)}):l.lines.push({type:"context",text:i.startsWith(" ")?i.slice(1):i}))}return a}function R(s){return s?[{header:"",lines:(s.endsWith(`
4
- `)?s.slice(0,-1):s).split(`
5
- `).map(a=>({type:"add",text:a}))}]:[]}const W={add:"bg-watercolor-green/[18%] text-watercolor-green-dark",remove:"bg-watercolor-rose/[18%] text-watercolor-rose-dark",context:""},G={add:"+",remove:"-",context:" "},H=({additions:s,deletions:t})=>e.jsxs("span",{className:"inline-flex shrink-0 gap-2 font-mono text-2xs",children:[e.jsxs("span",{className:"text-watercolor-green-dark",children:["+",s]}),e.jsxs("span",{className:"text-watercolor-rose-dark",children:["-",t]})]}),T=({entry:s})=>e.jsxs("div",{className:"flex w-full min-w-0 items-center justify-between gap-3",children:[e.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap font-mono text-xs",children:s.renameSource?`${s.renameSource} → ${s.path}`:s.path}),e.jsxs("span",{className:"flex shrink-0 items-center gap-2",children:[s.staged&&e.jsx(b,{size:"small",children:"staged"}),!s.binary&&e.jsx(H,{additions:s.additions,deletions:s.deletions})]})]}),J=({entry:s})=>{if(s.binary)return e.jsx("p",{className:"m-0 opacity-60",children:"Binary file not shown."});if(s.contentKind==="too-large")return e.jsx("p",{className:"m-0 opacity-60",children:"File too large to preview."});const t=s.contentKind==="raw"?R(s.patch):L(s.patch);return t.length===0?s.renameSource?e.jsx("p",{className:"m-0 opacity-60",children:s.additions===0&&s.deletions===0?"Renamed, no content changes.":"Renamed with unrelated content — diff omitted."}):e.jsx("p",{className:"m-0 opacity-60",children:"No changes to preview."}):e.jsx("div",{className:"flex min-w-0 max-w-full flex-col gap-3",children:t.map((a,l)=>e.jsxs("div",{className:"min-w-0 max-w-full",children:[a.header&&e.jsx("div",{className:"mb-1 font-mono text-2xs opacity-50",children:a.header}),e.jsx("pre",{className:"m-0 min-w-0 max-w-full overflow-x-auto font-mono text-2xs",children:a.lines.map((i,o)=>e.jsxs("span",{className:`block ${W[i.type]}`,children:[G[i.type],i.text]},`${i.type}-${o}`))})]},`${a.header}-${l}`))})},M=({entry:s})=>e.jsxs("div",{"data-diff-path":s.path,className:"min-w-0 max-w-full scroll-mt-4",children:[e.jsx("div",{className:"mb-3",children:e.jsx(T,{entry:s})}),e.jsx(J,{entry:s})]}),w=()=>{const s=d(r=>r.gitAhead),t=d(r=>r.gitBranchHygiene),{pushing:a,syncing:l,pulling:i,gitActionBusy:o,handlePush:g,handleSync:u,handlePull:f}=$();return e.jsxs("div",{className:"mb-4 flex items-center gap-2",children:[e.jsx(A,{content:t==="clean-on-main"?"Already on clean main":void 0,children:e.jsx(v,{size:"small",icon:e.jsx(D,{size:14}),disabled:o||t==="clean-on-main",onClick:u,children:l?"Syncing…":"Sync to main"})}),e.jsx(v,{size:"small",icon:e.jsx(I,{size:14}),disabled:o||s===0,onClick:g,children:a?"Pushing…":s>0?`Push (${s})`:"Push"}),e.jsx(v,{size:"small",icon:e.jsx(z,{size:14}),disabled:o,onClick:f,children:i?"Pulling…":"Pull"})]})},U=()=>{const s=k(),t=d(n=>n.diffFiles),a=d(n=>n.diffLoadFailed),l=d(n=>n.loadDiffFiles),i=d(n=>n.setActiveDiffPath),o=h.useRef(null),g=h.useMemo(()=>(t==null?void 0:t.map(n=>n.path))??[],[t]),u=F(void 0,g);h.useEffect(()=>{l()},[l]),h.useEffect(()=>{const n=new EventSource(P("/api/activity/stream"));let c;n.onmessage=j=>{let x;try{x=JSON.parse(j.data)}catch{return}x.message==="changed"&&(c&&clearTimeout(c),c=setTimeout(l,250))};const m=()=>l();return window.addEventListener("focus",m),()=>{c&&clearTimeout(c),window.removeEventListener("focus",m),n.close()}},[l]),h.useEffect(()=>{const n=o.current;if(!n)return;const c=Array.from(n.querySelectorAll("[data-diff-path]"));if(c.length===0)return;const m=new Set,j=new IntersectionObserver(x=>{for(const p of x)p.isIntersecting?m.add(p.target):m.delete(p.target);const N=c.find(p=>m.has(p));N&&i(N.dataset.diffPath??null)},{rootMargin:"0px 0px -70% 0px"});for(const x of c)j.observe(x);return()=>j.disconnect()},[t,i]);const f=e.jsx("div",{className:"mb-4",children:e.jsx(E,{items:[{id:"plans",label:"Plans",onClick:()=>s({to:"/"})},{id:"git",label:"Git"}]})}),r="min-h-page";return a?e.jsxs("div",{children:[f,e.jsx(w,{}),e.jsx("div",{className:r,children:e.jsx("p",{className:"opacity-50",children:"Couldn't load the working-tree diff."})})]}):t?e.jsxs("div",{children:[f,e.jsx(w,{}),t.length===0?e.jsx("div",{className:r,children:e.jsx("p",{className:"opacity-50",children:"No changed files."})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-6 flex items-start gap-2",children:[e.jsx("div",{className:"flex-1",children:e.jsx(S,{state:u,filesEmpty:!1})}),e.jsx(C,{state:u,filesEmpty:!1})]}),e.jsx("div",{ref:o,className:`flex min-w-0 flex-col gap-6 ${r}`,children:t.map((n,c)=>e.jsxs(h.Fragment,{children:[c>0&&e.jsx(y,{}),e.jsx(M,{entry:n})]},n.path))})]})]}):e.jsxs("div",{children:[f,e.jsx(w,{}),e.jsx("div",{className:r,children:e.jsx("p",{className:"opacity-50",children:"Loading…"})})]})},q="text-2xs font-semibold tracking-[0.08em] uppercase text-ink-300 mb-2",K=({additions:s,deletions:t})=>e.jsxs("span",{className:"inline-flex gap-2 font-mono text-2xs",children:[e.jsxs("span",{className:"text-watercolor-green-dark",children:["+",s]}),e.jsxs("span",{className:"text-watercolor-rose-dark",children:["-",t]})]}),O=s=>{var t;(t=document.querySelector(`[data-diff-path="${CSS.escape(s)}"]`))==null||t.scrollIntoView({behavior:"smooth",block:"start"})},V=()=>{const s=d(a=>a.diffFiles),t=d(a=>a.activeDiffPath);return!s||s.length===0?null:e.jsx("div",{className:"flex flex-col gap-8 -mt-5",children:e.jsxs("div",{children:[e.jsx("div",{className:q,children:"Changed files"}),e.jsx("div",{className:"flex flex-col gap-1",children:s.map(a=>e.jsx(B,{size:"small",active:a.path===t,onClick:()=>O(a.path),action:e.jsxs("span",{className:"flex items-center gap-2",children:[a.staged&&e.jsx(b,{size:"small",children:"staged"}),!a.binary&&e.jsx(K,{additions:a.additions,deletions:a.deletions})]}),children:e.jsx("span",{className:"block overflow-hidden text-ellipsis whitespace-nowrap font-mono text-2xs",children:a.path})},a.path))})]})})};export{V as GitFileList,U as GitPage};
6
- //# sourceMappingURL=index-DahTzD09.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index-DahTzD09.js","sources":["../../../src/app/utils/parse-diff.ts","../../../src/app/features/git/file-diff-section.tsx","../../../src/app/features/git/git-page.tsx","../../../src/app/features/git/git-file-list.tsx"],"sourcesContent":["export type DiffLineType = 'add' | 'remove' | 'context';\n\nexport interface DiffLine {\n type: DiffLineType;\n text: string;\n}\n\nexport interface DiffHunk {\n header: string;\n lines: DiffLine[];\n}\n\n// Parses a unified diff (git.ts getWorkingDiff, contentKind: 'diff'). A real diff\n// with no hunks (pure rename, mode-only change) is just the preamble, so it yields [].\nexport function parsePatch(patch: string): DiffHunk[] {\n if (!patch) return [];\n const lines = (patch.endsWith('\\n') ? patch.slice(0, -1) : patch).split('\\n');\n\n const hunks: DiffHunk[] = [];\n let current: DiffHunk | null = null;\n for (const line of lines) {\n if (line.startsWith('@@ ')) {\n current = { header: line, lines: [] };\n hunks.push(current);\n continue;\n }\n if (!current) continue; // preamble: diff --git / index / --- / +++\n if (line.startsWith('+')) current.lines.push({ type: 'add', text: line.slice(1) });\n else if (line.startsWith('-')) current.lines.push({ type: 'remove', text: line.slice(1) });\n else current.lines.push({ type: 'context', text: line.startsWith(' ') ? line.slice(1) : line });\n }\n return hunks;\n}\n\n// Untracked files store raw content, not a diff (git.ts getWorkingDiff, contentKind:\n// 'raw') — synthesize a single all-added hunk so the renderer only has one shape to draw.\nexport function rawContentHunks(content: string): DiffHunk[] {\n if (!content) return [];\n const lines = (content.endsWith('\\n') ? content.slice(0, -1) : content).split('\\n');\n return [{ header: '', lines: lines.map((text) => ({ type: 'add', text })) }];\n}\n","import { type DiffLineType, parsePatch, rawContentHunks } from '@/app/utils/parse-diff';\nimport type { FileDiffEntry } from '@/types/index';\nimport { Stamp } from '@dendelion/paper-ui';\n\nconst LINE_CLASS: Record<DiffLineType, string> = {\n add: 'bg-watercolor-green/[18%] text-watercolor-green-dark',\n remove: 'bg-watercolor-rose/[18%] text-watercolor-rose-dark',\n context: '',\n};\n\nconst LINE_PREFIX: Record<DiffLineType, string> = { add: '+', remove: '-', context: ' ' };\n\ninterface CountBadgeProps {\n additions: number;\n deletions: number;\n}\n\nconst CountBadge = ({ additions, deletions }: CountBadgeProps) => (\n <span className=\"inline-flex shrink-0 gap-2 font-mono text-2xs\">\n <span className=\"text-watercolor-green-dark\">+{additions}</span>\n <span className=\"text-watercolor-rose-dark\">-{deletions}</span>\n </span>\n);\n\ninterface FileHeaderProps {\n entry: FileDiffEntry;\n}\n\nconst FileHeader = ({ entry }: FileHeaderProps) => (\n <div className=\"flex w-full min-w-0 items-center justify-between gap-3\">\n <span className=\"overflow-hidden text-ellipsis whitespace-nowrap font-mono text-xs\">\n {entry.renameSource ? `${entry.renameSource} → ${entry.path}` : entry.path}\n </span>\n <span className=\"flex shrink-0 items-center gap-2\">\n {entry.staged && <Stamp size=\"small\">staged</Stamp>}\n {!entry.binary && <CountBadge additions={entry.additions} deletions={entry.deletions} />}\n </span>\n </div>\n);\n\ninterface DiffBodyProps {\n entry: FileDiffEntry;\n}\n\nconst DiffBody = ({ entry }: DiffBodyProps) => {\n if (entry.binary) {\n return <p className=\"m-0 opacity-60\">Binary file not shown.</p>;\n }\n if (entry.contentKind === 'too-large') {\n return <p className=\"m-0 opacity-60\">File too large to preview.</p>;\n }\n const hunks =\n entry.contentKind === 'raw' ? rawContentHunks(entry.patch) : parsePatch(entry.patch);\n if (hunks.length === 0) {\n if (entry.renameSource) {\n return (\n <p className=\"m-0 opacity-60\">\n {entry.additions === 0 && entry.deletions === 0\n ? 'Renamed, no content changes.'\n : 'Renamed with unrelated content — diff omitted.'}\n </p>\n );\n }\n return <p className=\"m-0 opacity-60\">No changes to preview.</p>;\n }\n return (\n <div className=\"flex min-w-0 max-w-full flex-col gap-3\">\n {hunks.map((hunk, i) => (\n <div key={`${hunk.header}-${i}`} className=\"min-w-0 max-w-full\">\n {hunk.header && <div className=\"mb-1 font-mono text-2xs opacity-50\">{hunk.header}</div>}\n {/* paper-ui's CodeBlock has no per-line add/remove styling. */}\n <pre className=\"m-0 min-w-0 max-w-full overflow-x-auto font-mono text-2xs\">\n {hunk.lines.map((line, j) => (\n <span key={`${line.type}-${j}`} className={`block ${LINE_CLASS[line.type]}`}>\n {LINE_PREFIX[line.type]}\n {line.text}\n </span>\n ))}\n </pre>\n </div>\n ))}\n </div>\n );\n};\n\ninterface FileDiffSectionProps {\n entry: FileDiffEntry;\n}\n\nexport const FileDiffSection = ({ entry }: FileDiffSectionProps) => (\n <div data-diff-path={entry.path} className=\"min-w-0 max-w-full scroll-mt-4\">\n <div className=\"mb-3\">\n <FileHeader entry={entry} />\n </div>\n <DiffBody entry={entry} />\n </div>\n);\n","import { MergeIcon, PullIcon, PushIcon } from '@/app/components/icons';\nimport { FileDiffSection } from '@/app/features/git/file-diff-section';\nimport {\n DeliverCommitButton,\n DeliverCommitInputRow,\n useDeliverCommitForm,\n} from '@/app/features/plans/components/deliver-controls';\nimport { useBranchSync } from '@/app/hooks/use-branch-sync';\nimport { apiUrl } from '@/app/services/api-base';\nimport { useAppStore } from '@/app/stores/app-store';\nimport { Breadcrumb, Button, Divider, Tooltip } from '@dendelion/paper-ui';\nimport { useNavigate } from '@tanstack/react-router';\nimport { Fragment, useEffect, useMemo, useRef } from 'react';\n\nconst GitActionsRow = () => {\n const gitAhead = useAppStore((s) => s.gitAhead);\n const gitBranchHygiene = useAppStore((s) => s.gitBranchHygiene);\n const { pushing, syncing, pulling, gitActionBusy, handlePush, handleSync, handlePull } =\n useBranchSync();\n\n return (\n <div className=\"mb-4 flex items-center gap-2\">\n <Tooltip content={gitBranchHygiene === 'clean-on-main' ? 'Already on clean main' : undefined}>\n <Button\n size=\"small\"\n icon={<MergeIcon size={14} />}\n disabled={gitActionBusy || gitBranchHygiene === 'clean-on-main'}\n onClick={handleSync}\n >\n {syncing ? 'Syncing…' : 'Sync to main'}\n </Button>\n </Tooltip>\n <Button\n size=\"small\"\n icon={<PushIcon size={14} />}\n disabled={gitActionBusy || gitAhead === 0}\n onClick={handlePush}\n >\n {pushing ? 'Pushing…' : gitAhead > 0 ? `Push (${gitAhead})` : 'Push'}\n </Button>\n <Button\n size=\"small\"\n icon={<PullIcon size={14} />}\n disabled={gitActionBusy}\n onClick={handlePull}\n >\n {pulling ? 'Pulling…' : 'Pull'}\n </Button>\n </div>\n );\n};\n\nexport const GitPage = () => {\n const navigate = useNavigate();\n const files = useAppStore((s) => s.diffFiles);\n const loadFailed = useAppStore((s) => s.diffLoadFailed);\n const loadDiffFiles = useAppStore((s) => s.loadDiffFiles);\n const setActiveDiffPath = useAppStore((s) => s.setActiveDiffPath);\n const sectionsRef = useRef<HTMLDivElement>(null);\n const commitFiles = useMemo(() => files?.map((entry) => entry.path) ?? [], [files]);\n const commitForm = useDeliverCommitForm(undefined, commitFiles);\n\n useEffect(() => {\n loadDiffFiles();\n }, [loadDiffFiles]);\n\n useEffect(() => {\n const source = new EventSource(apiUrl('/api/activity/stream'));\n let timer: ReturnType<typeof setTimeout> | undefined;\n source.onmessage = (event) => {\n let payload: { message?: string };\n try {\n payload = JSON.parse(event.data);\n } catch {\n return;\n }\n if (payload.message !== 'changed') return;\n if (timer) clearTimeout(timer);\n timer = setTimeout(loadDiffFiles, 250);\n };\n const onFocus = () => loadDiffFiles();\n window.addEventListener('focus', onFocus);\n return () => {\n if (timer) clearTimeout(timer);\n window.removeEventListener('focus', onFocus);\n source.close();\n };\n }, [loadDiffFiles]);\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: files is the trigger to rebuild the observer, not a value read in the body.\n useEffect(() => {\n const root = sectionsRef.current;\n if (!root) return;\n const sections = Array.from(root.querySelectorAll<HTMLElement>('[data-diff-path]'));\n if (sections.length === 0) return;\n const visible = new Set<HTMLElement>();\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) visible.add(entry.target as HTMLElement);\n else visible.delete(entry.target as HTMLElement);\n }\n const topmost = sections.find((el) => visible.has(el));\n if (topmost) setActiveDiffPath(topmost.dataset.diffPath ?? null);\n },\n { rootMargin: '0px 0px -70% 0px' },\n );\n for (const el of sections) observer.observe(el);\n return () => observer.disconnect();\n }, [files, setActiveDiffPath]);\n\n const breadcrumb = (\n <div className=\"mb-4\">\n <Breadcrumb\n items={[\n { id: 'plans', label: 'Plans', onClick: () => navigate({ to: '/' }) },\n { id: 'git', label: 'Git' },\n ]}\n />\n </div>\n );\n\n const contentClass = 'min-h-page';\n\n if (loadFailed) {\n return (\n <div>\n {breadcrumb}\n <GitActionsRow />\n <div className={contentClass}>\n <p className=\"opacity-50\">Couldn't load the working-tree diff.</p>\n </div>\n </div>\n );\n }\n\n if (!files) {\n return (\n <div>\n {breadcrumb}\n <GitActionsRow />\n <div className={contentClass}>\n <p className=\"opacity-50\">Loading…</p>\n </div>\n </div>\n );\n }\n\n return (\n <div>\n {breadcrumb}\n <GitActionsRow />\n {files.length === 0 ? (\n <div className={contentClass}>\n <p className=\"opacity-50\">No changed files.</p>\n </div>\n ) : (\n <>\n <div className=\"mb-6 flex items-start gap-2\">\n <div className=\"flex-1\">\n <DeliverCommitInputRow state={commitForm} filesEmpty={false} />\n </div>\n <DeliverCommitButton state={commitForm} filesEmpty={false} />\n </div>\n <div ref={sectionsRef} className={`flex min-w-0 flex-col gap-6 ${contentClass}`}>\n {files.map((entry, idx) => (\n <Fragment key={entry.path}>\n {idx > 0 && <Divider />}\n <FileDiffSection entry={entry} />\n </Fragment>\n ))}\n </div>\n </>\n )}\n </div>\n );\n};\n","import { useAppStore } from '@/app/stores/app-store';\nimport { ListItem, Stamp } from '@dendelion/paper-ui';\n\nconst sectionLabelClass = 'text-2xs font-semibold tracking-[0.08em] uppercase text-ink-300 mb-2';\n\ninterface CountBadgeProps {\n additions: number;\n deletions: number;\n}\n\nconst CountBadge = ({ additions, deletions }: CountBadgeProps) => (\n <span className=\"inline-flex gap-2 font-mono text-2xs\">\n <span className=\"text-watercolor-green-dark\">+{additions}</span>\n <span className=\"text-watercolor-rose-dark\">-{deletions}</span>\n </span>\n);\n\nconst scrollToFile = (path: string) => {\n document\n .querySelector(`[data-diff-path=\"${CSS.escape(path)}\"]`)\n ?.scrollIntoView({ behavior: 'smooth', block: 'start' });\n};\n\nexport const GitFileList = () => {\n const files = useAppStore((s) => s.diffFiles);\n const activePath = useAppStore((s) => s.activeDiffPath);\n\n if (!files || files.length === 0) return null;\n\n return (\n <div className=\"flex flex-col gap-8 -mt-5\">\n <div>\n <div className={sectionLabelClass}>Changed files</div>\n <div className=\"flex flex-col gap-1\">\n {files.map((entry) => (\n <ListItem\n key={entry.path}\n size=\"small\"\n active={entry.path === activePath}\n onClick={() => scrollToFile(entry.path)}\n action={\n <span className=\"flex items-center gap-2\">\n {entry.staged && <Stamp size=\"small\">staged</Stamp>}\n {!entry.binary && (\n <CountBadge additions={entry.additions} deletions={entry.deletions} />\n )}\n </span>\n }\n >\n <span className=\"block overflow-hidden text-ellipsis whitespace-nowrap font-mono text-2xs\">\n {entry.path}\n </span>\n </ListItem>\n ))}\n </div>\n </div>\n </div>\n );\n};\n"],"names":["parsePatch","patch","lines","hunks","current","line","rawContentHunks","content","text","LINE_CLASS","LINE_PREFIX","CountBadge","additions","deletions","jsxs","FileHeader","entry","jsx","Stamp","DiffBody","hunk","i","j","FileDiffSection","GitActionsRow","gitAhead","useAppStore","s","gitBranchHygiene","pushing","syncing","pulling","gitActionBusy","handlePush","handleSync","handlePull","useBranchSync","Tooltip","Button","MergeIcon","PushIcon","PullIcon","GitPage","navigate","useNavigate","files","loadFailed","loadDiffFiles","setActiveDiffPath","sectionsRef","useRef","commitFiles","useMemo","commitForm","useDeliverCommitForm","useEffect","source","apiUrl","timer","event","payload","onFocus","root","sections","visible","observer","entries","topmost","el","breadcrumb","Breadcrumb","contentClass","Fragment","DeliverCommitInputRow","DeliverCommitButton","idx","Divider","sectionLabelClass","scrollToFile","path","_a","GitFileList","activePath","ListItem"],"mappings":"gKAcO,SAASA,EAAWC,EAA2B,CACpD,GAAI,CAACA,EAAO,MAAO,CAAA,EACnB,MAAMC,GAASD,EAAM,SAAS;AAAA,CAAI,EAAIA,EAAM,MAAM,EAAG,EAAE,EAAIA,GAAO,MAAM;AAAA,CAAI,EAEtEE,EAAoB,CAAA,EAC1B,IAAIC,EAA2B,KAC/B,UAAWC,KAAQH,EAAO,CACxB,GAAIG,EAAK,WAAW,KAAK,EAAG,CAC1BD,EAAU,CAAE,OAAQC,EAAM,MAAO,CAAA,CAAC,EAClCF,EAAM,KAAKC,CAAO,EAClB,QACF,CACKA,IACDC,EAAK,WA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