Skip to content
This repository was archived by the owner on Apr 27, 2025. It is now read-only.

Commit 2657a02

Browse files
committed
wip: update
1 parent 224533e commit 2657a02

File tree

2 files changed

+25
-27
lines changed

2 files changed

+25
-27
lines changed

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"format": "prettier --write ."
1313
},
1414
"dependencies": {
15-
"@fontsource-variable/ubuntu-sans": "^5.2.5",
16-
"@fontsource-variable/ubuntu-sans-mono": "^5.2.5",
15+
"@fontsource-variable/ubuntu-sans": "^5.2.6",
16+
"@fontsource-variable/ubuntu-sans-mono": "^5.2.6",
1717
"@hcaptcha/react-hcaptcha": "^1.12.0",
1818
"@hookform/resolvers": "^4.1.3",
1919
"@marsidev/react-turnstile": "^1.1.0",
@@ -29,23 +29,23 @@
2929
"@radix-ui/react-switch": "^1.1.3",
3030
"@radix-ui/react-tooltip": "^1.1.8",
3131
"@tanstack/react-table": "^8.21.2",
32-
"ace-builds": "^1.39.0",
33-
"alova": "^3.2.9",
32+
"ace-builds": "^1.39.1",
33+
"alova": "^3.2.10",
3434
"ansi_up": "^6.0.2",
3535
"class-variance-authority": "^0.7.1",
3636
"clsx": "^2.1.1",
3737
"crypto-js": "^4.2.0",
3838
"highlight.js": "^11.11.1",
3939
"katex": "^0.16.21",
40-
"lucide-react": "^0.477.0",
41-
"nanoid": "^5.1.2",
40+
"lucide-react": "^0.483.0",
41+
"nanoid": "^5.1.5",
4242
"react": "^19.0.0",
43-
"react-day-picker": "^9.5.1",
43+
"react-day-picker": "^9.6.3",
4444
"react-dom": "^19.0.0",
4545
"react-dropzone": "^14.3.8",
4646
"react-hook-form": "^7.54.2",
47-
"react-markdown": "^10.0.1",
48-
"react-router": "^7.2.0",
47+
"react-markdown": "^10.1.0",
48+
"react-router": "^7.4.0",
4949
"recharts": "^2.15.1",
5050
"rehype-autolink-headings": "^7.1.0",
5151
"rehype-highlight": "^7.0.2",
@@ -63,25 +63,25 @@
6363
"zustand": "^5.0.3"
6464
},
6565
"devDependencies": {
66-
"@eslint/js": "^9.21.0",
67-
"@shikijs/rehype": "^3.1.0",
66+
"@eslint/js": "^9.23.0",
67+
"@shikijs/rehype": "^3.2.1",
6868
"@tailwindcss/typography": "^0.5.16",
69-
"@tailwindcss/vite": "^4.0.9",
69+
"@tailwindcss/vite": "^4.0.15",
7070
"@types/crypto-js": "^4.2.2",
71-
"@types/node": "^22.13.9",
72-
"@types/react": "^19.0.10",
71+
"@types/node": "^22.13.13",
72+
"@types/react": "^19.0.12",
7373
"@types/react-dom": "^19.0.4",
74-
"@vitejs/plugin-react-swc": "^3.8.0",
75-
"eslint": "^9.21.0",
74+
"@vitejs/plugin-react-swc": "^3.8.1",
75+
"eslint": "^9.23.0",
7676
"eslint-plugin-react-hooks": "^5.2.0",
7777
"eslint-plugin-react-refresh": "^0.4.19",
7878
"globals": "^16.0.0",
7979
"prettier": "^3.5.3",
80-
"tailwindcss": "^4.0.9",
80+
"tailwindcss": "^4.0.15",
8181
"typescript": "~5.8.2",
82-
"typescript-eslint": "^8.26.0",
83-
"vite": "^6.2.0",
82+
"typescript-eslint": "^8.28.0",
83+
"vite": "^6.2.3",
8484
"vite-plugin-compression": "^0.5.1"
8585
},
86-
"packageManager": "[email protected].1+sha512.40ee09af407fa9fbb5fbfb8e1cb40fbb74c0af0c3e10e9224d7b53c7658528615b2c92450e74cfad91e3a2dcafe3ce4050d80bda71d757756d2ce2b66213e9a3"
86+
"packageManager": "[email protected].5"
8787
}

src/components/ui/editor.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useThemeStore } from "@/storages/theme";
22
import { cn } from "@/utils";
3-
import ace from "ace-builds";
3+
import ace, { edit } from "ace-builds";
44
import "ace-builds/esm-resolver";
55
import { useEffect, useRef, useState } from "react";
66

@@ -43,7 +43,6 @@ function Editor(props: EditorProps) {
4343

4444
const editor = ace.edit(editorRef.current, {
4545
mode: `ace/mode/${lang || "text"}`,
46-
theme: `ace/theme/${theme === "light" ? "kuroir" : "github_dark"}`,
4746
showPrintMargin: false,
4847
highlightActiveLine: false,
4948
highlightGutterLine: false,
@@ -85,14 +84,13 @@ function Editor(props: EditorProps) {
8584
return () => {
8685
editor.destroy();
8786
};
88-
}, [lang, showLineNumbers, tabSize, placeholder, theme]);
87+
}, [lang, showLineNumbers, tabSize, placeholder]);
8988

9089
useEffect(() => {
91-
const editor = editorRef.current;
90+
const editor = editorInstance.current;
9291
if (editor) {
93-
editor.classList.remove("ace-kuroir", "ace-github-dark");
94-
editor.classList.add(
95-
theme === "light" ? "ace-kuroir" : "ace-github-dark"
92+
editor.setTheme(
93+
`ace/theme/${theme === "light" ? "kuroir" : "github_dark"}`
9694
);
9795
}
9896
}, [theme]);

0 commit comments

Comments
 (0)