diff --git a/client/src/components/chat.tsx b/client/src/components/chat.tsx index e9b06d2..6acbfc6 100644 --- a/client/src/components/chat.tsx +++ b/client/src/components/chat.tsx @@ -12,10 +12,15 @@ import { Button, Markdown } from './utils' import { ChatContext, GameIdContext, PageContext, PreferencesContext, ProofContext } from '../state/context' import { GameHint, InteractiveGoalsWithHints } from './infoview/rpc_api' import { lastStepHasErrors } from './infoview/goals' +import { AllMessages } from '../../../node_modules/@leanprover/infoview/dist/infoview/messages' +import { LeanDiagnostic, RpcErrorCode, getInteractiveDiagnostics, InteractiveDiagnostic, TaggedText_stripTags } from '@leanprover/infoview-api' +import { Location, DocumentUri, Diagnostic, DiagnosticSeverity, PublishDiagnosticsParams } from 'vscode-languageserver-protocol' +import { InteractiveMessage } from '../../../node_modules/lean4-infoview/src/infoview/traceExplorer' import '../css/chat.css' import { faHome } from '@fortawesome/free-solid-svg-icons' + /** Split a string by double newlines and filters out empty segments. */ function splitIntro (intro : string) { return intro.split(/\n(\s*\n)+/).filter(t => t.trim()) @@ -164,11 +169,23 @@ function getHintText(hint: GameHint): string { } } +/** Hint kinds. Note that number 1-4 are matching the numbers from `DiagnosticSeverity` + * from the vscode language server protocol. + */ +enum HintKind { + Error = 1, + Warning = 2, + Information = 3, + Hint = 4, + GameHint = 5, + Conclusion = 7, +} + /** Bundling a hint with the proof-step it comes from. */ type GameHintWithStep = { hint: GameHint + kind: HintKind step?: number - conclusion?: boolean } /** Filter hints to not show consequtive identical hints twice. @@ -186,8 +203,14 @@ export function filterHints(hints: GameHint[], prevHints: GameHint[]): GameHint[ } } +// TODO +function helper(step, proof, kind, typewriterMode, selectedStep) { + return (step == proof?.steps?.length - (lastStepHasErrors(proof) ? 2 : 1) ? ' recent' : '') + + (!(kind == HintKind.Conclusion) && step >= (typewriterMode ? proof?.steps?.length : selectedStep+1) ? ' deleted-hint' : '') +} + /** A hint as it is displayed in the chat. */ -export function Hint({hint, step=null, conclusion=false} : GameHintWithStep) { +export function Hint({hint, kind, step=null} : GameHintWithStep) { const { levelId } = useContext(GameIdContext) const { selectedStep, setSelectedStep } = useContext(ChatContext) @@ -208,10 +231,9 @@ export function Hint({hint, step=null, conclusion=false} : GameHintWithStep) { // In typewriter, deleting parts of the proof stores the removed hints as `deletedChat` // until the next command is submitted; in editor, moving the cursor through the proof will // render all hints - return
= (typewriterMode ? proof?.steps?.length : selectedStep+1) ? ' deleted-hint' : '') } onClick={toggleSelection}> + return
{getHintText(hint)}
} @@ -221,9 +243,8 @@ export function Hint({hint, step=null, conclusion=false} : GameHintWithStep) { * * Set `conclusion` to true to trigger different style and disable selecting/deleting. */ -export function Hints({ hints, conclusion, counter=undefined } : { +export function Hints({ hints, counter=undefined } : { hints: GameHintWithStep[], - conclusion?: boolean, counter?: number }) { @@ -238,7 +259,7 @@ export function Hints({ hints, conclusion, counter=undefined } : { return <> { hints.slice(0, counter).map((hint, j) => ((!hint.hint.hidden || showHelp.has(hint.step)) && - + ) )} {/* { //showHelp.has(hint.step) && @@ -268,7 +289,6 @@ export function ChatPanel ({visible = true}) { const [counter, setCounter] = useState(1) const [introText, setIntroText] = useState>([]) - const [chatMessages, setChatMessages] = useState>([]) const { chatRef, deletedChat, showHelp, selectedStep } = useContext(ChatContext) const { proof } = useContext(ProofContext) @@ -280,11 +300,9 @@ export function ChatPanel ({visible = true}) { // load and display the correct intro text useEffect(() => { - let messages: GameHintWithStep[] = [] - if (levelId > 0) { let introText = t(levelInfo.data?.introduction, {ns : gameId}).trim() - let introHint: GameHintWithStep = {hint: {text: introText, hidden: false, rawText: introText }, step: 0} + let introHint: GameHintWithStep = {hint: {text: introText, hidden: false, rawText: introText }, kind: HintKind.GameHint, step: 0} // playable level: show the level's intro if (levelInfo.data?.introduction) { @@ -294,16 +312,10 @@ export function ChatPanel ({visible = true}) { else { setIntroText([]) } - - proof?.steps?.forEach((step, i) => { - console.log("tesr") - messages = messages.concat(filterHints(step.goals[0]?.hints, proof.steps[i-1]?.goals[0]?.hints).map(hint => ({hint: hint, step: i}))) - }) - } else { if (worldId) { let introText = t(gameInfo.data?.worlds.nodes[worldId].introduction, {ns: gameId}).trim() - let introHints: GameHintWithStep[] = splitIntro(introText).map( txt => ({hint: {text: txt, hidden: false, rawText: txt }, step: 0})) + let introHints: GameHintWithStep[] = splitIntro(introText).map( txt => ({hint: {text: txt, hidden: false, rawText: txt }, kind: HintKind.GameHint, step: 0})) // Level 0: show the world's intro if (gameInfo.data?.worlds.nodes[worldId].introduction) { @@ -314,7 +326,7 @@ export function ChatPanel ({visible = true}) { } } else { let introText = t(gameInfo.data?.introduction, {ns : gameId}).trim() - let introHints: GameHintWithStep[] = splitIntro(introText).map( txt => ({hint: {text: txt, hidden: false, rawText: txt }, step: 0})) + let introHints: GameHintWithStep[] = splitIntro(introText).map( txt => ({hint: {text: txt, hidden: false, rawText: txt }, kind: HintKind.GameHint, step: 0})) // world overview: show the game's intro if (gameInfo.data?.introduction) { @@ -325,9 +337,6 @@ export function ChatPanel ({visible = true}) { } } } - console.log('chat messages:') - console.log(messages) - setChatMessages(messages) }, [gameInfo, levelInfo, gameId, worldId, levelId, proof]) // Scroll the chat @@ -355,7 +364,7 @@ export function ChatPanel ({visible = true}) { console.debug('scroll chat: down') chatRef.current!.lastElementChild?.scrollIntoView({block: "center"}) } - }, [counter, introText, chatMessages, gameId, worldId, levelId]) + }, [counter, introText, gameId, worldId, levelId]) // Scroll down when new hidden hints are triggered useEffect(() => { @@ -380,6 +389,19 @@ export function ChatPanel ({visible = true}) { } }, [selectedStep, gameId, worldId, levelId]) + /** TODO: What's the magic here? Only needed if diags are displayed in chat. */ + function diagToString (diag) { + // Hide "unsolved goals" messages + let message; + if ("append" in diag.message && "text" in diag.message.append[0] && + diag.message?.append[0].text === "unsolved goals") { + message = diag.message.append[0] + } else { + message = diag.message + } + return message + } + return
{ gameInfo.error && @@ -388,17 +410,32 @@ export function ChatPanel ({visible = true}) {
} - + {proof?.steps.map((step, i) => { + let x = [].concat( + filterHints(step.goals[0]?.hints, proof.steps[i-1]?.goals[0]?.hints).map(hint => ({hint: hint, kind: HintKind.GameHint, step: i})), + // // TODO: Uncomment this if you want to see the diags in chat + // step.diags.map(diag => ({hint: diagToString(diag), kind: diag.severity, step: i})) + ) + + return <> + + + })} + + {/* */} {/* {proof?.steps.map((step, i) => ({hint: hint, step: i}))}/> )} */} {/* ({hint: hint, step: proof?.steps?.length - 1}))} /> */} { deletedChat && - ({hint: hint, step: proof?.steps?.length}))} /> + ({hint: hint, kind: HintKind.GameHint, step: proof?.steps?.length}))} /> } { completed && levelInfo.data?.conclusion && - + } {/* {chatMessages.map(((t, i) => diff --git a/client/src/components/infoview/typewriter.tsx b/client/src/components/infoview/typewriter.tsx index f83bd5f..211b8d3 100644 --- a/client/src/components/infoview/typewriter.tsx +++ b/client/src/components/infoview/typewriter.tsx @@ -93,19 +93,6 @@ export function Typewriter({disabled}: {disabled?: boolean}) { const inputRef = useRef() - // TODO: added for new typewriter. Clean up. - const [abbrRewriter, setAbbrRewriter] = useState() - const typewriterRef = useRef() - const typewriterContent = useRef('(new typewriter)') - const handleTypewriterChange = evt => { - typewriterContent.current = evt.target.value; - abbrRewriter?.resetAbbreviations() - }; - const handleTypeWriterBlur = () => { - console.log(`handle typewriter blur. content: ${typewriterContent.current}`); - }; - - // The context storing all information about the current proof const {proof, setProof, interimDiags, setInterimDiags, setCrashed} = React.useContext(ProofContext) @@ -194,16 +181,6 @@ export function Typewriter({disabled}: {disabled?: boolean}) { // }, [uri]); - // Use unicode abbreviations in typewriter input - useEffect(() => { - const abbrRewriter = new InputAbbreviationRewriter({ - abbreviationCharacter: "\\", - customTranslations: {}, - eagerReplacementEnabled: false - }, typewriterRef.current!) - setAbbrRewriter(abbrRewriter) - }, []) - useEffect(() => { const myEditor = monaco.editor.create(inputRef.current!, { value: typewriterInput, @@ -291,14 +268,6 @@ export function Typewriter({disabled}: {disabled?: boolean}) {
- - - {/*
*/} diff --git a/client/src/css/chat.css b/client/src/css/chat.css index f071a68..1d370f4 100644 --- a/client/src/css/chat.css +++ b/client/src/css/chat.css @@ -55,18 +55,18 @@ border-radius: 3px 3px 3px 3px; } -.message.information, .message.info { +.message.information, .message.info, .message.kind-5, .message.kind-3, .message.kind-4 { /* color: #059; */ color: #000; background-color: #DDF6FF; } -.message.warning { +.message.warning, .message.kind-2 { color: #9F6000; background-color: #FEEFB3; } -.message.error { +.message.error, .message.kind-1 { color: #D8000C; background-color: #FFBABA; } @@ -77,7 +77,7 @@ box-shadow: .0em .0em .5em .2em #EEE; } -.message.success { +.message.success, , .message.kind-6 { color: #000; background-color: #E5FFDD; } diff --git a/client/src/css/level.css b/client/src/css/level.css index 133db44..09e7583 100644 --- a/client/src/css/level.css +++ b/client/src/css/level.css @@ -357,8 +357,9 @@ td code { text-align: center; } -#unicode-input { +#unicode-input, .lean-abbrev-input { min-width: 0; + white-space: pre; flex: 1; /* padding: 0.4em .6em 0; */ font-size: var(--vscode-editor-font-size); diff --git a/package-lock.json b/package-lock.json index 86ad7af..a66fa95 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@fortawesome/free-regular-svg-icons": "^6.5.1", "@fortawesome/free-solid-svg-icons": "^6.5.1", "@fortawesome/react-fontawesome": "^0.2.0", - "@leanprover/infoview": "^0.4.3", + "@leanprover/infoview": "^0.7.1", "@leanprover/unicode-input-component": "^0.1.0", "@mui/icons-material": "^5.11.0", "@mui/material": "^5.11.1", @@ -2170,231 +2170,6 @@ "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.3.1.tgz", "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" }, - "node_modules/@esbuild/android-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", - "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", - "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/android-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", - "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "android" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", - "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/darwin-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", - "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", - "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/freebsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", - "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "freebsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", - "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", - "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", - "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-loong64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", - "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", - "cpu": [ - "loong64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-mips64el": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", - "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", - "cpu": [ - "mips64el" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-ppc64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", - "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", - "cpu": [ - "ppc64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-riscv64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", - "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", - "cpu": [ - "riscv64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/linux-s390x": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", - "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", - "cpu": [ - "s390x" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@esbuild/linux-x64": { "version": "0.18.20", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", @@ -2410,96 +2185,6 @@ "node": ">=12" } }, - "node_modules/@esbuild/netbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", - "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "netbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/openbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", - "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "openbsd" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/sunos-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", - "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "sunos" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", - "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", - "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, - "node_modules/@esbuild/win32-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", - "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=12" - } - }, "node_modules/@floating-ui/core": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz", @@ -2811,17 +2496,18 @@ } }, "node_modules/@leanprover/infoview": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/@leanprover/infoview/-/infoview-0.4.4.tgz", - "integrity": "sha512-OxHffFaHcEudLyBEWpicOl7TfXuTYxW5Sz1RkHdUINWJpQsQn60YDF5fNRKmSb0d/fm7p+LVeBvM273jvfR5wQ==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@leanprover/infoview/-/infoview-0.7.1.tgz", + "integrity": "sha512-7I1T8RfewiGfn7TN3et3s01gGsWgarsstbZdxcq4ZztKE412Tm4sg0wnfMgMOSzx7zzkdC8DfBQsIlY2Qbqvxg==", "dependencies": { - "@leanprover/infoview-api": "~0.2.1", + "@leanprover/infoview-api": "~0.4.0", "@vscode/codicons": "^0.0.32", - "es-module-shims": "^1.6.2", - "marked": "^4.2.2", - "react-fast-compare": "^3.2.0", + "@vscode/webview-ui-toolkit": "^1.4.0", + "es-module-shims": "^1.7.3", + "marked": "^4.3.0", + "react-fast-compare": "^3.2.2", "tachyons": "^4.12.0", - "vscode-languageserver-protocol": "^3.17.2" + "vscode-languageserver-protocol": "^3.17.3" } }, "node_modules/@leanprover/infoview-api": { @@ -2829,6 +2515,11 @@ "resolved": "https://registry.npmjs.org/@leanprover/infoview-api/-/infoview-api-0.2.1.tgz", "integrity": "sha512-4sYdwOhUsa5wfvo/ZsCbcm8fBWcrATciZq0sWfmi5NRbIyZ+c2QjTm6D9CeYPCNvz9yvD1KBp/2+hKEZ8SOHkA==" }, + "node_modules/@leanprover/infoview/node_modules/@leanprover/infoview-api": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@leanprover/infoview-api/-/infoview-api-0.4.0.tgz", + "integrity": "sha512-g9Eo2DGd2m3QsEjMdREUFzfGY1Ya6keLf49hUHEONFfIBAa4/a0CGapPz9uci/0oFnE4yXt//KpmBRfLSYxRzg==" + }, "node_modules/@leanprover/unicode-input": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/@leanprover/unicode-input/-/unicode-input-0.1.0.tgz", @@ -2842,6 +2533,47 @@ "@leanprover/unicode-input": "~0.1.0" } }, + "node_modules/@microsoft/fast-element": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@microsoft/fast-element/-/fast-element-1.13.0.tgz", + "integrity": "sha512-iFhzKbbD0cFRo9cEzLS3Tdo9BYuatdxmCEKCpZs1Cro/93zNMpZ/Y9/Z7SknmW6fhDZbpBvtO8lLh9TFEcNVAQ==" + }, + "node_modules/@microsoft/fast-foundation": { + "version": "2.49.6", + "resolved": "https://registry.npmjs.org/@microsoft/fast-foundation/-/fast-foundation-2.49.6.tgz", + "integrity": "sha512-DZVr+J/NIoskFC1Y6xnAowrMkdbf2d5o7UyWK6gW5AiQ6S386Ql8dw4KcC4kHaeE1yL2CKvweE79cj6ZhJhTvA==", + "dependencies": { + "@microsoft/fast-element": "^1.13.0", + "@microsoft/fast-web-utilities": "^5.4.1", + "tabbable": "^5.2.0", + "tslib": "^1.13.0" + } + }, + "node_modules/@microsoft/fast-foundation/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/@microsoft/fast-react-wrapper": { + "version": "0.3.24", + "resolved": "https://registry.npmjs.org/@microsoft/fast-react-wrapper/-/fast-react-wrapper-0.3.24.tgz", + "integrity": "sha512-sRnSBIKaO42p4mYoYR60spWVkg89wFxFAgQETIMazAm2TxtlsnsGszJnTwVhXq2Uz+XNiD8eKBkfzK5c/i6/Kw==", + "dependencies": { + "@microsoft/fast-element": "^1.13.0", + "@microsoft/fast-foundation": "^2.49.6" + }, + "peerDependencies": { + "react": ">=16.9.0" + } + }, + "node_modules/@microsoft/fast-web-utilities": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/@microsoft/fast-web-utilities/-/fast-web-utilities-5.4.1.tgz", + "integrity": "sha512-ReWYncndjV3c8D8iq9tp7NcFNc1vbVHvcBFPME2nNFKNbS1XCesYZGlIlf3ot5EmuOXPlrzUHOWzQ2vFpIkqDg==", + "dependencies": { + "exenv-es6": "^1.1.1" + } + }, "node_modules/@mui/base": { "version": "5.0.0-beta.34", "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.34.tgz", @@ -5044,81 +4776,6 @@ } } }, - "node_modules/@swc/core-darwin-arm64": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.4.0.tgz", - "integrity": "sha512-UTJ/Vz+s7Pagef6HmufWt6Rs0aUu+EJF4Pzuwvr7JQQ5b1DZeAAUeUtkUTFx/PvCbM8Xfw4XdKBUZfrIKCfW8A==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-darwin-x64": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.4.0.tgz", - "integrity": "sha512-f8v58u2GsGak8EtZFN9guXqE0Ep10Suny6xriaW2d8FGqESPyNrnBzli3aqkSeQk5gGqu2zJ7WiiKp3XoUOidA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.4.0.tgz", - "integrity": "sha512-q2KAkBzmPcTnRij/Y1fgHCKAGevUX/H4uUESrw1J5gmUg9Qip6onKV80lTumA1/aooGJ18LOsB31qdbwmZk9OA==", - "cpu": [ - "arm" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.4.0.tgz", - "integrity": "sha512-SknGu96W0mzHtLHWm+62fk5+Omp9fMPFO7AWyGFmz2tr8EgRRXtTSrBUnWhAbgcalnhen48GsvtMdxf1KNputg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.4.0.tgz", - "integrity": "sha512-/k3TDvpBRMDNskHooNN1KqwUhcwkfBlIYxRTnJvsfT2C7My4pffR+4KXmt0IKynlTTbCdlU/4jgX4801FSuliw==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=10" - } - }, "node_modules/@swc/core-linux-x64-gnu": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.4.0.tgz", @@ -5149,51 +4806,6 @@ "node": ">=10" } }, - "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.4.0.tgz", - "integrity": "sha512-biHYm1AronEKlt47O/H8sSOBM2BKXMmWT+ApvlxUw50m1RGNnVnE0bgY7tylFuuSiWyXsQPJbmUV708JqORXVg==", - "cpu": [ - "arm64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.4.0.tgz", - "integrity": "sha512-TL5L2tFQb19kJwv6+elToGBj74QXCn9j+hZfwQatvZEJRA5rDK16eH6oAE751dGUArhnWlW3Vj65hViPvTuycw==", - "cpu": [ - "ia32" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.4.0.tgz", - "integrity": "sha512-e2xVezU7XZ2Stzn4i7TOQe2Kn84oYdG0M3A7XI7oTdcpsKCcKwgiMoroiAhqCv+iN20KNqhnWwJiUiTj/qN5AA==", - "cpu": [ - "x64" - ], - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, "node_modules/@swc/counter": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", @@ -5566,6 +5178,20 @@ "resolved": "https://registry.npmjs.org/@vscode/codicons/-/codicons-0.0.32.tgz", "integrity": "sha512-3lgSTWhAzzWN/EPURoY4ZDBEA80OPmnaknNujA3qnI4Iu7AONWd9xF3iE4L+4prIe8E3TUnLQ4pxoaFTEEZNwg==" }, + "node_modules/@vscode/webview-ui-toolkit": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@vscode/webview-ui-toolkit/-/webview-ui-toolkit-1.4.0.tgz", + "integrity": "sha512-modXVHQkZLsxgmd5yoP3ptRC/G8NBDD+ob+ngPiWNQdlrH6H1xR/qgOBD85bfU3BhOB5sZzFWBwwhp9/SfoHww==", + "dependencies": { + "@microsoft/fast-element": "^1.12.0", + "@microsoft/fast-foundation": "^2.49.4", + "@microsoft/fast-react-wrapper": "^0.3.22", + "tslib": "^2.6.2" + }, + "peerDependencies": { + "react": ">=16.9.0" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", @@ -7980,6 +7606,11 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, + "node_modules/exenv-es6": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/exenv-es6/-/exenv-es6-1.1.1.tgz", + "integrity": "sha512-vlVu3N8d6yEMpMsEm+7sUBAI81aqYYuEvfK0jNqmdb/OPXzzH7QWDDnVjMvDSY47JdHEqx/dfC/q8WkfoTmpGQ==" + }, "node_modules/express": { "version": "4.19.2", "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", @@ -8328,19 +7959,6 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -10665,6 +10283,20 @@ "vscode-languageserver-protocol": "^3.17.2" } }, + "node_modules/lean4/node_modules/@leanprover/infoview": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/@leanprover/infoview/-/infoview-0.4.5.tgz", + "integrity": "sha512-CK1Etux2e9lBg/eiDb0laj5Y9VAcPquLd9wdWU/GOiL1XAT64MVsGvhUsHr+LbZq6bxQn8JIgSfKgnHGTKwigg==", + "dependencies": { + "@leanprover/infoview-api": "~0.2.1", + "@vscode/codicons": "^0.0.32", + "es-module-shims": "^1.6.2", + "marked": "^4.2.2", + "react-fast-compare": "^3.2.0", + "tachyons": "^4.12.0", + "vscode-languageserver-protocol": "^3.17.2" + } + }, "node_modules/lean4/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -10742,6 +10374,20 @@ "ws": "^8.9.0" } }, + "node_modules/lean4web/node_modules/@leanprover/infoview": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/@leanprover/infoview/-/infoview-0.4.5.tgz", + "integrity": "sha512-CK1Etux2e9lBg/eiDb0laj5Y9VAcPquLd9wdWU/GOiL1XAT64MVsGvhUsHr+LbZq6bxQn8JIgSfKgnHGTKwigg==", + "dependencies": { + "@leanprover/infoview-api": "~0.2.1", + "@vscode/codicons": "^0.0.32", + "es-module-shims": "^1.6.2", + "marked": "^4.2.2", + "react-fast-compare": "^3.2.0", + "tachyons": "^4.12.0", + "vscode-languageserver-protocol": "^3.17.2" + } + }, "node_modules/leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -15487,6 +15133,11 @@ "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz", "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==" }, + "node_modules/tabbable": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-5.3.3.tgz", + "integrity": "sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==" + }, "node_modules/tachyons": { "version": "4.12.0", "resolved": "https://registry.npmjs.org/tachyons/-/tachyons-4.12.0.tgz", diff --git a/package.json b/package.json index 9b46287..cc5323a 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@fortawesome/free-regular-svg-icons": "^6.5.1", "@fortawesome/free-solid-svg-icons": "^6.5.1", "@fortawesome/react-fontawesome": "^0.2.0", - "@leanprover/infoview": "^0.4.3", + "@leanprover/infoview": "^0.7.1", "@leanprover/unicode-input-component": "^0.1.0", "@mui/icons-material": "^5.11.0", "@mui/material": "^5.11.1",