@evandu/super-pi 0.1.252 → 0.1.254

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "hash": "65d7b7db952d0f12adb4a0970b6b92f18b3b0522d14f313ea8b0fca841a422e4",
2
+ "hash": "78ac4a08e57bc90c156b27f5f7a5f2a14e7c4667f0e6f75847ab161be6400eb3",
3
3
  "files": {
4
4
  "src/client/App.tsx": "ee2123818d348885bdeba609139a543a23d8957dd6a678c559ea954ff2c8911e",
5
5
  "src/client/CacheWarmingSettings.tsx": "6a810dcaff04eecd6546b442168b257b21f442bf5b2909180a7ad914325f5a72",
@@ -9,8 +9,8 @@
9
9
  "src/client/FileMentionMenu.tsx": "165817b4dbbd344437c1b14f6622df2827310b99857f32afe65d3e481ad7b396",
10
10
  "src/client/FileWorkbenchChrome.tsx": "0863c988bdc50962e3dab365e918ad6de6aee7cc2d0d4d3cce049fa3529d2b6b",
11
11
  "src/client/FilesPanel.tsx": "ba95182ea84939de4e620c7f16158a5047ea40d56d673fb1c3f5f77d0b637a5c",
12
- "src/client/GitDiffEditor.tsx": "4af283f93b111dfb280ed83da2b040df5e440514696b0efc779480dbc9f4f4ba",
13
- "src/client/GitPanel.tsx": "3f9130a123b7108987c9872dab86994520bbab030d9d6b17da1fd4b08ebb67e1",
12
+ "src/client/GitDiffEditor.tsx": "8d28584ef627a41116b6886afd71c0d30982c7dfafd43a8e19d6e2634f2ed0b9",
13
+ "src/client/GitPanel.tsx": "895b96ae16fbfb55753582280f64d9ea4e715e8deda64f2ed271901e08cd818c",
14
14
  "src/client/GroupChatPane.tsx": "df84611c199fe82627e1f9406991e2bb7fce89b1fa4afcc5d757646e5599b292",
15
15
  "src/client/GroupExecutionPane.tsx": "5cdba8a51b0e5daa097f08979ca4abe0b64b73649e60fdcc83d23e2b588a1ca6",
16
16
  "src/client/HelpWindow.tsx": "dd4767f4cdced2fcdb50769eb5417ef8de722f43bbd594c9854f49fe61d15d97",
@@ -32,7 +32,7 @@
32
32
  "src/client/TeamHandoffCard.tsx": "925284ab81c7845c5cfdcfa1f631e124bb02d7d86b03ede8f3fbabc194c32dca",
33
33
  "src/client/TerminalPanel.tsx": "c9e1b2f840d05eeaf73690fc4b84d446dec1fd06d716af5445ff6031bbf3a6cb",
34
34
  "src/client/ToolGlyph.tsx": "a1100b61f1eee9520e7323385f667898763bfd69068f22de7dd36db2d4096c76",
35
- "src/client/WorkbenchChrome.tsx": "143d43a132c4f12f2be49fdca071bdf64c94e9a8c073fbd4216245f1c9d86f26",
35
+ "src/client/WorkbenchChrome.tsx": "6328c984b736651024ebade3f390380e53333e6d11bea74ca4593a4176893778",
36
36
  "src/client/WorkbenchSearch.tsx": "83a52a45d561bc31f19ae0c76708572cde73cb952ef69e60247e638c0abe57f2",
37
37
  "src/client/WorkbenchSplit.tsx": "7afc0e435ad8eae95f95a28563034e3bf09eef070f47bd3366d9b8eff9bc229e",
38
38
  "src/client/WorkflowCard.tsx": "8ce5458537a3b02dcbb9bbb4c7afacb07e0f41857ed250aa4cde0cbc8d4bde6c",
@@ -51,7 +51,7 @@
51
51
  "src/client/group-chat.css": "8545b2fefb784e04e56898b72ef05be25a6685a67ed918df8b6d1be39fe0d99c",
52
52
  "src/client/main.tsx": "d6325cec79ebc225e4972c33ad9b4266fa1eab5f962fec36ed4c539124a8fcab",
53
53
  "src/client/markdown-settings.ts": "33075c9137183ae4874d5a9a764cd2ae5ce9abd27331065880aa53cf6e3f307a",
54
- "src/client/markdown.ts": "c17f5b8c5d3d1b7905bc7c9ba1a180d85a1e7a7f4a2f86cabe5fc5becdc5b38a",
54
+ "src/client/markdown.ts": "8d1b61361739313914b973cb1eaad5060f4c7ceec2dd18f609a8cfb50852c956",
55
55
  "src/client/native-tools.css": "71bbb365a91105be0925acce27f1e1ea5e0c3369aa5137060d2bc426682e113d",
56
56
  "src/client/pending-operations.ts": "8a5f9e9711c0f875c8ed194196c218162de5270298dad4091351d41294c859d7",
57
57
  "src/client/project-evidence.ts": "3bc5ea85f6b20a19a36cfdd4a958d83dd53b21f3d8f20fae1914a575dfbad3c4",
@@ -59,7 +59,7 @@
59
59
  "src/client/session-tree.ts": "08a14c6611fdd9a72001eb1672060479e7660de5a5d221c7e80036209fd26546",
60
60
  "src/client/slash-commands.ts": "4a2cef1eb9517628eadfdc38bca7e3663e4d48090d8b87a8a79de4bfd586e112",
61
61
  "src/client/software-update.css": "a4ec1565b70008b55618197a8d88db51a79fb932b9a69bfe4318a62774e8020a",
62
- "src/client/styles.css": "0eb08784fab1286b2a26e6dc1377f3cb509f2ae121b2b14d1752a389b4b3d0b9",
62
+ "src/client/styles.css": "3184e7d61b6a726d6c18dec2f9d13d94b051b956d92d19ba56e35eb25d663ed3",
63
63
  "src/client/terminal-emulator.ts": "ffcc4f5fbddaf25cebcc9e03dbe5d7d0ad2c21586f5d169e57c04c82e2308b3b",
64
64
  "src/client/theme.tsx": "d9929d8fb390ebeb52db324faa40d1a7edcb1aa1ffa13981508b7ff5b88622f0",
65
65
  "src/client/tool-launcher.ts": "40fb4974362bbc8c73ecd651da1abce251fc28857564a9321037adcfdb0bfe24",
@@ -70,5 +70,5 @@
70
70
  "src/client/vite-env.d.ts": "65996936fbb042915f7b74a200fcdde7e410f32a669b1ab9597cfaa4b0faddb5",
71
71
  "src/client/workbench-navigation.ts": "3b229752a8ce4a45eba7aeff040eb33001413190141f1e9b8e5f38246a1761e2"
72
72
  },
