From df706d364cc22d911cec52e9793b5d4b3a359f23 Mon Sep 17 00:00:00 2001 From: ankushKun Date: Mon, 20 May 2024 18:56:51 +0530 Subject: [PATCH] better latex --- next_app/package.json | 2 +- next_app/pnpm-lock.yaml | 33 ++++++++++++++---------- next_app/src/components/layout.tsx | 3 ++- next_app/src/components/settings-tab.tsx | 16 ++++++------ next_app/src/pages/_app.tsx | 2 ++ 5 files changed, 33 insertions(+), 23 deletions(-) diff --git a/next_app/package.json b/next_app/package.json index 66790e6..5815c49 100644 --- a/next_app/package.json +++ b/next_app/package.json @@ -48,7 +48,7 @@ "nextjs-google-analytics": "^2.3.3", "react": "^18", "react-dom": "^18", - "react-latex": "^2.0.0", + "react-latex-next": "^3.0.0", "react-markdown": "^9.0.1", "react-resizable-panels": "^2.0.18", "remark-gfm": "^4.0.0", diff --git a/next_app/pnpm-lock.yaml b/next_app/pnpm-lock.yaml index 34376b8..dda5812 100644 --- a/next_app/pnpm-lock.yaml +++ b/next_app/pnpm-lock.yaml @@ -116,9 +116,9 @@ dependencies: react-dom: specifier: ^18 version: 18.2.0(react@18.2.0) - react-latex: - specifier: ^2.0.0 - version: 2.0.0 + react-latex-next: + specifier: ^3.0.0 + version: 3.0.0(react-dom@18.2.0)(react@18.2.0) react-markdown: specifier: ^9.0.1 version: 9.0.1(@types/react@18.2.79)(react@18.2.0) @@ -2270,14 +2270,15 @@ packages: engines: {node: '>=16'} dev: false - /commander@2.20.3: - resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - dev: false - /commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} + /commander@8.3.0: + resolution: {integrity: sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==} + engines: {node: '>= 12'} + dev: false + /commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} dev: false @@ -3565,11 +3566,11 @@ packages: object.values: 1.2.0 dev: true - /katex@0.10.2: - resolution: {integrity: sha512-cQOmyIRoMloCoSIOZ1+gEwsksdJZ1EW4SWm3QzxSza/QsnZr6D4U1V9S4q+B/OLm2OQ8TCBecQ8MaIfnScI7cw==} + /katex@0.16.10: + resolution: {integrity: sha512-ZiqaC04tp2O5utMsl2TEZTXxa6WSC4yo0fv5ML++D3QZv/vx2Mct0mTlRx3O+uUkjfuAgOkzsCmq5MiUEsDDdA==} hasBin: true dependencies: - commander: 2.20.3 + commander: 8.3.0 dev: false /keyv@4.5.4: @@ -4578,10 +4579,16 @@ packages: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: true - /react-latex@2.0.0: - resolution: {integrity: sha512-x17uDCfqBgR+5ZF/zplRCuHdEbX22CJlVipOqMUinRMoiOwh5fr3jbjD4zqVQ8pIs4AnF0BWPDR2S7Fyd8Snxw==} + /react-latex-next@3.0.0(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-x70f1b1G7TronVigsRgKHKYYVUNfZk/3bciFyYX1lYLQH2y3/TXku3+5Vap8MDbJhtopePSYBsYWS6jhzIdz+g==} + engines: {node: '>=12', npm: '>=5'} + peerDependencies: + react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 + react-dom: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 dependencies: - katex: 0.10.2 + katex: 0.16.10 + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) dev: false /react-markdown@9.0.1(@types/react@18.2.79)(react@18.2.0): diff --git a/next_app/src/components/layout.tsx b/next_app/src/components/layout.tsx index 59c73bb..ed07d78 100644 --- a/next_app/src/components/layout.tsx +++ b/next_app/src/components/layout.tsx @@ -32,7 +32,8 @@ import WarpLanding from "./warp/landing"; import { luaCompletionProvider } from "@/lib/monaco-completions"; import Markdown from "react-markdown" import remarkGfm from "remark-gfm" -import Latex from "react-latex" +import Latex from 'react-latex-next'; + const monacoConfig: { [key: string]: editor.IStandaloneEditorConstructionOptions diff --git a/next_app/src/components/settings-tab.tsx b/next_app/src/components/settings-tab.tsx index a390233..abfeabb 100644 --- a/next_app/src/components/settings-tab.tsx +++ b/next_app/src/components/settings-tab.tsx @@ -26,9 +26,9 @@ export default function SettingsTab() { return (
-
+ {/*
-
+
*/} <div className="my-8 grid grid-cols-3"> @@ -41,7 +41,7 @@ export default function SettingsTab() { </div> - <div className="mb-8"> + {/* <div className="mb-8"> <Title title="NOTIFICATIONS" /> <div className="items-top flex space-x-2.5"> @@ -51,9 +51,9 @@ export default function SettingsTab() { Toast notifications </Label> </div> - </div> + </div> */} - <div className="mb-8"> + {/* <div className="mb-8"> <Title title="EDITOR STYLE" /> <div className="flex flex-col gap-3"> @@ -74,9 +74,9 @@ export default function SettingsTab() { </Label> </div> </div> - </div> + </div> */} - <div className="mb-8"> + {/* <div className="mb-8"> <Title title="DISABLE" /> <div className="items-top flex space-x-2.5"> @@ -87,7 +87,7 @@ export default function SettingsTab() { <span className="text-sm ml-2 text-muted">(some features might not work correctly if you enable this)</span> </Label> </div> - </div> + </div> */} </div> </ScrollArea> ); diff --git a/next_app/src/pages/_app.tsx b/next_app/src/pages/_app.tsx index 1d6f7a6..1620ddb 100644 --- a/next_app/src/pages/_app.tsx +++ b/next_app/src/pages/_app.tsx @@ -1,4 +1,5 @@ import "@/styles/globals.css"; +import 'katex/dist/katex.min.css'; import type { AppProps } from "next/app"; import { Toaster } from "@/components/ui/toaster"; import { Toaster as Sonner } from "@/components/ui/sonner"; @@ -7,6 +8,7 @@ import { GoogleAnalytics } from "@next/third-parties/google"; // import { GoogleAnalytics } from "nextjs-google-analytics"; + declare global { interface Window { arweaveWallet: {