@tom2012/cc-web 1.5.43 → 1.5.44
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/README.md +1 -1
- package/frontend/dist/assets/{ChatView-BdMCvRde.js → ChatView-D6ueT069.js} +1 -1
- package/frontend/dist/assets/{GraphPreview-D-s0oDaH.js → GraphPreview-B1a0da7R.js} +1 -1
- package/frontend/dist/assets/{OfficePreview-Bc3VbeK3.js → OfficePreview-CjkLd1i7.js} +3 -3
- package/frontend/dist/assets/{ProjectPage-BN_FRfFU.js → ProjectPage-hof1YKWe.js} +4 -4
- package/frontend/dist/assets/{SettingsPage-BXHs7CzQ.js → SettingsPage-CnUWUu-3.js} +1 -1
- package/frontend/dist/assets/{SkillHubPage-BbdcHgdn.js → SkillHubPage-CMnjoU1a.js} +1 -1
- package/frontend/dist/assets/{chevron-down-cL1veBn_.js → chevron-down-Dkv3pYkA.js} +1 -1
- package/frontend/dist/assets/{index-B8LinJ0F.js → index-0WSh5alt.js} +1 -1
- package/frontend/dist/assets/index-BWy75gf0.css +1 -0
- package/frontend/dist/assets/{index-JDBiQrHY.js → index-ENoYwr63.js} +2 -2
- package/frontend/dist/assets/{jszip.min-CRTaTaI5.js → jszip.min-jEdfP_HB.js} +1 -1
- package/frontend/dist/assets/{select-Bg4UM8ER.js → select-C3IR_c32.js} +1 -1
- package/frontend/dist/assets/{user-bSFixhhj.js → user-DFI3Dlfq.js} +1 -1
- package/frontend/dist/index.html +2 -2
- package/package.json +1 -1
- package/frontend/dist/assets/index-CKhjWK5m.css +0 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A self-hosted web application (distributed as npm package) that provides a browser-based interface for [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI sessions. Create projects, each with a persistent terminal running Claude Code, and interact with them through a real-time terminal UI.
|
|
4
4
|
|
|
5
|
-
**Current version**: v1.5.
|
|
5
|
+
**Current version**: v1.5.44 | [GitHub](https://github.com/zbc0315/cc-web) | MIT License
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as g,r as l,j as e,o as p,e as m,C as v,A as N}from"./index-
|
|
1
|
+
import{c as g,r as l,j as e,o as p,e as m,C as v,A as N}from"./index-ENoYwr63.js";import{S as C,M,r as R,B as S}from"./ProjectPage-hof1YKWe.js";import"./select-C3IR_c32.js";import"./chevron-down-Dkv3pYkA.js";import"./user-DFI3Dlfq.js";/**
|
|
2
2
|
* @license lucide-react v0.309.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as je,r as C,d as De,j as y,K as q,l as he}from"./index-
|
|
1
|
+
import{c as je,r as C,d as De,j as y,K as q,l as he}from"./index-ENoYwr63.js";import{L as Ye,Z as Pe,a as Be}from"./ProjectPage-hof1YKWe.js";import"./select-C3IR_c32.js";import"./chevron-down-Dkv3pYkA.js";import"./user-DFI3Dlfq.js";/**
|
|
2
2
|
* @license lucide-react v0.309.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{j as e,r as c,_ as m,b as y,h as S}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-0WSh5alt.js","assets/index-ENoYwr63.js","assets/index-BWy75gf0.css","assets/jszip.min-jEdfP_HB.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as e,r as c,_ as m,b as y,h as S}from"./index-ENoYwr63.js";async function h(a){let l=S(a);const s=y();s&&(l+=`${l.includes("?")?"&":"?"}token=${encodeURIComponent(s)}`);const d=await fetch(l);if(!d.ok)throw new Error(`Failed to fetch file: ${d.status}`);return d.arrayBuffer()}function j({filePath:a,zoom:l}){const[s,d]=c.useState(""),[x,n]=c.useState(null),[u,i]=c.useState(!0);return c.useEffect(()=>{let t=!1;return i(!0),n(null),(async()=>{try{const r=await m(()=>import("./index-0WSh5alt.js").then(f=>f.i),__vite__mapDeps([0,1,2,3])),o=await h(a),p=await r.convertToHtml({arrayBuffer:o});t||d(p.value)}catch(r){t||n(r instanceof Error?r.message:"Failed to render docx")}finally{t||i(!1)}})(),()=>{t=!0}},[a]),u?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 Word 文档中..."}):x?e.jsx("p",{className:"text-sm text-destructive p-4",children:x}):e.jsx("div",{className:"p-6 prose dark:prose-invert max-w-none",style:{fontSize:`${12*l/100}px`},dangerouslySetInnerHTML:{__html:s}})}function _({filePath:a,zoom:l}){var o;const[s,d]=c.useState([]),[x,n]=c.useState(0),[u,i]=c.useState(null),[t,r]=c.useState(!0);return c.useEffect(()=>{let p=!1;return r(!0),i(null),(async()=>{try{const f=await m(()=>import("./xlsx-D_0l8YDs.js"),[]),v=await h(a),g=f.read(v,{type:"array"}),b=g.SheetNames.map(w=>({name:w,html:f.utils.sheet_to_html(g.Sheets[w],{editable:!1})}));p||(d(b),n(0))}catch(f){p||i(f instanceof Error?f.message:"Failed to render xlsx")}finally{p||r(!1)}})(),()=>{p=!0}},[a]),t?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 Excel 文件中..."}):u?e.jsx("p",{className:"text-sm text-destructive p-4",children:u}):s.length===0?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"空文件"}):e.jsxs("div",{className:"flex flex-col h-full",children:[s.length>1&&e.jsx("div",{className:"flex gap-0.5 px-3 py-1.5 border-b border-border bg-muted/30 flex-shrink-0 overflow-x-auto",children:s.map((p,f)=>e.jsx("button",{onClick:()=>n(f),className:`px-3 py-1 text-xs rounded-t transition-colors whitespace-nowrap ${f===x?"bg-background text-foreground border border-b-0 border-border":"text-muted-foreground hover:text-foreground"}`,children:p.name},f))}),e.jsx("div",{className:"flex-1 overflow-auto p-2 xlsx-preview",style:{fontSize:`${12*l/100}px`},dangerouslySetInnerHTML:{__html:((o=s[x])==null?void 0:o.html)??""}}),e.jsx("style",{children:`
|
|
3
3
|
.xlsx-preview table { border-collapse: collapse; width: auto; min-width: 100%; }
|
|
4
4
|
.xlsx-preview td, .xlsx-preview th {
|
|
5
5
|
border: 1px solid hsl(var(--border));
|
|
@@ -10,4 +10,4 @@ import{j as e,r as c,_ as m,b as y,h as S}from"./index-JDBiQrHY.js";async functi
|
|
|
10
10
|
}
|
|
11
11
|
.xlsx-preview th { background: hsl(var(--muted)); font-weight: 600; }
|
|
12
12
|
.xlsx-preview tr:hover td { background: hsl(var(--accent) / 0.3); }
|
|
13
|
-
`})]})}async function E(a){const{default:l}=await m(async()=>{const{default:n}=await import("./jszip.min-
|
|
13
|
+
`})]})}async function E(a){const{default:l}=await m(async()=>{const{default:n}=await import("./jszip.min-jEdfP_HB.js").then(u=>u.j);return{default:n}},__vite__mapDeps([3,1,2])),s=await l.loadAsync(a),d=[],x=Object.keys(s.files).filter(n=>/^ppt\/slides\/slide\d+\.xml$/i.test(n)).sort((n,u)=>{var r,o;const i=parseInt(((r=n.match(/slide(\d+)/))==null?void 0:r[1])??"0"),t=parseInt(((o=u.match(/slide(\d+)/))==null?void 0:o[1])??"0");return i-t});for(let n=0;n<x.length;n++){const u=await s.file(x[n]).async("text"),i=[],t=/<a:t[^>]*>([\s\S]*?)<\/a:t>/g;let r;for(;(r=t.exec(u))!==null;){const o=r[1].replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').trim();o&&i.push(o)}d.push({index:n+1,texts:i})}return d}function N({filePath:a,zoom:l}){const[s,d]=c.useState([]),[x,n]=c.useState(null),[u,i]=c.useState(!0);return c.useEffect(()=>{let t=!1;return i(!0),n(null),(async()=>{try{const r=await h(a),o=await E(r);t||d(o)}catch(r){t||n(r instanceof Error?r.message:"Failed to render pptx")}finally{t||i(!1)}})(),()=>{t=!0}},[a]),u?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"加载 PPT 文件中..."}):x?e.jsx("p",{className:"text-sm text-destructive p-4",children:x}):s.length===0?e.jsx("p",{className:"text-sm text-muted-foreground p-4",children:"空文件"}):e.jsx("div",{className:"p-4 space-y-4",style:{fontSize:`${12*l/100}px`},children:s.map(t=>e.jsxs("div",{className:"border border-border rounded-lg p-5 bg-muted/20",children:[e.jsxs("div",{className:"text-xs text-muted-foreground mb-2 font-medium",children:["Slide ",t.index]}),t.texts.length>0?e.jsx("div",{className:"space-y-1.5",children:t.texts.map((r,o)=>e.jsx("p",{className:"text-foreground leading-relaxed",style:{fontSize:"inherit"},children:r},o))}):e.jsx("p",{className:"text-muted-foreground text-sm italic",children:"(无文本内容)"})]},t.index))})}const I=new Set(["docx","xlsx","xls","pptx"]);function L({filePath:a,ext:l,zoom:s}){return l==="docx"?e.jsx(j,{filePath:a,zoom:s}):l==="xlsx"||l==="xls"?e.jsx(_,{filePath:a,zoom:s}):l==="pptx"?e.jsx(N,{filePath:a,zoom:s}):null}export{I as OFFICE_EXTS,L as OfficePreview};
|