73
- "recordedAt": "2026-11-19T11:23:59.527Z"
73
+ "recordedAt": "2026-11-19T12:24:35.774Z"
74
74
  }
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-BsG-6pTu.js","assets/rolldown-runtime-XKyaHtl9.js","assets/dist-D978o95T.js","assets/dist-B3-a6uF0.js","assets/dist-Cus6_oaF.js","assets/dist-CISO_jYt.js","assets/dist-BXAOrsjq.js","assets/dist-DRk4qy9i.js","assets/dist-uuaqc1SU.js","assets/dist-0FXz0KLB.js","assets/dist-D1NpQAva.js","assets/dist-DkPVc7Rf.js","assets/dist-vK4fMIi8.js","assets/dist-D5-SYidb.js","assets/dist-C8yZkfJN.js","assets/dist-D09S6VMH.js","assets/dist-BbuAnJ4T.js","assets/dist-BSugRTzs.js","assets/dist-BUl4ovQu.js","assets/dist-AczI3ocs.js","assets/dist-QyJg7PsR.js","assets/dist-gBVaCjue.js","assets/dist-scBkrwv-.js"])))=>i.map(i=>d[i]);
2
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{l as t,n,o as r,r as i,t as a}from"./index-D2IVVBA_.js";var o=e(t(),1);async function s(e,t){let[{StreamLanguage:n},r]=await Promise.all([i(()=>import(`./dist-BsG-6pTu.js`).then(e=>e.d),__vite__mapDeps([0,1,2,3,4])),e()]),a=r[t]??r.default??r;return n.define(a)}var c={cpp:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),cc:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),cxx:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),hpp:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),hh:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),hxx:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),c:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),h:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),cu:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),cuh:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),js:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([7,1,2,3,4,0,6,8])),jsx:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([7,1,2,3,4,0,6,8])),mjs:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([7,1,2,3,4,0,6,8])),cjs:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([7,1,2,3,4,0,6,8])),ts:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([7,1,2,3,4,0,6,8])),tsx:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0,jsx:!0})),__vite__mapDeps([7,1,2,3,4,0,6,8])),mts:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([7,1,2,3,4,0,6,8])),cts:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([7,1,2,3,4,0,6,8])),py:()=>i(()=>import(`./dist-0FXz0KLB.js`).then(e=>e.python()),__vite__mapDeps([9,4,1,0,2,3,6,8])),pyi:()=>i(()=>import(`./dist-0FXz0KLB.js`).then(e=>e.python()),__vite__mapDeps([9,4,1,0,2,3,6,8])),java:()=>i(()=>import(`./dist-D1NpQAva.js`).then(e=>e.java()),__vite__mapDeps([10,4,1,0,2,3,6])),php:()=>i(()=>import(`./dist-DkPVc7Rf.js`).then(e=>e.php()),__vite__mapDeps([11,4,1,0,2,3,6,12,13,7,8])),sql:()=>i(()=>import(`./dist-C8yZkfJN.js`).then(e=>e.sql()),__vite__mapDeps([14,4,1,0,2,3,6,8])),yaml:()=>i(()=>import(`./dist-D09S6VMH.js`).then(e=>e.yaml()),__vite__mapDeps([15,4,1,0,2,3,6])),yml:()=>i(()=>import(`./dist-D09S6VMH.js`).then(e=>e.yaml()),__vite__mapDeps([15,4,1,0,2,3,6])),xml:()=>i(()=>import(`./dist-BbuAnJ4T.js`).then(e=>e.xml()),__vite__mapDeps([16,2,1,3,4,0,6])),json:()=>i(()=>import(`./dist-BSugRTzs.js`).then(e=>e.json()),__vite__mapDeps([17,4,1,0,2,3,6])),jsonc:()=>i(()=>import(`./dist-BSugRTzs.js`).then(e=>e.json()),__vite__mapDeps([17,4,1,0,2,3,6])),json5:()=>i(()=>import(`./dist-BSugRTzs.js`).then(e=>e.json()),__vite__mapDeps([17,4,1,0,2,3,6])),html:()=>i(()=>import(`./dist-vK4fMIi8.js`).then(e=>e.html()),__vite__mapDeps([12,2,1,3,4,0,6,13,7,8])),htm:()=>i(()=>import(`./dist-vK4fMIi8.js`).then(e=>e.html()),__vite__mapDeps([12,2,1,3,4,0,6,13,7,8])),vue:()=>i(()=>import(`./dist-vK4fMIi8.js`).then(e=>e.html()),__vite__mapDeps([12,2,1,3,4,0,6,13,7,8])),svelte:()=>i(()=>import(`./dist-vK4fMIi8.js`).then(e=>e.html()),__vite__mapDeps([12,2,1,3,4,0,6,13,7,8])),css:()=>i(()=>import(`./dist-D5-SYidb.js`).then(e=>e.r).then(e=>e.css()),__vite__mapDeps([13,1,4,0,2,3,6])),md:()=>i(()=>import(`./dist-BUl4ovQu.js`).then(e=>e.markdown()),__vite__mapDeps([18,2,1,3,4,0,8,12,6,13,7])),markdown:()=>i(()=>import(`./dist-BUl4ovQu.js`).then(e=>e.markdown()),__vite__mapDeps([18,2,1,3,4,0,8,12,6,13,7])),mdx:()=>i(()=>import(`./dist-BUl4ovQu.js`).then(e=>e.markdown()),__vite__mapDeps([18,2,1,3,4,0,8,12,6,13,7])),rs:()=>i(()=>import(`./dist-AczI3ocs.js`).then(e=>e.rust()),__vite__mapDeps([19,4,1,0,2,3,6])),go:()=>i(()=>import(`./dist-QyJg7PsR.js`).then(e=>e.go()),__vite__mapDeps([20,4,1,0,2,3,6,8])),sh:()=>s(()=>i(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),bash:()=>s(()=>i(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),zsh:()=>s(()=>i(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),fish:()=>s(()=>i(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),ps1:()=>s(()=>i(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),psm1:()=>s(()=>i(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),rb:()=>s(()=>i(()=>import(`./ruby-ChfNwlCY.js`),[]),`ruby`),swift:()=>s(()=>i(()=>import(`./swift-DKB6_1j6.js`),[]),`swift`),toml:()=>s(()=>i(()=>import(`./toml-BPTmHmyx.js`),[]),`toml`),ini:()=>s(()=>i(()=>import(`./properties-C357ku5U.js`),[]),`properties`),cfg:()=>s(()=>i(()=>import(`./properties-C357ku5U.js`),[]),`properties`),conf:()=>s(()=>i(()=>import(`./properties-C357ku5U.js`),[]),`properties`),properties:()=>s(()=>i(()=>import(`./properties-C357ku5U.js`),[]),`properties`),dockerfile:()=>s(()=>i(()=>import(`./dockerfile-BDePf5PZ.js`),[]),`dockerfile`),diff:()=>s(()=>i(()=>import(`./diff-ChtP43wD.js`),[]),`diff`),patch:()=>s(()=>i(()=>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=r(),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:r,jumpToLine:s,onSave:c,workspaceId:l,blame:g,onPosition:v,readOnly:y=!1}){let 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)(null),O=(0,o.useRef)(r),k=(0,o.useRef)(c);O.current=r,k.current=c;let[A,j]=(0,o.useState)(!1),[M,N]=(0,o.useState)(!1),[P,F]=(0,o.useState)(`0,0`),[I,L]=(0,o.useState)(0);(0,o.useEffect)(()=>{let r=!1,a,o,s,c,l;return(async()=>{try{let d=h(e),f=u(d),[m,g,v,A,M,P,I,R]=await Promise.all([i(()=>import(`./dist-D978o95T.js`).then(e=>e.S),__vite__mapDeps([2,1])),i(()=>import(`./dist-B3-a6uF0.js`).then(e=>e.s),__vite__mapDeps([3,1,2])),i(()=>import(`./dist-gBVaCjue.js`),__vite__mapDeps([21,2,1,3,4,0])),i(()=>import(`./dist-scBkrwv-.js`),__vite__mapDeps([22,2,1,3])),i(()=>import(`./dist-BsG-6pTu.js`).then(e=>e.d),__vite__mapDeps([0,1,2,3,4])),i(()=>import(`./dist-Cus6_oaF.js`).then(e=>e.n),__vite__mapDeps([4,1])),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(r||!b.current)return;c=M,l=P,C.current=m.Annotation.define(),w.current=m.Transaction.addToHistory;let z=t.length<=p&&I!==null;o=new m.Compartment;let B=[g.lineNumbers(),g.highlightActiveLine(),g.drawSelection(),v.history(),g.keymap.of([v.indentWithTab,...v.defaultKeymap,...v.historyKeymap,...A.searchKeymap,{key:`Mod-s`,run:()=>(k.current(),!0)}]),g.EditorView.updateListener.of(e=>{e.docChanged&&!(C.current&&e.transactions.some(e=>e.annotation(C.current)===!0))&&O.current(e.state.doc.toString()),e.selectionSet&&F(`${e.state.selection.main.from},${e.state.selection.main.to}`)}),g.EditorView.domEventHandlers({mousedown:(e,t)=>(t.focus(),!1)})];if(y&&B.push(m.EditorState.readOnly.of(!0),g.EditorView.editable.of(!1)),R&&!y&&(s=new m.Compartment,B.splice(1,0,s.of([])),B.push(R.base)),I)try{B.push(I)}catch(e){console.warn(`[CodeMirror] Failed to apply language extension for .${d}:`,e),z=!1}if(z&&o&&c&&l)try{B.push(o.of(c.syntaxHighlighting(_(c,l))))}catch(e){console.warn(`[CodeMirror] Failed to attach syntaxHighlighting for .${d}:`,e),z=!1}if(a=new g.EditorView({state:m.EditorState.create({doc:t,extensions:B}),parent:b.current}),r){a.destroy();return}x.current=a,j(z),N(!0),T.current=R,E.current=s??null,D.current=null,L(e=>e+1);let V=new MutationObserver(()=>{let e=x.current;if(e&&z&&o&&c&&l)try{e.dispatch({effects:o.reconfigure(c.syntaxHighlighting(_(c,l)))})}catch{}});S.current=V,V.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})}catch(e){console.error(`[CodeMirror] Fatal editor initialization error:`,e),r||N(!0)}})(),()=>{r=!0,S.current?.disconnect(),S.current=null,a?.destroy(),x.current=null,N(!1),b.current&&(b.current.textContent=``)}},[e,y]),(0,o.useEffect)(()=>{let e=x.current;if(!e)return;let n=e.state.doc.toString();n!==t&&e.dispatch({changes:{from:0,to:n.length,insert:t},annotations:C.current?C.current.of(!0):void 0})},[t]),(0,o.useEffect)(()=>{let e=x.current;if(!e||!s)return;let t=e.state.doc.line(Math.min(Math.max(1,s.line),e.state.doc.lines)),n=Math.min(t.to,t.from+(s.column??1)-1);e.dispatch({selection:{anchor:t.to,head:n},scrollIntoView:!0}),e.focus()},[s,M]);let R=!!(g&&g.state===`ready`&&g.response&&g.path===e&&g.workspaceId===l);(0,o.useEffect)(()=>{let t=x.current,n=T.current,r=E.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;D.current!==o&&(D.current=o,t.dispatch({effects:[n.setBlame.of(o),r.reconfigure(o?n.gutter:[])]}))},[g?.state,g?.response,g?.path,g?.workspaceId,e,l,I]);let z=x.current?.state.doc.toString()??t,B=z.length<=m?z:z.slice(0,m),V=h(e),H=d(V),U=x.current?.state,W=U?.selection.main.head,G=W===void 0?void 0:U?.doc.lineAt(W),K=G?.number,q=W!==void 0&&G?W-G.from+1:void 0;return(0,o.useEffect)(()=>{M&&K!==void 0&&q!==void 0&&v?.({line:K,column:q,language:A&&H||`纯文本`,highlight:A?V:`plain`})},[M,K,q,A,H,V,v]),(0,o.useEffect)(()=>()=>v?.(),[v]),(0,f.jsxs)(`div`,{className:`file-cm-wrap`,"data-file-text":e,"data-file-content":B,"data-file-content-truncated":z.length>m?`1`:`0`,"data-file-selection":P,"data-file-editor-ready":M?`1`:`0`,"data-file-blame-gutter":R?`1`:void 0,onMouseDown:()=>x.current?.focus(),children:[(0,f.jsx)(`div`,{className:`file-cm`,ref:b,"aria-label":`${y?`查看`:`编辑`} ${e}`}),(!M||!v)&&(0,f.jsxs)(`div`,{className:`file-editor-status`,children:[!M&&(0,f.jsx)(`span`,{"data-file-editor-loading":`1`,children:`正在加载编辑器…`}),M&&W!==void 0&&G&&(0,f.jsxs)(`span`,{children:[`第 `,G.number,` 行,第 `,W-G.from+1,` 列`]}),M&&!A&&(0,f.jsx)(`span`,{"data-file-highlight-status":`plain`,children:`纯文本`}),M&&A&&H&&(0,f.jsx)(`span`,{"data-file-highlight-status":V,children:H})]})]})}export{v as CodeMirrorEditor,u as t,_ as themeHighlightStyle};
2
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{l as t,n,o as r,r as i,t as a}from"./index-WcUajwk6.js";var o=e(t(),1);async function s(e,t){let[{StreamLanguage:n},r]=await Promise.all([i(()=>import(`./dist-BsG-6pTu.js`).then(e=>e.d),__vite__mapDeps([0,1,2,3,4])),e()]),a=r[t]??r.default??r;return n.define(a)}var c={cpp:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),cc:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),cxx:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),hpp:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),hh:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),hxx:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),c:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),h:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),cu:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),cuh:()=>i(()=>import(`./dist-CISO_jYt.js`).then(e=>e.cpp()),__vite__mapDeps([5,4,1,0,2,3,6])),js:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([7,1,2,3,4,0,6,8])),jsx:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([7,1,2,3,4,0,6,8])),mjs:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([7,1,2,3,4,0,6,8])),cjs:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([7,1,2,3,4,0,6,8])),ts:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([7,1,2,3,4,0,6,8])),tsx:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0,jsx:!0})),__vite__mapDeps([7,1,2,3,4,0,6,8])),mts:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([7,1,2,3,4,0,6,8])),cts:()=>i(()=>import(`./dist-DRk4qy9i.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([7,1,2,3,4,0,6,8])),py:()=>i(()=>import(`./dist-0FXz0KLB.js`).then(e=>e.python()),__vite__mapDeps([9,4,1,0,2,3,6,8])),pyi:()=>i(()=>import(`./dist-0FXz0KLB.js`).then(e=>e.python()),__vite__mapDeps([9,4,1,0,2,3,6,8])),java:()=>i(()=>import(`./dist-D1NpQAva.js`).then(e=>e.java()),__vite__mapDeps([10,4,1,0,2,3,6])),php:()=>i(()=>import(`./dist-DkPVc7Rf.js`).then(e=>e.php()),__vite__mapDeps([11,4,1,0,2,3,6,12,13,7,8])),sql:()=>i(()=>import(`./dist-C8yZkfJN.js`).then(e=>e.sql()),__vite__mapDeps([14,4,1,0,2,3,6,8])),yaml:()=>i(()=>import(`./dist-D09S6VMH.js`).then(e=>e.yaml()),__vite__mapDeps([15,4,1,0,2,3,6])),yml:()=>i(()=>import(`./dist-D09S6VMH.js`).then(e=>e.yaml()),__vite__mapDeps([15,4,1,0,2,3,6])),xml:()=>i(()=>import(`./dist-BbuAnJ4T.js`).then(e=>e.xml()),__vite__mapDeps([16,2,1,3,4,0,6])),json:()=>i(()=>import(`./dist-BSugRTzs.js`).then(e=>e.json()),__vite__mapDeps([17,4,1,0,2,3,6])),jsonc:()=>i(()=>import(`./dist-BSugRTzs.js`).then(e=>e.json()),__vite__mapDeps([17,4,1,0,2,3,6])),json5:()=>i(()=>import(`./dist-BSugRTzs.js`).then(e=>e.json()),__vite__mapDeps([17,4,1,0,2,3,6])),html:()=>i(()=>import(`./dist-vK4fMIi8.js`).then(e=>e.html()),__vite__mapDeps([12,2,1,3,4,0,6,13,7,8])),htm:()=>i(()=>import(`./dist-vK4fMIi8.js`).then(e=>e.html()),__vite__mapDeps([12,2,1,3,4,0,6,13,7,8])),vue:()=>i(()=>import(`./dist-vK4fMIi8.js`).then(e=>e.html()),__vite__mapDeps([12,2,1,3,4,0,6,13,7,8])),svelte:()=>i(()=>import(`./dist-vK4fMIi8.js`).then(e=>e.html()),__vite__mapDeps([12,2,1,3,4,0,6,13,7,8])),css:()=>i(()=>import(`./dist-D5-SYidb.js`).then(e=>e.r).then(e=>e.css()),__vite__mapDeps([13,1,4,0,2,3,6])),md:()=>i(()=>import(`./dist-BUl4ovQu.js`).then(e=>e.markdown()),__vite__mapDeps([18,2,1,3,4,0,8,12,6,13,7])),markdown:()=>i(()=>import(`./dist-BUl4ovQu.js`).then(e=>e.markdown()),__vite__mapDeps([18,2,1,3,4,0,8,12,6,13,7])),mdx:()=>i(()=>import(`./dist-BUl4ovQu.js`).then(e=>e.markdown()),__vite__mapDeps([18,2,1,3,4,0,8,12,6,13,7])),rs:()=>i(()=>import(`./dist-AczI3ocs.js`).then(e=>e.rust()),__vite__mapDeps([19,4,1,0,2,3,6])),go:()=>i(()=>import(`./dist-QyJg7PsR.js`).then(e=>e.go()),__vite__mapDeps([20,4,1,0,2,3,6,8])),sh:()=>s(()=>i(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),bash:()=>s(()=>i(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),zsh:()=>s(()=>i(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),fish:()=>s(()=>i(()=>import(`./shell-DwuoZtxw.js`),[]),`shell`),ps1:()=>s(()=>i(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),psm1:()=>s(()=>i(()=>import(`./powershell-D8WpQPaX.js`),[]),`powershell`),rb:()=>s(()=>i(()=>import(`./ruby-ChfNwlCY.js`),[]),`ruby`),swift:()=>s(()=>i(()=>import(`./swift-DKB6_1j6.js`),[]),`swift`),toml:()=>s(()=>i(()=>import(`./toml-BPTmHmyx.js`),[]),`toml`),ini:()=>s(()=>i(()=>import(`./properties-C357ku5U.js`),[]),`properties`),cfg:()=>s(()=>i(()=>import(`./properties-C357ku5U.js`),[]),`properties`),conf:()=>s(()=>i(()=>import(`./properties-C357ku5U.js`),[]),`properties`),properties:()=>s(()=>i(()=>import(`./properties-C357ku5U.js`),[]),`properties`),dockerfile:()=>s(()=>i(()=>import(`./dockerfile-BDePf5PZ.js`),[]),`dockerfile`),diff:()=>s(()=>i(()=>import(`./diff-ChtP43wD.js`),[]),`diff`),patch:()=>s(()=>i(()=>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=r(),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:r,jumpToLine:s,onSave:c,workspaceId:l,blame:g,onPosition:v,readOnly:y=!1}){let 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)(null),O=(0,o.useRef)(r),k=(0,o.useRef)(c);O.current=r,k.current=c;let[A,j]=(0,o.useState)(!1),[M,N]=(0,o.useState)(!1),[P,F]=(0,o.useState)(`0,0`),[I,L]=(0,o.useState)(0);(0,o.useEffect)(()=>{let r=!1,a,o,s,c,l;return(async()=>{try{let d=h(e),f=u(d),[m,g,v,A,M,P,I,R]=await Promise.all([i(()=>import(`./dist-D978o95T.js`).then(e=>e.S),__vite__mapDeps([2,1])),i(()=>import(`./dist-B3-a6uF0.js`).then(e=>e.s),__vite__mapDeps([3,1,2])),i(()=>import(`./dist-gBVaCjue.js`),__vite__mapDeps([21,2,1,3,4,0])),i(()=>import(`./dist-scBkrwv-.js`),__vite__mapDeps([22,2,1,3])),i(()=>import(`./dist-BsG-6pTu.js`).then(e=>e.d),__vite__mapDeps([0,1,2,3,4])),i(()=>import(`./dist-Cus6_oaF.js`).then(e=>e.n),__vite__mapDeps([4,1])),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(r||!b.current)return;c=M,l=P,C.current=m.Annotation.define(),w.current=m.Transaction.addToHistory;let z=t.length<=p&&I!==null;o=new m.Compartment;let B=[g.lineNumbers(),g.highlightActiveLine(),g.drawSelection(),v.history(),g.keymap.of([v.indentWithTab,...v.defaultKeymap,...v.historyKeymap,...A.searchKeymap,{key:`Mod-s`,run:()=>(k.current(),!0)}]),g.EditorView.updateListener.of(e=>{e.docChanged&&!(C.current&&e.transactions.some(e=>e.annotation(C.current)===!0))&&O.current(e.state.doc.toString()),e.selectionSet&&F(`${e.state.selection.main.from},${e.state.selection.main.to}`)}),g.EditorView.domEventHandlers({mousedown:(e,t)=>(t.focus(),!1)})];if(y&&B.push(m.EditorState.readOnly.of(!0),g.EditorView.editable.of(!1)),R&&!y&&(s=new m.Compartment,B.splice(1,0,s.of([])),B.push(R.base)),I)try{B.push(I)}catch(e){console.warn(`[CodeMirror] Failed to apply language extension for .${d}:`,e),z=!1}if(z&&o&&c&&l)try{B.push(o.of(c.syntaxHighlighting(_(c,l))))}catch(e){console.warn(`[CodeMirror] Failed to attach syntaxHighlighting for .${d}:`,e),z=!1}if(a=new g.EditorView({state:m.EditorState.create({doc:t,extensions:B}),parent:b.current}),r){a.destroy();return}x.current=a,j(z),N(!0),T.current=R,E.current=s??null,D.current=null,L(e=>e+1);let V=new MutationObserver(()=>{let e=x.current;if(e&&z&&o&&c&&l)try{e.dispatch({effects:o.reconfigure(c.syntaxHighlighting(_(c,l)))})}catch{}});S.current=V,V.observe(document.documentElement,{attributes:!0,attributeFilter:[`data-theme`]})}catch(e){console.error(`[CodeMirror] Fatal editor initialization error:`,e),r||N(!0)}})(),()=>{r=!0,S.current?.disconnect(),S.current=null,a?.destroy(),x.current=null,N(!1),b.current&&(b.current.textContent=``)}},[e,y]),(0,o.useEffect)(()=>{let e=x.current;if(!e)return;let n=e.state.doc.toString();n!==t&&e.dispatch({changes:{from:0,to:n.length,insert:t},annotations:C.current?C.current.of(!0):void 0})},[t]),(0,o.useEffect)(()=>{let e=x.current;if(!e||!s)return;let t=e.state.doc.line(Math.min(Math.max(1,s.line),e.state.doc.lines)),n=Math.min(t.to,t.from+(s.column??1)-1);e.dispatch({selection:{anchor:t.to,head:n},scrollIntoView:!0}),e.focus()},[s,M]);let R=!!(g&&g.state===`ready`&&g.response&&g.path===e&&g.workspaceId===l);(0,o.useEffect)(()=>{let t=x.current,n=T.current,r=E.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;D.current!==o&&(D.current=o,t.dispatch({effects:[n.setBlame.of(o),r.reconfigure(o?n.gutter:[])]}))},[g?.state,g?.response,g?.path,g?.workspaceId,e,l,I]);let z=x.current?.state.doc.toString()??t,B=z.length<=m?z:z.slice(0,m),V=h(e),H=d(V),U=x.current?.state,W=U?.selection.main.head,G=W===void 0?void 0:U?.doc.lineAt(W),K=G?.number,q=W!==void 0&&G?W-G.from+1:void 0;return(0,o.useEffect)(()=>{M&&K!==void 0&&q!==void 0&&v?.({line:K,column:q,language:A&&H||`纯文本`,highlight:A?V:`plain`})},[M,K,q,A,H,V,v]),(0,o.useEffect)(()=>()=>v?.(),[v]),(0,f.jsxs)(`div`,{className:`file-cm-wrap`,"data-file-text":e,"data-file-content":B,"data-file-content-truncated":z.length>m?`1`:`0`,"data-file-selection":P,"data-file-editor-ready":M?`1`:`0`,"data-file-blame-gutter":R?`1`:void 0,onMouseDown:()=>x.current?.focus(),children:[(0,f.jsx)(`div`,{className:`file-cm`,ref:b,"aria-label":`${y?`查看`:`编辑`} ${e}`}),(!M||!v)&&(0,f.jsxs)(`div`,{className:`file-editor-status`,children:[!M&&(0,f.jsx)(`span`,{"data-file-editor-loading":`1`,children:`正在加载编辑器…`}),M&&W!==void 0&&G&&(0,f.jsxs)(`span`,{children:[`第 `,G.number,` 行,第 `,W-G.from+1,` 列`]}),M&&!A&&(0,f.jsx)(`span`,{"data-file-highlight-status":`plain`,children:`纯文本`}),M&&A&&H&&(0,f.jsx)(`span`,{"data-file-highlight-status":V,children:H})]})]})}export{v as CodeMirrorEditor,u as t,_ as themeHighlightStyle};