mirror of
https://github.com/SrIzan10/spongebin.git
synced 2026-05-01 11:05:09 +00:00
chore: remove monaco-editor-auto-typings since it doesn't work too well
This commit is contained in:
3
bun.lock
3
bun.lock
@@ -20,7 +20,6 @@
|
|||||||
"drizzle-orm": "^0.42.0",
|
"drizzle-orm": "^0.42.0",
|
||||||
"lucide-react": "^0.488.0",
|
"lucide-react": "^0.488.0",
|
||||||
"monaco-editor": "^0.52.2",
|
"monaco-editor": "^0.52.2",
|
||||||
"monaco-editor-auto-typings": "^0.4.6",
|
|
||||||
"nanoid": "^5.1.5",
|
"nanoid": "^5.1.5",
|
||||||
"next": "15.3.6",
|
"next": "15.3.6",
|
||||||
"next-themes": "^0.4.6",
|
"next-themes": "^0.4.6",
|
||||||
@@ -419,8 +418,6 @@
|
|||||||
|
|
||||||
"monaco-editor": ["monaco-editor@0.52.2", "", {}, "sha512-GEQWEZmfkOGLdd3XK8ryrfWz3AIP8YymVXiPHEdewrUq7mh0qrKrfHLNCXcbB6sTnMLnOZ3ztSiKcciFUkIJwQ=="],
|
"monaco-editor": ["monaco-editor@0.52.2", "", {}, "sha512-GEQWEZmfkOGLdd3XK8ryrfWz3AIP8YymVXiPHEdewrUq7mh0qrKrfHLNCXcbB6sTnMLnOZ3ztSiKcciFUkIJwQ=="],
|
||||||
|
|
||||||
"monaco-editor-auto-typings": ["monaco-editor-auto-typings@0.4.6", "", { "peerDependencies": { "monaco-editor": "*" } }, "sha512-yN6yP2oQJkpyZtUyi5qT9AjZLILrTZWOFny7Km2yNiPMPqOWq/znkTS4b5Yk1sHumSaLJUw5m1EPKiopRqtEpA=="],
|
|
||||||
|
|
||||||
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
|
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
|
||||||
|
|
||||||
"nanoid": ["nanoid@5.1.5", "", { "bin": { "nanoid": "bin/nanoid.js" } }, "sha512-Ir/+ZpE9fDsNH0hQ3C68uyThDXzYcim2EqcZ8zn8Chtt1iylPT9xXJB0kPCnqzgcEGikO9RxSrh63MsmVCU7Fw=="],
|
"nanoid": ["nanoid@5.1.5", "", { "bin": { "nanoid": "bin/nanoid.js" } }, "sha512-Ir/+ZpE9fDsNH0hQ3C68uyThDXzYcim2EqcZ8zn8Chtt1iylPT9xXJB0kPCnqzgcEGikO9RxSrh63MsmVCU7Fw=="],
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
"drizzle-orm": "^0.42.0",
|
"drizzle-orm": "^0.42.0",
|
||||||
"lucide-react": "^0.488.0",
|
"lucide-react": "^0.488.0",
|
||||||
"monaco-editor": "^0.52.2",
|
"monaco-editor": "^0.52.2",
|
||||||
"monaco-editor-auto-typings": "^0.4.6",
|
|
||||||
"nanoid": "^5.1.5",
|
"nanoid": "^5.1.5",
|
||||||
"next": "15.3.6",
|
"next": "15.3.6",
|
||||||
"next-themes": "^0.4.6",
|
"next-themes": "^0.4.6",
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import {
|
|
||||||
AutoTypings,
|
|
||||||
LocalStorageCache,
|
|
||||||
} from "monaco-editor-auto-typings/custom-editor";
|
|
||||||
import { useEffect, useRef, useState } from "react";
|
import { useEffect, useRef, useState } from "react";
|
||||||
import { Editor, type Monaco } from "@monaco-editor/react";
|
import { Editor, type Monaco } from "@monaco-editor/react";
|
||||||
import { shikiToMonaco } from "@shikijs/monaco";
|
import { shikiToMonaco } from "@shikijs/monaco";
|
||||||
@@ -83,19 +79,7 @@ export function MonacoEditor() {
|
|||||||
language={activeTab.language}
|
language={activeTab.language}
|
||||||
value={activeTab.content}
|
value={activeTab.content}
|
||||||
onChange={(val) => updateActiveTabContent(val || "")}
|
onChange={(val) => updateActiveTabContent(val || "")}
|
||||||
onMount={async (editor, monaco) => {
|
onMount={async (_editor, monaco) => await handleEditorDidMount(monaco)}
|
||||||
try {
|
|
||||||
await handleEditorDidMount(monaco);
|
|
||||||
if (!editor.getModel()) return;
|
|
||||||
|
|
||||||
await AutoTypings.create(editor, {
|
|
||||||
sourceCache: new LocalStorageCache(),
|
|
||||||
monaco,
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
console.warn("AutoTypings init failed (ignored):", error);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
options={{
|
options={{
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
wordWrap: wordWrap ? "on" : "off",
|
wordWrap: wordWrap ? "on" : "off",
|
||||||
|
|||||||
Reference in New Issue
Block a user