@evandu/super-pi 0.1.230 → 0.1.231
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/client/.super-pi-client-sources.json +4 -4
- package/dist/client/assets/{CodeMirrorEditor-CdH83gXm.js → CodeMirrorEditor-DID93847.js} +2 -2
- package/dist/client/assets/{dist-BfIoLWsG.js → dist-3Pg6D38j.js} +1 -1
- package/dist/client/assets/{dist-Bd15gAzx.js → dist-B6rCaeRi.js} +1 -1
- package/dist/client/assets/{dist-DyNzjZtx.js → dist-BKrl_5gD.js} +1 -1
- package/dist/client/assets/{dist-m4X84SYg.js → dist-BTSVYElY.js} +1 -1
- package/dist/client/assets/{dist-CzuEzEPN.js → dist-BV3vRZ2y.js} +1 -1
- package/dist/client/assets/{dist-C_eX0zQ_.js → dist-Bv7cRIVR.js} +1 -1
- package/dist/client/assets/{dist-BRd0MY6g.js → dist-C1xMWmS1.js} +1 -1
- package/dist/client/assets/{dist-C2tHyY0J.js → dist-C5DwUAF0.js} +1 -1
- package/dist/client/assets/{dist-C115lC0h.js → dist-CP9KnSJ0.js} +1 -1
- package/dist/client/assets/{dist-C_OkoC2r.js → dist-C_rYZ4Ky.js} +1 -1
- package/dist/client/assets/{dist-Qvx5Yx_1.js → dist-CbrabxHt.js} +1 -1
- package/dist/client/assets/{dist-Ms7w8NQJ.js → dist-Cs3DwIND.js} +1 -1
- package/dist/client/assets/{dist-BUpGK7Wx.js → dist-DAOEPk-0.js} +1 -1
- package/dist/client/assets/{dist-BIoUtFoO.js → dist-DCp9UGuI.js} +1 -1
- package/dist/client/assets/{dist-DxruSi9F.js → dist-DIxMpUkq.js} +1 -1
- package/dist/client/assets/{dist-BxYCi1Ci.js → dist-DOAMUZ7W.js} +1 -1
- package/dist/client/assets/{dist-uzU0O2CO.js → dist-DZ2c3_-S.js} +1 -1
- package/dist/client/assets/{dist-4oqeKAJs.js → dist-Df4Kt0qp.js} +1 -1
- package/dist/client/assets/{dist-CgnYxIkq.js → dist-IwOdQEYa.js} +1 -1
- package/dist/client/assets/{dist-DmhzFjHs.js → dist-LTYjIRRC.js} +1 -1
- package/dist/client/assets/{dist-Dw21zOyP.js → dist-gxPEZLSf.js} +1 -1
- package/dist/client/assets/{dist-C6kevFTa.js → dist-hbrdp5Te.js} +1 -1
- package/dist/client/assets/{index-Do6vTy5G.js → index-pgCioXy9.js} +28 -28
- package/dist/client/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"hash": "
|
|
2
|
+
"hash": "24306cd9dd614e6536190b14c778e9b0802ab00c1045f8db48039c15bb0a687f",
|
|
3
3
|
"files": {
|
|
4
|
-
"src/client/App.tsx": "
|
|
4
|
+
"src/client/App.tsx": "874de7df221028dba598e0941368cc0749adfe4cfb24ba3e7b26a558ce11a510",
|
|
5
5
|
"src/client/CodeMirrorEditor.tsx": "86c85ef93a8a4853534593a4e432c56a3a4d37125e02bc6a334aadf88ab9ea63",
|
|
6
6
|
"src/client/ErrorBoundary.tsx": "d16376f9f6c7cc1fab8590c65a66438127642f7d6bb8023cec53d8a6cc9f3964",
|
|
7
7
|
"src/client/FeishuPanel.tsx": "52f116eba265bfde683338f5893107ad5559fd2f7d4a9e0df935507a46862a3b",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"src/client/project-evidence.ts": "3bc5ea85f6b20a19a36cfdd4a958d83dd53b21f3d8f20fae1914a575dfbad3c4",
|
|
45
45
|
"src/client/reader-recovery.ts": "20030e65dce38d06bcc65d13cbe451e87dcee9c10cae7cdb7c056e5407f77849",
|
|
46
46
|
"src/client/session-tree.ts": "08a14c6611fdd9a72001eb1672060479e7660de5a5d221c7e80036209fd26546",
|
|
47
|
-
"src/client/slash-commands.ts": "
|
|
47
|
+
"src/client/slash-commands.ts": "4a2cef1eb9517628eadfdc38bca7e3663e4d48090d8b87a8a79de4bfd586e112",
|
|
48
48
|
"src/client/styles.css": "be9240e771f5053e1cdcf3c4d131d0591ae2438fa55f88c1f2dc9d1b496436eb",
|
|
49
49
|
"src/client/terminal-emulator.ts": "ffcc4f5fbddaf25cebcc9e03dbe5d7d0ad2c21586f5d169e57c04c82e2308b3b",
|
|
50
50
|
"src/client/theme.tsx": "3974330014e335c9e668491067a642a56b20d3ec54af8f227a182cea72436876",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"src/client/types.ts": "3b0eeb7e1bab7ad4bf4f3a7ddc5ee99f2ae72eba246c96d668ea7ae535dac095",
|
|
56
56
|
"src/client/vite-env.d.ts": "65996936fbb042915f7b74a200fcdde7e410f32a669b1ab9597cfaa4b0faddb5"
|
|
57
57
|
},
|
|
58
|
-
"recordedAt": "2026-11-
|
|
58
|
+
"recordedAt": "2026-11-17T13:06:46.723Z"
|
|
59
59
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-
|
|
2
|
-
import{a as e,i as t,n,r,s as i,t as a}from"./index-Do6vTy5G.js";var o=i(e(),1);async function s(e,t){let[{StreamLanguage:n},i]=await Promise.all([r(()=>import(`./dist-C_eX0zQ_.js`),__vite__mapDeps([0,1,2,3,4,5])),e()]),a=i[t]??i.default??i;return n.define(a)}var c={cpp:()=>r(()=>import(`./dist-BfIoLWsG.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cc:()=>r(()=>import(`./dist-BfIoLWsG.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cxx:()=>r(()=>import(`./dist-BfIoLWsG.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hpp:()=>r(()=>import(`./dist-BfIoLWsG.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hh:()=>r(()=>import(`./dist-BfIoLWsG.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hxx:()=>r(()=>import(`./dist-BfIoLWsG.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),c:()=>r(()=>import(`./dist-BfIoLWsG.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),h:()=>r(()=>import(`./dist-BfIoLWsG.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cu:()=>r(()=>import(`./dist-BfIoLWsG.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cuh:()=>r(()=>import(`./dist-BfIoLWsG.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),js:()=>r(()=>import(`./dist-C2tHyY0J.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),jsx:()=>r(()=>import(`./dist-C2tHyY0J.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),mjs:()=>r(()=>import(`./dist-C2tHyY0J.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),cjs:()=>r(()=>import(`./dist-C2tHyY0J.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),ts:()=>r(()=>import(`./dist-C2tHyY0J.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),tsx:()=>r(()=>import(`./dist-C2tHyY0J.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0,jsx:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),mts:()=>r(()=>import(`./dist-C2tHyY0J.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),cts:()=>r(()=>import(`./dist-C2tHyY0J.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),py:()=>r(()=>import(`./dist-C_OkoC2r.js`).then(e=>e.python()),__vite__mapDeps([10,5,2,3,0,1,4,7,9])),pyi:()=>r(()=>import(`./dist-C_OkoC2r.js`).then(e=>e.python()),__vite__mapDeps([10,5,2,3,0,1,4,7,9])),java:()=>r(()=>import(`./dist-C6kevFTa.js`).then(e=>e.java()),__vite__mapDeps([11,5,2,3,0,1,4,7])),php:()=>r(()=>import(`./dist-Qvx5Yx_1.js`).then(e=>e.php()),__vite__mapDeps([12,5,2,3,0,1,4,7,13,14,8,9])),sql:()=>r(()=>import(`./dist-4oqeKAJs.js`).then(e=>e.sql()),__vite__mapDeps([15,5,2,3,0,1,4,7,9])),yaml:()=>r(()=>import(`./dist-Dw21zOyP.js`).then(e=>e.yaml()),__vite__mapDeps([16,5,2,3,0,1,4,7])),yml:()=>r(()=>import(`./dist-Dw21zOyP.js`).then(e=>e.yaml()),__vite__mapDeps([16,5,2,3,0,1,4,7])),xml:()=>r(()=>import(`./dist-BUpGK7Wx.js`).then(e=>e.xml()),__vite__mapDeps([17,1,2,3,4,5,0,7])),json:()=>r(()=>import(`./dist-BIoUtFoO.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),jsonc:()=>r(()=>import(`./dist-BIoUtFoO.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),json5:()=>r(()=>import(`./dist-BIoUtFoO.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),html:()=>r(()=>import(`./dist-m4X84SYg.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),htm:()=>r(()=>import(`./dist-m4X84SYg.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),vue:()=>r(()=>import(`./dist-m4X84SYg.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),svelte:()=>r(()=>import(`./dist-m4X84SYg.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),css:()=>r(()=>import(`./dist-BxYCi1Ci.js`).then(e=>e.r).then(e=>e.css()),__vite__mapDeps([14,2,3,5,0,1,4,7])),md:()=>r(()=>import(`./dist-Bd15gAzx.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),markdown:()=>r(()=>import(`./dist-Bd15gAzx.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),mdx:()=>r(()=>import(`./dist-Bd15gAzx.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),rs:()=>r(()=>import(`./dist-BRd0MY6g.js`).then(e=>e.rust()),__vite__mapDeps([20,5,2,3,0,1,4,7])),go:()=>r(()=>import(`./dist-DxruSi9F.js`).then(e=>e.go()),__vite__mapDeps([21,5,2,3,0,1,4,7,9])),sh:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),bash:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),zsh:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),fish:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),ps1:()=>s(()=>r(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),psm1:()=>s(()=>r(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),rb:()=>s(()=>r(()=>import(`./ruby-ChfNwlCY.js`),[]),`ruby`),swift:()=>s(()=>r(()=>import(`./swift-DKB6_1j6.js`),[]),`swift`),toml:()=>s(()=>r(()=>import(`./toml-BPTmHmyx.js`),[]),`toml`),ini:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),cfg:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),conf:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),properties:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),dockerfile:()=>s(()=>r(()=>import(`./dockerfile-BDePf5PZ.js`),[]),`dockerfile`),diff:()=>s(()=>r(()=>import(`./diff-ChtP43wD.js`),[]),`diff`),patch:()=>s(()=>r(()=>import(`./diff-ChtP43wD.js`),[]),`diff`)},l={cpp:`C++`,cc:`C++`,cxx:`C++`,hpp:`C++`,hh:`C++`,hxx:`C++`,cu:`CUDA C++`,cuh:`CUDA C++`,c:`C`,h:`C/C++ Header`,js:`JavaScript`,jsx:`JSX`,mjs:`JavaScript`,cjs:`JavaScript`,ts:`TypeScript`,tsx:`TSX`,mts:`TypeScript`,cts:`TypeScript`,py:`Python`,pyi:`Python Stub`,java:`Java`,php:`PHP`,sql:`SQL`,yaml:`YAML`,yml:`YAML`,xml:`XML`,json:`JSON`,jsonc:`JSON with Comments`,json5:`JSON5`,css:`CSS`,md:`Markdown`,markdown:`Markdown`,mdx:`MDX`,rs:`Rust`,go:`Go`,html:`HTML`,htm:`HTML`,vue:`Vue`,svelte:`Svelte`,sh:`Shell`,bash:`Bash`,zsh:`Zsh`,fish:`Fish`,ps1:`PowerShell`,psm1:`PowerShell`,rb:`Ruby`,swift:`Swift`,toml:`TOML`,ini:`INI`,cfg:`Config`,conf:`Config`,properties:`Properties`,dockerfile:`Dockerfile`,diff:`Diff`,patch:`Patch`};function u(e){return c[e.toLowerCase()]}function d(e){return l[e.toLowerCase()]}var f=t(),p=262144,m=131072;function h(e){return e.split(`.`).pop()?.toLowerCase()??``}function g(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()}function _(e,t){return e.HighlightStyle.define([{tag:t.tags.keyword,color:g(`--cm-keyword`)},{tag:t.tags.string,color:g(`--cm-string`)},{tag:t.tags.number,color:g(`--cm-number`)},{tag:t.tags.comment,color:g(`--cm-comment`),fontStyle:`italic`},{tag:t.tags.function(t.tags.variableName),color:g(`--cm-function`)},{tag:t.tags.typeName,color:g(`--cm-type`)},{tag:t.tags.className,color:g(`--cm-type`)},{tag:t.tags.propertyName,color:g(`--cm-property`)},{tag:t.tags.operator,color:g(`--cm-operator`)},{tag:t.tags.variableName,color:g(`--cm-variable`)}])}function v({path:e,value:t,onChange:i,jumpToLine:s,onSave:c,workspaceId:l,blame:g,onPosition:v}){let y=(0,o.useRef)(null),b=(0,o.useRef)(null),x=(0,o.useRef)(null),S=(0,o.useRef)(null),C=(0,o.useRef)(null),w=(0,o.useRef)(null),T=(0,o.useRef)(null),E=(0,o.useRef)(null),D=(0,o.useRef)(i),O=(0,o.useRef)(c);D.current=i,O.current=c;let[k,A]=(0,o.useState)(!1),[j,M]=(0,o.useState)(!1),[N,P]=(0,o.useState)(`0,0`),[F,I]=(0,o.useState)(0);(0,o.useEffect)(()=>{let i=!1,a,o,s,c,l;return(async()=>{try{let d=h(e),f=u(d),[m,g,v,k,j,N,F,L]=await Promise.all([r(()=>import(`./dist-CzuEzEPN.js`).then(e=>e.x),__vite__mapDeps([1,2,3])),r(()=>import(`./dist-CgnYxIkq.js`).then(e=>e.s),__vite__mapDeps([4,2,3,1])),r(()=>import(`./dist-DyNzjZtx.js`),__vite__mapDeps([22,1,2,3,4,5,0])),r(()=>import(`./dist-Ms7w8NQJ.js`),__vite__mapDeps([23,1,2,3,4])),r(()=>import(`./dist-C_eX0zQ_.js`),__vite__mapDeps([0,1,2,3,4,5])),r(()=>import(`./dist-C115lC0h.js`).then(e=>e.n),__vite__mapDeps([5,2,3])),f?f().catch(e=>(console.warn(`[CodeMirror] Failed to load language for .${d}:`,e),null)):Promise.resolve(null),n().catch(e=>(console.warn(`[CodeMirror] Failed to build the blame extension:`,e),null))]);if(i||!y.current)return;c=j,l=N,S.current=m.Annotation.define(),C.current=m.Transaction.addToHistory;let R=t.length<=p&&F!==null;o=new m.Compartment;let z=[g.lineNumbers(),g.highlightActiveLine(),g.drawSelection(),v.history(),g.keymap.of([v.indentWithTab,...v.defaultKeymap,...v.historyKeymap,...k.searchKeymap,{key:`Mod-s`,run:()=>(O.current(),!0)}]),g.EditorView.updateListener.of(e=>{e.docChanged&&!(S.current&&e.transactions.some(e=>e.annotation(S.current)===!0))&&D.current(e.state.doc.toString()),e.selectionSet&&P(`${e.state.selection.main.from},${e.state.selection.main.to}`)}),g.EditorView.domEventHandlers({mousedown:(e,t)=>(t.focus(),!1)})];if(L&&(s=new m.Compartment,z.splice(1,0,s.of([])),z.push(L.base)),F)try{z.push(F)}catch(e){console.warn(`[CodeMirror] Failed to apply language extension for .${d}:`,e),R=!1}if(R&&o&&c&&l)try{z.push(o.of(c.syntaxHighlighting(_(c,l))))}catch(e){console.warn(`[CodeMirror] Failed to attach syntaxHighlighting for .${d}:`,e),R=!1}if(a=new g.EditorView({state:m.EditorState.create({doc:t,extensions:z}),parent:y.current}),i){a.destroy();return}b.current=a,A(R),M(!0),w.current=L,T.current=s??null,E.current=null,I(e=>e+1);let B=new MutationObserver(()=>{let e=b.current;if(e&&R&&o&&c&&l)try{e.dispatch({effects:o.reconfigure(c.syntaxHighlighting(_(c,l)))})}catch{}});x.current=B,B.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})}catch(e){console.error(`[CodeMirror] Fatal editor initialization error:`,e),i||M(!0)}})(),()=>{i=!0,x.current?.disconnect(),x.current=null,a?.destroy(),b.current=null,M(!1),y.current&&(y.current.textContent=``)}},[e]),(0,o.useEffect)(()=>{let e=b.current;if(!e)return;let n=e.state.doc.toString();n!==t&&e.dispatch({changes:{from:0,to:n.length,insert:t},annotations:S.current?S.current.of(!0):void 0})},[t]),(0,o.useEffect)(()=>{let e=b.current;if(!e||!s)return;let t=e.state.doc.line(Math.min(Math.max(1,s.line),e.state.doc.lines));e.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0}),e.focus()},[s,j]);let L=!!(g&&g.state===`ready`&&g.response&&g.path===e&&g.workspaceId===l);(0,o.useEffect)(()=>{let t=b.current,n=w.current,r=T.current;if(!t||!n||!r)return;let i=g&&g.state===`ready`&&g.response&&g.path===e&&g.workspaceId===l?g.response:null,o=i?a(i):null;E.current!==o&&(E.current=o,t.dispatch({effects:[n.setBlame.of(o),r.reconfigure(o?n.gutter:[])]}))},[g?.state,g?.response,g?.path,g?.workspaceId,e,l,F]);let R=b.current?.state.doc.toString()??t,z=R.length<=m?R:R.slice(0,m),B=h(e),V=d(B),H=b.current?.state,U=H?.selection.main.head,W=U===void 0?void 0:H?.doc.lineAt(U),G=W?.number,K=U!==void 0&&W?U-W.from+1:void 0;return(0,o.useEffect)(()=>{j&&G!==void 0&&K!==void 0&&v?.({line:G,column:K,language:k&&V||`纯文本`,highlight:k?B:`plain`})},[j,G,K,k,V,B,v]),(0,o.useEffect)(()=>()=>v?.(),[v]),(0,f.jsxs)(`div`,{className:`file-cm-wrap`,"data-file-text":e,"data-file-content":z,"data-file-content-truncated":R.length>m?`1`:`0`,"data-file-selection":N,"data-file-editor-ready":j?`1`:`0`,"data-file-blame-gutter":L?`1`:void 0,onMouseDown:()=>b.current?.focus(),children:[(0,f.jsx)(`div`,{className:`file-cm`,ref:y,"aria-label":`编辑 ${e}`}),(!j||!v)&&(0,f.jsxs)(`div`,{className:`file-editor-status`,children:[!j&&(0,f.jsx)(`span`,{"data-file-editor-loading":`1`,children:`正在加载编辑器…`}),j&&U!==void 0&&W&&(0,f.jsxs)(`span`,{children:[`第 `,W.number,` 行,第 `,U-W.from+1,` 列`]}),j&&!k&&(0,f.jsx)(`span`,{"data-file-highlight-status":`plain`,children:`纯文本`}),j&&k&&V&&(0,f.jsx)(`span`,{"data-file-highlight-status":B,children:V})]})]})}export{v as CodeMirrorEditor};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-Bv7cRIVR.js","assets/dist-BV3vRZ2y.js","assets/index-pgCioXy9.js","assets/index-ZZn2vRR_.css","assets/dist-IwOdQEYa.js","assets/dist-CP9KnSJ0.js","assets/dist-3Pg6D38j.js","assets/dist-DZ2c3_-S.js","assets/dist-C5DwUAF0.js","assets/dist-LTYjIRRC.js","assets/dist-C_rYZ4Ky.js","assets/dist-hbrdp5Te.js","assets/dist-CbrabxHt.js","assets/dist-BTSVYElY.js","assets/dist-DOAMUZ7W.js","assets/dist-Df4Kt0qp.js","assets/dist-gxPEZLSf.js","assets/dist-DAOEPk-0.js","assets/dist-DCp9UGuI.js","assets/dist-B6rCaeRi.js","assets/dist-C1xMWmS1.js","assets/dist-DIxMpUkq.js","assets/dist-BKrl_5gD.js","assets/dist-Cs3DwIND.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as e,i as t,n,r,s as i,t as a}from"./index-pgCioXy9.js";var o=i(e(),1);async function s(e,t){let[{StreamLanguage:n},i]=await Promise.all([r(()=>import(`./dist-Bv7cRIVR.js`),__vite__mapDeps([0,1,2,3,4,5])),e()]),a=i[t]??i.default??i;return n.define(a)}var c={cpp:()=>r(()=>import(`./dist-3Pg6D38j.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cc:()=>r(()=>import(`./dist-3Pg6D38j.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cxx:()=>r(()=>import(`./dist-3Pg6D38j.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hpp:()=>r(()=>import(`./dist-3Pg6D38j.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hh:()=>r(()=>import(`./dist-3Pg6D38j.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),hxx:()=>r(()=>import(`./dist-3Pg6D38j.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),c:()=>r(()=>import(`./dist-3Pg6D38j.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),h:()=>r(()=>import(`./dist-3Pg6D38j.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cu:()=>r(()=>import(`./dist-3Pg6D38j.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),cuh:()=>r(()=>import(`./dist-3Pg6D38j.js`).then(e=>e.cpp()),__vite__mapDeps([6,5,2,3,0,1,4,7])),js:()=>r(()=>import(`./dist-C5DwUAF0.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),jsx:()=>r(()=>import(`./dist-C5DwUAF0.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),mjs:()=>r(()=>import(`./dist-C5DwUAF0.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),cjs:()=>r(()=>import(`./dist-C5DwUAF0.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),ts:()=>r(()=>import(`./dist-C5DwUAF0.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),tsx:()=>r(()=>import(`./dist-C5DwUAF0.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0,jsx:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),mts:()=>r(()=>import(`./dist-C5DwUAF0.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),cts:()=>r(()=>import(`./dist-C5DwUAF0.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([8,2,3,1,4,5,0,7,9])),py:()=>r(()=>import(`./dist-C_rYZ4Ky.js`).then(e=>e.python()),__vite__mapDeps([10,5,2,3,0,1,4,7,9])),pyi:()=>r(()=>import(`./dist-C_rYZ4Ky.js`).then(e=>e.python()),__vite__mapDeps([10,5,2,3,0,1,4,7,9])),java:()=>r(()=>import(`./dist-hbrdp5Te.js`).then(e=>e.java()),__vite__mapDeps([11,5,2,3,0,1,4,7])),php:()=>r(()=>import(`./dist-CbrabxHt.js`).then(e=>e.php()),__vite__mapDeps([12,5,2,3,0,1,4,7,13,14,8,9])),sql:()=>r(()=>import(`./dist-Df4Kt0qp.js`).then(e=>e.sql()),__vite__mapDeps([15,5,2,3,0,1,4,7,9])),yaml:()=>r(()=>import(`./dist-gxPEZLSf.js`).then(e=>e.yaml()),__vite__mapDeps([16,5,2,3,0,1,4,7])),yml:()=>r(()=>import(`./dist-gxPEZLSf.js`).then(e=>e.yaml()),__vite__mapDeps([16,5,2,3,0,1,4,7])),xml:()=>r(()=>import(`./dist-DAOEPk-0.js`).then(e=>e.xml()),__vite__mapDeps([17,1,2,3,4,5,0,7])),json:()=>r(()=>import(`./dist-DCp9UGuI.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),jsonc:()=>r(()=>import(`./dist-DCp9UGuI.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),json5:()=>r(()=>import(`./dist-DCp9UGuI.js`).then(e=>e.json()),__vite__mapDeps([18,5,2,3,0,1,4,7])),html:()=>r(()=>import(`./dist-BTSVYElY.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),htm:()=>r(()=>import(`./dist-BTSVYElY.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),vue:()=>r(()=>import(`./dist-BTSVYElY.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),svelte:()=>r(()=>import(`./dist-BTSVYElY.js`).then(e=>e.html()),__vite__mapDeps([13,1,2,3,4,5,0,7,14,8,9])),css:()=>r(()=>import(`./dist-DOAMUZ7W.js`).then(e=>e.r).then(e=>e.css()),__vite__mapDeps([14,2,3,5,0,1,4,7])),md:()=>r(()=>import(`./dist-B6rCaeRi.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),markdown:()=>r(()=>import(`./dist-B6rCaeRi.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),mdx:()=>r(()=>import(`./dist-B6rCaeRi.js`).then(e=>e.markdown()),__vite__mapDeps([19,1,2,3,4,5,0,9,13,7,14,8])),rs:()=>r(()=>import(`./dist-C1xMWmS1.js`).then(e=>e.rust()),__vite__mapDeps([20,5,2,3,0,1,4,7])),go:()=>r(()=>import(`./dist-DIxMpUkq.js`).then(e=>e.go()),__vite__mapDeps([21,5,2,3,0,1,4,7,9])),sh:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),bash:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),zsh:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),fish:()=>s(()=>r(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),ps1:()=>s(()=>r(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),psm1:()=>s(()=>r(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),rb:()=>s(()=>r(()=>import(`./ruby-ChfNwlCY.js`),[]),`ruby`),swift:()=>s(()=>r(()=>import(`./swift-DKB6_1j6.js`),[]),`swift`),toml:()=>s(()=>r(()=>import(`./toml-BPTmHmyx.js`),[]),`toml`),ini:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),cfg:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),conf:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),properties:()=>s(()=>r(()=>import(`./properties-C357ku5U.js`),[]),`properties`),dockerfile:()=>s(()=>r(()=>import(`./dockerfile-BDePf5PZ.js`),[]),`dockerfile`),diff:()=>s(()=>r(()=>import(`./diff-ChtP43wD.js`),[]),`diff`),patch:()=>s(()=>r(()=>import(`./diff-ChtP43wD.js`),[]),`diff`)},l={cpp:`C++`,cc:`C++`,cxx:`C++`,hpp:`C++`,hh:`C++`,hxx:`C++`,cu:`CUDA C++`,cuh:`CUDA C++`,c:`C`,h:`C/C++ Header`,js:`JavaScript`,jsx:`JSX`,mjs:`JavaScript`,cjs:`JavaScript`,ts:`TypeScript`,tsx:`TSX`,mts:`TypeScript`,cts:`TypeScript`,py:`Python`,pyi:`Python Stub`,java:`Java`,php:`PHP`,sql:`SQL`,yaml:`YAML`,yml:`YAML`,xml:`XML`,json:`JSON`,jsonc:`JSON with Comments`,json5:`JSON5`,css:`CSS`,md:`Markdown`,markdown:`Markdown`,mdx:`MDX`,rs:`Rust`,go:`Go`,html:`HTML`,htm:`HTML`,vue:`Vue`,svelte:`Svelte`,sh:`Shell`,bash:`Bash`,zsh:`Zsh`,fish:`Fish`,ps1:`PowerShell`,psm1:`PowerShell`,rb:`Ruby`,swift:`Swift`,toml:`TOML`,ini:`INI`,cfg:`Config`,conf:`Config`,properties:`Properties`,dockerfile:`Dockerfile`,diff:`Diff`,patch:`Patch`};function u(e){return c[e.toLowerCase()]}function d(e){return l[e.toLowerCase()]}var f=t(),p=262144,m=131072;function h(e){return e.split(`.`).pop()?.toLowerCase()??``}function g(e){return getComputedStyle(document.documentElement).getPropertyValue(e).trim()}function _(e,t){return e.HighlightStyle.define([{tag:t.tags.keyword,color:g(`--cm-keyword`)},{tag:t.tags.string,color:g(`--cm-string`)},{tag:t.tags.number,color:g(`--cm-number`)},{tag:t.tags.comment,color:g(`--cm-comment`),fontStyle:`italic`},{tag:t.tags.function(t.tags.variableName),color:g(`--cm-function`)},{tag:t.tags.typeName,color:g(`--cm-type`)},{tag:t.tags.className,color:g(`--cm-type`)},{tag:t.tags.propertyName,color:g(`--cm-property`)},{tag:t.tags.operator,color:g(`--cm-operator`)},{tag:t.tags.variableName,color:g(`--cm-variable`)}])}function v({path:e,value:t,onChange:i,jumpToLine:s,onSave:c,workspaceId:l,blame:g,onPosition:v}){let y=(0,o.useRef)(null),b=(0,o.useRef)(null),x=(0,o.useRef)(null),S=(0,o.useRef)(null),C=(0,o.useRef)(null),w=(0,o.useRef)(null),T=(0,o.useRef)(null),E=(0,o.useRef)(null),D=(0,o.useRef)(i),O=(0,o.useRef)(c);D.current=i,O.current=c;let[k,A]=(0,o.useState)(!1),[j,M]=(0,o.useState)(!1),[N,P]=(0,o.useState)(`0,0`),[F,I]=(0,o.useState)(0);(0,o.useEffect)(()=>{let i=!1,a,o,s,c,l;return(async()=>{try{let d=h(e),f=u(d),[m,g,v,k,j,N,F,L]=await Promise.all([r(()=>import(`./dist-BV3vRZ2y.js`).then(e=>e.x),__vite__mapDeps([1,2,3])),r(()=>import(`./dist-IwOdQEYa.js`).then(e=>e.s),__vite__mapDeps([4,2,3,1])),r(()=>import(`./dist-BKrl_5gD.js`),__vite__mapDeps([22,1,2,3,4,5,0])),r(()=>import(`./dist-Cs3DwIND.js`),__vite__mapDeps([23,1,2,3,4])),r(()=>import(`./dist-Bv7cRIVR.js`),__vite__mapDeps([0,1,2,3,4,5])),r(()=>import(`./dist-CP9KnSJ0.js`).then(e=>e.n),__vite__mapDeps([5,2,3])),f?f().catch(e=>(console.warn(`[CodeMirror] Failed to load language for .${d}:`,e),null)):Promise.resolve(null),n().catch(e=>(console.warn(`[CodeMirror] Failed to build the blame extension:`,e),null))]);if(i||!y.current)return;c=j,l=N,S.current=m.Annotation.define(),C.current=m.Transaction.addToHistory;let R=t.length<=p&&F!==null;o=new m.Compartment;let z=[g.lineNumbers(),g.highlightActiveLine(),g.drawSelection(),v.history(),g.keymap.of([v.indentWithTab,...v.defaultKeymap,...v.historyKeymap,...k.searchKeymap,{key:`Mod-s`,run:()=>(O.current(),!0)}]),g.EditorView.updateListener.of(e=>{e.docChanged&&!(S.current&&e.transactions.some(e=>e.annotation(S.current)===!0))&&D.current(e.state.doc.toString()),e.selectionSet&&P(`${e.state.selection.main.from},${e.state.selection.main.to}`)}),g.EditorView.domEventHandlers({mousedown:(e,t)=>(t.focus(),!1)})];if(L&&(s=new m.Compartment,z.splice(1,0,s.of([])),z.push(L.base)),F)try{z.push(F)}catch(e){console.warn(`[CodeMirror] Failed to apply language extension for .${d}:`,e),R=!1}if(R&&o&&c&&l)try{z.push(o.of(c.syntaxHighlighting(_(c,l))))}catch(e){console.warn(`[CodeMirror] Failed to attach syntaxHighlighting for .${d}:`,e),R=!1}if(a=new g.EditorView({state:m.EditorState.create({doc:t,extensions:z}),parent:y.current}),i){a.destroy();return}b.current=a,A(R),M(!0),w.current=L,T.current=s??null,E.current=null,I(e=>e+1);let B=new MutationObserver(()=>{let e=b.current;if(e&&R&&o&&c&&l)try{e.dispatch({effects:o.reconfigure(c.syntaxHighlighting(_(c,l)))})}catch{}});x.current=B,B.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})}catch(e){console.error(`[CodeMirror] Fatal editor initialization error:`,e),i||M(!0)}})(),()=>{i=!0,x.current?.disconnect(),x.current=null,a?.destroy(),b.current=null,M(!1),y.current&&(y.current.textContent=``)}},[e]),(0,o.useEffect)(()=>{let e=b.current;if(!e)return;let n=e.state.doc.toString();n!==t&&e.dispatch({changes:{from:0,to:n.length,insert:t},annotations:S.current?S.current.of(!0):void 0})},[t]),(0,o.useEffect)(()=>{let e=b.current;if(!e||!s)return;let t=e.state.doc.line(Math.min(Math.max(1,s.line),e.state.doc.lines));e.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0}),e.focus()},[s,j]);let L=!!(g&&g.state===`ready`&&g.response&&g.path===e&&g.workspaceId===l);(0,o.useEffect)(()=>{let t=b.current,n=w.current,r=T.current;if(!t||!n||!r)return;let i=g&&g.state===`ready`&&g.response&&g.path===e&&g.workspaceId===l?g.response:null,o=i?a(i):null;E.current!==o&&(E.current=o,t.dispatch({effects:[n.setBlame.of(o),r.reconfigure(o?n.gutter:[])]}))},[g?.state,g?.response,g?.path,g?.workspaceId,e,l,F]);let R=b.current?.state.doc.toString()??t,z=R.length<=m?R:R.slice(0,m),B=h(e),V=d(B),H=b.current?.state,U=H?.selection.main.head,W=U===void 0?void 0:H?.doc.lineAt(U),G=W?.number,K=U!==void 0&&W?U-W.from+1:void 0;return(0,o.useEffect)(()=>{j&&G!==void 0&&K!==void 0&&v?.({line:G,column:K,language:k&&V||`纯文本`,highlight:k?B:`plain`})},[j,G,K,k,V,B,v]),(0,o.useEffect)(()=>()=>v?.(),[v]),(0,f.jsxs)(`div`,{className:`file-cm-wrap`,"data-file-text":e,"data-file-content":z,"data-file-content-truncated":R.length>m?`1`:`0`,"data-file-selection":N,"data-file-editor-ready":j?`1`:`0`,"data-file-blame-gutter":L?`1`:void 0,onMouseDown:()=>b.current?.focus(),children:[(0,f.jsx)(`div`,{className:`file-cm`,ref:y,"aria-label":`编辑 ${e}`}),(!j||!v)&&(0,f.jsxs)(`div`,{className:`file-editor-status`,children:[!j&&(0,f.jsx)(`span`,{"data-file-editor-loading":`1`,children:`正在加载编辑器…`}),j&&U!==void 0&&W&&(0,f.jsxs)(`span`,{children:[`第 `,W.number,` 行,第 `,U-W.from+1,` 列`]}),j&&!k&&(0,f.jsx)(`span`,{"data-file-highlight-status":`plain`,children:`纯文本`}),j&&k&&V&&(0,f.jsx)(`span`,{"data-file-highlight-status":B,children:V})]})]})}export{v as CodeMirrorEditor};
|