fix warnings

This commit is contained in:
2023-12-16 12:47:44 +01:00
parent a53f465792
commit da656d1adf

View File

@ -36,6 +36,7 @@ import { toposCompletions, soundCompletions } from "./documentation/inlineHelp";
import { javascriptLanguage } from "@codemirror/lang-javascript"; import { javascriptLanguage } from "@codemirror/lang-javascript";
export const getCodeMirrorTheme = (theme: {[key: string]: string}): Extension => { export const getCodeMirrorTheme = (theme: {[key: string]: string}): Extension => {
// @ts-ignore
const black = theme["black"], const black = theme["black"],
red = theme["red"], red = theme["red"],
green = theme["green"], green = theme["green"],
@ -44,12 +45,18 @@ export const getCodeMirrorTheme = (theme: {[key: string]: string}): Extension =>
magenta = theme["magenta"], magenta = theme["magenta"],
cyan = theme["cyan"], cyan = theme["cyan"],
white = theme["white"], white = theme["white"],
// @ts-ignore
brightblack = theme["brightblack"], brightblack = theme["brightblack"],
// @ts-ignore
brightred = theme["brightred"], brightred = theme["brightred"],
brightgreen = theme["brightgreen"], brightgreen = theme["brightgreen"],
// @ts-ignore
brightyellow = theme["brightyellow"], brightyellow = theme["brightyellow"],
// @ts-ignore
brightblue = theme["brightblue"], brightblue = theme["brightblue"],
// @ts-ignore
brightmagenta = theme["brightmagenta"], brightmagenta = theme["brightmagenta"],
// @ts-ignore
brightcyan = theme["brightcyan"], brightcyan = theme["brightcyan"],
brightwhite = theme["brightwhite"], brightwhite = theme["brightwhite"],
background = theme["background"], background = theme["background"],
@ -203,33 +210,33 @@ export const getCodeMirrorTheme = (theme: {[key: string]: string}): Extension =>
] ]
} }
const debugTheme = EditorView.theme({ // const debugTheme = EditorView.theme({
".cm-line span": { // ".cm-line span": {
position: "relative", // position: "relative",
}, // },
".cm-line span:hover::after": { // ".cm-line span:hover::after": {
position: "absolute", // position: "absolute",
bottom: "100%", // bottom: "100%",
left: 0, // left: 0,
background: "black", // background: "black",
color: "white", // color: "white",
border: "solid 2px", // border: "solid 2px",
borderRadius: "5px", // borderRadius: "5px",
content: "var(--tags)", // content: "var(--tags)",
width: `max-content`, // width: `max-content`,
padding: "1px 4px", // padding: "1px 4px",
zIndex: 10, // zIndex: 10,
pointerEvents: "none", // pointerEvents: "none",
}, // },
}); // });
const debugHighlightStyle = HighlightStyle.define( // const debugHighlightStyle = HighlightStyle.define(
// @ts-ignore // // @ts-ignore
Object.entries(t).map(([key, value]) => { // Object.entries(t).map(([key, value]) => {
return { tag: value, "--tags": `"tag.${key}"` }; // return { tag: value, "--tags": `"tag.${key}"` };
}) // })
); // );
const debug = [debugTheme, syntaxHighlighting(debugHighlightStyle)]; // const debug = [debugTheme, syntaxHighlighting(debugHighlightStyle)];
export const jsCompletions = javascriptLanguage.data.of({ export const jsCompletions = javascriptLanguage.data.of({