From 76df29fba29f6b34ab9e8b6f392d465775f7aa4f Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Thu, 14 Nov 2024 14:51:58 -0300 Subject: [PATCH 1/4] Actually stop searching for CSS debugging chunk --- src/debug/loadLazyChunks.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/debug/loadLazyChunks.ts b/src/debug/loadLazyChunks.ts index 6923d3a23..c7f8047db 100644 --- a/src/debug/loadLazyChunks.ts +++ b/src/debug/loadLazyChunks.ts @@ -27,11 +27,11 @@ export async function loadLazyChunks() { const LazyChunkRegex = canonicalizeMatch(/(?:(?:Promise\.all\(\[)?(\i\.e\("?[^)]+?"?\)[^\]]*?)(?:\]\))?)\.then\(\i\.bind\(\i,"?([^)]+?)"?\)\)/g); - const foundCssDebuggingLoad = false; + let foundCssDebuggingLoad = false; async function searchAndLoadLazyChunks(factoryCode: string) { // Workaround to avoid loading the CSS debugging chunk which turns the app pink - const hasCssDebuggingLoad = foundCssDebuggingLoad ? false : factoryCode.includes(".cssDebuggingEnabled&&"); + const hasCssDebuggingLoad = foundCssDebuggingLoad ? false : (foundCssDebuggingLoad = factoryCode.includes(".cssDebuggingEnabled&&")); const lazyChunks = factoryCode.matchAll(LazyChunkRegex); const validChunkGroups = new Set<[chunkIds: number[], entryPoint: number]>(); From 8558b1a58948625c2c1f29be439d2329c36dfc82 Mon Sep 17 00:00:00 2001 From: Frocat <65976911+ItsFrocat@users.noreply.github.com> Date: Thu, 14 Nov 2024 23:54:01 +0100 Subject: [PATCH 2/4] ShikiCodeblocks: Updated codeblocks themes (#3013) --- .../shikiCodeblocks.desktop/api/themes.ts | 46 +++++++++++++++---- 1 file changed, 36 insertions(+), 10 deletions(-) diff --git a/src/plugins/shikiCodeblocks.desktop/api/themes.ts b/src/plugins/shikiCodeblocks.desktop/api/themes.ts index f31ce60b3..bc1dd184d 100644 --- a/src/plugins/shikiCodeblocks.desktop/api/themes.ts +++ b/src/plugins/shikiCodeblocks.desktop/api/themes.ts @@ -1,6 +1,6 @@ /* * Vencord, a modification for Discord's desktop app - * Copyright (c) 2022 Vendicated and contributors + * Copyright (c) 2024 Vendicated and contributors * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,9 +18,9 @@ import { IShikiTheme } from "@vap/shiki"; -export const SHIKI_REPO = "shikijs/shiki"; -export const SHIKI_REPO_COMMIT = "0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043"; -export const shikiRepoTheme = (name: string) => `https://raw.githubusercontent.com/${SHIKI_REPO}/${SHIKI_REPO_COMMIT}/packages/shiki/themes/${name}.json`; +export const SHIKI_REPO = "shikijs/textmate-grammars-themes"; +export const SHIKI_REPO_COMMIT = "2d87559c7601a928b9f7e0f0dda243d2fb6d4499"; +export const shikiRepoTheme = (name: string) => `https://raw.githubusercontent.com/${SHIKI_REPO}/${SHIKI_REPO_COMMIT}/packages/tm-themes/themes/${name}.json`; export const themes = { // Default @@ -30,33 +30,59 @@ export const themes = { MaterialCandy: "https://raw.githubusercontent.com/millsp/material-candy/master/material-candy.json", // More from Shiki repo + Andromeeda: shikiRepoTheme("andromeeda"), + AuroraX: shikiRepoTheme("aurora-x"), + AyuDark: shikiRepoTheme("ayu-dark"), + CatppuccinLatte: shikiRepoTheme("catppuccin-latte"), + CatppuccinFrappe: shikiRepoTheme("catppuccin-frappe"), + CatppuccinMacchiato: shikiRepoTheme("catppuccin-macchiato"), + CatppuccinMocha: shikiRepoTheme("catppuccin-mocha"), DraculaSoft: shikiRepoTheme("dracula-soft"), Dracula: shikiRepoTheme("dracula"), + EverforestDark: shikiRepoTheme("everforest-dark"), + EverforestLight: shikiRepoTheme("everforest-light"), + GithubDarkDefault: shikiRepoTheme("github-dark-default"), GithubDarkDimmed: shikiRepoTheme("github-dark-dimmed"), + GithubDarkHighContrast: shikiRepoTheme("github-dark-high-contrast"), GithubDark: shikiRepoTheme("github-dark"), + GithubLightDefault: shikiRepoTheme("github-light-default"), + GithubLightHighContrast: shikiRepoTheme("github-light-high-contrast"), GithubLight: shikiRepoTheme("github-light"), + Houston: shikiRepoTheme("houston"), + KanagawaDragon: shikiRepoTheme("kanagawa-dragon"), + KanagawaLotus: shikiRepoTheme("kanagawa-lotus"), + KanagawaWave: shikiRepoTheme("kanagawa-wave"), + LaserWave: shikiRepoTheme("laserwave"), LightPlus: shikiRepoTheme("light-plus"), - MaterialDarker: shikiRepoTheme("material-darker"), - MaterialDefault: shikiRepoTheme("material-default"), - MaterialLighter: shikiRepoTheme("material-lighter"), - MaterialOcean: shikiRepoTheme("material-ocean"), - MaterialPalenight: shikiRepoTheme("material-palenight"), + MaterialDarker: shikiRepoTheme("material-theme-darker"), + MaterialDefault: shikiRepoTheme("material-theme"), + MaterialLighter: shikiRepoTheme("material-theme-lighter"), + MaterialOcean: shikiRepoTheme("material-theme-ocean"), + MaterialPalenight: shikiRepoTheme("material-theme-palenight"), MinDark: shikiRepoTheme("min-dark"), MinLight: shikiRepoTheme("min-light"), Monokai: shikiRepoTheme("monokai"), + NightOwl: shikiRepoTheme("night-owl"), Nord: shikiRepoTheme("nord"), OneDarkPro: shikiRepoTheme("one-dark-pro"), + OneLight: shikiRepoTheme("one-light"), + Plastic: shikiRepoTheme("plastic"), Poimandres: shikiRepoTheme("poimandres"), + Red: shikiRepoTheme("red"), RosePineDawn: shikiRepoTheme("rose-pine-dawn"), RosePineMoon: shikiRepoTheme("rose-pine-moon"), RosePine: shikiRepoTheme("rose-pine"), SlackDark: shikiRepoTheme("slack-dark"), SlackOchin: shikiRepoTheme("slack-ochin"), + SnazzyLight: shikiRepoTheme("snazzy-light"), SolarizedDark: shikiRepoTheme("solarized-dark"), SolarizedLight: shikiRepoTheme("solarized-light"), + Synthwave84: shikiRepoTheme("synthwave-84"), + TokyoNight: shikiRepoTheme("tokyo-night"), + Vesper: shikiRepoTheme("vesper"), + VitesseBlack: shikiRepoTheme("vitesse-black"), VitesseDark: shikiRepoTheme("vitesse-dark"), VitesseLight: shikiRepoTheme("vitesse-light"), - CssVariables: shikiRepoTheme("css-variables"), }; export const themeCache = new Map(); From c4f6f151e6692c2fb3dafd103f89f63d578bad8b Mon Sep 17 00:00:00 2001 From: Lumap Date: Thu, 14 Nov 2024 23:57:16 +0100 Subject: [PATCH 3/4] PictureInPicture: Fix button not showing up (#3014) --- src/plugins/pictureInPicture/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/pictureInPicture/index.tsx b/src/plugins/pictureInPicture/index.tsx index 20cedf45b..ef3d35ff1 100644 --- a/src/plugins/pictureInPicture/index.tsx +++ b/src/plugins/pictureInPicture/index.tsx @@ -30,10 +30,10 @@ export default definePlugin({ { find: ".removeMosaicItemHoverButton),", replacement: { - match: /\.nonMediaMosaicItem\]:!(\i).{0,50}?children:\[\S,(\S)/, - replace: "$&,$1&&$2&&$self.renderPiPButton()," - }, - }, + match: /\.nonMediaMosaicItem\]:.{0,40}children:\[(?<=showDownload:(\i).+?isVisualMediaType:(\i).+?)/, + replace: "$&$1&&$2&&$self.renderPiPButton()," + } + } ], renderPiPButton: ErrorBoundary.wrap(() => { From 99458da3beb21dcba71abc64cb99c0f4f232cb81 Mon Sep 17 00:00:00 2001 From: nyx <60797172+verticalsync@users.noreply.github.com> Date: Fri, 15 Nov 2024 01:00:11 +0200 Subject: [PATCH 4/4] ViewRaw: Add support for Group DMs (#3010) --- src/plugins/viewRaw/index.tsx | 1 + src/utils/constants.ts | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/viewRaw/index.tsx b/src/plugins/viewRaw/index.tsx index 0134ea3e3..8ee1ca8d7 100644 --- a/src/plugins/viewRaw/index.tsx +++ b/src/plugins/viewRaw/index.tsx @@ -155,6 +155,7 @@ export default definePlugin({ "guild-context": MakeContextCallback("Guild"), "channel-context": MakeContextCallback("Channel"), "thread-context": MakeContextCallback("Channel"), + "gdm-context": MakeContextCallback("Channel"), "user-context": MakeContextCallback("User") }, diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 70eca56fd..11ce47388 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -520,8 +520,8 @@ export const Devs = /* #__PURE__*/ Object.freeze({ id: 721717126523781240n, }, nyx: { - name: "verticalsync", - id: 328165170536775680n + name: "verticalsync.", + id: 1207087393929171095n }, nekohaxx: { name: "nekohaxx", @@ -575,7 +575,7 @@ export const Devs = /* #__PURE__*/ Object.freeze({ name: "RamziAH", id: 1279957227612147747n, }, - SomeAspy: { + SomeAspy: { name: "SomeAspy", id: 516750892372852754n, },