@evandu/super-pi 0.1.271 → 0.1.273
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 +10 -10
- package/dist/client/assets/{CodeMirrorEditor-Q77Plbqw.js → CodeMirrorEditor-D8MjtASz.js} +1 -1
- package/dist/client/assets/{GitDiffEditor-C0XYcNpE.js → GitDiffEditor-DFJmhUHc.js} +1 -1
- package/dist/client/assets/{index-CoLvWsuI.js → index-Bqutm6qV.js} +62 -62
- package/dist/client/index.html +1 -1
- package/dist/server/application/run-service.js +2 -2
- package/dist/server/http-server.js +39 -8
- package/dist/server/managed-http.js +37 -2
- package/dist/server/managed-model-adapter.js +11 -3
- package/dist/server/managed-model-relay.d.ts +12 -0
- package/dist/server/managed-model-relay.js +182 -0
- package/dist/server/managed-servers.d.ts +4 -0
- package/dist/server/managed-servers.js +93 -8
- package/dist/server/turn-failure.d.ts +2 -0
- package/dist/server/turn-failure.js +11 -0
- package/dist/server/types.d.ts +1 -0
- package/dist/server/update.d.ts +6 -0
- package/dist/server/update.js +16 -1
- package/dist/server/ws-server.js +16 -0
- package/dist/shared/managed-servers.d.ts +2 -0
- package/dist/shared/update-status.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"hash": "
|
|
2
|
+
"hash": "589067076d1f0f27f1556f9ab372fa6bb40cccac8b589e94307dfd6ba4105c64",
|
|
3
3
|
"files": {
|
|
4
|
-
"src/client/App.tsx": "
|
|
4
|
+
"src/client/App.tsx": "8c6de69d073b730b33f1d2e2cd86f73ee4fc29aa089369e316b944c900331cbb",
|
|
5
5
|
"src/client/CacheWarmingSettings.tsx": "cce26c4547634b76c08c681a4b9605f884d8502f554f12ff8c30cbd2fd0bd9c0",
|
|
6
6
|
"src/client/CodeMirrorEditor.tsx": "10e4444d606b731a117417b052401f27b5d14ba8d12ff518e31ee188bf66e512",
|
|
7
7
|
"src/client/DesktopPanel.tsx": "ffe835f8c350dfc7ff8f2c6c0b820d9188156a68482c640aa59567c3f2c81ddf",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"src/client/HelpWindow.tsx": "dd4767f4cdced2fcdb50769eb5417ef8de722f43bbd594c9854f49fe61d15d97",
|
|
19
19
|
"src/client/KnowledgeFilePicker.tsx": "82bdd65e8a624276abd5a7530ef47f86a5f9b7649b464080638055991f6278cf",
|
|
20
20
|
"src/client/KnowledgePanel.tsx": "1e64ee6f9d29456ab9470424def8269cc9b3935e3b8ba674739ce5a6cb7db56d",
|
|
21
|
-
"src/client/ManagedServersPanel.tsx": "
|
|
21
|
+
"src/client/ManagedServersPanel.tsx": "a1998638fdd5fbde01335b0e9175936d60d3c5df8136fcb645807a333de2bce2",
|
|
22
22
|
"src/client/MarkdownSyntaxSettings.tsx": "9124d02956a4d70e2607fc584b226f8a82764b613015958fe117159d0cbf78e1",
|
|
23
23
|
"src/client/MarkdownView.tsx": "16eae0d3d5c23e30ad2ed297dc4b2325e3b505376dbf3e498388c50f84ef3439",
|
|
24
24
|
"src/client/MathView.tsx": "f322a430b93594dd625b4c699994574f81d9bac72fa49b904505ca6e9e3dcb93",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"src/client/MessageMedia.tsx": "4aee39d81ba4f405f6f3cd66e0ca4c89fc9a59145c2c463743a9869d78a2df25",
|
|
27
27
|
"src/client/NativeToolsPanel.tsx": "31e544b6def3cf0b09d86c485846c48cf787c518575b34aaceb930a8a68c96b6",
|
|
28
28
|
"src/client/ProjectControlPanel.tsx": "ddd1ba2249bd070d35ad0e9bd7154b088c8374c579ff9bbcfd3b46c2d144abd7",
|
|
29
|
-
"src/client/ProviderNetworkSettings.tsx": "
|
|
29
|
+
"src/client/ProviderNetworkSettings.tsx": "917c46fa6c4d24ec3e90f3365d313e7b97c070cf09d4d5c81cdea0fd31686138",
|
|
30
30
|
"src/client/ScheduledTasksPanel.tsx": "ed69d3617b6e4dc1a815cbf1a8d675c7c2010061b9fe2eac216813527c9cd7ab",
|
|
31
|
-
"src/client/ServerConnectionsPanel.tsx": "
|
|
31
|
+
"src/client/ServerConnectionsPanel.tsx": "0e19b52a945d9fa5d57de806ba52c3ced85628b438e51edbeeede3220625a7a0",
|
|
32
32
|
"src/client/SidebarSection.tsx": "579c014caeddd94d21911d7b9eca4ceef930ca13c2baeb7bf5ffba59c2bb0b75",
|
|
33
33
|
"src/client/SlashCommandMenu.tsx": "8b2319da03b55827865fb9b6646f7a820aa26cc460cceeed9fb7edb20ad9ebb7",
|
|
34
|
-
"src/client/SoftwareUpdate.tsx": "
|
|
34
|
+
"src/client/SoftwareUpdate.tsx": "b718b22e2f73c1e674f15a5b1ccd79adb7bf9b64e043d14fadb22beeda2d6b0e",
|
|
35
35
|
"src/client/SshVerificationForm.tsx": "8d7968822203e2404742f9fb6dde24656c97541628999e1d8cd34c8652c1c23e",
|
|
36
36
|
"src/client/Tabs.tsx": "a6a853b0752f5a96f451de502669fbb7ad4b5c141cb3f6a9cd3b9746797b5649",
|
|
37
37
|
"src/client/TavilyPanel.css": "22d4fb4a1bc95b2e0a96c49b9650a56f1a6cf7cfc3c6bc68564417d2c268e193",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"src/client/pending-operations.ts": "8a5f9e9711c0f875c8ed194196c218162de5270298dad4091351d41294c859d7",
|
|
66
66
|
"src/client/project-evidence.ts": "3bc5ea85f6b20a19a36cfdd4a958d83dd53b21f3d8f20fae1914a575dfbad3c4",
|
|
67
67
|
"src/client/reader-recovery.ts": "a72b6255bc66c5585bc5ec6f9eb6ab5e3cdea0edd7582408a0c2881e6417255f",
|
|
68
|
-
"src/client/server-connections.ts": "
|
|
68
|
+
"src/client/server-connections.ts": "15f02a415fdd85092d05ed523e739ba5c26b700449bf346ec7905fa4771a72b9",
|
|
69
69
|
"src/client/server-scope.ts": "bac94044310b832382d981c98b2ca7ca9731ca1ce2b0b384a9a746efec6a2585",
|
|
70
70
|
"src/client/session-tree.ts": "08a14c6611fdd9a72001eb1672060479e7660de5a5d221c7e80036209fd26546",
|
|
71
71
|
"src/client/shared-read-receipts.ts": "3554e6f85c20d2c2228cca02579b1e5bc2c1c9a3fff7caa4421055d564a04e9b",
|
|
@@ -74,17 +74,17 @@
|
|
|
74
74
|
"src/client/styles.css": "40e535d1ac35e37e2936ead412b15d3bfe6a786d6ee03cfd037bc5eb862691a9",
|
|
75
75
|
"src/client/system-notifications.ts": "1c87edfa9879b42f602dc74848723bb9c9a6ce3bfb0d2eaccde9f04fb16bb070",
|
|
76
76
|
"src/client/terminal-emulator.ts": "ffcc4f5fbddaf25cebcc9e03dbe5d7d0ad2c21586f5d169e57c04c82e2308b3b",
|
|
77
|
-
"src/client/theme.tsx": "
|
|
77
|
+
"src/client/theme.tsx": "a5ed8e38f37fc1aac98838574ae0ae1698038d28b0395734a6d66d578c53ecc2",
|
|
78
78
|
"src/client/tool-frame-bridge.ts": "74b8afda4fe321101124cadee6e79ada2d733f05af05d4953d0530d3ed3c2a36",
|
|
79
79
|
"src/client/tool-launcher.ts": "9699c9498c905e395bbe89e0e367721ab253b5ec1e318a8093ce6a88c2ff5c29",
|
|
80
80
|
"src/client/tool-sharing.ts": "011212825dbbffe18c8f15aca721c02938ab6273fb5607b072a1e7b8b1853640",
|
|
81
81
|
"src/client/tool-shortcuts.ts": "4422d29ba770af6acef18e66c6be05a9bc021f7323c7ca28bbe7668f26d4adb8",
|
|
82
82
|
"src/client/tools.ts": "58fe41f0edbd490e3fab7f12f258b1dbc2163b653553b03ac61caf1543618e50",
|
|
83
|
-
"src/client/types.ts": "
|
|
83
|
+
"src/client/types.ts": "2c26715d68dbdfe83b2d8ab9afa2fd52b6d1ed340e8903ade5d1f09fbcd2487e",
|
|
84
84
|
"src/client/vite-env.d.ts": "65996936fbb042915f7b74a200fcdde7e410f32a669b1ab9597cfaa4b0faddb5",
|
|
85
85
|
"src/client/workbench-memory.ts": "72c9b52cc28f8c8e90636c2425f0d14c4b5af1e36bff9bf8ad272d0811e60099",
|
|
86
86
|
"src/client/workbench-navigation.ts": "3b229752a8ce4a45eba7aeff040eb33001413190141f1e9b8e5f38246a1761e2",
|
|
87
87
|
"src/client/workbench-search-panel.css": "6978c03db4f17411e9064242b0ff786a520ee8cf58fe8a9d0ea42872ba3737f0"
|
|
88
88
|
},
|
|
89
|
-
"recordedAt": "2026-11-
|
|
89
|
+
"recordedAt": "2026-11-20T17:22:06.163Z"
|
|
90
90
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dist-ZAR1Tu2c.js","assets/rolldown-runtime-XKyaHtl9.js","assets/dist-i79xiXVk.js","assets/dist-D978o95T.js","assets/dist-DlPa5gNa.js","assets/dist-DRBIy9A1.js","assets/dist-BlRuQIg1.js","assets/dist-HXD8sSA4.js","assets/dist-DjI7p99D.js","assets/dist-CZ4PyxQu.js","assets/dist-DGBjhKI9.js","assets/dist-LbeLCeoq.js","assets/dist-D8HpMxmZ.js","assets/dist-Dcww9FSw.js","assets/dist-D5u1uPmZ.js","assets/dist-CxmJXjJI.js","assets/dist-ONdtnupI.js","assets/dist-CQncCwUc.js","assets/dist-3qQVP6l8.js","assets/dist-BvjUKkwy.js","assets/dist-YqmXusLA.js","assets/dist-DxPJ1PN-.js","assets/dist-CfTFp0AF.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{c as t,l as n,n as r,r as i,t as a}from"./index-CoLvWsuI.js";var o=e(n(),1);async function s(e,t){let[{StreamLanguage:n},r]=await Promise.all([i(()=>import(`./dist-ZAR1Tu2c.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-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),cc:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),cxx:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),hpp:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),hh:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),hxx:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),c:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),h:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),cu:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),cuh:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),js:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([7,1,6,2,0,3,4,8])),jsx:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([7,1,6,2,0,3,4,8])),mjs:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([7,1,6,2,0,3,4,8])),cjs:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([7,1,6,2,0,3,4,8])),ts:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([7,1,6,2,0,3,4,8])),tsx:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0,jsx:!0})),__vite__mapDeps([7,1,6,2,0,3,4,8])),mts:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([7,1,6,2,0,3,4,8])),cts:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([7,1,6,2,0,3,4,8])),py:()=>i(()=>import(`./dist-CZ4PyxQu.js`).then(e=>e.python()),__vite__mapDeps([9,6,2,1,0,3,4,8])),pyi:()=>i(()=>import(`./dist-CZ4PyxQu.js`).then(e=>e.python()),__vite__mapDeps([9,6,2,1,0,3,4,8])),java:()=>i(()=>import(`./dist-DGBjhKI9.js`).then(e=>e.java()),__vite__mapDeps([10,6,2,1,0,3,4])),php:()=>i(()=>import(`./dist-LbeLCeoq.js`).then(e=>e.php()),__vite__mapDeps([11,6,2,1,12,13,0,3,4,7,8])),sql:()=>i(()=>import(`./dist-D5u1uPmZ.js`).then(e=>e.sql()),__vite__mapDeps([14,0,1,2,3,4,6,8])),yaml:()=>i(()=>import(`./dist-CxmJXjJI.js`).then(e=>e.yaml()),__vite__mapDeps([15,6,2,1,0,3,4])),yml:()=>i(()=>import(`./dist-CxmJXjJI.js`).then(e=>e.yaml()),__vite__mapDeps([15,6,2,1,0,3,4])),xml:()=>i(()=>import(`./dist-ONdtnupI.js`).then(e=>e.xml()),__vite__mapDeps([16,6,2,1,0,3,4])),json:()=>i(()=>import(`./dist-CQncCwUc.js`).then(e=>e.json()),__vite__mapDeps([17,6,2,1,0,3,4])),jsonc:()=>i(()=>import(`./dist-CQncCwUc.js`).then(e=>e.json()),__vite__mapDeps([17,6,2,1,0,3,4])),json5:()=>i(()=>import(`./dist-CQncCwUc.js`).then(e=>e.json()),__vite__mapDeps([17,6,2,1,0,3,4])),html:()=>i(()=>import(`./dist-D8HpMxmZ.js`).then(e=>e.html()),__vite__mapDeps([12,6,2,1,13,0,3,4,7,8])),htm:()=>i(()=>import(`./dist-D8HpMxmZ.js`).then(e=>e.html()),__vite__mapDeps([12,6,2,1,13,0,3,4,7,8])),vue:()=>i(()=>import(`./dist-D8HpMxmZ.js`).then(e=>e.html()),__vite__mapDeps([12,6,2,1,13,0,3,4,7,8])),svelte:()=>i(()=>import(`./dist-D8HpMxmZ.js`).then(e=>e.html()),__vite__mapDeps([12,6,2,1,13,0,3,4,7,8])),css:()=>i(()=>import(`./dist-Dcww9FSw.js`).then(e=>e.r).then(e=>e.css()),__vite__mapDeps([13,1,6,2,0,3,4])),md:()=>i(()=>import(`./dist-3qQVP6l8.js`).then(e=>e.markdown()),__vite__mapDeps([18,3,1,4,0,2,8,12,6,13,7])),markdown:()=>i(()=>import(`./dist-3qQVP6l8.js`).then(e=>e.markdown()),__vite__mapDeps([18,3,1,4,0,2,8,12,6,13,7])),mdx:()=>i(()=>import(`./dist-3qQVP6l8.js`).then(e=>e.markdown()),__vite__mapDeps([18,3,1,4,0,2,8,12,6,13,7])),rs:()=>i(()=>import(`./dist-BvjUKkwy.js`).then(e=>e.rust()),__vite__mapDeps([19,6,2,1,0,3,4])),go:()=>i(()=>import(`./dist-YqmXusLA.js`).then(e=>e.go()),__vite__mapDeps([20,6,2,1,0,3,4,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=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:n,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)(n),k=(0,o.useRef)(c);O.current=n,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 n=!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([3,1])),i(()=>import(`./dist-DlPa5gNa.js`).then(e=>e.s),__vite__mapDeps([4,1,3])),i(()=>import(`./dist-DxPJ1PN-.js`),__vite__mapDeps([21,3,1,4,0,2])),i(()=>import(`./dist-CfTFp0AF.js`),__vite__mapDeps([22,4,1,3])),i(()=>import(`./dist-ZAR1Tu2c.js`).then(e=>e.d),__vite__mapDeps([0,1,2,3,4])),i(()=>import(`./dist-i79xiXVk.js`).then(e=>e.n),__vite__mapDeps([2,1])),f?f().catch(e=>(console.warn(`[CodeMirror] Failed to load language for .${d}:`,e),null)):Promise.resolve(null),r().catch(e=>(console.warn(`[CodeMirror] Failed to build the blame extension:`,e),null))]);if(n||!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}),n){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),n||N(!0)}})(),()=>{n=!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{c as t,l as n,n as r,r as i,t as a}from"./index-Bqutm6qV.js";var o=e(n(),1);async function s(e,t){let[{StreamLanguage:n},r]=await Promise.all([i(()=>import(`./dist-ZAR1Tu2c.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-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),cc:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),cxx:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),hpp:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),hh:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),hxx:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),c:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),h:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),cu:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),cuh:()=>i(()=>import(`./dist-DRBIy9A1.js`).then(e=>e.cpp()),__vite__mapDeps([5,6,2,1,0,3,4])),js:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([7,1,6,2,0,3,4,8])),jsx:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript({jsx:!0})),__vite__mapDeps([7,1,6,2,0,3,4,8])),mjs:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([7,1,6,2,0,3,4,8])),cjs:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript()),__vite__mapDeps([7,1,6,2,0,3,4,8])),ts:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([7,1,6,2,0,3,4,8])),tsx:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0,jsx:!0})),__vite__mapDeps([7,1,6,2,0,3,4,8])),mts:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([7,1,6,2,0,3,4,8])),cts:()=>i(()=>import(`./dist-HXD8sSA4.js`).then(e=>e.t).then(e=>e.javascript({typescript:!0})),__vite__mapDeps([7,1,6,2,0,3,4,8])),py:()=>i(()=>import(`./dist-CZ4PyxQu.js`).then(e=>e.python()),__vite__mapDeps([9,6,2,1,0,3,4,8])),pyi:()=>i(()=>import(`./dist-CZ4PyxQu.js`).then(e=>e.python()),__vite__mapDeps([9,6,2,1,0,3,4,8])),java:()=>i(()=>import(`./dist-DGBjhKI9.js`).then(e=>e.java()),__vite__mapDeps([10,6,2,1,0,3,4])),php:()=>i(()=>import(`./dist-LbeLCeoq.js`).then(e=>e.php()),__vite__mapDeps([11,6,2,1,12,13,0,3,4,7,8])),sql:()=>i(()=>import(`./dist-D5u1uPmZ.js`).then(e=>e.sql()),__vite__mapDeps([14,0,1,2,3,4,6,8])),yaml:()=>i(()=>import(`./dist-CxmJXjJI.js`).then(e=>e.yaml()),__vite__mapDeps([15,6,2,1,0,3,4])),yml:()=>i(()=>import(`./dist-CxmJXjJI.js`).then(e=>e.yaml()),__vite__mapDeps([15,6,2,1,0,3,4])),xml:()=>i(()=>import(`./dist-ONdtnupI.js`).then(e=>e.xml()),__vite__mapDeps([16,6,2,1,0,3,4])),json:()=>i(()=>import(`./dist-CQncCwUc.js`).then(e=>e.json()),__vite__mapDeps([17,6,2,1,0,3,4])),jsonc:()=>i(()=>import(`./dist-CQncCwUc.js`).then(e=>e.json()),__vite__mapDeps([17,6,2,1,0,3,4])),json5:()=>i(()=>import(`./dist-CQncCwUc.js`).then(e=>e.json()),__vite__mapDeps([17,6,2,1,0,3,4])),html:()=>i(()=>import(`./dist-D8HpMxmZ.js`).then(e=>e.html()),__vite__mapDeps([12,6,2,1,13,0,3,4,7,8])),htm:()=>i(()=>import(`./dist-D8HpMxmZ.js`).then(e=>e.html()),__vite__mapDeps([12,6,2,1,13,0,3,4,7,8])),vue:()=>i(()=>import(`./dist-D8HpMxmZ.js`).then(e=>e.html()),__vite__mapDeps([12,6,2,1,13,0,3,4,7,8])),svelte:()=>i(()=>import(`./dist-D8HpMxmZ.js`).then(e=>e.html()),__vite__mapDeps([12,6,2,1,13,0,3,4,7,8])),css:()=>i(()=>import(`./dist-Dcww9FSw.js`).then(e=>e.r).then(e=>e.css()),__vite__mapDeps([13,1,6,2,0,3,4])),md:()=>i(()=>import(`./dist-3qQVP6l8.js`).then(e=>e.markdown()),__vite__mapDeps([18,3,1,4,0,2,8,12,6,13,7])),markdown:()=>i(()=>import(`./dist-3qQVP6l8.js`).then(e=>e.markdown()),__vite__mapDeps([18,3,1,4,0,2,8,12,6,13,7])),mdx:()=>i(()=>import(`./dist-3qQVP6l8.js`).then(e=>e.markdown()),__vite__mapDeps([18,3,1,4,0,2,8,12,6,13,7])),rs:()=>i(()=>import(`./dist-BvjUKkwy.js`).then(e=>e.rust()),__vite__mapDeps([19,6,2,1,0,3,4])),go:()=>i(()=>import(`./dist-YqmXusLA.js`).then(e=>e.go()),__vite__mapDeps([20,6,2,1,0,3,4,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=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:n,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)(n),k=(0,o.useRef)(c);O.current=n,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 n=!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([3,1])),i(()=>import(`./dist-DlPa5gNa.js`).then(e=>e.s),__vite__mapDeps([4,1,3])),i(()=>import(`./dist-DxPJ1PN-.js`),__vite__mapDeps([21,3,1,4,0,2])),i(()=>import(`./dist-CfTFp0AF.js`),__vite__mapDeps([22,4,1,3])),i(()=>import(`./dist-ZAR1Tu2c.js`).then(e=>e.d),__vite__mapDeps([0,1,2,3,4])),i(()=>import(`./dist-i79xiXVk.js`).then(e=>e.n),__vite__mapDeps([2,1])),f?f().catch(e=>(console.warn(`[CodeMirror] Failed to load language for .${d}:`,e),null)):Promise.resolve(null),r().catch(e=>(console.warn(`[CodeMirror] Failed to build the blame extension:`,e),null))]);if(n||!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}),n){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),n||N(!0)}})(),()=>{n=!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};
|