@evandu/super-pi 0.1.284 → 0.1.285
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/.super-pi-check-inputs.json +2 -2
- package/dist/client/.super-pi-client-sources.json +3 -3
- package/dist/client/assets/{CodeMirrorEditor-6_hCAYhn.js → CodeMirrorEditor-zoNEpI2I.js} +1 -1
- package/dist/client/assets/{GitDiffEditor-VvD8axSx.js → GitDiffEditor-B8XFlAKh.js} +1 -1
- package/dist/client/assets/{index-IafH0r-m.js → index-l_Knh78R.js} +23 -23
- package/dist/client/index.html +1 -1
- package/dist/server/explicit-file-open.js +4 -6
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"hash": "
|
|
2
|
+
"hash": "f2140569ccb10cd9232bf4bc2c48fa707a7e5413dd4ebe6a6ea7116671590f71",
|
|
3
3
|
"files": {
|
|
4
4
|
"src/client/AnchoredPopover.tsx": "3d683cc9e4305678141c83987a37a36b3da30e20d7bd17ea8e48a72504475605",
|
|
5
5
|
"src/client/App.tsx": "0c9530e4a13fdf06cd90efc023d3255d6d7eb8c466e7c3ba6bd7d3ab5972c1e9",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"src/client/FeishuPanel.tsx": "3b3257da36bf863e004a33a4c1d721db364b4449fb23f0805cb74b973a2ed2da",
|
|
13
13
|
"src/client/FileMentionMenu.tsx": "d400e7afb31008eda49d4b531eceda65a926b877177d0cffd9a8056b55161c3e",
|
|
14
14
|
"src/client/FileWorkbenchChrome.tsx": "0863c988bdc50962e3dab365e918ad6de6aee7cc2d0d4d3cce049fa3529d2b6b",
|
|
15
|
-
"src/client/FilesPanel.tsx": "
|
|
15
|
+
"src/client/FilesPanel.tsx": "673c13f96e21d09c12ecc8a445d9756167270e52bcb49e6321bdfc8b8144d195",
|
|
16
16
|
"src/client/GitDiffEditor.tsx": "777fca5c7bf710259632afd3d0bd2025aa9c63479dc8c2cd0144028c39bc12e6",
|
|
17
17
|
"src/client/GitPanel.tsx": "8daed9269cc4717a546fbe2c6b1650e50ae29e5ee9069c5ba98ca832b9e3d3c0",
|
|
18
18
|
"src/client/GroupChatPane.tsx": "437a69bee4411d2894c945d747ab016be9bdf73d1792f6ecaf86cee93f2b9ebe",
|
|
@@ -111,5 +111,5 @@
|
|
|
111
111
|
"src/client/workbench-navigation.ts": "3b229752a8ce4a45eba7aeff040eb33001413190141f1e9b8e5f38246a1761e2",
|
|
112
112
|
"src/client/workbench-search-panel.css": "6978c03db4f17411e9064242b0ff786a520ee8cf58fe8a9d0ea42872ba3737f0"
|
|
113
113
|
},
|
|
114
|
-
"recordedAt": "2026-11-23T11:
|
|
114
|
+
"recordedAt": "2026-11-23T11:56:54.261Z"
|
|
115
115
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-D978o95T.js","assets/rolldown-runtime-XKyaHtl9.js","assets/dist-B3-a6uF0.js","assets/dist-CX_Hm4GS.js","assets/dist-Cus6_oaF.js","assets/dist-J6XWqRpB.js","assets/dist-scBkrwv-.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{c as t,d as n,f as r,l as i,n as a,r as o,u as s}from"./index-
|
|
2
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{c as t,d as n,f as r,l as i,n as a,r as o,u as s}from"./index-l_Knh78R.js";var c=e(r(),1),l=n(),u=262144,d=131072;function f(e){return e.split(`.`).pop()?.toLowerCase()??``}function p(e,t,n=!1){let r=e=>n?`var(--git-diff-${e.slice(5)}, var(${e}))`:`var(${e})`;return e.HighlightStyle.define([{tag:t.tags.keyword,color:r(`--cm-keyword`)},{tag:t.tags.string,color:r(`--cm-string`)},{tag:t.tags.number,color:r(`--cm-number`)},{tag:t.tags.comment,color:r(`--cm-comment`),fontStyle:`italic`},{tag:t.tags.function(t.tags.variableName),color:r(`--cm-function`)},{tag:t.tags.typeName,color:r(`--cm-type`)},{tag:t.tags.className,color:r(`--cm-type`)},{tag:t.tags.propertyName,color:r(`--cm-property`)},{tag:t.tags.operator,color:r(`--cm-operator`)},{tag:t.tags.variableName,color:r(`--cm-variable`)}])}function m({path:e,value:n,onChange:r,jumpToLine:m,onSave:h,workspaceId:g,blame:_,onPosition:v,readOnly:y=!1,languageOverride:b}){let x=(0,c.useRef)(null),S=(0,c.useRef)(null),C=(0,c.useRef)(null),w=(0,c.useRef)(void 0),T=(0,c.useRef)(null),E=(0,c.useRef)(null),D=(0,c.useRef)(null),O=(0,c.useRef)(null),k=(0,c.useRef)(null),A=(0,c.useRef)(null),j=(0,c.useRef)(r),M=(0,c.useRef)(h);j.current=r,M.current=h;let[N,P]=(0,c.useState)(!1),[F,I]=(0,c.useState)(!1),[L,R]=(0,c.useState)(`0,0`),[z,B]=(0,c.useState)(0);(0,c.useEffect)(()=>{let t=!1,r,a,c,l,d;return(async()=>{try{let m=b??f(e),h=i(m),[_,v,N,F,L,z,V,H]=await Promise.all([s(()=>import(`./dist-D978o95T.js`).then(e=>e.S),__vite__mapDeps([0,1])),s(()=>import(`./dist-B3-a6uF0.js`).then(e=>e.s),__vite__mapDeps([2,1,0])),s(()=>import(`./dist-CX_Hm4GS.js`),__vite__mapDeps([3,0,1,2,4,5])),s(()=>import(`./dist-scBkrwv-.js`),__vite__mapDeps([6,0,1,2])),s(()=>import(`./dist-J6XWqRpB.js`).then(e=>e.d),__vite__mapDeps([5,1,0,2,4])),s(()=>import(`./dist-Cus6_oaF.js`).then(e=>e.n),__vite__mapDeps([4,1])),h?h().catch(e=>(console.warn(`[CodeMirror] Failed to load language for .${m}:`,e),null)):Promise.resolve(null),o().catch(e=>(console.warn(`[CodeMirror] Failed to build the blame extension:`,e),null))]);if(t||!x.current)return;C.current=v.EditorView,l=L,d=z,E.current=_.Annotation.define(),D.current=_.Transaction.addToHistory;let U=n.length<=u&&V!==null;a=new _.Compartment;let W=[v.lineNumbers(),v.highlightActiveLine(),v.drawSelection(),N.history(),v.keymap.of([N.indentWithTab,...N.defaultKeymap,...N.historyKeymap,...F.searchKeymap,{key:`Mod-s`,run:()=>(M.current(),!0)}]),v.EditorView.updateListener.of(e=>{e.docChanged&&!(E.current&&e.transactions.some(e=>e.annotation(E.current)===!0))&&j.current(e.state.doc.toString()),e.selectionSet&&R(`${e.state.selection.main.from},${e.state.selection.main.to}`)}),v.EditorView.domEventHandlers({mousedown:(e,t)=>(t.focus(),!1)})];if(y&&W.push(_.EditorState.readOnly.of(!0),v.EditorView.editable.of(!1)),H&&!y&&(c=new _.Compartment,W.splice(1,0,c.of([])),W.push(H.base)),V)try{W.push(V)}catch(e){console.warn(`[CodeMirror] Failed to apply language extension for .${m}:`,e),U=!1}if(U&&a&&l&&d)try{W.push(a.of(l.syntaxHighlighting(p(l,d))))}catch(e){console.warn(`[CodeMirror] Failed to attach syntaxHighlighting for .${m}:`,e),U=!1}let G=w.current,K=G?.scope===JSON.stringify([g,e])&&G.state.doc.toString()===n,q=K?G.state.update({effects:_.StateEffect.reconfigure.of(W)}).state:_.EditorState.create({doc:n,extensions:W});if(r=new v.EditorView({state:q,parent:x.current}),K&&(r.scrollDOM.scrollTop=G.top,r.scrollDOM.scrollLeft=G.left),t){r.destroy();return}S.current=r,P(U),I(!0),O.current=H,k.current=c??null,A.current=null,B(e=>e+1);let J=new MutationObserver(()=>{let e=S.current;if(e&&U&&a&&l&&d)try{e.dispatch({effects:a.reconfigure(l.syntaxHighlighting(p(l,d)))})}catch{}});T.current=J,J.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})}catch(e){console.error(`[CodeMirror] Fatal editor initialization error:`,e),t||I(!0)}})(),()=>{t=!0,T.current?.disconnect(),T.current=null,r&&(w.current={scope:JSON.stringify([g,e]),state:r.state,top:r.scrollDOM.scrollTop,left:r.scrollDOM.scrollLeft}),r?.destroy(),S.current=null,I(!1),x.current&&(x.current.textContent=``)}},[e,y,b]),(0,c.useEffect)(()=>{let e=S.current;if(!e)return;let t=e.state.doc.toString();t!==n&&e.dispatch({changes:{from:0,to:t.length,insert:n},annotations:E.current?E.current.of(!0):void 0})},[n]),(0,c.useEffect)(()=>{let e=S.current;if(!e||!m)return;let t=e.state.doc.line(Math.min(Math.max(1,m.line),e.state.doc.lines)),n=Math.min(t.to,t.from+(m.column??1)-1);e.dispatch({selection:{anchor:t.to,head:n},effects:C.current?.scrollIntoView(n,{y:`center`})}),e.focus()},[m,F]);let V=!!(_&&_.state===`ready`&&_.response&&_.path===e&&_.workspaceId===g);(0,c.useEffect)(()=>{let t=S.current,n=O.current,r=k.current;if(!t||!n||!r)return;let i=_&&_.state===`ready`&&_.response&&_.path===e&&_.workspaceId===g?_.response:null,o=i?a(i):null;A.current!==o&&(A.current=o,t.dispatch({effects:[n.setBlame.of(o),r.reconfigure(o?n.gutter:[])]}))},[_?.state,_?.response,_?.path,_?.workspaceId,e,g,z]);let H=S.current?.state.doc.toString()??n,U=H.length<=d?H:H.slice(0,d),W=b??f(e),G=t(W),K=S.current?.state,q=K?.selection.main.head,J=q===void 0?void 0:K?.doc.lineAt(q),Y=J?.number,X=q!==void 0&&J?q-J.from+1:void 0;return(0,c.useEffect)(()=>{F&&Y!==void 0&&X!==void 0&&v?.({line:Y,column:X,language:N&&G||`纯文本`,highlight:N?W:`plain`})},[F,Y,X,N,G,W,v]),(0,c.useEffect)(()=>()=>v?.(),[v]),(0,l.jsxs)(`div`,{className:`file-cm-wrap`,"data-file-text":e,"data-file-content":U,"data-file-content-truncated":H.length>d?`1`:`0`,"data-file-selection":L,"data-file-editor-ready":F?`1`:`0`,"data-file-blame-gutter":V?`1`:void 0,onMouseDown:()=>S.current?.focus(),children:[(0,l.jsx)(`div`,{className:`file-cm`,ref:x,"aria-label":`${y?`查看`:`编辑`} ${e}`}),(!F||!v)&&(0,l.jsxs)(`div`,{className:`file-editor-status`,children:[!F&&(0,l.jsx)(`span`,{"data-file-editor-loading":`1`,children:`正在加载编辑器…`}),F&&q!==void 0&&J&&(0,l.jsxs)(`span`,{children:[`第 `,J.number,` 行,第 `,q-J.from+1,` 列`]}),F&&!N&&(0,l.jsx)(`span`,{"data-file-highlight-status":`plain`,children:`纯文本`}),F&&N&&G&&(0,l.jsx)(`span`,{"data-file-highlight-status":W,children:G})]})]})}export{m as CodeMirrorEditor,p as themeHighlightStyle};
|