+ {delim}
+ {children}
+ {delim}
+
+ );
+}
diff --git a/src/equicordplugins/TeX/katexLoader.ts b/src/equicordplugins/TeX/katexLoader.ts
new file mode 100644
index 00000000..bf01ba06
--- /dev/null
+++ b/src/equicordplugins/TeX/katexLoader.ts
@@ -0,0 +1,29 @@
+/*
+ * Vencord, a Discord client mod
+ * Copyright (c) 2024 Vendicated and contributors
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+import { makeLazy } from "@utils/lazy";
+import { useEffect, useState } from "@webpack/common";
+
+const SCRIPT_URL = "https://unpkg.com/katex@0.16.9/dist/katex.mjs";
+const STYLE_URL = "https://unpkg.com/katex@0.16.9/dist/katex.min.css";
+
+let theKatex: undefined | any = undefined;
+export const loadKatex = makeLazy(async () => {
+ const style = document.createElement("link");
+ style.setAttribute("rel", "stylesheet");
+ style.setAttribute("href", STYLE_URL);
+ document.head.appendChild(style);
+ return theKatex = (await import(SCRIPT_URL)).default;
+});
+
+export function useKatex() {
+ const [katex, setKatex] = useState(theKatex);
+ useEffect(() => {
+ if (katex === undefined)
+ loadKatex().then(setKatex);
+ });
+ return katex;
+}
diff --git a/src/equicordplugins/TeX/style.css b/src/equicordplugins/TeX/style.css
new file mode 100644
index 00000000..38fb2546
--- /dev/null
+++ b/src/equicordplugins/TeX/style.css
@@ -0,0 +1,8 @@
+.katex-display {
+ margin: 0;
+ display: inline-block;
+}
+
+.tex-error {
+ color: var(--status-danger);
+}
diff --git a/src/equicordplugins/cleanChannelName/index.ts b/src/equicordplugins/cleanChannelName/index.ts
index 669d1dc5..ee4ea0bb 100644
--- a/src/equicordplugins/cleanChannelName/index.ts
+++ b/src/equicordplugins/cleanChannelName/index.ts
@@ -24,7 +24,20 @@ export default definePlugin({
cleanChannelName(channel?: Channel) {
if (channel) {
- channel.name = channel.name.normalize("NFKC").replace(/[^\u0020-\u007E]?\p{Extended_Pictographic}[^\u0020-\u007E]?/ug, "").replace(/-?[^\p{Letter}\u0020-\u007E]-?/ug, [2, 4].includes(channel.type) ? " " : "-").replace(/(^-|-$)/g, "");
+ channel.name = channel.name
+ .normalize("NFKC")
+ .replace(/[ᴀʙᴄᴅᴇꜰɢʜɪᴊᴋʟᴍɴᴏᴘǫʀꜱᴛᴜᴠᴡxʏᴢ]/g, match => {
+ const smallCapsToNormal = {
+ "ᴀ": "a", "ʙ": "b", "ᴄ": "c", "ᴅ": "d", "ᴇ": "e", "ꜰ": "f", "ɢ": "g", "ʜ": "h", "ɪ": "i", "ᴊ": "j",
+ "ᴋ": "k", "ʟ": "l", "ᴍ": "m", "ɴ": "n", "ᴏ": "o", "ᴘ": "p", "ǫ": "q", "ʀ": "r", "ꜱ": "s", "ᴛ": "t",
+ "ᴜ": "u", "ᴠ": "v", "ᴡ": "w", "x": "x", "ʏ": "y", "ᴢ": "z"
+ };
+ return smallCapsToNormal[match];
+ })
+ .replace(/[^\u0020-\u007E]?\p{Extended_Pictographic}[^\u0020-\u007E]?/ug, "")
+ .replace(/-?[^\p{Letter}\u0020-\u007E]-?/ug, [2, 4].includes(channel.type) ? " " : "-")
+ .replace(/(^-|-$)/g, "")
+ .replace(/-+/g, "-");
}
return channel;
}
diff --git a/src/equicordplugins/modalFade/index.tsx b/src/equicordplugins/modalFade/index.tsx
new file mode 100644
index 00000000..1d858b2e
--- /dev/null
+++ b/src/equicordplugins/modalFade/index.tsx
@@ -0,0 +1,99 @@
+/*
+ * Vencord, a Discord client mod
+ * Copyright (c) 2024 Vendicated and contributors
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ */
+
+import { Devs } from "@utils/constants";
+import { proxyLazy } from "@utils/lazy";
+import definePlugin from "@utils/types";
+import { findByPropsLazy } from "@webpack";
+import { Forms, useEffect, useRef } from "@webpack/common";
+import type { StoreApi, UseBoundStore } from "zustand";
+
+type Modal = {
+ Layer?: any,
+ instant?: boolean,
+ backdropStyle?: "SUBTLE" | "DARK" | "BLUR",
+};
+
+const { useModalContext, useModalsStore } = proxyLazy(() => Forms as any as {
+ useModalContext(): "default" | "popout";
+ useModalsStore: UseBoundStore