From 54f58cd7c954a936cb833448ac0dfe027c647511 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 15 May 2024 00:38:07 -0300 Subject: [PATCH 01/44] Fix: Canonicalize regex finds --- scripts/generateReport.ts | 4 +++- src/plugins/index.ts | 7 ++++++- src/utils/patches.ts | 8 +++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/scripts/generateReport.ts b/scripts/generateReport.ts index 912f38eda..164e409df 100644 --- a/scripts/generateReport.ts +++ b/scripts/generateReport.ts @@ -303,8 +303,10 @@ async function runtime(token: string) { delete patch.predicate; delete patch.group; - if (!Array.isArray(patch.replacement)) + Vencord.Util.canonicalizeFind(patch); + if (!Array.isArray(patch.replacement)) { patch.replacement = [patch.replacement]; + } patch.replacement.forEach(r => { delete r.predicate; diff --git a/src/plugins/index.ts b/src/plugins/index.ts index 488847d15..3291885c1 100644 --- a/src/plugins/index.ts +++ b/src/plugins/index.ts @@ -20,6 +20,7 @@ import { registerCommand, unregisterCommand } from "@api/Commands"; import { addContextMenuPatch, removeContextMenuPatch } from "@api/ContextMenu"; import { Settings } from "@api/Settings"; import { Logger } from "@utils/Logger"; +import { canonicalizeFind } from "@utils/patches"; import { Patch, Plugin, StartAt } from "@utils/types"; import { FluxDispatcher } from "@webpack/common"; import { FluxEvents } from "@webpack/types"; @@ -83,8 +84,12 @@ for (const p of pluginsValues) { if (p.patches && isPluginEnabled(p.name)) { for (const patch of p.patches) { patch.plugin = p.name; - if (!Array.isArray(patch.replacement)) + + canonicalizeFind(patch); + if (!Array.isArray(patch.replacement)) { patch.replacement = [patch.replacement]; + } + patches.push(patch); } } diff --git a/src/utils/patches.ts b/src/utils/patches.ts index 99f0595d6..87f3ce78c 100644 --- a/src/utils/patches.ts +++ b/src/utils/patches.ts @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import { PatchReplacement, ReplaceFn } from "./types"; +import { Patch, PatchReplacement, ReplaceFn } from "./types"; export function canonicalizeMatch(match: T): T { if (typeof match === "string") return match; @@ -55,3 +55,9 @@ export function canonicalizeReplacement(replacement: Pick Date: Wed, 15 May 2024 21:46:09 -0400 Subject: [PATCH 02/44] Fix: Plugins without start/stop function failing to stop/start (#2463) --- src/plugins/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/index.ts b/src/plugins/index.ts index 3291885c1..a434b4a6f 100644 --- a/src/plugins/index.ts +++ b/src/plugins/index.ts @@ -170,13 +170,14 @@ export const startPlugin = traceFunction("startPlugin", function startPlugin(p: } try { p.start(); - p.started = true; } catch (e) { logger.error(`Failed to start ${name}\n`, e); return false; } } + p.started = true; + if (commands?.length) { logger.debug("Registering commands of plugin", name); for (const cmd of commands) { @@ -206,6 +207,7 @@ export const startPlugin = traceFunction("startPlugin", function startPlugin(p: export const stopPlugin = traceFunction("stopPlugin", function stopPlugin(p: Plugin) { const { name, commands, flux, contextMenus } = p; + if (p.stop) { logger.info("Stopping plugin", name); if (!p.started) { @@ -214,13 +216,14 @@ export const stopPlugin = traceFunction("stopPlugin", function stopPlugin(p: Plu } try { p.stop(); - p.started = false; } catch (e) { logger.error(`Failed to stop ${name}\n`, e); return false; } } + p.started = false; + if (commands?.length) { logger.debug("Unregistering commands of plugin", name); for (const cmd of commands) { From c0c897fc237df5e60be759966a12c8e2478ee9ef Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 15 May 2024 23:00:21 -0300 Subject: [PATCH 03/44] extractAndLoadChunksLazy: Cache result to avoid searching factories everytime --- src/webpack/webpack.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webpack/webpack.ts b/src/webpack/webpack.ts index 8ea6713d0..0bee08f32 100644 --- a/src/webpack/webpack.ts +++ b/src/webpack/webpack.ts @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import { proxyLazy } from "@utils/lazy"; +import { makeLazy, proxyLazy } from "@utils/lazy"; import { LazyComponent } from "@utils/lazyReact"; import { Logger } from "@utils/Logger"; import { canonicalizeMatch } from "@utils/patches"; @@ -462,7 +462,7 @@ export async function extractAndLoadChunks(code: string[], matcher: RegExp = Def export function extractAndLoadChunksLazy(code: string[], matcher = DefaultExtractAndLoadChunksRegex) { if (IS_DEV) lazyWebpackSearchHistory.push(["extractAndLoadChunks", [code, matcher]]); - return () => extractAndLoadChunks(code, matcher); + return makeLazy(() => extractAndLoadChunks(code, matcher)); } /** From 7b4ecff67e08fecfc91d01cc44a02992b520b948 Mon Sep 17 00:00:00 2001 From: rozbrajaczpoziomow Date: Thu, 16 May 2024 04:22:45 +0200 Subject: [PATCH 04/44] feat(MessageLatency): Show milliseconds option (#2454) --- src/plugins/messageLatency/index.tsx | 36 ++++++++++++++++++---------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/src/plugins/messageLatency/index.tsx b/src/plugins/messageLatency/index.tsx index 301e605fb..6f0f68577 100644 --- a/src/plugins/messageLatency/index.tsx +++ b/src/plugins/messageLatency/index.tsx @@ -22,9 +22,10 @@ interface Diff { hours: number, minutes: number, seconds: number; + milliseconds: number; } -const DISCORD_KT_DELAY = 1471228.928; +const DISCORD_KT_DELAY = 14712289280; const HiddenVisually = findExportedComponentLazy("HiddenVisually"); export default definePlugin({ @@ -42,6 +43,11 @@ export default definePlugin({ type: OptionType.BOOLEAN, description: "Detect old Discord Android clients", default: true + }, + showMillis: { + type: OptionType.BOOLEAN, + description: "Show milliseconds", + default: false } }), @@ -55,12 +61,13 @@ export default definePlugin({ } ], - stringDelta(delta: number) { + stringDelta(delta: number, showMillis: boolean) { const diff: Diff = { - days: Math.round(delta / (60 * 60 * 24)), - hours: Math.round((delta / (60 * 60)) % 24), - minutes: Math.round((delta / (60)) % 60), - seconds: Math.round(delta % 60), + days: Math.round(delta / (60 * 60 * 24 * 1000)), + hours: Math.round((delta / (60 * 60 * 1000)) % 24), + minutes: Math.round((delta / (60 * 1000)) % 60), + seconds: Math.round(delta / 1000 % 60), + milliseconds: Math.round(delta % 1000) }; const str = (k: DiffKey) => diff[k] > 0 ? `${diff[k]} ${diff[k] > 1 ? k : k.substring(0, k.length - 1)}` : null; @@ -72,7 +79,7 @@ export default definePlugin({ return prev + ( isNonNullish(s) ? (prev !== "" - ? k === "seconds" + ? (showMillis ? k === "milliseconds" : k === "seconds") ? " and " : " " : "") + s @@ -84,18 +91,21 @@ export default definePlugin({ }, latencyTooltipData(message: Message) { - const { latency, detectDiscordKotlin } = this.settings.store; + const { latency, detectDiscordKotlin, showMillis } = this.settings.store; const { id, nonce } = message; // Message wasn't received through gateway if (!isNonNullish(nonce)) return null; let isDiscordKotlin = false; - let delta = Math.round((SnowflakeUtils.extractTimestamp(id) - SnowflakeUtils.extractTimestamp(nonce)) / 1000); + let delta = SnowflakeUtils.extractTimestamp(id) - SnowflakeUtils.extractTimestamp(nonce); // milliseconds + if (!showMillis) { + delta = Math.round(delta / 1000) * 1000; + } // Old Discord Android clients have a delay of around 17 days // This is a workaround for that - if (-delta >= DISCORD_KT_DELAY - 86400) { // One day of padding for good measure + if (-delta >= DISCORD_KT_DELAY - 86400000) { // One day of padding for good measure isDiscordKotlin = detectDiscordKotlin; delta += DISCORD_KT_DELAY; } @@ -106,17 +116,17 @@ export default definePlugin({ const abs = Math.abs(delta); const ahead = abs !== delta; - const stringDelta = abs >= latency ? this.stringDelta(abs) : null; + const stringDelta = abs >= latency * 1000 ? this.stringDelta(abs, showMillis) : null; // Also thanks dziurwa // 2 minutes - const TROLL_LIMIT = 2 * 60; + const TROLL_LIMIT = 2 * 60 * 1000; const fill: Fill = isDiscordKotlin ? ["status-positive", "status-positive", "text-muted"] : delta >= TROLL_LIMIT || ahead ? ["text-muted", "text-muted", "text-muted"] - : delta >= (latency * 2) + : delta >= (latency * 2000) ? ["status-danger", "text-muted", "text-muted"] : ["status-warning", "status-warning", "text-muted"]; From 09f894468a020be4fbbff5e59150c37985db6ef7 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 15 May 2024 23:38:36 -0300 Subject: [PATCH 05/44] MessageLatency: Fix wrong constant & false positive --- src/plugins/messageLatency/index.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/messageLatency/index.tsx b/src/plugins/messageLatency/index.tsx index 6f0f68577..d517c0e01 100644 --- a/src/plugins/messageLatency/index.tsx +++ b/src/plugins/messageLatency/index.tsx @@ -25,7 +25,7 @@ interface Diff { milliseconds: number; } -const DISCORD_KT_DELAY = 14712289280; +const DISCORD_KT_DELAY = 1471228928; const HiddenVisually = findExportedComponentLazy("HiddenVisually"); export default definePlugin({ @@ -115,8 +115,9 @@ export default definePlugin({ // Can't do anything if the clock is behind const abs = Math.abs(delta); const ahead = abs !== delta; + const latencyMillis = latency * 1000; - const stringDelta = abs >= latency * 1000 ? this.stringDelta(abs, showMillis) : null; + const stringDelta = abs >= latencyMillis ? this.stringDelta(abs, showMillis) : null; // Also thanks dziurwa // 2 minutes @@ -126,11 +127,11 @@ export default definePlugin({ ? ["status-positive", "status-positive", "text-muted"] : delta >= TROLL_LIMIT || ahead ? ["text-muted", "text-muted", "text-muted"] - : delta >= (latency * 2000) + : delta >= (latencyMillis * 2) ? ["status-danger", "text-muted", "text-muted"] : ["status-warning", "status-warning", "text-muted"]; - return (abs >= latency || isDiscordKotlin) ? { delta: stringDelta, ahead, fill, isDiscordKotlin } : null; + return (abs >= latencyMillis || isDiscordKotlin) ? { delta: stringDelta, ahead, fill, isDiscordKotlin } : null; }, Tooltip() { From 4281b7a94a97b2b9d930116779f37f3e293b7b64 Mon Sep 17 00:00:00 2001 From: Sqaaakoi Date: Thu, 16 May 2024 15:21:52 +1200 Subject: [PATCH 06/44] ShowTimeoutDuration: Simplify tooltip style, allow changing style without reload (#2441) --- src/plugins/showTimeoutDuration/index.tsx | 34 +++++++--------------- src/plugins/showTimeoutDuration/styles.css | 4 +++ 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/src/plugins/showTimeoutDuration/index.tsx b/src/plugins/showTimeoutDuration/index.tsx index f57ee0fc9..bfe806802 100644 --- a/src/plugins/showTimeoutDuration/index.tsx +++ b/src/plugins/showTimeoutDuration/index.tsx @@ -9,11 +9,11 @@ import "./styles.css"; import { definePluginSettings } from "@api/Settings"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; -import { Margins } from "@utils/margins"; import definePlugin, { OptionType } from "@utils/types"; import { findComponentLazy } from "@webpack"; -import { ChannelStore, Forms, GuildMemberStore, i18n, Text, Tooltip } from "@webpack/common"; +import { ChannelStore, GuildMemberStore, i18n, Text, Tooltip } from "@webpack/common"; import { Message } from "discord-types/general"; +import { FunctionComponent, ReactNode } from "react"; const CountDown = findComponentLazy(m => m.prototype?.render?.toString().includes(".MAX_AGE_NEVER")); @@ -26,7 +26,6 @@ const settings = definePluginSettings({ displayStyle: { description: "How to display the timeout duration", type: OptionType.SELECT, - restartNeeded: true, options: [ { label: "In the Tooltip", value: DisplayStyle.Tooltip }, { label: "Next to the timeout icon", value: DisplayStyle.Inline, default: true }, @@ -60,7 +59,7 @@ function renderTimeout(message: Message, inline: boolean) { export default definePlugin({ name: "ShowTimeoutDuration", description: "Shows how much longer a user's timeout will last, either in the timeout icon tooltip or next to it", - authors: [Devs.Ven], + authors: [Devs.Ven, Devs.Sqaaakoi], settings, @@ -70,33 +69,20 @@ export default definePlugin({ replacement: [ { match: /(\i)\.Tooltip,{(text:.{0,30}\.Messages\.GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY)/, - get replace() { - if (settings.store.displayStyle === DisplayStyle.Inline) - return "$self.TooltipWrapper,{vcProps:arguments[0],$2"; - - return "$1.Tooltip,{text:$self.renderTimeoutDuration(arguments[0])"; - } + replace: "$self.TooltipWrapper,{message:arguments[0].message,$2" } ] } ], - renderTimeoutDuration: ErrorBoundary.wrap(({ message }: { message: Message; }) => { - return ( - <> - {i18n.Messages.GUILD_COMMUNICATION_DISABLED_ICON_TOOLTIP_BODY} - - {renderTimeout(message, false)} - - - ); - }, { noop: true }), - - TooltipWrapper: ErrorBoundary.wrap(({ vcProps: { message }, ...tooltipProps }: { vcProps: { message: Message; }; }) => { + TooltipWrapper: ErrorBoundary.wrap(({ message, children, text }: { message: Message; children: FunctionComponent; text: ReactNode; }) => { + if (settings.store.displayStyle === DisplayStyle.Tooltip) return ; return (
- - + {renderTimeout(message, true)} timeout remaining diff --git a/src/plugins/showTimeoutDuration/styles.css b/src/plugins/showTimeoutDuration/styles.css index 70a826e10..a6f830c38 100644 --- a/src/plugins/showTimeoutDuration/styles.css +++ b/src/plugins/showTimeoutDuration/styles.css @@ -2,3 +2,7 @@ display: flex; align-items: center; } + +.vc-std-wrapper [class*="communicationDisabled"] { + margin-right: 0; +} From fb19642d8d8465c8578185491d6a2aba5bf4ab0a Mon Sep 17 00:00:00 2001 From: DShadow <62884000+PonyGirlDShadow@users.noreply.github.com> Date: Thu, 16 May 2024 07:07:14 +0300 Subject: [PATCH 07/44] fix(readAllNotificationsButton): Mark threads as read (#2437) --- .../readAllNotificationsButton/index.tsx | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/plugins/readAllNotificationsButton/index.tsx b/src/plugins/readAllNotificationsButton/index.tsx index 3bf53f993..7a6737a8a 100644 --- a/src/plugins/readAllNotificationsButton/index.tsx +++ b/src/plugins/readAllNotificationsButton/index.tsx @@ -22,14 +22,34 @@ import { addServerListElement, removeServerListElement, ServerListRenderPosition import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; +import { findStoreLazy } from "@webpack"; import { Button, FluxDispatcher, GuildChannelStore, GuildStore, React, ReadStateStore } from "@webpack/common"; +import { Channel } from "discord-types/general"; + +interface ThreadJoined { + channel: Channel; + joinTimestamp: number; +} + +type ThreadsJoined = Record; +type ThreadsJoinedByParent = Record; + +interface ActiveJoinedThreadsStore { + getActiveJoinedThreadsForGuild(guildId: string): ThreadsJoinedByParent; +} + +const ActiveJoinedThreadsStore: ActiveJoinedThreadsStore = findStoreLazy("ActiveJoinedThreadsStore"); function onClick() { const channels: Array = []; Object.values(GuildStore.getGuilds()).forEach(guild => { - GuildChannelStore.getChannels(guild.id).SELECTABLE - .concat(GuildChannelStore.getChannels(guild.id).VOCAL) + GuildChannelStore.getChannels(guild.id).SELECTABLE // Array<{ channel, comparator }> + .concat(GuildChannelStore.getChannels(guild.id).VOCAL) // Array<{ channel, comparator }> + .concat( + Object.values(ActiveJoinedThreadsStore.getActiveJoinedThreadsForGuild(guild.id)) + .flatMap(threadChannels => Object.values(threadChannels)) + ) .forEach((c: { channel: { id: string; }; }) => { if (!ReadStateStore.hasUnread(c.channel.id)) return; From cddc811c02b37a0dd0bff24b36ff562f42497231 Mon Sep 17 00:00:00 2001 From: nyx <60797172+verticalsync@users.noreply.github.com> Date: Thu, 16 May 2024 08:26:40 +0300 Subject: [PATCH 08/44] feat(ViewIcons): Group & User DMs icons support (#2464) --- src/plugins/viewIcons/index.tsx | 58 ++++++++++++++++++++++++++++++--- src/utils/constants.ts | 4 +++ 2 files changed, 57 insertions(+), 5 deletions(-) diff --git a/src/plugins/viewIcons/index.tsx b/src/plugins/viewIcons/index.tsx index f71777ad7..fc74db0f7 100644 --- a/src/plugins/viewIcons/index.tsx +++ b/src/plugins/viewIcons/index.tsx @@ -36,6 +36,10 @@ interface GuildContextProps { guild?: Guild; } +interface GroupDMContextProps { + channel: Channel; +} + const settings = definePluginSettings({ format: { type: OptionType.SELECT, @@ -145,10 +149,27 @@ const GuildContext: NavContextMenuPatchCallback = (children, { guild }: GuildCon )); }; +const GroupDMContext: NavContextMenuPatchCallback = (children, { channel }: GroupDMContextProps) => { + if (!channel) return; + + children.splice(-1, 0, ( + + + openImage(IconUtils.getChannelIconURL(channel)!) + } + icon={ImageIcon} + /> + + )); +}; + export default definePlugin({ name: "ViewIcons", - authors: [Devs.Ven, Devs.TheKodeToad, Devs.Nuckyz], - description: "Makes avatars and banners in user profiles clickable, and adds View Icon/Banner entries in the user and server context menu", + authors: [Devs.Ven, Devs.TheKodeToad, Devs.Nuckyz, Devs.nyx], + description: "Makes avatars and banners in user profiles clickable, adds View Icon/Banner entries in the user, server and group channel context menu.", tags: ["ImageUtilities"], settings, @@ -157,11 +178,12 @@ export default definePlugin({ contextMenus: { "user-context": UserContext, - "guild-context": GuildContext + "guild-context": GuildContext, + "gdm-context": GroupDMContext }, patches: [ - // Make pfps clickable + // Profiles Modal pfp { find: "User Profile Modal - Context Menu", replacement: { @@ -169,7 +191,7 @@ export default definePlugin({ replace: "{src:$1,onClick:()=>$self.openImage($1)" } }, - // Make banners clickable + // Banners { find: ".NITRO_BANNER,", replacement: { @@ -180,12 +202,38 @@ export default definePlugin({ 'onClick:ev=>$1&&ev.target.style.backgroundImage&&$self.openImage($2),style:{cursor:$1?"pointer":void 0,' } }, + // User DMs "User Profile" popup in the right { find: ".avatarPositionPanel", replacement: { match: /(?<=avatarWrapperNonUserBot.{0,50})onClick:(\i\|\|\i)\?void 0(?<=,avatarSrc:(\i).+?)/, replace: "style:($1)?{cursor:\"pointer\"}:{},onClick:$1?()=>{$self.openImage($2)}" } + }, + // Group DMs top small & large icon + { + find: ".recipients.length>=2", + all: true, + replacement: { + match: /null==\i\.icon\?.+?src:(\(0,\i\.getChannelIconURL\).+?\))(?=[,}])/, + replace: (m, iconUrl) => `${m},onClick:()=>$self.openImage(${iconUrl})` + } + }, + // User DMs top small icon + { + find: /HiddenVisually,{children:\i\.\i\.Messages\.DIRECT_MESSAGE/, + replacement: { + match: /.Avatar,.+?src:(.+?\))(?=[,}])/, + replace: (m, avatarUrl) => `${m},onClick:()=>$self.openImage(${avatarUrl})` + } + }, + // User Dms top large icon + { + find: 'experimentLocation:"empty_messages"', + replacement: { + match: /.Avatar,.+?src:(.+?\))(?=[,}])/, + replace: (m, avatarUrl) => `${m},onClick:()=>$self.openImage(${avatarUrl})` + } } ] }); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index a77edf7d5..e6e13bf38 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -490,6 +490,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({ name: "ScattrdBlade", id: 678007540608532491n }, + nyx: { + name: "verticalsync", + id: 328165170536775680n + }, } satisfies Record); // iife so #__PURE__ works correctly From c5e554e48c89c0b386fef718799fb5b289204c40 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Thu, 16 May 2024 02:37:24 -0300 Subject: [PATCH 09/44] ViewIcon: Replace regex find with string find --- src/plugins/viewIcons/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/viewIcons/index.tsx b/src/plugins/viewIcons/index.tsx index fc74db0f7..104252f6e 100644 --- a/src/plugins/viewIcons/index.tsx +++ b/src/plugins/viewIcons/index.tsx @@ -221,7 +221,7 @@ export default definePlugin({ }, // User DMs top small icon { - find: /HiddenVisually,{children:\i\.\i\.Messages\.DIRECT_MESSAGE/, + find: ".cursorPointer:null,children", replacement: { match: /.Avatar,.+?src:(.+?\))(?=[,}])/, replace: (m, avatarUrl) => `${m},onClick:()=>$self.openImage(${avatarUrl})` From 0c50e153eff0c26fbd8850cbe92cdcde9fc0a3fa Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Thu, 16 May 2024 23:02:50 -0300 Subject: [PATCH 10/44] FakeNitro: Fix & rewrite emoji bypass patches --- src/plugins/fakeNitro/index.tsx | 75 +++++++++++++++++---------------- 1 file changed, 39 insertions(+), 36 deletions(-) diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index a55a7771e..65cae3752 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -54,16 +54,22 @@ const ClientThemeSettingsActionsCreators = proxyLazyWebpack(() => searchProtoCla const enum EmojiIntentions { - REACTION = 0, - STATUS = 1, - COMMUNITY_CONTENT = 2, - CHAT = 3, - GUILD_STICKER_RELATED_EMOJI = 4, - GUILD_ROLE_BENEFIT_EMOJI = 5, - COMMUNITY_CONTENT_ONLY = 6, - SOUNDBOARD = 7 + REACTION, + STATUS, + COMMUNITY_CONTENT, + CHAT, + GUILD_STICKER_RELATED_EMOJI, + GUILD_ROLE_BENEFIT_EMOJI, + COMMUNITY_CONTENT_ONLY, + SOUNDBOARD, + VOICE_CHANNEL_TOPIC, + GIFT, + AUTO_SUGGESTION, + POLLS } +const IS_BYPASSEABLE_INTENTION = `[${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention)`; + const enum StickerType { PNG = 1, APNG = 2, @@ -198,37 +204,43 @@ export default definePlugin({ patches: [ { find: ".PREMIUM_LOCKED;", + group: true, predicate: () => settings.store.enableEmojiBypass, replacement: [ { - // Create a variable for the intention of listing the emoji - match: /(?<=,intention:(\i).+?;)/, - replace: (_, intention) => `let fakeNitroIntention=${intention};` + // Create a variable for the intention of using the emoji + match: /(?<=\.USE_EXTERNAL_EMOJIS.+?;)(?<=intention:(\i).+?)/, + replace: (_, intention) => `const fakeNitroIntention=${intention};` }, { - // Send the intention of listing the emoji to the nitro permission check functions - match: /\.(?:canUseEmojisEverywhere|canUseAnimatedEmojis)\(\i(?=\))/g, - replace: '$&,typeof fakeNitroIntention!=="undefined"?fakeNitroIntention:void 0' + // Disallow the emoji for external if the intention doesn't allow it + match: /&&!\i&&!\i(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/, + replace: m => `${m}&&!${IS_BYPASSEABLE_INTENTION}` }, { - // Disallow the emoji if the intention doesn't allow it - match: /(&&!\i&&)!(\i)(?=\)return \i\.\i\.DISALLOW_EXTERNAL;)/, - replace: (_, rest, canUseExternal) => `${rest}(!${canUseExternal}&&(typeof fakeNitroIntention==="undefined"||![${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention)))` + // Disallow the emoji for unavailable if the intention doesn't allow it + match: /!\i\.available(?=\)return \i\.\i\.GUILD_SUBSCRIPTION_UNAVAILABLE;)/, + replace: m => `${m}&&!${IS_BYPASSEABLE_INTENTION}` }, { - // Make the emoji always available if the intention allows it - match: /if\(!\i\.available/, - replace: m => `${m}&&(typeof fakeNitroIntention==="undefined"||![${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention))` + // Disallow the emoji for premium locked if the intention doesn't allow it + match: /!\i\.\i\.canUseEmojisEverywhere\(\i\)/, + replace: m => `(${m}&&!${IS_BYPASSEABLE_INTENTION})` + }, + { + // Allow animated emojis to be used if the intention allows it + match: /(?<=\|\|)\i\.\i\.canUseAnimatedEmojis\(\i\)/, + replace: m => `(${m}||${IS_BYPASSEABLE_INTENTION})` } ] }, - // Allow emojis and animated emojis to be sent everywhere + // Allows the usage of subscription-locked emojis { - find: "canUseAnimatedEmojis:function", - predicate: () => settings.store.enableEmojiBypass, + find: "isUnusableRoleSubscriptionEmoji:function", replacement: { - match: /((?:canUseEmojisEverywhere|canUseAnimatedEmojis):function\(\i)\){(.+?\))(?=})/g, - replace: (_, rest, premiumCheck) => `${rest},fakeNitroIntention){${premiumCheck}||fakeNitroIntention==null||[${EmojiIntentions.CHAT},${EmojiIntentions.GUILD_STICKER_RELATED_EMOJI}].includes(fakeNitroIntention)` + match: /isUnusableRoleSubscriptionEmoji:function/, + // Replace the original export with a func that always returns false and alias the original + replace: "isUnusableRoleSubscriptionEmoji:()=>()=>false,isUnusableRoleSubscriptionEmojiOriginal:function" } }, // Allow stickers to be sent everywhere @@ -242,10 +254,10 @@ export default definePlugin({ }, // Make stickers always available { - find: "\"SENDABLE\"", + find: '"SENDABLE"', predicate: () => settings.store.enableStickerBypass, replacement: { - match: /(\w+)\.available\?/, + match: /\i\.available\?/, replace: "true?" } }, @@ -408,15 +420,6 @@ export default definePlugin({ match: /canUseCustomNotificationSounds:function\(\i\){/, replace: "$&return true;" } - }, - // Allows the usage of subscription-locked emojis - { - find: "isUnusableRoleSubscriptionEmoji:function", - replacement: { - match: /isUnusableRoleSubscriptionEmoji:function/, - // replace the original export with a func that always returns false and alias the original - replace: "isUnusableRoleSubscriptionEmoji:()=>()=>false,isUnusableRoleSubscriptionEmojiOriginal:function" - } } ], From 03d83e1ff752ac3338ee3aa7f52ed67e6da92ff3 Mon Sep 17 00:00:00 2001 From: Tuur Martens Date: Fri, 17 May 2024 09:11:41 +0200 Subject: [PATCH 11/44] new plugin AutomodContext (#2290) --- src/plugins/automodContext/index.tsx | 73 ++++++++++++++++++++++++++++ src/utils/constants.ts | 4 ++ 2 files changed, 77 insertions(+) create mode 100644 src/plugins/automodContext/index.tsx diff --git a/src/plugins/automodContext/index.tsx b/src/plugins/automodContext/index.tsx new file mode 100644 index 000000000..5425c5526 --- /dev/null +++ b/src/plugins/automodContext/index.tsx @@ -0,0 +1,73 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +import ErrorBoundary from "@components/ErrorBoundary"; +import { Devs } from "@utils/constants"; +import definePlugin from "@utils/types"; +import { findByPropsLazy } from "@webpack"; +import { Button, ChannelStore, Text } from "@webpack/common"; + +const { selectChannel } = findByPropsLazy("selectChannel", "selectVoiceChannel"); + +function jumpToMessage(channelId: string, messageId: string) { + const guildId = ChannelStore.getChannel(channelId)?.guild_id; + + selectChannel({ + guildId, + channelId, + messageId, + jumpType: "INSTANT" + }); +} + +function findChannelId(message: any): string | null { + const { embeds: [embed] } = message; + const channelField = embed.fields.find(({ rawName }) => rawName === "channel_id"); + + if (!channelField) { + return null; + } + + return channelField.rawValue; +} + +export default definePlugin({ + name: "AutomodContext", + description: "Allows you to jump to the messages surrounding an automod hit.", + authors: [Devs.JohnyTheCarrot], + + patches: [ + { + find: ".Messages.GUILD_AUTOMOD_REPORT_ISSUES", + replacement: { + match: /\.Messages\.ACTIONS.+?}\)(?=,(\(0.{0,40}\.dot.*?}\)),)/, + replace: (m, dot) => `${m},${dot},$self.renderJumpButton({message:arguments[0].message})` + } + } + ], + + renderJumpButton: ErrorBoundary.wrap(({ message }: { message: any; }) => { + const channelId = findChannelId(message); + + if (!channelId) { + return null; + } + + return ( + + ); + }, { noop: true }) +}); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index e6e13bf38..5327e3cdf 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -442,6 +442,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({ name: "newwares", id: 421405303951851520n }, + JohnyTheCarrot: { + name: "JohnyTheCarrot", + id: 132819036282159104n + }, puv: { name: "puv", id: 469441552251355137n From ffe1d7cc4d00b3d8061df55b0dd64f8ce720abc9 Mon Sep 17 00:00:00 2001 From: Moxxie <79810799+ImpishMoxxie@users.noreply.github.com> Date: Fri, 17 May 2024 10:17:14 +0300 Subject: [PATCH 12/44] new plugin ReplaceGoogleSearch (#2450) --- src/plugins/ReplaceGoogleSearch/index.tsx | 107 ++++++++++++++++++++++ src/utils/constants.ts | 8 ++ 2 files changed, 115 insertions(+) create mode 100644 src/plugins/ReplaceGoogleSearch/index.tsx diff --git a/src/plugins/ReplaceGoogleSearch/index.tsx b/src/plugins/ReplaceGoogleSearch/index.tsx new file mode 100644 index 000000000..1b1a761fc --- /dev/null +++ b/src/plugins/ReplaceGoogleSearch/index.tsx @@ -0,0 +1,107 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +import { findGroupChildrenByChildId, NavContextMenuPatchCallback } from "@api/ContextMenu"; +import { definePluginSettings } from "@api/Settings"; +import { Devs } from "@utils/constants"; +import definePlugin, { OptionType } from "@utils/types"; +import { Flex, Menu } from "@webpack/common"; + +const DefaultEngines = { + Google: "https://www.google.com/search?q=", + DuckDuckGo: "https://duckduckgo.com/", + Bing: "https://www.bing.com/search?q=", + Yahoo: "https://search.yahoo.com/search?p=", + Github: "https://github.com/search?q=", + Kagi: "https://kagi.com/search?q=", + Yandex: "https://yandex.com/search/?text=", + AOL: "https://search.aol.com/aol/search?q=", + Baidu: "https://www.baidu.com/s?wd=", + Wikipedia: "https://wikipedia.org/w/index.php?search=", +} as const; + +const settings = definePluginSettings({ + customEngineName: { + description: "Name of the custom search engine", + type: OptionType.STRING, + placeholder: "Google" + }, + customEngineURL: { + description: "The URL of your Engine", + type: OptionType.STRING, + placeholder: "https://google.com/search?q=" + } +}); + +function search(src: string, engine: string) { + open(engine + encodeURIComponent(src), "_blank"); +} + +function makeSearchItem(src: string) { + let Engines = {}; + + if (settings.store.customEngineName && settings.store.customEngineURL) { + Engines[settings.store.customEngineName] = settings.store.customEngineURL; + } + + Engines = { ...Engines, ...DefaultEngines }; + + return ( + + {Object.keys(Engines).map((engine, i) => { + const key = "vc-search-content-" + engine; + return ( + + + {engine} + + } + action={() => search(src, Engines[engine])} + /> + ); + })} + + ); +} + +const messageContextMenuPatch: NavContextMenuPatchCallback = (children, _props) => { + const selection = document.getSelection()?.toString(); + if (!selection) return; + + const group = findGroupChildrenByChildId("search-google", children); + if (group) { + const idx = group.findIndex(c => c?.props?.id === "search-google"); + if (idx !== -1) group[idx] = makeSearchItem(selection); + } +}; + +export default definePlugin({ + name: "ReplaceGoogleSearch", + description: "Replaces the Google search with different Engines", + authors: [Devs.Moxxie, Devs.Ethan], + + settings, + + contextMenus: { + "message": messageContextMenuPatch + } +}); diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 5327e3cdf..974758e3a 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -494,6 +494,14 @@ export const Devs = /* #__PURE__*/ Object.freeze({ name: "ScattrdBlade", id: 678007540608532491n }, + Moxxie: { + name: "Moxxie", + id: 712653921692155965n, + }, + Ethan: { + name: "Ethan", + id: 721717126523781240n, + }, nyx: { name: "verticalsync", id: 328165170536775680n From 6547cc10f7f515652de6513326342ea3e87535ba Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 17 May 2024 04:34:50 -0300 Subject: [PATCH 13/44] FakeNitro: Fix attempting to bypass unicode emojis Closes #2470 --- src/plugins/fakeNitro/index.tsx | 6 +++--- src/webpack/common/types/stores.d.ts | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index 65cae3752..9c8af1e7c 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -25,7 +25,7 @@ import { Logger } from "@utils/Logger"; import definePlugin, { OptionType } from "@utils/types"; import { findByPropsLazy, findStoreLazy, proxyLazyWebpack } from "@webpack"; import { Alerts, ChannelStore, DraftType, EmojiStore, FluxDispatcher, Forms, IconUtils, lodash, Parser, PermissionsBits, PermissionStore, UploadHandler, UserSettingsActionCreators, UserStore } from "@webpack/common"; -import type { CustomEmoji } from "@webpack/types"; +import type { Emoji } from "@webpack/types"; import type { Message } from "discord-types/general"; import { applyPalette, GIFEncoder, quantize } from "gifenc"; import type { ReactElement, ReactNode } from "react"; @@ -812,8 +812,8 @@ export default definePlugin({ UploadHandler.promptToUpload([file], ChannelStore.getChannel(channelId), DraftType.ChannelMessage); }, - canUseEmote(e: CustomEmoji, channelId: string) { - if (e.require_colons === false) return true; + canUseEmote(e: Emoji, channelId: string) { + if (e.type === "UNICODE") return true; if (e.available === false) return false; const isUnusableRoleSubEmoji = RoleSubscriptionEmojiUtils.isUnusableRoleSubscriptionEmojiOriginal ?? RoleSubscriptionEmojiUtils.isUnusableRoleSubscriptionEmoji; diff --git a/src/webpack/common/types/stores.d.ts b/src/webpack/common/types/stores.d.ts index 27715b5ee..059924f5a 100644 --- a/src/webpack/common/types/stores.d.ts +++ b/src/webpack/common/types/stores.d.ts @@ -63,7 +63,7 @@ export interface CustomEmoji { originalName?: string; require_colons: boolean; roles: string[]; - url: string; + type: "GUILD_EMOJI"; } export interface UnicodeEmoji { @@ -75,6 +75,7 @@ export interface UnicodeEmoji { }; index: number; surrogates: string; + type: "UNICODE"; uniqueName: string; useSpriteSheet: boolean; get allNamesString(): string; From 60f8225b96cbdce8bd5f8a60d805da39ac8a523f Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 17 May 2024 04:51:59 -0300 Subject: [PATCH 14/44] chore: Fix non standard plugin names --- src/plugins/partyMode/index.ts | 5 +++-- .../{ReplaceGoogleSearch => replaceGoogleSearch}/index.tsx | 0 2 files changed, 3 insertions(+), 2 deletions(-) rename src/plugins/{ReplaceGoogleSearch => replaceGoogleSearch}/index.tsx (100%) diff --git a/src/plugins/partyMode/index.ts b/src/plugins/partyMode/index.ts index 06e87195e..56c19c02c 100644 --- a/src/plugins/partyMode/index.ts +++ b/src/plugins/partyMode/index.ts @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import { definePluginSettings } from "@api/Settings"; +import { definePluginSettings, migratePluginSettings } from "@api/Settings"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; import { FluxDispatcher } from "@webpack/common"; @@ -41,8 +41,9 @@ const settings = definePluginSettings({ }, }); +migratePluginSettings("PartyMode", "Party mode 🎉"); export default definePlugin({ - name: "Party mode 🎉", + name: "PartyMode", description: "Allows you to use party mode cause the party never ends ✨", authors: [Devs.UwUDev], settings, diff --git a/src/plugins/ReplaceGoogleSearch/index.tsx b/src/plugins/replaceGoogleSearch/index.tsx similarity index 100% rename from src/plugins/ReplaceGoogleSearch/index.tsx rename to src/plugins/replaceGoogleSearch/index.tsx From 0b4b6031c53f9943acb8a61747aa8c9994c2fcfe Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 17 May 2024 10:21:12 +0200 Subject: [PATCH 15/44] new plugin NoDefaultHangStatus (#2468) --- src/plugins/noDefaultHangStatus/README.md | 5 +++++ src/plugins/noDefaultHangStatus/index.ts | 24 +++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/plugins/noDefaultHangStatus/README.md create mode 100644 src/plugins/noDefaultHangStatus/index.ts diff --git a/src/plugins/noDefaultHangStatus/README.md b/src/plugins/noDefaultHangStatus/README.md new file mode 100644 index 000000000..e6bc9f83a --- /dev/null +++ b/src/plugins/noDefaultHangStatus/README.md @@ -0,0 +1,5 @@ +# NoDefaultHangStatus + +Disable the default hang status when joining voice channels + +![Visualization](https://github.com/Vendicated/Vencord/assets/24937357/329a9742-236f-48f7-94ff-c3510eca505a) diff --git a/src/plugins/noDefaultHangStatus/index.ts b/src/plugins/noDefaultHangStatus/index.ts new file mode 100644 index 000000000..3f77feb22 --- /dev/null +++ b/src/plugins/noDefaultHangStatus/index.ts @@ -0,0 +1,24 @@ +/* + * 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 definePlugin from "@utils/types"; + +export default definePlugin({ + name: "NoDefaultHangStatus", + description: "Disable the default hang status when joining voice channels", + authors: [Devs.D3SOX], + + patches: [ + { + find: "HangStatusTypes.CHILLING)", + replacement: { + match: /{enableHangStatus:(\i),/, + replace: "{_enableHangStatus:$1=false," + } + } + ] +}); From 84e477f678b316a2de26cbdede9a19767313cb74 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 17 May 2024 05:43:40 -0300 Subject: [PATCH 16/44] Add missing README to new plugins --- src/plugins/automodContext/README.md | 5 +++++ src/plugins/replaceGoogleSearch/README.md | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 src/plugins/automodContext/README.md create mode 100644 src/plugins/replaceGoogleSearch/README.md diff --git a/src/plugins/automodContext/README.md b/src/plugins/automodContext/README.md new file mode 100644 index 000000000..f70d71d90 --- /dev/null +++ b/src/plugins/automodContext/README.md @@ -0,0 +1,5 @@ +# AutomodContext + +Allows you to jump to the messages surrounding an automod hit + +![Visualization](https://github.com/Vendicated/Vencord/assets/61953774/d13740c8-2062-4553-b975-82fd3d6cc08b) diff --git a/src/plugins/replaceGoogleSearch/README.md b/src/plugins/replaceGoogleSearch/README.md new file mode 100644 index 000000000..1ab30212e --- /dev/null +++ b/src/plugins/replaceGoogleSearch/README.md @@ -0,0 +1,5 @@ +# ReplaceGoogleSearch + +Replaces the Google search with different Engines + +![Visualization](https://github.com/Vendicated/Vencord/assets/61953774/8b8158d2-0407-4d7b-9dff-a8b9bdc1a122) From 5fc6ba86d187e51004bce274e5281cc67cf7ec75 Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 17 May 2024 17:40:01 +0200 Subject: [PATCH 17/44] fix(replaceGoogleSearch): correct GitHub casing (#2471) --- src/plugins/replaceGoogleSearch/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/replaceGoogleSearch/index.tsx b/src/plugins/replaceGoogleSearch/index.tsx index 1b1a761fc..dff593a3b 100644 --- a/src/plugins/replaceGoogleSearch/index.tsx +++ b/src/plugins/replaceGoogleSearch/index.tsx @@ -15,7 +15,7 @@ const DefaultEngines = { DuckDuckGo: "https://duckduckgo.com/", Bing: "https://www.bing.com/search?q=", Yahoo: "https://search.yahoo.com/search?p=", - Github: "https://github.com/search?q=", + GitHub: "https://github.com/search?q=", Kagi: "https://kagi.com/search?q=", Yandex: "https://yandex.com/search/?text=", AOL: "https://search.aol.com/aol/search?q=", From 54817ab5069026421c263d8d71c252b43d4976a9 Mon Sep 17 00:00:00 2001 From: flag <38012125+Yumiro@users.noreply.github.com> Date: Fri, 17 May 2024 17:36:35 +0100 Subject: [PATCH 18/44] lastfmRPC: add setting to toggle "View Song" button (#2292) Co-authored-by: vee --- src/plugins/lastfm/index.tsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/plugins/lastfm/index.tsx b/src/plugins/lastfm/index.tsx index 1213ece29..02fd694f8 100644 --- a/src/plugins/lastfm/index.tsx +++ b/src/plugins/lastfm/index.tsx @@ -114,6 +114,11 @@ const settings = definePluginSettings({ type: OptionType.BOOLEAN, default: false, }, + shareSong: { + description: "show link to song on last.fm", + type: OptionType.BOOLEAN, + default: true, + }, hideWithSpotify: { description: "hide last.fm presence if spotify is running", type: OptionType.BOOLEAN, @@ -295,12 +300,7 @@ export default definePlugin({ large_text: trackData.album || undefined, }; - const buttons: ActivityButton[] = [ - { - label: "View Song", - url: trackData.url, - }, - ]; + const buttons: ActivityButton[] = []; if (settings.store.shareUsername) buttons.push({ @@ -308,6 +308,12 @@ export default definePlugin({ url: `https://www.last.fm/user/${settings.store.username}`, }); + if (settings.store.shareSong) + buttons.push({ + label: "View Song", + url: trackData.url, + }); + const statusName = (() => { switch (settings.store.nameFormat) { case NameFormat.ArtistFirst: @@ -333,7 +339,7 @@ export default definePlugin({ state: trackData.artist, assets, - buttons: buttons.map(v => v.label), + buttons: buttons.length ? buttons.map(v => v.label) : undefined, metadata: { button_urls: buttons.map(v => v.url), }, From c3757a2ae6cf775b32a1935cdce96feb1124faff Mon Sep 17 00:00:00 2001 From: vee Date: Fri, 17 May 2024 23:01:07 +0200 Subject: [PATCH 19/44] add package for publishing types to npm (#2473) https://www.npmjs.com/package/@vencord/types --- package.json | 14 +- packages/vencord-types/.gitignore | 7 + packages/vencord-types/.npmignore | 4 + packages/vencord-types/HOW2PUB.md | 5 + packages/vencord-types/README.md | 11 + packages/vencord-types/globals.d.ts | 24 + packages/vencord-types/index.d.ts | 5 + packages/vencord-types/package.json | 28 + packages/vencord-types/prepare.ts | 47 + pnpm-lock.yaml | 1123 +++++++++++++++-- pnpm-workspace.yaml | 2 + src/Vencord.ts | 1 + src/api/Notifications/Notifications.tsx | 1 + src/components/ExpandableHeader.tsx | 8 +- src/components/index.ts | 18 + src/modules.d.ts | 2 +- .../decor/lib/stores/AuthorizationStore.tsx | 9 +- .../lib/stores/CurrentUserDecorationsStore.ts | 4 +- .../decor/lib/stores/UsersDecorationsStore.ts | 6 +- .../decor/ui/components/DecorSection.tsx | 2 +- .../components/UserPermissions.tsx | 2 +- src/plugins/reviewDB/index.tsx | 2 +- src/utils/index.ts | 2 + src/utils/types.ts | 2 +- src/webpack/common/utils.ts | 4 +- tsconfig.json | 10 +- 26 files changed, 1231 insertions(+), 112 deletions(-) create mode 100644 packages/vencord-types/.gitignore create mode 100644 packages/vencord-types/.npmignore create mode 100644 packages/vencord-types/HOW2PUB.md create mode 100644 packages/vencord-types/README.md create mode 100644 packages/vencord-types/globals.d.ts create mode 100644 packages/vencord-types/index.d.ts create mode 100644 packages/vencord-types/package.json create mode 100644 packages/vencord-types/prepare.ts create mode 100644 pnpm-workspace.yaml create mode 100644 src/components/index.ts diff --git a/package.json b/package.json index 95f98a8ba..0819f2aee 100644 --- a/package.json +++ b/package.json @@ -19,16 +19,17 @@ "scripts": { "build": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/build.mjs", "buildWeb": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/buildWeb.mjs", + "watch": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/build.mjs --watch", "generatePluginJson": "tsx scripts/generatePluginList.ts", + "generateTypes": "tspc --emitDeclarationOnly --declaration --outDir packages/vencord-types", "inject": "node scripts/runInstaller.mjs", + "uninject": "node scripts/runInstaller.mjs", "lint": "eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern src/userplugins", "lint-styles": "stylelint \"src/**/*.css\" --ignore-pattern src/userplugins", "lint:fix": "pnpm lint --fix", "test": "pnpm build && pnpm lint && pnpm lint-styles && pnpm testTsc && pnpm generatePluginJson", "testWeb": "pnpm lint && pnpm buildWeb && pnpm testTsc", - "testTsc": "tsc --noEmit", - "uninject": "node scripts/runInstaller.mjs", - "watch": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/build.mjs --watch" + "testTsc": "tsc --noEmit" }, "dependencies": { "@sapphi-red/web-noise-suppressor": "0.3.3", @@ -65,11 +66,12 @@ "standalone-electron-types": "^1.0.0", "stylelint": "^15.6.0", "stylelint-config-standard": "^33.0.0", + "ts-patch": "^3.1.2", "tsx": "^3.12.7", "type-fest": "^3.9.0", - "typescript": "^5.0.4", - "zip-local": "^0.3.5", - "zustand": "^3.7.2" + "typescript": "^5.4.5", + "typescript-transform-paths": "^3.4.7", + "zip-local": "^0.3.5" }, "packageManager": "pnpm@9.1.0", "pnpm": { diff --git a/packages/vencord-types/.gitignore b/packages/vencord-types/.gitignore new file mode 100644 index 000000000..bc23f8b6a --- /dev/null +++ b/packages/vencord-types/.gitignore @@ -0,0 +1,7 @@ +* +!.*ignore +!package.json +!*.md +!prepare.ts +!index.d.ts +!globals.d.ts diff --git a/packages/vencord-types/.npmignore b/packages/vencord-types/.npmignore new file mode 100644 index 000000000..28822788f --- /dev/null +++ b/packages/vencord-types/.npmignore @@ -0,0 +1,4 @@ +node_modules +prepare.ts +.gitignore +HOW2PUB.md diff --git a/packages/vencord-types/HOW2PUB.md b/packages/vencord-types/HOW2PUB.md new file mode 100644 index 000000000..2085898ec --- /dev/null +++ b/packages/vencord-types/HOW2PUB.md @@ -0,0 +1,5 @@ +# How to publish + +1. run `pnpm generateTypes` in the project root +2. bump package.json version +3. npm publish diff --git a/packages/vencord-types/README.md b/packages/vencord-types/README.md new file mode 100644 index 000000000..0513f8703 --- /dev/null +++ b/packages/vencord-types/README.md @@ -0,0 +1,11 @@ +# Vencord Types + +Typings for Vencord's api, published to npm + +```sh +npm i @vencord/types + +yarn add @vencord/types + +pnpm add @vencord/types +``` diff --git a/packages/vencord-types/globals.d.ts b/packages/vencord-types/globals.d.ts new file mode 100644 index 000000000..a5916e54f --- /dev/null +++ b/packages/vencord-types/globals.d.ts @@ -0,0 +1,24 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2022 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +declare global { + export var VencordNative: typeof import("./VencordNative").default; + export var Vencord: typeof import("./Vencord"); +} + +export { }; diff --git a/packages/vencord-types/index.d.ts b/packages/vencord-types/index.d.ts new file mode 100644 index 000000000..c7d8253c6 --- /dev/null +++ b/packages/vencord-types/index.d.ts @@ -0,0 +1,5 @@ +/* eslint-disable */ + +/// +/// +/// diff --git a/packages/vencord-types/package.json b/packages/vencord-types/package.json new file mode 100644 index 000000000..8f9d852e4 --- /dev/null +++ b/packages/vencord-types/package.json @@ -0,0 +1,28 @@ +{ + "name": "@vencord/types", + "private": false, + "version": "0.1.3", + "description": "", + "types": "index.d.ts", + "scripts": { + "prepublishOnly": "tsx ./prepare.ts", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "Vencord", + "license": "GPL-3.0", + "devDependencies": { + "@types/fs-extra": "^11.0.4", + "fs-extra": "^11.2.0", + "tsx": "^3.12.6" + }, + "dependencies": { + "@types/lodash": "^4.14.191", + "@types/node": "^18.11.18", + "@types/react": "^18.2.0", + "@types/react-dom": "^18.0.10", + "discord-types": "^1.3.26", + "standalone-electron-types": "^1.0.0", + "type-fest": "^3.5.3" + } +} diff --git a/packages/vencord-types/prepare.ts b/packages/vencord-types/prepare.ts new file mode 100644 index 000000000..de1f6b04b --- /dev/null +++ b/packages/vencord-types/prepare.ts @@ -0,0 +1,47 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2023 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 + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + +import { cpSync, moveSync, readdirSync, rmSync } from "fs-extra"; +import { join } from "path"; + +readdirSync(join(__dirname, "src")) + .forEach(child => moveSync(join(__dirname, "src", child), join(__dirname, child), { overwrite: true })); + +const VencordSrc = join(__dirname, "..", "..", "src"); + +for (const file of ["preload.d.ts", "userplugins", "main", "debug", "src", "browser", "scripts"]) { + rmSync(join(__dirname, file), { recursive: true, force: true }); +} + +function copyDtsFiles(from: string, to: string) { + for (const file of readdirSync(from, { withFileTypes: true })) { + // bad + if (from === VencordSrc && file.name === "globals.d.ts") continue; + + const fullFrom = join(from, file.name); + const fullTo = join(to, file.name); + + if (file.isDirectory()) { + copyDtsFiles(fullFrom, fullTo); + } else if (file.name.endsWith(".d.ts")) { + cpSync(fullFrom, fullTo); + } + } +} + +copyDtsFiles(VencordSrc, __dirname); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 54b3ab8da..065d5d4e7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -67,10 +67,10 @@ importers: version: 2.4.2 '@typescript-eslint/eslint-plugin': specifier: ^5.59.1 - version: 5.59.1(@typescript-eslint/parser@5.59.1)(eslint@8.46.0)(typescript@5.0.4) + version: 5.59.1(@typescript-eslint/parser@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5) '@typescript-eslint/parser': specifier: ^5.59.1 - version: 5.59.1(eslint@8.46.0)(typescript@5.0.4) + version: 5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5) diff: specifier: ^5.1.0 version: 5.1.0 @@ -85,16 +85,16 @@ importers: version: 8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4) eslint-import-resolver-alias: specifier: ^1.1.2 - version: 1.1.2 + version: 1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))) eslint-plugin-path-alias: specifier: ^1.0.0 - version: 1.0.0(patch_hash=m6sma4g6bh67km3q6igf6uxaja)(eslint@8.46.0) + version: 1.0.0(patch_hash=m6sma4g6bh67km3q6igf6uxaja)(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)) eslint-plugin-simple-import-sort: specifier: ^10.0.0 - version: 10.0.0(eslint@8.46.0) + version: 10.0.0(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)) eslint-plugin-unused-imports: specifier: ^2.0.0 - version: 2.0.0(@typescript-eslint/eslint-plugin@5.59.1)(eslint@8.46.0) + version: 2.0.0(@typescript-eslint/eslint-plugin@5.59.1(@typescript-eslint/parser@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)) highlight.js: specifier: 10.6.0 version: 10.6.0 @@ -103,7 +103,7 @@ importers: version: 2.29.4 puppeteer-core: specifier: ^19.11.1 - version: 19.11.1(typescript@5.0.4) + version: 19.11.1(typescript@5.4.5) standalone-electron-types: specifier: ^1.0.0 version: 1.0.0 @@ -113,6 +113,9 @@ importers: stylelint-config-standard: specifier: ^33.0.0 version: 33.0.0(stylelint@15.6.0) + ts-patch: + specifier: ^3.1.2 + version: 3.1.2 tsx: specifier: ^3.12.7 version: 3.12.7 @@ -120,14 +123,48 @@ importers: specifier: ^3.9.0 version: 3.9.0 typescript: - specifier: ^5.0.4 - version: 5.0.4 + specifier: ^5.4.5 + version: 5.4.5 + typescript-transform-paths: + specifier: ^3.4.7 + version: 3.4.7(typescript@5.4.5) zip-local: specifier: ^0.3.5 version: 0.3.5 - zustand: - specifier: ^3.7.2 - version: 3.7.2 + + packages/vencord-types: + dependencies: + '@types/lodash': + specifier: ^4.14.191 + version: 4.14.194 + '@types/node': + specifier: ^18.11.18 + version: 18.16.3 + '@types/react': + specifier: ^18.2.0 + version: 18.2.0 + '@types/react-dom': + specifier: ^18.0.10 + version: 18.2.1 + discord-types: + specifier: ^1.3.26 + version: 1.3.26 + standalone-electron-types: + specifier: ^1.0.0 + version: 1.0.0 + type-fest: + specifier: ^3.5.3 + version: 3.9.0 + devDependencies: + '@types/fs-extra': + specifier: ^11.0.4 + version: 11.0.4 + fs-extra: + specifier: ^11.2.0 + version: 11.2.0 + tsx: + specifier: ^3.12.6 + version: 3.12.7 packages: @@ -328,9 +365,6 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - peerDependenciesMeta: - eslint: - optional: true '@eslint-community/regexpp@4.5.1': resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==} @@ -396,12 +430,21 @@ packages: '@types/filewriter@0.0.30': resolution: {integrity: sha512-lB98tui0uxc7erbj0serZfJlHKLNJHwBltPnbmO1WRpL5T325GOHRiQfr2E29V2q+S1brDO63Fpdt6vb3bES9Q==} + '@types/fs-extra@11.0.4': + resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} + '@types/har-format@1.2.13': resolution: {integrity: sha512-PwBsCBD3lDODn4xpje3Y1di0aDJp4Ww7aSfMRVw6ysnxD4I7Wmq2mBkSKaDtN403hqH5sp6c9xQUvFYY3+lkBg==} '@types/json-schema@7.0.11': resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} + '@types/json5@0.0.29': + resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} + + '@types/jsonfile@6.1.4': + resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} + '@types/lodash@4.14.194': resolution: {integrity: sha512-r22s9tAS7imvBt2lyHC9B8AGwWnXaYb1tY09oyLkXDs4vArpYJzw09nj8MLx5VfciBPGIb+ZwG0ssYnEPJxn/g==} @@ -446,8 +489,6 @@ packages: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: - eslint: - optional: true typescript: optional: true @@ -458,8 +499,6 @@ packages: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 typescript: '*' peerDependenciesMeta: - eslint: - optional: true typescript: optional: true @@ -474,8 +513,6 @@ packages: eslint: '*' typescript: '*' peerDependenciesMeta: - eslint: - optional: true typescript: optional: true @@ -497,9 +534,6 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 - peerDependenciesMeta: - eslint: - optional: true '@typescript-eslint/visitor-keys@5.59.1': resolution: {integrity: sha512-6waEYwBTCWryx0VJmP7JaM4FpipLsFl9CvYf2foAE8Qh/Y0s+bxWysciwOs0LTBED4JCaNxTZ5rGadB14M6dwA==} @@ -554,6 +588,14 @@ packages: resolution: {integrity: sha512-sKpyeERZ02v1FeCZT8lrfJq5u6goHCtpTAzPwJYe7c8SPFOboNjNg1vz2L4VTn9T4PQxEx13TbXLmYUcS6Ug7Q==} engines: {node: '>=0.10.0'} + array-buffer-byte-length@1.0.1: + resolution: {integrity: sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==} + engines: {node: '>= 0.4'} + + array-includes@3.1.8: + resolution: {integrity: sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==} + engines: {node: '>= 0.4'} + array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} @@ -562,6 +604,22 @@ packages: resolution: {integrity: sha512-SleRWjh9JUud2wH1hPs9rZBZ33H6T9HOiL0uwGnGx9FpE6wKGyfWugmbkEOIs6qWrZhg0LWeLziLrEwQJhs5mQ==} engines: {node: '>=0.10.0'} + array.prototype.findlastindex@1.2.5: + resolution: {integrity: sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==} + engines: {node: '>= 0.4'} + + array.prototype.flat@1.3.2: + resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} + engines: {node: '>= 0.4'} + + array.prototype.flatmap@1.3.2: + resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} + engines: {node: '>= 0.4'} + + arraybuffer.prototype.slice@1.0.3: + resolution: {integrity: sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==} + engines: {node: '>= 0.4'} + arrify@1.0.1: resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} engines: {node: '>=0.10.0'} @@ -582,6 +640,10 @@ packages: engines: {node: '>= 4.5.0'} hasBin: true + available-typed-arrays@1.0.7: + resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} + engines: {node: '>= 0.4'} + balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -618,6 +680,10 @@ packages: resolution: {integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==} engines: {node: '>=0.10.0'} + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -711,6 +777,18 @@ packages: csstype@3.1.2: resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} + data-view-buffer@1.0.1: + resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} + engines: {node: '>= 0.4'} + + data-view-byte-length@1.0.1: + resolution: {integrity: sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==} + engines: {node: '>= 0.4'} + + data-view-byte-offset@1.0.0: + resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} + engines: {node: '>= 0.4'} + debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: @@ -719,6 +797,14 @@ packages: supports-color: optional: true + debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -743,6 +829,14 @@ packages: deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + + define-properties@1.2.1: + resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} + engines: {node: '>= 0.4'} + define-property@0.2.5: resolution: {integrity: sha512-Rr7ADjQZenceVOAKop6ALkkRAmH1A4Gx9hV/7ZujPUN2rkATqFO0JZLZInbAjpZYoJ1gUx8MRMQVkYemcbMSTA==} engines: {node: '>=0.10.0'} @@ -769,6 +863,10 @@ packages: discord-types@1.3.26: resolution: {integrity: sha512-ToG51AOCH+JTQf7b+8vuYQe5Iqwz7nZ7StpECAZ/VZcI1ZhQk13pvt9KkRTfRv1xNvwJ2qib4e3+RifQlo8VPQ==} + doctrine@2.1.0: + resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} + engines: {node: '>=0.10.0'} + doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} @@ -782,6 +880,33 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} + es-abstract@1.23.3: + resolution: {integrity: sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==} + engines: {node: '>= 0.4'} + + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + + es-object-atoms@1.0.0: + resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} + engines: {node: '>= 0.4'} + + es-set-tostringtag@2.0.3: + resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} + engines: {node: '>= 0.4'} + + es-shim-unscopables@1.0.2: + resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + + es-to-primitive@1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + esbuild-android-64@0.15.18: resolution: {integrity: sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA==} engines: {node: '>=12'} @@ -929,17 +1054,45 @@ packages: engines: {node: '>= 4'} peerDependencies: eslint-plugin-import: '>=1.4.0' + + eslint-import-resolver-node@0.3.9: + resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} + + eslint-module-utils@2.8.1: + resolution: {integrity: sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: '*' + eslint-import-resolver-node: '*' + eslint-import-resolver-typescript: '*' + eslint-import-resolver-webpack: '*' peerDependenciesMeta: - eslint-plugin-import: + '@typescript-eslint/parser': + optional: true + eslint: + optional: true + eslint-import-resolver-node: + optional: true + eslint-import-resolver-typescript: + optional: true + eslint-import-resolver-webpack: + optional: true + + eslint-plugin-import@2.29.1: + resolution: {integrity: sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==} + engines: {node: '>=4'} + peerDependencies: + '@typescript-eslint/parser': '*' + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + peerDependenciesMeta: + '@typescript-eslint/parser': optional: true eslint-plugin-path-alias@1.0.0: resolution: {integrity: sha512-FXus57yC+Zd3sMv46pbloXYwFeNVNHJqlACr9V68FG/IzGFBBokGJpmjDbEjpt8ZCeVSndUubeDWWl2A8sCNVQ==} peerDependencies: eslint: ^7 - peerDependenciesMeta: - eslint: - optional: true eslint-plugin-simple-header@1.0.2: resolution: {integrity: sha512-K1EJ/ueBIjPRA8qR44Ymo+GDmPYYmfoODtainGxVr7PSbX6QiaY+pTuGCrOhO+AtVsYJs8GLSVdGUTXyAxAtOA==} @@ -948,9 +1101,6 @@ packages: resolution: {integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==} peerDependencies: eslint: '>=5.0.0' - peerDependenciesMeta: - eslint: - optional: true eslint-plugin-unused-imports@2.0.0: resolution: {integrity: sha512-3APeS/tQlTrFa167ThtP0Zm0vctjr4M44HMpeg1P4bK6wItarumq0Ma82xorMKdFsWpphQBlRPzw/pxiVELX1A==} @@ -961,8 +1111,6 @@ packages: peerDependenciesMeta: '@typescript-eslint/eslint-plugin': optional: true - eslint: - optional: true eslint-rule-composer@0.3.0: resolution: {integrity: sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==} @@ -1078,6 +1226,9 @@ packages: flatted@3.2.7: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} + for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + for-in@1.0.2: resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} engines: {node: '>=0.10.0'} @@ -1089,6 +1240,10 @@ packages: fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + fs-extra@11.2.0: + resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} + engines: {node: '>=14.14'} + fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -1100,14 +1255,32 @@ packages: function-bind@1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + function-bind@1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + + function.prototype.name@1.1.6: + resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} + engines: {node: '>= 0.4'} + + functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} + get-symbol-description@1.0.2: + resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} + engines: {node: '>= 0.4'} + get-tsconfig@4.5.0: resolution: {integrity: sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==} @@ -1117,7 +1290,6 @@ packages: gifenc@https://codeload.github.com/mattdesl/gifenc/tar.gz/64842fca317b112a8590f8fef2bf3825da8f6fe3: resolution: {tarball: https://codeload.github.com/mattdesl/gifenc/tar.gz/64842fca317b112a8590f8fef2bf3825da8f6fe3} - name: gifenc version: 1.0.3 glob-parent@5.1.2: @@ -1143,6 +1315,10 @@ packages: resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} engines: {node: '>=8'} + globalthis@1.0.4: + resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} + engines: {node: '>= 0.4'} + globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -1150,6 +1326,9 @@ packages: globjoin@0.1.4: resolution: {integrity: sha512-xYfnw62CKG8nLkZBfWbhWwDw02CHty86jfPcc2cr3ZfeuK9ysoVPPEUxf21bAD/rWAgk52SuBrLJlefNy8mvFg==} + gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -1163,6 +1342,9 @@ packages: resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} engines: {node: '>=6'} + has-bigints@1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} @@ -1171,6 +1353,21 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + + has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + has-tostringtag@1.0.2: + resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} + engines: {node: '>= 0.4'} + has-value@0.3.1: resolution: {integrity: sha512-gpG936j8/MzaeID5Yif+577c17TxaDmhuyVgSwtnL/q8UUTySg8Mecb+8Cf1otgLoD7DDH75axp86ER7LFsf3Q==} engines: {node: '>=0.10.0'} @@ -1191,6 +1388,10 @@ packages: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + highlight.js@10.6.0: resolution: {integrity: sha512-8mlRcn5vk/r4+QcqerapwBYTe+iPL5ih6xrNylxrnBdHQiijDETfXX7VIxC3UiCRiINBJfANBAsPzAvRQj8RpQ==} @@ -1241,6 +1442,10 @@ packages: ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + internal-slot@1.0.7: + resolution: {integrity: sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==} + engines: {node: '>= 0.4'} + is-accessor-descriptor@0.1.6: resolution: {integrity: sha512-e1BM1qnDbMRG3ll2U9dSK0UMHuWOs3pY3AtcFsmvwPtKL3MML/Q86i+GilLfvqEs4GW+ExB91tQ3Ig9noDIZ+A==} engines: {node: '>=0.10.0'} @@ -1249,15 +1454,33 @@ packages: resolution: {integrity: sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==} engines: {node: '>=0.10.0'} + is-array-buffer@3.0.4: + resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==} + engines: {node: '>= 0.4'} + is-arrayish@0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} + is-bigint@1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + + is-boolean-object@1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + is-buffer@1.1.6: resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} + is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + is-core-module@2.12.0: resolution: {integrity: sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==} + is-core-module@2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} + is-data-descriptor@0.1.4: resolution: {integrity: sha512-+w9D5ulSoBNlmw9OHn3U2v51SyoCd0he+bB3xMl62oijhrspxowjU+AIcDY0N3iEJbUEkB15IlMASQsxYigvXg==} engines: {node: '>=0.10.0'} @@ -1266,6 +1489,14 @@ packages: resolution: {integrity: sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==} engines: {node: '>=0.10.0'} + is-data-view@1.0.1: + resolution: {integrity: sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==} + engines: {node: '>= 0.4'} + + is-date-object@1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + is-descriptor@0.1.6: resolution: {integrity: sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==} engines: {node: '>=0.10.0'} @@ -1294,6 +1525,14 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-negative-zero@2.0.3: + resolution: {integrity: sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==} + engines: {node: '>= 0.4'} + + is-number-object@1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + is-number@3.0.0: resolution: {integrity: sha512-4cboCqIpliH+mAvFNegjZQ4kgKc3ZUhQVr3HvWbSh5q3WH2v82ct+T2Y1hdU5Gdtorx/cLifQjqCbL7bpznLTg==} engines: {node: '>=0.10.0'} @@ -1318,6 +1557,29 @@ packages: resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} engines: {node: '>=0.10.0'} + is-regex@1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + + is-shared-array-buffer@1.0.3: + resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} + engines: {node: '>= 0.4'} + + is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + + is-symbol@1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + + is-typed-array@1.1.13: + resolution: {integrity: sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==} + engines: {node: '>= 0.4'} + + is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} @@ -1325,6 +1587,9 @@ packages: isarray@1.0.0: resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -1355,9 +1620,16 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json5@1.0.2: + resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} + hasBin: true + jsonc-parser@3.2.0: resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + jsonfile@6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + jszip@2.7.0: resolution: {integrity: sha512-JIsRKRVC3gTRo2vM4Wy9WBC3TRcfnIZU8k65Phi3izkvPH975FowRYtKGT6PxevA0XnJ/yO8b0QwV0ydVyQwfw==} @@ -1450,6 +1722,9 @@ packages: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + mitt@3.0.0: resolution: {integrity: sha512-7dX2/10ITVyqh4aOSVI9gdape+t9l2/8QxHrFmUXu4EEUpdlxl6RudZUPZoc+zuY2hk1j7XxVroIVIan/pD/SQ==} @@ -1472,6 +1747,9 @@ packages: ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + nanoid@3.3.6: resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -1516,14 +1794,37 @@ packages: resolution: {integrity: sha512-79LYn6VAb63zgtmAteVOWo9Vdj71ZVBy3Pbse+VqxDpEP83XuujMrGqHIwAXJ5I/aM0zU7dIyIAhifVTPrNItQ==} engines: {node: '>=0.10.0'} + object-inspect@1.13.1: + resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} + + object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + object-visit@1.0.1: resolution: {integrity: sha512-GBaMwwAVK9qbQN3Scdo0OyvgPW7l3lnaVMj84uTOZlswkX0KpF6fyDBJhtTthf7pymztoN36/KEr1DyhF96zEA==} engines: {node: '>=0.10.0'} + object.assign@4.1.5: + resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} + engines: {node: '>= 0.4'} + + object.fromentries@2.0.8: + resolution: {integrity: sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==} + engines: {node: '>= 0.4'} + + object.groupby@1.0.3: + resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} + engines: {node: '>= 0.4'} + object.pick@1.3.0: resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} engines: {node: '>=0.10.0'} + object.values@1.2.0: + resolution: {integrity: sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==} + engines: {node: '>= 0.4'} + once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -1595,6 +1896,10 @@ packages: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + possible-typed-array-names@1.0.0: + resolution: {integrity: sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==} + engines: {node: '>= 0.4'} + postcss-media-query-parser@0.2.3: resolution: {integrity: sha512-3sOlxmbKcSHMjlUXQZKQ06jOswE7oVkXPxmZdoB1r5l0q6gTFTQSHxNxOrCccElbW7dxNytifNEo8qidX2Vsig==} @@ -1676,6 +1981,10 @@ packages: resolution: {integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==} engines: {node: '>=0.10.0'} + regexp.prototype.flags@1.5.2: + resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==} + engines: {node: '>= 0.4'} + require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -1700,6 +2009,10 @@ packages: resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} hasBin: true + resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + ret@0.1.15: resolution: {integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==} engines: {node: '>=0.12'} @@ -1715,9 +2028,17 @@ packages: run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + safe-array-concat@1.1.2: + resolution: {integrity: sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==} + engines: {node: '>=0.4'} + safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + safe-regex-test@1.0.3: + resolution: {integrity: sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==} + engines: {node: '>= 0.4'} + safe-regex@1.1.0: resolution: {integrity: sha512-aJXcif4xnaNUzvUuC5gcb46oTS7zvg4jpMTnuqtrEPlR3vFr4pxtdTwaF1Qs3Enjn9HK+ZlwQui+a7z0SywIzg==} @@ -1725,11 +2046,28 @@ packages: resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} hasBin: true + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + semver@7.5.0: resolution: {integrity: sha512-+XC0AD/R7Q2mPSRuy2Id0+CGTZ98+8f+KvwirxOKIEyid+XSx6HbC63p+O4IndTHuX5Z+JxQ0TghCkO5Cg/2HA==} engines: {node: '>=10'} hasBin: true + semver@7.6.2: + resolution: {integrity: sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==} + engines: {node: '>=10'} + hasBin: true + + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + + set-function-name@2.0.2: + resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} + engines: {node: '>= 0.4'} + set-value@2.0.1: resolution: {integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==} engines: {node: '>=0.10.0'} @@ -1742,6 +2080,10 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + side-channel@1.0.6: + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} + signal-exit@4.0.1: resolution: {integrity: sha512-uUWsN4aOxJAS8KOuf3QMyFtgm1pkb6I+KRZbRF/ghdf5T7sM+B1lLLzPDxswUjkmHyxQAVzEgG35E3NzDM9GVw==} engines: {node: '>=14'} @@ -1808,6 +2150,17 @@ packages: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} + string.prototype.trim@1.2.9: + resolution: {integrity: sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==} + engines: {node: '>= 0.4'} + + string.prototype.trimend@1.0.8: + resolution: {integrity: sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==} + + string.prototype.trimstart@1.0.8: + resolution: {integrity: sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==} + engines: {node: '>= 0.4'} + string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} @@ -1815,6 +2168,10 @@ packages: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} + strip-indent@3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -1896,6 +2253,13 @@ packages: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} + ts-patch@3.1.2: + resolution: {integrity: sha512-n58F5AqjUMdp9RAKq+E1YBkmONltPVbt1nN+wrmZXoYZek6QcvaTuqvKMhYhr5BxtC53kD/exxIPA1cP1RQxsA==} + hasBin: true + + tsconfig-paths@3.15.0: + resolution: {integrity: sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==} + tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} @@ -1933,11 +2297,35 @@ packages: resolution: {integrity: sha512-hR8JP2e8UiH7SME5JZjsobBlEiatFoxpzCP+R3ZeCo7kAaG1jXQE5X/buLzogM6GJu8le9Y4OcfNuIQX0rZskA==} engines: {node: '>=14.16'} - typescript@5.0.4: - resolution: {integrity: sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==} - engines: {node: '>=12.20'} + typed-array-buffer@1.0.2: + resolution: {integrity: sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==} + engines: {node: '>= 0.4'} + + typed-array-byte-length@1.0.1: + resolution: {integrity: sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==} + engines: {node: '>= 0.4'} + + typed-array-byte-offset@1.0.2: + resolution: {integrity: sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==} + engines: {node: '>= 0.4'} + + typed-array-length@1.0.6: + resolution: {integrity: sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==} + engines: {node: '>= 0.4'} + + typescript-transform-paths@3.4.7: + resolution: {integrity: sha512-1Us1kdkdfKd2unbkBAOV2HHRmbRBYpSuk9nJ7cLD2hP4QmfToiM/VpxNlhJc1eezVwVqSKSBjNSzZsK/fWR/9A==} + peerDependencies: + typescript: '>=3.6.5' + + typescript@5.4.5: + resolution: {integrity: sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==} + engines: {node: '>=14.17'} hasBin: true + unbox-primitive@1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + unbzip2-stream@1.4.3: resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} @@ -1945,6 +2333,10 @@ packages: resolution: {integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==} engines: {node: '>=0.10.0'} + universalify@2.0.1: + resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} + engines: {node: '>= 10.0.0'} + unset-value@1.0.0: resolution: {integrity: sha512-PcA2tsuGSF9cnySLHTLSh2qrQiJ70mn+r+Glzxv2TWZblxsxCC52BDlZoPCsz7STd9pN7EZetkWZBAvk4cgZdQ==} engines: {node: '>=0.10.0'} @@ -1984,6 +2376,13 @@ packages: whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + which-boxed-primitive@1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + + which-typed-array@1.1.15: + resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} + engines: {node: '>= 0.4'} + which@1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true @@ -2045,15 +2444,6 @@ packages: zip-local@0.3.5: resolution: {integrity: sha512-GRV3D5TJY+/PqyeRm5CYBs7xVrKTKzljBoEXvocZu0HJ7tPEcgpSOYa2zFIsCZWgKWMuc4U3yMFgFkERGFIB9w==} - zustand@3.7.2: - resolution: {integrity: sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA==} - engines: {node: '>=12.7.0'} - peerDependencies: - react: '>=16.8' - peerDependenciesMeta: - react: - optional: true - snapshots: '@aashutoshrathi/word-wrap@1.2.6': {} @@ -2076,7 +2466,7 @@ snapshots: '@csstools/css-tokenizer@2.1.1': {} - '@csstools/media-query-list-parser@2.0.4(@csstools/css-parser-algorithms@2.1.1)(@csstools/css-tokenizer@2.1.1)': + '@csstools/media-query-list-parser@2.0.4(@csstools/css-parser-algorithms@2.1.1(@csstools/css-tokenizer@2.1.1))(@csstools/css-tokenizer@2.1.1)': dependencies: '@csstools/css-parser-algorithms': 2.1.1(@csstools/css-tokenizer@2.1.1) '@csstools/css-tokenizer': 2.1.1 @@ -2172,7 +2562,7 @@ snapshots: '@esbuild/win32-x64@0.17.18': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.46.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))': dependencies: eslint: 8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4) eslint-visitor-keys: 3.4.2 @@ -2221,7 +2611,7 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.13.0 - '@puppeteer/browsers@0.5.0(typescript@5.0.4)': + '@puppeteer/browsers@0.5.0(typescript@5.4.5)': dependencies: debug: 4.3.4 extract-zip: 2.0.1 @@ -2229,9 +2619,10 @@ snapshots: progress: 2.0.3 proxy-from-env: 1.1.0 tar-fs: 2.1.1 - typescript: 5.0.4 unbzip2-stream: 1.4.3 yargs: 17.7.1 + optionalDependencies: + typescript: 5.4.5 transitivePeerDependencies: - supports-color @@ -2250,10 +2641,21 @@ snapshots: '@types/filewriter@0.0.30': {} + '@types/fs-extra@11.0.4': + dependencies: + '@types/jsonfile': 6.1.4 + '@types/node': 18.16.3 + '@types/har-format@1.2.13': {} '@types/json-schema@7.0.11': {} + '@types/json5@0.0.29': {} + + '@types/jsonfile@6.1.4': + dependencies: + '@types/node': 18.16.3 + '@types/lodash@4.14.194': {} '@types/minimist@1.2.2': {} @@ -2292,32 +2694,34 @@ snapshots: dependencies: '@types/node': 18.16.3 - '@typescript-eslint/eslint-plugin@5.59.1(@typescript-eslint/parser@5.59.1)(eslint@8.46.0)(typescript@5.0.4)': + '@typescript-eslint/eslint-plugin@5.59.1(@typescript-eslint/parser@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5)': dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 5.59.1(eslint@8.46.0)(typescript@5.0.4) + '@typescript-eslint/parser': 5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5) '@typescript-eslint/scope-manager': 5.59.1 - '@typescript-eslint/type-utils': 5.59.1(eslint@8.46.0)(typescript@5.0.4) - '@typescript-eslint/utils': 5.59.1(eslint@8.46.0)(typescript@5.0.4) + '@typescript-eslint/type-utils': 5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5) + '@typescript-eslint/utils': 5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5) debug: 4.3.4 eslint: 8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4) grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 semver: 7.5.0 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 + tsutils: 3.21.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@5.59.1(eslint@8.46.0)(typescript@5.0.4)': + '@typescript-eslint/parser@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5)': dependencies: '@typescript-eslint/scope-manager': 5.59.1 '@typescript-eslint/types': 5.59.1 - '@typescript-eslint/typescript-estree': 5.59.1(typescript@5.0.4) + '@typescript-eslint/typescript-estree': 5.59.1(typescript@5.4.5) debug: 4.3.4 eslint: 8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4) - typescript: 5.0.4 + optionalDependencies: + typescript: 5.4.5 transitivePeerDependencies: - supports-color @@ -2326,20 +2730,21 @@ snapshots: '@typescript-eslint/types': 5.59.1 '@typescript-eslint/visitor-keys': 5.59.1 - '@typescript-eslint/type-utils@5.59.1(eslint@8.46.0)(typescript@5.0.4)': + '@typescript-eslint/type-utils@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5)': dependencies: - '@typescript-eslint/typescript-estree': 5.59.1(typescript@5.0.4) - '@typescript-eslint/utils': 5.59.1(eslint@8.46.0)(typescript@5.0.4) + '@typescript-eslint/typescript-estree': 5.59.1(typescript@5.4.5) + '@typescript-eslint/utils': 5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5) debug: 4.3.4 eslint: 8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4) - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 + tsutils: 3.21.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 transitivePeerDependencies: - supports-color '@typescript-eslint/types@5.59.1': {} - '@typescript-eslint/typescript-estree@5.59.1(typescript@5.0.4)': + '@typescript-eslint/typescript-estree@5.59.1(typescript@5.4.5)': dependencies: '@typescript-eslint/types': 5.59.1 '@typescript-eslint/visitor-keys': 5.59.1 @@ -2347,19 +2752,20 @@ snapshots: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.0 - tsutils: 3.21.0(typescript@5.0.4) - typescript: 5.0.4 + tsutils: 3.21.0(typescript@5.4.5) + optionalDependencies: + typescript: 5.4.5 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@5.59.1(eslint@8.46.0)(typescript@5.0.4)': + '@typescript-eslint/utils@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)) '@types/json-schema': 7.0.11 '@types/semver': 7.3.13 '@typescript-eslint/scope-manager': 5.59.1 '@typescript-eslint/types': 5.59.1 - '@typescript-eslint/typescript-estree': 5.59.1(typescript@5.0.4) + '@typescript-eslint/typescript-estree': 5.59.1(typescript@5.4.5) eslint: 8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4) eslint-scope: 5.1.1 semver: 7.5.0 @@ -2424,10 +2830,58 @@ snapshots: arr-union@3.1.0: {} + array-buffer-byte-length@1.0.1: + dependencies: + call-bind: 1.0.7 + is-array-buffer: 3.0.4 + + array-includes@3.1.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-object-atoms: 1.0.0 + get-intrinsic: 1.2.4 + is-string: 1.0.7 + array-union@2.1.0: {} array-unique@0.3.2: {} + array.prototype.findlastindex@1.2.5: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-shim-unscopables: 1.0.2 + + array.prototype.flat@1.3.2: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-shim-unscopables: 1.0.2 + + array.prototype.flatmap@1.3.2: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-shim-unscopables: 1.0.2 + + arraybuffer.prototype.slice@1.0.3: + dependencies: + array-buffer-byte-length: 1.0.1 + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + is-array-buffer: 3.0.4 + is-shared-array-buffer: 1.0.3 + arrify@1.0.1: {} assign-symbols@1.0.0: {} @@ -2438,6 +2892,10 @@ snapshots: atob@2.1.2: {} + available-typed-arrays@1.0.7: + dependencies: + possible-typed-array-names: 1.0.0 + balanced-match@1.0.2: {} balanced-match@2.0.0: {} @@ -2490,6 +2948,14 @@ snapshots: union-value: 1.0.1 unset-value: 1.0.0 + call-bind@1.0.7: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + callsites@3.1.0: {} camelcase-keys@6.2.2: @@ -2586,10 +3052,32 @@ snapshots: csstype@3.1.2: {} + data-view-buffer@1.0.1: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + + data-view-byte-length@1.0.1: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + + data-view-byte-offset@1.0.0: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-data-view: 1.0.1 + debug@2.6.9: dependencies: ms: 2.0.0 + debug@3.2.7: + dependencies: + ms: 2.1.3 + debug@4.3.4: dependencies: ms: 2.1.2 @@ -2605,6 +3093,18 @@ snapshots: deep-is@0.1.4: {} + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + + define-properties@1.2.1: + dependencies: + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 + object-keys: 1.1.1 + define-property@0.2.5: dependencies: is-descriptor: 0.1.6 @@ -2631,6 +3131,10 @@ snapshots: '@types/react': 17.0.2 moment: 2.29.4 + doctrine@2.1.0: + dependencies: + esutils: 2.0.3 + doctrine@3.0.0: dependencies: esutils: 2.0.3 @@ -2645,6 +3149,81 @@ snapshots: dependencies: is-arrayish: 0.2.1 + es-abstract@1.23.3: + dependencies: + array-buffer-byte-length: 1.0.1 + arraybuffer.prototype.slice: 1.0.3 + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + data-view-buffer: 1.0.1 + data-view-byte-length: 1.0.1 + data-view-byte-offset: 1.0.0 + es-define-property: 1.0.0 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + es-set-tostringtag: 2.0.3 + es-to-primitive: 1.2.1 + function.prototype.name: 1.1.6 + get-intrinsic: 1.2.4 + get-symbol-description: 1.0.2 + globalthis: 1.0.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + internal-slot: 1.0.7 + is-array-buffer: 3.0.4 + is-callable: 1.2.7 + is-data-view: 1.0.1 + is-negative-zero: 2.0.3 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.3 + is-string: 1.0.7 + is-typed-array: 1.1.13 + is-weakref: 1.0.2 + object-inspect: 1.13.1 + object-keys: 1.1.1 + object.assign: 4.1.5 + regexp.prototype.flags: 1.5.2 + safe-array-concat: 1.1.2 + safe-regex-test: 1.0.3 + string.prototype.trim: 1.2.9 + string.prototype.trimend: 1.0.8 + string.prototype.trimstart: 1.0.8 + typed-array-buffer: 1.0.2 + typed-array-byte-length: 1.0.1 + typed-array-byte-offset: 1.0.2 + typed-array-length: 1.0.6 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.15 + + es-define-property@1.0.0: + dependencies: + get-intrinsic: 1.2.4 + + es-errors@1.3.0: {} + + es-object-atoms@1.0.0: + dependencies: + es-errors: 1.3.0 + + es-set-tostringtag@2.0.3: + dependencies: + get-intrinsic: 1.2.4 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + + es-shim-unscopables@1.0.2: + dependencies: + hasown: 2.0.2 + + es-to-primitive@1.2.1: + dependencies: + is-callable: 1.2.7 + is-date-object: 1.0.5 + is-symbol: 1.0.4 + esbuild-android-64@0.15.18: optional: true @@ -2761,9 +3340,56 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-import-resolver-alias@1.1.2: {} + eslint-import-resolver-alias@1.1.2(eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))): + dependencies: + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)) - eslint-plugin-path-alias@1.0.0(patch_hash=m6sma4g6bh67km3q6igf6uxaja)(eslint@8.46.0): + eslint-import-resolver-node@0.3.9: + dependencies: + debug: 3.2.7 + is-core-module: 2.13.1 + resolve: 1.22.8 + transitivePeerDependencies: + - supports-color + + eslint-module-utils@2.8.1(@typescript-eslint/parser@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5) + eslint: 8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4) + eslint-import-resolver-node: 0.3.9 + transitivePeerDependencies: + - supports-color + + eslint-plugin-import@2.29.1(@typescript-eslint/parser@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)): + dependencies: + array-includes: 3.1.8 + array.prototype.findlastindex: 1.2.5 + array.prototype.flat: 1.3.2 + array.prototype.flatmap: 1.3.2 + debug: 3.2.7 + doctrine: 2.1.0 + eslint: 8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4) + eslint-import-resolver-node: 0.3.9 + eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint-import-resolver-node@0.3.9)(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)) + hasown: 2.0.2 + is-core-module: 2.13.1 + is-glob: 4.0.3 + minimatch: 3.1.2 + object.fromentries: 2.0.8 + object.groupby: 1.0.3 + object.values: 1.2.0 + semver: 6.3.1 + tsconfig-paths: 3.15.0 + optionalDependencies: + '@typescript-eslint/parser': 5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5) + transitivePeerDependencies: + - eslint-import-resolver-typescript + - eslint-import-resolver-webpack + - supports-color + + eslint-plugin-path-alias@1.0.0(patch_hash=m6sma4g6bh67km3q6igf6uxaja)(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)): dependencies: eslint: 8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4) nanomatch: 1.2.13 @@ -2772,15 +3398,16 @@ snapshots: eslint-plugin-simple-header@1.0.2: {} - eslint-plugin-simple-import-sort@10.0.0(eslint@8.46.0): + eslint-plugin-simple-import-sort@10.0.0(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)): dependencies: eslint: 8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4) - eslint-plugin-unused-imports@2.0.0(@typescript-eslint/eslint-plugin@5.59.1)(eslint@8.46.0): + eslint-plugin-unused-imports@2.0.0(@typescript-eslint/eslint-plugin@5.59.1(@typescript-eslint/parser@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)): dependencies: - '@typescript-eslint/eslint-plugin': 5.59.1(@typescript-eslint/parser@5.59.1)(eslint@8.46.0)(typescript@5.0.4) eslint: 8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4) eslint-rule-composer: 0.3.0 + optionalDependencies: + '@typescript-eslint/eslint-plugin': 5.59.1(@typescript-eslint/parser@5.59.1(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5))(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4))(typescript@5.4.5) eslint-rule-composer@0.3.0: {} @@ -2800,7 +3427,7 @@ snapshots: eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.46.0(patch_hash=xm46kqcmdgzlmm4aifkfpxaho4)) '@eslint-community/regexpp': 4.6.2 '@eslint/eslintrc': 2.1.1 '@eslint/js': 8.46.0 @@ -2932,6 +3559,10 @@ snapshots: flatted@3.2.7: {} + for-each@0.3.3: + dependencies: + is-callable: 1.2.7 + for-in@1.0.2: {} fragment-cache@0.2.1: @@ -2940,6 +3571,12 @@ snapshots: fs-constants@1.0.0: {} + fs-extra@11.2.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + fs.realpath@1.0.0: {} fsevents@2.3.2: @@ -2947,12 +3584,37 @@ snapshots: function-bind@1.1.1: {} + function-bind@1.1.2: {} + + function.prototype.name@1.1.6: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + functions-have-names: 1.2.3 + + functions-have-names@1.2.3: {} + get-caller-file@2.0.5: {} + get-intrinsic@1.2.4: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + get-stream@5.2.0: dependencies: pump: 3.0.0 + get-symbol-description@1.0.2: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + get-tsconfig@4.5.0: {} get-value@2.0.6: {} @@ -2990,6 +3652,11 @@ snapshots: dependencies: type-fest: 0.20.2 + globalthis@1.0.4: + dependencies: + define-properties: 1.2.1 + gopd: 1.0.1 + globby@11.1.0: dependencies: array-union: 2.1.0 @@ -3001,6 +3668,10 @@ snapshots: globjoin@0.1.4: {} + gopd@1.0.1: + dependencies: + get-intrinsic: 1.2.4 + graceful-fs@4.2.11: {} grapheme-splitter@1.0.4: {} @@ -3009,10 +3680,24 @@ snapshots: hard-rejection@2.1.0: {} + has-bigints@1.0.2: {} + has-flag@3.0.0: {} has-flag@4.0.0: {} + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.0 + + has-proto@1.0.3: {} + + has-symbols@1.0.3: {} + + has-tostringtag@1.0.2: + dependencies: + has-symbols: 1.0.3 + has-value@0.3.1: dependencies: get-value: 2.0.6 @@ -3036,6 +3721,10 @@ snapshots: dependencies: function-bind: 1.1.1 + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + highlight.js@10.6.0: {} hosted-git-info@2.8.9: {} @@ -3077,6 +3766,12 @@ snapshots: ini@1.3.8: {} + internal-slot@1.0.7: + dependencies: + es-errors: 1.3.0 + hasown: 2.0.2 + side-channel: 1.0.6 + is-accessor-descriptor@0.1.6: dependencies: kind-of: 3.2.2 @@ -3085,14 +3780,34 @@ snapshots: dependencies: kind-of: 6.0.3 + is-array-buffer@3.0.4: + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + is-arrayish@0.2.1: {} + is-bigint@1.0.4: + dependencies: + has-bigints: 1.0.2 + + is-boolean-object@1.1.2: + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + is-buffer@1.1.6: {} + is-callable@1.2.7: {} + is-core-module@2.12.0: dependencies: has: 1.0.3 + is-core-module@2.13.1: + dependencies: + hasown: 2.0.2 + is-data-descriptor@0.1.4: dependencies: kind-of: 3.2.2 @@ -3101,6 +3816,14 @@ snapshots: dependencies: kind-of: 6.0.3 + is-data-view@1.0.1: + dependencies: + is-typed-array: 1.1.13 + + is-date-object@1.0.5: + dependencies: + has-tostringtag: 1.0.2 + is-descriptor@0.1.6: dependencies: is-accessor-descriptor: 0.1.6 @@ -3127,6 +3850,12 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-negative-zero@2.0.3: {} + + is-number-object@1.0.7: + dependencies: + has-tostringtag: 1.0.2 + is-number@3.0.0: dependencies: kind-of: 3.2.2 @@ -3143,10 +3872,37 @@ snapshots: is-plain-object@5.0.0: {} + is-regex@1.1.4: + dependencies: + call-bind: 1.0.7 + has-tostringtag: 1.0.2 + + is-shared-array-buffer@1.0.3: + dependencies: + call-bind: 1.0.7 + + is-string@1.0.7: + dependencies: + has-tostringtag: 1.0.2 + + is-symbol@1.0.4: + dependencies: + has-symbols: 1.0.3 + + is-typed-array@1.1.13: + dependencies: + which-typed-array: 1.1.15 + + is-weakref@1.0.2: + dependencies: + call-bind: 1.0.7 + is-windows@1.0.2: {} isarray@1.0.0: {} + isarray@2.0.5: {} + isexe@2.0.0: {} isobject@2.1.0: @@ -3169,8 +3925,18 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} + json5@1.0.2: + dependencies: + minimist: 1.2.8 + jsonc-parser@3.2.0: {} + jsonfile@6.1.0: + dependencies: + universalify: 2.0.1 + optionalDependencies: + graceful-fs: 4.2.11 + jszip@2.7.0: dependencies: pako: 1.0.11 @@ -3260,6 +4026,8 @@ snapshots: is-plain-obj: 1.1.0 kind-of: 6.0.3 + minimist@1.2.8: {} + mitt@3.0.0: {} mixin-deep@1.3.2: @@ -3277,6 +4045,8 @@ snapshots: ms@2.1.2: {} + ms@2.1.3: {} + nanoid@3.3.6: {} nanoid@4.0.2: {} @@ -3327,14 +4097,44 @@ snapshots: define-property: 0.2.5 kind-of: 3.2.2 + object-inspect@1.13.1: {} + + object-keys@1.1.1: {} + object-visit@1.0.1: dependencies: isobject: 3.0.1 + object.assign@4.1.5: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + has-symbols: 1.0.3 + object-keys: 1.1.1 + + object.fromentries@2.0.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-object-atoms: 1.0.0 + + object.groupby@1.0.3: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + object.pick@1.3.0: dependencies: isobject: 3.0.1 + object.values@1.2.0: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + once@1.4.0: dependencies: wrappy: 1.0.2 @@ -3397,6 +4197,8 @@ snapshots: picomatch@2.3.1: {} + possible-typed-array-names@1.0.0: {} + postcss-media-query-parser@0.2.3: {} postcss-resolve-nested-selector@0.1.1: {} @@ -3431,9 +4233,9 @@ snapshots: punycode@2.1.1: {} - puppeteer-core@19.11.1(typescript@5.0.4): + puppeteer-core@19.11.1(typescript@5.4.5): dependencies: - '@puppeteer/browsers': 0.5.0(typescript@5.0.4) + '@puppeteer/browsers': 0.5.0(typescript@5.4.5) chromium-bidi: 0.4.7(devtools-protocol@0.0.1107588) cross-fetch: 3.1.5 debug: 4.3.4 @@ -3442,9 +4244,10 @@ snapshots: https-proxy-agent: 5.0.1 proxy-from-env: 1.1.0 tar-fs: 2.1.1 - typescript: 5.0.4 unbzip2-stream: 1.4.3 ws: 8.13.0 + optionalDependencies: + typescript: 5.4.5 transitivePeerDependencies: - bufferutil - encoding @@ -3486,6 +4289,13 @@ snapshots: extend-shallow: 3.0.2 safe-regex: 1.1.0 + regexp.prototype.flags@1.5.2: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-errors: 1.3.0 + set-function-name: 2.0.2 + require-directory@2.1.1: {} require-from-string@2.0.2: {} @@ -3502,6 +4312,12 @@ snapshots: path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 + resolve@1.22.8: + dependencies: + is-core-module: 2.13.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + ret@0.1.15: {} reusify@1.0.4: {} @@ -3514,18 +4330,51 @@ snapshots: dependencies: queue-microtask: 1.2.3 + safe-array-concat@1.1.2: + dependencies: + call-bind: 1.0.7 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 + isarray: 2.0.5 + safe-buffer@5.2.1: {} + safe-regex-test@1.0.3: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-regex: 1.1.4 + safe-regex@1.1.0: dependencies: ret: 0.1.15 semver@5.7.1: {} + semver@6.3.1: {} + semver@7.5.0: dependencies: lru-cache: 6.0.0 + semver@7.6.2: {} + + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + + set-function-name@2.0.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + functions-have-names: 1.2.3 + has-property-descriptors: 1.0.2 + set-value@2.0.1: dependencies: extend-shallow: 2.0.1 @@ -3539,6 +4388,13 @@ snapshots: shebang-regex@3.0.0: {} + side-channel@1.0.6: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + object-inspect: 1.13.1 + signal-exit@4.0.1: {} slash@3.0.0: {} @@ -3616,6 +4472,25 @@ snapshots: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 + string.prototype.trim@1.2.9: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-abstract: 1.23.3 + es-object-atoms: 1.0.0 + + string.prototype.trimend@1.0.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + + string.prototype.trimstart@1.0.8: + dependencies: + call-bind: 1.0.7 + define-properties: 1.2.1 + es-object-atoms: 1.0.0 + string_decoder@1.3.0: dependencies: safe-buffer: 5.2.1 @@ -3624,6 +4499,8 @@ snapshots: dependencies: ansi-regex: 5.0.1 + strip-bom@3.0.0: {} + strip-indent@3.0.0: dependencies: min-indent: 1.0.1 @@ -3645,7 +4522,7 @@ snapshots: dependencies: '@csstools/css-parser-algorithms': 2.1.1(@csstools/css-tokenizer@2.1.1) '@csstools/css-tokenizer': 2.1.1 - '@csstools/media-query-list-parser': 2.0.4(@csstools/css-parser-algorithms@2.1.1)(@csstools/css-tokenizer@2.1.1) + '@csstools/media-query-list-parser': 2.0.4(@csstools/css-parser-algorithms@2.1.1(@csstools/css-tokenizer@2.1.1))(@csstools/css-tokenizer@2.1.1) '@csstools/selector-specificity': 2.2.0(postcss-selector-parser@6.0.12) balanced-match: 2.0.0 colord: 2.9.3 @@ -3751,12 +4628,28 @@ snapshots: trim-newlines@3.0.1: {} + ts-patch@3.1.2: + dependencies: + chalk: 4.1.2 + global-prefix: 3.0.0 + minimist: 1.2.8 + resolve: 1.22.8 + semver: 7.6.2 + strip-ansi: 6.0.1 + + tsconfig-paths@3.15.0: + dependencies: + '@types/json5': 0.0.29 + json5: 1.0.2 + minimist: 1.2.8 + strip-bom: 3.0.0 + tslib@1.14.1: {} - tsutils@3.21.0(typescript@5.0.4): + tsutils@3.21.0(typescript@5.4.5): dependencies: tslib: 1.14.1 - typescript: 5.0.4 + typescript: 5.4.5 tsx@3.12.7: dependencies: @@ -3780,7 +4673,51 @@ snapshots: type-fest@3.9.0: {} - typescript@5.0.4: {} + typed-array-buffer@1.0.2: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + is-typed-array: 1.1.13 + + typed-array-byte-length@1.0.1: + dependencies: + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + + typed-array-byte-offset@1.0.2: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + + typed-array-length@1.0.6: + dependencies: + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-proto: 1.0.3 + is-typed-array: 1.1.13 + possible-typed-array-names: 1.0.0 + + typescript-transform-paths@3.4.7(typescript@5.4.5): + dependencies: + minimatch: 3.1.2 + typescript: 5.4.5 + + typescript@5.4.5: {} + + unbox-primitive@1.0.2: + dependencies: + call-bind: 1.0.7 + has-bigints: 1.0.2 + has-symbols: 1.0.3 + which-boxed-primitive: 1.0.2 unbzip2-stream@1.4.3: dependencies: @@ -3794,6 +4731,8 @@ snapshots: is-extendable: 0.1.1 set-value: 2.0.1 + universalify@2.0.1: {} + unset-value@1.0.0: dependencies: has-value: 0.3.1 @@ -3829,6 +4768,22 @@ snapshots: tr46: 0.0.3 webidl-conversions: 3.0.1 + which-boxed-primitive@1.0.2: + dependencies: + is-bigint: 1.0.4 + is-boolean-object: 1.1.2 + is-number-object: 1.0.7 + is-string: 1.0.7 + is-symbol: 1.0.4 + + which-typed-array@1.1.15: + dependencies: + available-typed-arrays: 1.0.7 + call-bind: 1.0.7 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.2 + which@1.3.1: dependencies: isexe: 2.0.0 @@ -3883,5 +4838,3 @@ snapshots: graceful-fs: 4.2.11 jszip: 2.7.0 q: 1.5.1 - - zustand@3.7.2: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 000000000..9bec5ba55 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +packages: + - packages/* diff --git a/src/Vencord.ts b/src/Vencord.ts index 655e76c3d..72541148e 100644 --- a/src/Vencord.ts +++ b/src/Vencord.ts @@ -17,6 +17,7 @@ */ export * as Api from "./api"; +export * as Components from "./components"; export * as Plugins from "./plugins"; export * as Util from "./utils"; export * as QuickCss from "./utils/quickCss"; diff --git a/src/api/Notifications/Notifications.tsx b/src/api/Notifications/Notifications.tsx index 602564671..1350e5bdc 100644 --- a/src/api/Notifications/Notifications.tsx +++ b/src/api/Notifications/Notifications.tsx @@ -100,6 +100,7 @@ export async function showNotification(data: NotificationData) { const n = new Notification(title, { body, icon, + // @ts-expect-error ts is drunk image }); n.onclick = onClick; diff --git a/src/components/ExpandableHeader.tsx b/src/components/ExpandableHeader.tsx index 1cbce4f2e..84b065862 100644 --- a/src/components/ExpandableHeader.tsx +++ b/src/components/ExpandableHeader.tsx @@ -16,10 +16,12 @@ * along with this program. If not, see . */ +import "./ExpandableHeader.css"; + import { classNameFactory } from "@api/Styles"; import { Text, Tooltip, useState } from "@webpack/common"; -export const cl = classNameFactory("vc-expandableheader-"); -import "./ExpandableHeader.css"; + +const cl = classNameFactory("vc-expandableheader-"); export interface ExpandableHeaderProps { onMoreClick?: () => void; @@ -31,7 +33,7 @@ export interface ExpandableHeaderProps { buttons?: React.ReactNode[]; } -export default function ExpandableHeader({ children, onMoreClick, buttons, moreTooltipText, defaultState = false, onDropDownClick, headerText }: ExpandableHeaderProps) { +export function ExpandableHeader({ children, onMoreClick, buttons, moreTooltipText, defaultState = false, onDropDownClick, headerText }: ExpandableHeaderProps) { const [showContent, setShowContent] = useState(defaultState); return ( diff --git a/src/components/index.ts b/src/components/index.ts new file mode 100644 index 000000000..38e610fd8 --- /dev/null +++ b/src/components/index.ts @@ -0,0 +1,18 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +export * from "./Badge"; +export * from "./CheckedTextInput"; +export * from "./CodeBlock"; +export * from "./DonateButton"; +export { default as ErrorBoundary } from "./ErrorBoundary"; +export * from "./ErrorCard"; +export * from "./ExpandableHeader"; +export * from "./Flex"; +export * from "./Heart"; +export * from "./Icons"; +export * from "./Link"; +export * from "./Switch"; diff --git a/src/modules.d.ts b/src/modules.d.ts index 24f34664d..489799256 100644 --- a/src/modules.d.ts +++ b/src/modules.d.ts @@ -20,7 +20,7 @@ /// declare module "~plugins" { - const plugins: Record; + const plugins: Record; export default plugins; } diff --git a/src/plugins/decor/lib/stores/AuthorizationStore.tsx b/src/plugins/decor/lib/stores/AuthorizationStore.tsx index e31b1f43c..ba71da99e 100644 --- a/src/plugins/decor/lib/stores/AuthorizationStore.tsx +++ b/src/plugins/decor/lib/stores/AuthorizationStore.tsx @@ -9,7 +9,6 @@ import { proxyLazy } from "@utils/lazy"; import { Logger } from "@utils/Logger"; import { openModal } from "@utils/modal"; import { OAuth2AuthorizeModal, showToast, Toasts, UserStore, zustandCreate, zustandPersist } from "@webpack/common"; -import type { StateStorage } from "zustand/middleware"; import { AUTHORIZE_URL, CLIENT_ID } from "../constants"; @@ -23,7 +22,7 @@ interface AuthorizationState { isAuthorized: () => boolean; } -const indexedDBStorage: StateStorage = { +const indexedDBStorage = { async getItem(name: string): Promise { return DataStore.get(name).then(v => v ?? null); }, @@ -36,9 +35,9 @@ const indexedDBStorage: StateStorage = { }; // TODO: Move switching accounts subscription inside the store? -export const useAuthorizationStore = proxyLazy(() => zustandCreate( +export const useAuthorizationStore = proxyLazy(() => zustandCreate( zustandPersist( - (set, get) => ({ + (set: any, get: any) => ({ token: null, tokens: {}, init: () => { set({ token: get().tokens[UserStore.getCurrentUser().id] ?? null }); }, @@ -91,7 +90,7 @@ export const useAuthorizationStore = proxyLazy(() => zustandCreate !!get().token, - }), + } as AuthorizationState), { name: "decor-auth", getStorage: () => indexedDBStorage, diff --git a/src/plugins/decor/lib/stores/CurrentUserDecorationsStore.ts b/src/plugins/decor/lib/stores/CurrentUserDecorationsStore.ts index 1485a7438..e2bba6c0a 100644 --- a/src/plugins/decor/lib/stores/CurrentUserDecorationsStore.ts +++ b/src/plugins/decor/lib/stores/CurrentUserDecorationsStore.ts @@ -21,7 +21,7 @@ interface UserDecorationsState { clear: () => void; } -export const useCurrentUserDecorationsStore = proxyLazy(() => zustandCreate((set, get) => ({ +export const useCurrentUserDecorationsStore = proxyLazy(() => zustandCreate((set: any, get: any) => ({ decorations: [], selectedDecoration: null, async fetch() { @@ -53,4 +53,4 @@ export const useCurrentUserDecorationsStore = proxyLazy(() => zustandCreate set({ decorations: [], selectedDecoration: null }) -}))); +} as UserDecorationsState))); diff --git a/src/plugins/decor/lib/stores/UsersDecorationsStore.ts b/src/plugins/decor/lib/stores/UsersDecorationsStore.ts index b29945f82..53aa33e63 100644 --- a/src/plugins/decor/lib/stores/UsersDecorationsStore.ts +++ b/src/plugins/decor/lib/stores/UsersDecorationsStore.ts @@ -30,7 +30,7 @@ interface UsersDecorationsState { set: (userId: string, decoration: string | null) => void; } -export const useUsersDecorationsStore = proxyLazy(() => zustandCreate((set, get) => ({ +export const useUsersDecorationsStore = proxyLazy(() => zustandCreate((set: any, get: any) => ({ usersDecorations: new Map(), fetchQueue: new Set(), bulkFetch: debounce(async () => { @@ -40,7 +40,7 @@ export const useUsersDecorationsStore = proxyLazy(() => zustandCreate zustandCreate(user ? useUsersDecorationsStore.getState().getAsset(user.id) ?? null : null); diff --git a/src/plugins/decor/ui/components/DecorSection.tsx b/src/plugins/decor/ui/components/DecorSection.tsx index f11a87a53..ff044f8c7 100644 --- a/src/plugins/decor/ui/components/DecorSection.tsx +++ b/src/plugins/decor/ui/components/DecorSection.tsx @@ -15,7 +15,7 @@ import { openChangeDecorationModal } from "../modals/ChangeDecorationModal"; const CustomizationSection = findByCodeLazy(".customizationSectionBackground"); -interface DecorSectionProps { +export interface DecorSectionProps { hideTitle?: boolean; hideDivider?: boolean; noMargin?: boolean; diff --git a/src/plugins/permissionsViewer/components/UserPermissions.tsx b/src/plugins/permissionsViewer/components/UserPermissions.tsx index bcd6bdf07..869a6a1ee 100644 --- a/src/plugins/permissionsViewer/components/UserPermissions.tsx +++ b/src/plugins/permissionsViewer/components/UserPermissions.tsx @@ -17,7 +17,7 @@ */ import ErrorBoundary from "@components/ErrorBoundary"; -import ExpandableHeader from "@components/ExpandableHeader"; +import { ExpandableHeader } from "@components/ExpandableHeader"; import { classes } from "@utils/misc"; import { filters, findBulk, proxyLazyWebpack } from "@webpack"; import { i18n, PermissionsBits, Text, Tooltip, useMemo, UserStore } from "@webpack/common"; diff --git a/src/plugins/reviewDB/index.tsx b/src/plugins/reviewDB/index.tsx index e73bce82c..2ae74c388 100644 --- a/src/plugins/reviewDB/index.tsx +++ b/src/plugins/reviewDB/index.tsx @@ -20,7 +20,7 @@ import "./style.css"; import { NavContextMenuPatchCallback } from "@api/ContextMenu"; import ErrorBoundary from "@components/ErrorBoundary"; -import ExpandableHeader from "@components/ExpandableHeader"; +import { ExpandableHeader } from "@components/ExpandableHeader"; import { OpenExternalIcon } from "@components/Icons"; import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; diff --git a/src/utils/index.ts b/src/utils/index.ts index ea4adce4a..62f3f6e96 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -23,9 +23,11 @@ export * from "./constants"; export * from "./discord"; export * from "./guards"; export * from "./lazy"; +export * from "./lazyReact"; export * from "./localStorage"; export * from "./Logger"; export * from "./margins"; +export * from "./mergeDefaults"; export * from "./misc"; export * from "./modal"; export * from "./onlyOnce"; diff --git a/src/utils/types.ts b/src/utils/types.ts index 8f2ee8632..6e1524196 100644 --- a/src/utils/types.ts +++ b/src/utils/types.ts @@ -244,7 +244,7 @@ export interface PluginSettingSliderDef { stickToMarkers?: boolean; } -interface IPluginOptionComponentProps { +export interface IPluginOptionComponentProps { /** * Run this when the value changes. * diff --git a/src/webpack/common/utils.ts b/src/webpack/common/utils.ts index 2cd636d8e..72a71f31c 100644 --- a/src/webpack/common/utils.ts +++ b/src/webpack/common/utils.ts @@ -138,10 +138,10 @@ waitFor(["open", "saveAccountChanges"], m => SettingsRouter = m); export const { Permissions: PermissionsBits } = findLazy(m => typeof m.Permissions?.ADMINISTRATOR === "bigint") as { Permissions: t.PermissionsBits; }; -export const zustandCreate: typeof import("zustand").default = findByCodeLazy("will be removed in v4"); +export const zustandCreate = findByCodeLazy("will be removed in v4"); const persistFilter = filters.byCode("[zustand persist middleware]"); -export const { persist: zustandPersist }: typeof import("zustand/middleware") = findLazy(m => m.persist && persistFilter(m.persist)); +export const { persist: zustandPersist } = findLazy(m => m.persist && persistFilter(m.persist)); export const MessageActions = findByPropsLazy("editMessage", "sendMessage"); export const UserProfileActions = findByPropsLazy("openUserProfileModal", "closeUserProfileModal"); diff --git a/tsconfig.json b/tsconfig.json index 96c904766..8db0ab3c1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -29,7 +29,15 @@ "@webpack/types": ["./webpack/common/types"], "@webpack/common": ["./webpack/common"], "@webpack": ["./webpack/webpack"] - } + }, + + "plugins": [ + // Transform paths in output .d.ts files (Include this line if you output declarations files) + { + "transform": "typescript-transform-paths", + "afterDeclarations": true + } + ] }, "include": ["src/**/*", "browser/**/*", "scripts/**/*"] } From 8b0e7030adda2b554271ce19c2d6456640d450a1 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 17 May 2024 18:42:28 -0300 Subject: [PATCH 20/44] ViewIcons: Fix Group Icons being clickable in channel list --- src/plugins/viewIcons/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/viewIcons/index.tsx b/src/plugins/viewIcons/index.tsx index 104252f6e..359365ee4 100644 --- a/src/plugins/viewIcons/index.tsx +++ b/src/plugins/viewIcons/index.tsx @@ -212,8 +212,7 @@ export default definePlugin({ }, // Group DMs top small & large icon { - find: ".recipients.length>=2", - all: true, + find: /\.recipients\.length>=2(?! `${m},onClick:()=>$self.openImage(${iconUrl})` From 4e92612aa8b0fb4d1bf19349b3e4d1c4237c43c4 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 17 May 2024 19:41:12 -0300 Subject: [PATCH 21/44] ResurrectHome: Likely fix breaking latest messages in chat --- src/plugins/resurrectHome/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/resurrectHome/index.tsx b/src/plugins/resurrectHome/index.tsx index 2042ed9c7..70827e08f 100644 --- a/src/plugins/resurrectHome/index.tsx +++ b/src/plugins/resurrectHome/index.tsx @@ -135,7 +135,7 @@ export default definePlugin({ find: '"MessageActionCreators"', replacement: { match: /(?<=focusMessage\(\i\){.+?)(?=focus:{messageId:(\i)})/, - replace: "before:$1," + replace: "after:$1," } }, // Force Server Home instead of Server Guide From 04a86490a5e20419639e3222145711c271655f66 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sat, 18 May 2024 00:36:50 -0300 Subject: [PATCH 22/44] FriendsSince: Show in user profile modal --- src/plugins/friendsSince/index.tsx | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/plugins/friendsSince/index.tsx b/src/plugins/friendsSince/index.tsx index fb431b52b..8ad9dc7f4 100644 --- a/src/plugins/friendsSince/index.tsx +++ b/src/plugins/friendsSince/index.tsx @@ -7,6 +7,8 @@ import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import { getCurrentChannel } from "@utils/discord"; +import { Logger } from "@utils/Logger"; +import { classes } from "@utils/misc"; import definePlugin from "@utils/types"; import { findByPropsLazy } from "@webpack"; import { Heading, React, RelationshipStore, Text } from "@webpack/common"; @@ -22,6 +24,7 @@ export default definePlugin({ description: "Shows when you became friends with someone in the user popout", authors: [Devs.Elvyra], patches: [ + // User popup { find: ".AnalyticsSections.USER_PROFILE}", replacement: { @@ -29,16 +32,34 @@ export default definePlugin({ replace: "$&,$self.friendsSince({ userId: $1 })" } }, + // User DMs "User Profile" popup in the right { find: ".UserPopoutUpsellSource.PROFILE_PANEL,", replacement: { match: /\i.default,\{userId:(\i)}\)/, replace: "$&,$self.friendsSince({ userId: $1 })" } + }, + // User Profile Modal + { + find: ".userInfoSectionHeader,", + replacement: { + match: /(\.Messages\.USER_PROFILE_MEMBER_SINCE.+?userId:(.+?),textClassName:)(\i\.userInfoText)}\)/, + replace: (_, rest, userId, textClassName) => `${rest}!$self.getFriendSince(${userId}) ? ${textClassName} : void 0 }), $self.friendsSince({ userId: ${userId}, textClassName: ${textClassName} })` + } } ], - friendsSince: ErrorBoundary.wrap(({ userId }: { userId: string; }) => { + getFriendSince(userId: string) { + try { + return RelationshipStore.getSince(userId); + } catch (err) { + new Logger("FriendsSince").error(err); + return null; + } + }, + + friendsSince: ErrorBoundary.wrap(({ userId, textClassName }: { userId: string; textClassName?: string; }) => { const friendsSince = RelationshipStore.getSince(userId); if (!friendsSince) return null; @@ -61,7 +82,7 @@ export default definePlugin({ )} - + {getCreatedAtDate(friendsSince, locale.getLocale())}
@@ -69,4 +90,3 @@ export default definePlugin({ ); }, { noop: true }) }); - From 54e1bac6c6d095460a5d75cce233b993ff33eb1a Mon Sep 17 00:00:00 2001 From: Eric <45801973+waresnew@users.noreply.github.com> Date: Sat, 18 May 2024 19:41:58 -0400 Subject: [PATCH 23/44] new plugin CustomIdle (#2342) --- src/plugins/customidle/README.md | 5 ++ src/plugins/customidle/index.ts | 94 ++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+) create mode 100644 src/plugins/customidle/README.md create mode 100644 src/plugins/customidle/index.ts diff --git a/src/plugins/customidle/README.md b/src/plugins/customidle/README.md new file mode 100644 index 000000000..63bf87d89 --- /dev/null +++ b/src/plugins/customidle/README.md @@ -0,0 +1,5 @@ +# CustomIdle + +Lets you change the time until your status gets automatically set to idle. You can also prevent idling altogether. + +![Plugin Configuration](https://github.com/Vendicated/Vencord/assets/45801973/4e5259b2-18e0-42e5-b69f-efc672ce1e0b) diff --git a/src/plugins/customidle/index.ts b/src/plugins/customidle/index.ts new file mode 100644 index 000000000..a59bbcb01 --- /dev/null +++ b/src/plugins/customidle/index.ts @@ -0,0 +1,94 @@ +/* + * Vencord, a Discord client mod + * Copyright (c) 2024 Vendicated and contributors + * SPDX-License-Identifier: GPL-3.0-or-later + */ + +import { Notices } from "@api/index"; +import { definePluginSettings } from "@api/Settings"; +import { makeRange } from "@components/PluginSettings/components"; +import { Devs } from "@utils/constants"; +import definePlugin, { OptionType } from "@utils/types"; +import { FluxDispatcher } from "@webpack/common"; + +const settings = definePluginSettings({ + idleTimeout: { + description: "Minutes before Discord goes idle (0 to disable auto-idle)", + type: OptionType.SLIDER, + markers: makeRange(0, 60, 5), + default: 10, + stickToMarkers: false, + restartNeeded: true // Because of the setInterval patch + }, + remainInIdle: { + description: "When you come back to Discord, remain idle until you confirm you want to go online", + type: OptionType.BOOLEAN, + default: true + } +}); + +export default definePlugin({ + name: "CustomIdle", + description: "Allows you to set the time before Discord goes idle (or disable auto-idle)", + authors: [Devs.newwares], + settings, + patches: [ + { + find: "IDLE_DURATION:function(){return", + replacement: { + match: /(IDLE_DURATION:function\(\){return )\i/, + replace: "$1$self.getIdleTimeout()" + } + }, + { + find: 'type:"IDLE",idle:', + replacement: [ + { + match: /Math\.min\((\i\.AfkTimeout\.getSetting\(\)\*\i\.default\.Millis\.SECOND),\i\.IDLE_DURATION\)/, + replace: "$1" // Decouple idle from afk (phone notifications will remain at user setting or 10 min maximum) + }, + { + match: /\i\.default\.dispatch\({type:"IDLE",idle:!1}\)/, + replace: "$self.handleOnline()" + }, + { + match: /(setInterval\(\i,\.25\*)\i\.IDLE_DURATION/, + replace: "$1$self.getIntervalDelay()" // For web installs + } + ] + } + ], + + getIntervalDelay() { + return Math.min(6e5, this.getIdleTimeout()); + }, + + handleOnline() { + if (!settings.store.remainInIdle) { + FluxDispatcher.dispatch({ + type: "IDLE", + idle: false + }); + return; + } + + const backOnlineMessage = "Welcome back! Click the button to go online. Click the X to stay idle until reload."; + if ( + Notices.currentNotice?.[1] === backOnlineMessage || + Notices.noticesQueue.some(([, noticeMessage]) => noticeMessage === backOnlineMessage) + ) return; + + Notices.showNotice(backOnlineMessage, "Exit idle", () => { + Notices.popNotice(); + FluxDispatcher.dispatch({ + type: "IDLE", + idle: false + }); + }); + }, + + getIdleTimeout() { // milliseconds, default is 6e5 + const { idleTimeout } = settings.store; + return idleTimeout === 0 ? Infinity : idleTimeout * 60000; + } +}); From caed7cd92c5d6dfa74d00fbc752116c015acf55d Mon Sep 17 00:00:00 2001 From: Noxillio Date: Sun, 19 May 2024 00:22:45 +0000 Subject: [PATCH 24/44] MoreUserTags: If server owner tag is disabled, do not give other tags (#2219) --- src/plugins/moreUserTags/index.tsx | 9 +++++++++ src/utils/constants.ts | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/src/plugins/moreUserTags/index.tsx b/src/plugins/moreUserTags/index.tsx index 1257b4524..9c848df6d 100644 --- a/src/plugins/moreUserTags/index.tsx +++ b/src/plugins/moreUserTags/index.tsx @@ -354,6 +354,15 @@ export default definePlugin({ if (location === "chat" && !settings.tagSettings[tag.name].showInChat) continue; if (location === "not-chat" && !settings.tagSettings[tag.name].showInNotChat) continue; + // If the owner tag is disabled, and the user is the owner of the guild, + // avoid adding other tags because the owner will always match the condition for them + if ( + tag.name !== "OWNER" && + GuildStore.getGuild(channel?.guild_id)?.ownerId === user.id && + (location === "chat" && !settings.tagSettings.OWNER.showInChat) || + (location === "not-chat" && !settings.tagSettings.OWNER.showInNotChat) + ) continue; + if ( tag.permissions?.some(perm => perms.includes(perm)) || (tag.condition?.(message!, user, channel)) diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 974758e3a..44d13b54c 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -422,6 +422,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({ name: "Av32000", id: 593436735380127770n, }, + Noxillio: { + name: "Noxillio", + id: 138616536502894592n, + }, Kyuuhachi: { name: "Kyuuhachi", id: 236588665420251137n, From d43731833aab46b8eb7876e8c42474f7a9164c9e Mon Sep 17 00:00:00 2001 From: Eric <45801973+waresnew@users.noreply.github.com> Date: Sat, 18 May 2024 20:45:05 -0400 Subject: [PATCH 25/44] Fix: PatchHelper not auto filling match field (#2338) --- .../VencordSettings/PatchHelperTab.tsx | 39 +++++++++++-------- 1 file changed, 23 insertions(+), 16 deletions(-) diff --git a/src/components/VencordSettings/PatchHelperTab.tsx b/src/components/VencordSettings/PatchHelperTab.tsx index 9e2980e7e..013e32d7d 100644 --- a/src/components/VencordSettings/PatchHelperTab.tsx +++ b/src/components/VencordSettings/PatchHelperTab.tsx @@ -16,7 +16,6 @@ * along with this program. If not, see . */ -import { CheckedTextInput } from "@components/CheckedTextInput"; import { CodeBlock } from "@components/CodeBlock"; import { debounce } from "@shared/debounce"; import { Margins } from "@utils/margins"; @@ -47,7 +46,7 @@ const findCandidates = debounce(function ({ find, setModule, setError }) { interface ReplacementComponentProps { module: [id: number, factory: Function]; - match: string | RegExp; + match: string; replacement: string | ReplaceFn; setReplacementError(error: any): void; } @@ -58,7 +57,13 @@ function ReplacementComponent({ module, match, replacement, setReplacementError const [patchedCode, matchResult, diff] = React.useMemo(() => { const src: string = fact.toString().replaceAll("\n", ""); - const canonicalMatch = canonicalizeMatch(match); + + try { + new RegExp(match); + } catch (e) { + return ["", [], []]; + } + const canonicalMatch = canonicalizeMatch(new RegExp(match)); try { const canonicalReplace = canonicalizeReplace(replacement, "YourPlugin"); var patched = src.replace(canonicalMatch, canonicalReplace as string); @@ -286,6 +291,7 @@ function PatchHelper() { const [module, setModule] = React.useState<[number, Function]>(); const [findError, setFindError] = React.useState(); + const [matchError, setMatchError] = React.useState(); const code = React.useMemo(() => { return ` @@ -322,12 +328,17 @@ function PatchHelper() { } function onMatchChange(v: string) { + setMatchError(void 0); + setMatch(v); + } + + function onMatchBlur() { try { - new RegExp(v); - setFindError(void 0); - setMatch(v); + new RegExp(match); + setMatchError(void 0); + setMatch(match); } catch (e: any) { - setFindError((e as Error).message); + setMatchError((e as Error).message); } } @@ -351,16 +362,12 @@ function PatchHelper() { /> match - { - try { - return (new RegExp(v), true); - } catch (e) { - return (e as Error).message; - } - }} + onBlur={onMatchBlur} + error={matchError} />
@@ -374,7 +381,7 @@ function PatchHelper() { {module && ( From eac8a026a61e7e147ad0bd7fddf9efc1af14a70b Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sat, 18 May 2024 21:53:22 -0300 Subject: [PATCH 26/44] fix(PatchHelper): Make find and match more responsive --- .../VencordSettings/PatchHelperTab.tsx | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/components/VencordSettings/PatchHelperTab.tsx b/src/components/VencordSettings/PatchHelperTab.tsx index 013e32d7d..e09a1dbf3 100644 --- a/src/components/VencordSettings/PatchHelperTab.tsx +++ b/src/components/VencordSettings/PatchHelperTab.tsx @@ -306,20 +306,16 @@ function PatchHelper() { }, [parsedFind, match, replacement]); function onFindChange(v: string) { - setFindError(void 0); setFind(v); - } - function onFindBlur() { try { - let parsedFind = find as string | RegExp; - if (/^\/.+?\/$/.test(find)) parsedFind = new RegExp(find.slice(1, -1)); + let parsedFind = v as string | RegExp; + if (/^\/.+?\/$/.test(v)) parsedFind = new RegExp(v.slice(1, -1)); setFindError(void 0); - setFind(find); setParsedFind(parsedFind); - if (find.length) { + if (v.length) { findCandidates({ find: parsedFind, setModule, setError: setFindError }); } } catch (e: any) { @@ -328,15 +324,11 @@ function PatchHelper() { } function onMatchChange(v: string) { - setMatchError(void 0); setMatch(v); - } - function onMatchBlur() { try { - new RegExp(match); + new RegExp(v); setMatchError(void 0); - setMatch(match); } catch (e: any) { setMatchError((e as Error).message); } @@ -357,7 +349,6 @@ function PatchHelper() { type="text" value={find} onChange={onFindChange} - onBlur={onFindBlur} error={findError} /> @@ -366,7 +357,6 @@ function PatchHelper() { type="text" value={match} onChange={onMatchChange} - onBlur={onMatchBlur} error={matchError} /> From bc8b465753b5aa081024a5d1aca44260d8a32f86 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 19 May 2024 03:40:16 -0300 Subject: [PATCH 27/44] chore: Make package manager version not strict --- .npmrc | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmrc b/.npmrc index 319e41e69..336b6ad13 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ strict-peer-dependencies=false +package-manager-strict=false From b33b5bdc9f5b15f74e4a169d1072cb41d95819cc Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 19 May 2024 03:54:31 -0300 Subject: [PATCH 28/44] MessageLinkEmbeds: Add limit for nested links --- src/plugins/messageLinkEmbeds/index.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/plugins/messageLinkEmbeds/index.tsx b/src/plugins/messageLinkEmbeds/index.tsx index 5c3063628..6c8fd83e9 100644 --- a/src/plugins/messageLinkEmbeds/index.tsx +++ b/src/plugins/messageLinkEmbeds/index.tsx @@ -227,10 +227,8 @@ function MessageEmbedAccessory({ message }: { message: Message; }) { const accessories = [] as (JSX.Element | null)[]; - let match = null as RegExpMatchArray | null; - while ((match = messageLinkRegex.exec(message.content!)) !== null) { - const [_, channelID, messageID] = match; - if (embeddedBy.includes(messageID)) { + for (const [_, channelID, messageID] of message.content!.matchAll(messageLinkRegex)) { + if (embeddedBy.includes(messageID) || embeddedBy.length > 2) { continue; } From a94b88cd5610de1f4dee27a01cf1005d856dc01b Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 19 May 2024 04:20:27 -0300 Subject: [PATCH 29/44] MessageLinkEmbeds: No longer need to reset global regex --- src/plugins/messageLinkEmbeds/index.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/plugins/messageLinkEmbeds/index.tsx b/src/plugins/messageLinkEmbeds/index.tsx index 6c8fd83e9..dea586478 100644 --- a/src/plugins/messageLinkEmbeds/index.tsx +++ b/src/plugins/messageLinkEmbeds/index.tsx @@ -376,9 +376,6 @@ export default definePlugin({ if (!messageLinkRegex.test(props.message.content)) return null; - // need to reset the regex because it's global - messageLinkRegex.lastIndex = 0; - return ( Date: Sun, 19 May 2024 22:11:42 -0300 Subject: [PATCH 30/44] Change duplicate find for SHC and VCDoubleClick --- src/plugins/showHiddenChannels/index.tsx | 2 +- src/plugins/vcDoubleClick/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/showHiddenChannels/index.tsx b/src/plugins/showHiddenChannels/index.tsx index 09aa2302a..f08bc2d1d 100644 --- a/src/plugins/showHiddenChannels/index.tsx +++ b/src/plugins/showHiddenChannels/index.tsx @@ -436,7 +436,7 @@ export default definePlugin({ }, }, { - find: ".shouldCloseDefaultModals", + find: 'className:"channelMention",children', replacement: { // Show inside voice channel instead of trying to join them when clicking on a channel mention match: /(?<=getChannel\(\i\);if\(null!=(\i))(?=.{0,100}?selectVoiceChannel)/, diff --git a/src/plugins/vcDoubleClick/index.ts b/src/plugins/vcDoubleClick/index.ts index a55ac7b67..8d4cae6a9 100644 --- a/src/plugins/vcDoubleClick/index.ts +++ b/src/plugins/vcDoubleClick/index.ts @@ -48,7 +48,7 @@ export default definePlugin({ })), { // channel mentions - find: ".shouldCloseDefaultModals", + find: 'className:"channelMention",children', replacement: { match: /onClick:(\i)(?=,.{0,30}className:"channelMention".+?(\i)\.inContent)/, replace: (_, onClick, props) => "" From 0a595120b98ab382376f87bb8786d6f33aeba1a9 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 19 May 2024 23:08:33 -0300 Subject: [PATCH 31/44] Fix: Ignore bundled lib webpack on web --- src/webpack/patchWebpack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index c7e424671..f891e38df 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -122,7 +122,7 @@ Object.defineProperty(Function.prototype, "m", { // When using react devtools or other extensions, we may also catch their webpack here. // This ensures we actually got the right one const { stack } = new Error(); - if (stack?.includes("discord.com") || stack?.includes("discordapp.com")) { + if ((stack?.includes("discord.com") || stack?.includes("discordapp.com")) && !Array.isArray(v)) { logger.info("Found Webpack module factory", stack.match(/\/assets\/(.+?\.js)/)?.[1] ?? ""); patchFactories(v); } From 025508f18dbb75afdca57715b83a9dfb2ad95757 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 19 May 2024 23:32:15 -0300 Subject: [PATCH 32/44] StartupTimings: Fix patch --- src/plugins/_core/settings.tsx | 1 - src/plugins/startupTimings/index.tsx | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/_core/settings.tsx b/src/plugins/_core/settings.tsx index 81d1d1797..b743b0066 100644 --- a/src/plugins/_core/settings.tsx +++ b/src/plugins/_core/settings.tsx @@ -56,7 +56,6 @@ export default definePlugin({ } ] }, - // Discord Canary { find: "Messages.ACTIVITY_SETTINGS", replacement: { diff --git a/src/plugins/startupTimings/index.tsx b/src/plugins/startupTimings/index.tsx index cf366df38..5051fdf4a 100644 --- a/src/plugins/startupTimings/index.tsx +++ b/src/plugins/startupTimings/index.tsx @@ -28,7 +28,7 @@ export default definePlugin({ patches: [{ find: "Messages.ACTIVITY_SETTINGS", replacement: { - match: /(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+}\))/, + match: /(?<=}\)([,;])(\i\.settings)\.forEach.+?(\i)\.push.+}\)}\))/, replace: (_, commaOrSemi, settings, elements) => "" + `${commaOrSemi}${settings}?.[0]==="CHANGELOG"` + `&&${elements}.push({section:"StartupTimings",label:"Startup Timings",element:$self.StartupTimingPage})` From dac2d7520d0b0f90c2ced2931eee67730b7159b9 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Mon, 20 May 2024 18:19:45 +0200 Subject: [PATCH 33/44] bump to v1.8.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0819f2aee..a99b0ad70 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "vencord", "private": "true", - "version": "1.8.4", + "version": "1.8.5", "description": "The cutest Discord client mod", "homepage": "https://github.com/Vendicated/Vencord#readme", "bugs": { From f384fe6aa5a80a0406167b360ae96b350283cab7 Mon Sep 17 00:00:00 2001 From: Alyxia Sother Date: Tue, 21 May 2024 02:13:24 +0200 Subject: [PATCH 34/44] fakeProfileThemes: settings UI improvements (#966) Co-authored-by: V --- src/plugins/fakeProfileThemes/index.css | 3 + src/plugins/fakeProfileThemes/index.tsx | 143 +++++++++++++++++++++--- 2 files changed, 129 insertions(+), 17 deletions(-) create mode 100644 src/plugins/fakeProfileThemes/index.css diff --git a/src/plugins/fakeProfileThemes/index.css b/src/plugins/fakeProfileThemes/index.css new file mode 100644 index 000000000..1c9bebf2d --- /dev/null +++ b/src/plugins/fakeProfileThemes/index.css @@ -0,0 +1,3 @@ +.vc-fpt-preview * { + pointer-events: none; +} diff --git a/src/plugins/fakeProfileThemes/index.tsx b/src/plugins/fakeProfileThemes/index.tsx index a1b629d10..7a6bda9a5 100644 --- a/src/plugins/fakeProfileThemes/index.tsx +++ b/src/plugins/fakeProfileThemes/index.tsx @@ -17,13 +17,17 @@ */ // This plugin is a port from Alyxia's Vendetta plugin +import "./index.css"; + import { definePluginSettings } from "@api/Settings"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import { Margins } from "@utils/margins"; -import { copyWithToast } from "@utils/misc"; +import { classes, copyWithToast } from "@utils/misc"; +import { useAwaiter } from "@utils/react"; import definePlugin, { OptionType } from "@utils/types"; -import { Button, Forms } from "@webpack/common"; +import { extractAndLoadChunksLazy, findComponentByCodeLazy } from "@webpack"; +import { Button, Flex, Forms, React, Text, UserProfileStore, UserStore, useState } from "@webpack/common"; import { User } from "discord-types/general"; import virtualMerge from "virtual-merge"; @@ -81,6 +85,34 @@ const settings = definePluginSettings({ } }); +interface ColorPickerProps { + color: number | null; + label: React.ReactElement; + showEyeDropper?: boolean; + suggestedColors?: string[]; + onChange(value: number | null): void; +} + +// I can't be bothered to figure out the semantics of this component. The +// functions surely get some event argument sent to them and they likely aren't +// all required. If anyone who wants to use this component stumbles across this +// code, you'll have to do the research yourself. +interface ProfileModalProps { + user: User; + pendingThemeColors: [number, number]; + onAvatarChange: () => void; + onBannerChange: () => void; + canUsePremiumCustomization: boolean; + hideExampleButton: boolean; + hideFakeActivity: boolean; + isTryItOutFlow: boolean; +} + +const ColorPicker = findComponentByCodeLazy(".Messages.USER_SETTINGS_PROFILE_COLOR_SELECT_COLOR", ".BACKGROUND_PRIMARY)"); +const ProfileModal = findComponentByCodeLazy('"ProfileCustomizationPreview"'); + +const requireColorPicker = extractAndLoadChunksLazy(["USER_SETTINGS_PROFILE_COLOR_DEFAULT_BUTTON.format"], /createPromise:\(\)=>\i\.\i\("(.+?)"\).then\(\i\.bind\(\i,"(.+?)"\)\)/); + export default definePlugin({ name: "FakeProfileThemes", description: "Allows profile theming by hiding the colors in your bio thanks to invisible 3y3 encoding", @@ -101,21 +133,98 @@ export default definePlugin({ } } ], - settingsAboutComponent: () => ( - - Usage - - After enabling this plugin, you will see custom colors in the profiles of other people using compatible plugins.
- To set your own colors: -
    -
  • • go to your profile settings
  • -
  • • choose your own colors in the Nitro preview
  • -
  • • click the "Copy 3y3" button
  • -
  • • paste the invisible text anywhere in your bio
  • -

- Please note: if you are using a theme which hides nitro ads, you should disable it temporarily to set colors. -
-
), + settingsAboutComponent: () => { + const existingColors = decode( + UserProfileStore.getUserProfile(UserStore.getCurrentUser().id).bio + ) ?? [0, 0]; + const [color1, setColor1] = useState(existingColors[0]); + const [color2, setColor2] = useState(existingColors[1]); + + const [, , loadingColorPickerChunk] = useAwaiter(requireColorPicker); + + return ( + + Usage + + After enabling this plugin, you will see custom colors in + the profiles of other people using compatible plugins.{" "} +
+ To set your own colors: +
    +
  • + • use the color pickers below to choose your colors +
  • +
  • • click the "Copy 3y3" button
  • +
  • • paste the invisible text anywhere in your bio
  • +

+ + Color pickers + {!loadingColorPickerChunk && ( + + + Primary + + } + onChange={(color: number) => { + setColor1(color); + }} + /> + + Accent + + } + onChange={(color: number) => { + setColor2(color); + }} + /> + + + )} + + Preview +
+ { }} + onBannerChange={() => { }} + canUsePremiumCustomization={true} + hideExampleButton={true} + hideFakeActivity={true} + isTryItOutFlow={true} + /> +
+
+
); + }, settings, colorDecodeHook(user: UserProfile) { if (user) { From 9c092b9c2996f029683e4fa3ea2c676c25a88c86 Mon Sep 17 00:00:00 2001 From: goodbee <100511746+schoeneBiene@users.noreply.github.com> Date: Tue, 21 May 2024 02:24:00 +0200 Subject: [PATCH 35/44] feat(BetterRoleContext): Add option to view role icons (#2482) Co-authored-by: vee --- src/plugins/betterRoleContext/README.md | 4 +-- src/plugins/betterRoleContext/index.tsx | 48 ++++++++++++++++++++++--- src/utils/constants.ts | 4 +++ 3 files changed, 50 insertions(+), 6 deletions(-) diff --git a/src/plugins/betterRoleContext/README.md b/src/plugins/betterRoleContext/README.md index 3f3086bdb..e54e1e313 100644 --- a/src/plugins/betterRoleContext/README.md +++ b/src/plugins/betterRoleContext/README.md @@ -1,6 +1,6 @@ # BetterRoleContext -Adds options to copy role color and edit role when right clicking roles in the user profile +Adds options to copy role color, edit role and view role icon when right clicking roles in the user profile -![](https://github.com/Vendicated/Vencord/assets/45497981/d1765e9e-7db2-4a3c-b110-139c59235326) +![](https://github.com/Vendicated/Vencord/assets/45497981/354220a4-09f3-4c5f-a28e-4b19ca775190) diff --git a/src/plugins/betterRoleContext/index.tsx b/src/plugins/betterRoleContext/index.tsx index 3db3494f9..ecb1ed400 100644 --- a/src/plugins/betterRoleContext/index.tsx +++ b/src/plugins/betterRoleContext/index.tsx @@ -4,9 +4,11 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ +import { definePluginSettings } from "@api/Settings"; +import { ImageIcon } from "@components/Icons"; import { Devs } from "@utils/constants"; -import { getCurrentGuild } from "@utils/discord"; -import definePlugin from "@utils/types"; +import { getCurrentGuild, openImageModal } from "@utils/discord"; +import definePlugin, { OptionType } from "@utils/types"; import { findByPropsLazy } from "@webpack"; import { Clipboard, GuildStore, Menu, PermissionStore, TextAndImagesSettingsStores } from "@webpack/common"; @@ -34,10 +36,34 @@ function AppearanceIcon() { ); } +const settings = definePluginSettings({ + roleIconFileFormat: { + type: OptionType.SELECT, + description: "File format to use when viewing role icons", + options: [ + { + label: "png", + value: "png", + default: true + }, + { + label: "webp", + value: "webp", + }, + { + label: "jpg", + value: "jpg" + } + ] + } +}); + export default definePlugin({ name: "BetterRoleContext", - description: "Adds options to copy role color / edit role when right clicking roles in the user profile", - authors: [Devs.Ven], + description: "Adds options to copy role color / edit role / view role icon when right clicking roles in the user profile", + authors: [Devs.Ven, Devs.goodbee], + + settings, start() { // DeveloperMode needs to be enabled for the context menu to be shown @@ -63,6 +89,20 @@ export default definePlugin({ ); } + if (role.icon) { + children.push( + { + openImageModal(`${location.protocol}//${window.GLOBAL_ENV.CDN_HOST}/role-icons/${role.id}/${role.icon}.${settings.store.roleIconFileFormat}`); + }} + icon={ImageIcon} + /> + + ); + } + if (PermissionStore.getGuildPermissionProps(guild).canManageRoles) { children.push( Date: Mon, 20 May 2024 20:28:06 -0400 Subject: [PATCH 36/44] ShowHiddenThings: more effectively explode Algolia filters (#2484) Co-authored-by: vee --- src/plugins/showHiddenThings/index.ts | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/plugins/showHiddenThings/index.ts b/src/plugins/showHiddenThings/index.ts index 8de70aca9..db4fe5aa6 100644 --- a/src/plugins/showHiddenThings/index.ts +++ b/src/plugins/showHiddenThings/index.ts @@ -80,11 +80,19 @@ export default definePlugin({ } }, { - find: "auto_removed:", + find: "prod_discoverable_guilds", predicate: () => settings.store.disableDiscoveryFilters, replacement: { - match: /filters:\i\.join\(" AND "\),facets:\[/, - replace: "facets:[" + match: /\{"auto_removed:.*?\}/, + replace: "{}" + } + }, + { + find: "MINIMUM_MEMBER_COUNT:", + predicate: () => settings.store.disableDiscoveryFilters, + replacement: { + match: /MINIMUM_MEMBER_COUNT:function\(\)\{return \i}/, + replace: "MINIMUM_MEMBER_COUNT:() => \">0\"" } }, { From 44d708129bb12463128044fc8d490f3dfa9167f8 Mon Sep 17 00:00:00 2001 From: k26pl Date: Tue, 21 May 2024 02:44:29 +0200 Subject: [PATCH 37/44] fix(MessageLogger): correctly blur spoilered images (#2433) Co-authored-by: vee --- src/plugins/messageLogger/messageLogger.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/messageLogger/messageLogger.css b/src/plugins/messageLogger/messageLogger.css index b5f58a55b..d5a9c5f17 100644 --- a/src/plugins/messageLogger/messageLogger.css +++ b/src/plugins/messageLogger/messageLogger.css @@ -8,7 +8,7 @@ .emoji, [data-type="sticker"], iframe, - .messagelogger-deleted-attachment, + .messagelogger-deleted-attachment:not([class*="hiddenAttachment_"]), [class|="inlineMediaEmbed"] ) { filter: grayscale(1) !important; From 0751722add7b99369b2a5848d98838813bac089a Mon Sep 17 00:00:00 2001 From: PWall Date: Tue, 21 May 2024 02:52:43 +0200 Subject: [PATCH 38/44] QuickReply: skip blocked messages if NoBlockedMessages enabled (#2476) --- src/plugins/quickReply/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/quickReply/index.ts b/src/plugins/quickReply/index.ts index 620e1a33f..ac2a38705 100644 --- a/src/plugins/quickReply/index.ts +++ b/src/plugins/quickReply/index.ts @@ -24,6 +24,7 @@ import { ChannelStore, FluxDispatcher as Dispatcher, MessageStore, PermissionsBi import { Message } from "discord-types/general"; const Kangaroo = findByPropsLazy("jumpToMessage"); +const RelationshipStore = findByPropsLazy("getRelationships", "isBlocked"); const isMac = navigator.platform.includes("Mac"); // bruh let replyIdx = -1; @@ -139,6 +140,10 @@ function getNextMessage(isUp: boolean, isReply: boolean) { messages = messages.filter(m => m.author.id === meId); } + if (Vencord.Plugins.isPluginEnabled("NoBlockedMessages")) { + messages = messages.filter(m => !RelationshipStore.isBlocked(m.author.id)); + } + const mutate = (i: number) => isUp ? Math.min(messages.length - 1, i + 1) : Math.max(-1, i - 1); From afd56820db2b887177f296a9b7003daedcdb96b0 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Tue, 21 May 2024 23:58:37 -0300 Subject: [PATCH 39/44] Revert "MessageLinkEmbeds: No longer need to reset global regex" It is still needed for messageLinkRegex.test --- src/plugins/messageLinkEmbeds/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/messageLinkEmbeds/index.tsx b/src/plugins/messageLinkEmbeds/index.tsx index dea586478..6c8fd83e9 100644 --- a/src/plugins/messageLinkEmbeds/index.tsx +++ b/src/plugins/messageLinkEmbeds/index.tsx @@ -376,6 +376,9 @@ export default definePlugin({ if (!messageLinkRegex.test(props.message.content)) return null; + // need to reset the regex because it's global + messageLinkRegex.lastIndex = 0; + return ( Date: Wed, 22 May 2024 00:47:12 -0300 Subject: [PATCH 40/44] Fix reporter false positive and DefaultExtractAndLoadChunksRegex not catching all cases --- scripts/generateReport.ts | 62 +++++++++++++++++++++++++++------------ src/webpack/webpack.ts | 8 +++-- 2 files changed, 49 insertions(+), 21 deletions(-) diff --git a/scripts/generateReport.ts b/scripts/generateReport.ts index 164e409df..8bb87d812 100644 --- a/scripts/generateReport.ts +++ b/scripts/generateReport.ts @@ -243,19 +243,27 @@ page.on("console", async e => { } } - if (isDebug) { - console.error(e.text()); - } else if (level === "error") { - const text = await Promise.all( - e.args().map(async a => { - try { + async function getText() { + try { + return await Promise.all( + e.args().map(async a => { return await maybeGetError(a) || await a.jsonValue(); - } catch (e) { - return a.toString(); - } - }) - ).then(a => a.join(" ").trim()); + }) + ).then(a => a.join(" ").trim()); + } catch { + return e.text(); + } + } + if (isDebug) { + const text = await getText(); + + console.error(text); + if (text.includes("A fatal error occurred:")) { + process.exit(1); + } + } else if (level === "error") { + const text = await getText(); if (text.length && !text.startsWith("Failed to load resource: the server responded with a status of") && !text.includes("Webpack")) { console.error("[Unexpected Error]", text); @@ -322,22 +330,31 @@ async function runtime(token: string) { const validChunks = new Set(); const invalidChunks = new Set(); + const deferredRequires = new Set(); let chunksSearchingResolve: (value: void | PromiseLike) => void; const chunksSearchingDone = new Promise(r => chunksSearchingResolve = r); // True if resolved, false otherwise const chunksSearchPromises = [] as Array<() => boolean>; - const lazyChunkRegex = canonicalizeMatch(/Promise\.all\((\[\i\.\i\(".+?"\).+?\])\).then\(\i\.bind\(\i,"(.+?)"\)\)/g); - const chunkIdsRegex = canonicalizeMatch(/\("(.+?)"\)/g); + + const LazyChunkRegex = canonicalizeMatch(/(?:Promise\.all\(\[(\i\.\i\("[^)]+?"\)[^\]]+?)\]\)|(\i\.\i\("[^)]+?"\)))\.then\(\i\.bind\(\i,"([^)]+?)"\)\)/g); async function searchAndLoadLazyChunks(factoryCode: string) { - const lazyChunks = factoryCode.matchAll(lazyChunkRegex); + const lazyChunks = factoryCode.matchAll(LazyChunkRegex); const validChunkGroups = new Set<[chunkIds: string[], entryPoint: string]>(); - await Promise.all(Array.from(lazyChunks).map(async ([, rawChunkIds, entryPoint]) => { - const chunkIds = Array.from(rawChunkIds.matchAll(chunkIdsRegex)).map(m => m[1]); - if (chunkIds.length === 0) return; + // Workaround for a chunk that depends on the ChannelMessage component but may be be force loaded before + // the chunk containing the component + const shouldForceDefer = factoryCode.includes(".Messages.GUILD_FEED_UNFEATURE_BUTTON_TEXT"); + + await Promise.all(Array.from(lazyChunks).map(async ([, rawChunkIdsArray, rawChunkIdsSingle, entryPoint]) => { + const rawChunkIds = rawChunkIdsArray ?? rawChunkIdsSingle; + const chunkIds = rawChunkIds ? Array.from(rawChunkIds.matchAll(Vencord.Webpack.ChunkIdsRegex)).map(m => m[1]) : []; + + if (chunkIds.length === 0) { + return; + } let invalidChunkGroup = false; @@ -373,6 +390,11 @@ async function runtime(token: string) { // Requires the entry points for all valid chunk groups for (const [, entryPoint] of validChunkGroups) { try { + if (shouldForceDefer) { + deferredRequires.add(entryPoint); + continue; + } + if (wreq.m[entryPoint]) wreq(entryPoint as any); } catch (err) { console.error(err); @@ -435,6 +457,11 @@ async function runtime(token: string) { await chunksSearchingDone; + // Require deferred entry points + for (const deferredRequire of deferredRequires) { + wreq!(deferredRequire as any); + } + // All chunks Discord has mapped to asset files, even if they are not used anymore const allChunks = [] as string[]; @@ -514,7 +541,6 @@ async function runtime(token: string) { setTimeout(() => console.log("[PUPPETEER_TEST_DONE_SIGNAL]"), 1000); } catch (e) { console.log("[PUP_DEBUG]", "A fatal error occurred:", e); - process.exit(1); } } diff --git a/src/webpack/webpack.ts b/src/webpack/webpack.ts index 0bee08f32..854820851 100644 --- a/src/webpack/webpack.ts +++ b/src/webpack/webpack.ts @@ -402,7 +402,8 @@ export function findExportedComponentLazy(...props: stri }); } -const DefaultExtractAndLoadChunksRegex = /(?:Promise\.all\((\[\i\.\i\(".+?"\).+?\])\)|Promise\.resolve\(\)).then\(\i\.bind\(\i,"(.+?)"\)\)/; +export const DefaultExtractAndLoadChunksRegex = /(?:Promise\.all\(\[(\i\.\i\("[^)]+?"\)[^\]]+?)\]\)|(\i\.\i\("[^)]+?"\))|Promise\.resolve\(\))\.then\(\i\.bind\(\i,"([^)]+?)"\)\)/; +export const ChunkIdsRegex = /\("(.+?)"\)/g; /** * Extract and load chunks using their entry point @@ -431,7 +432,7 @@ export async function extractAndLoadChunks(code: string[], matcher: RegExp = Def return; } - const [, rawChunkIds, entryPointId] = match; + const [, rawChunkIdsArray, rawChunkIdsSingle, entryPointId] = match; if (Number.isNaN(Number(entryPointId))) { const err = new Error("extractAndLoadChunks: Matcher didn't return a capturing group with the chunk ids array, or the entry point id returned as the second group wasn't a number"); logger.warn(err, "Code:", code, "Matcher:", matcher); @@ -443,8 +444,9 @@ export async function extractAndLoadChunks(code: string[], matcher: RegExp = Def return; } + const rawChunkIds = rawChunkIdsArray ?? rawChunkIdsSingle; if (rawChunkIds) { - const chunkIds = Array.from(rawChunkIds.matchAll(/\("(.+?)"\)/g)).map((m: any) => m[1]); + const chunkIds = Array.from(rawChunkIds.matchAll(ChunkIdsRegex)).map((m: any) => m[1]); await Promise.all(chunkIds.map(id => wreq.e(id))); } From f686cba3988dcbefbc5d9d524bea832dfd46c7bf Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Wed, 22 May 2024 05:11:09 -0300 Subject: [PATCH 41/44] Fix not setting property on originalOnChunksLoaded --- src/webpack/patchWebpack.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/webpack/patchWebpack.ts b/src/webpack/patchWebpack.ts index f891e38df..311e6f2bc 100644 --- a/src/webpack/patchWebpack.ts +++ b/src/webpack/patchWebpack.ts @@ -99,6 +99,16 @@ Object.defineProperty(Function.prototype, "O", { }; onChunksLoaded.toString = originalOnChunksLoaded.toString.bind(originalOnChunksLoaded); + + // Returns whether a chunk has been loaded + Object.defineProperty(onChunksLoaded, "j", { + set(v) { + delete onChunksLoaded.j; + onChunksLoaded.j = v; + originalOnChunksLoaded.j = v; + }, + configurable: true + }); } Object.defineProperty(this, "O", { From b335df7fe2d20f24e8d463b10b8ec64f51793a51 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 23 May 2024 03:25:02 +0200 Subject: [PATCH 42/44] MessageLogger: fix edit logging --- src/plugins/messageLogger/index.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/messageLogger/index.tsx b/src/plugins/messageLogger/index.tsx index c3a25e1b6..892c819b7 100644 --- a/src/plugins/messageLogger/index.tsx +++ b/src/plugins/messageLogger/index.tsx @@ -295,12 +295,9 @@ export default definePlugin({ // }, { // Pass through editHistory & deleted & original attachments to the "edited message" transformer - match: /interactionData:(\i)\.interactionData/, + match: /(?<=null!=\i\.edited_timestamp\)return )\i\(\i,\{reactions:(\i)\.reactions.{0,50}\}\)/, replace: - "interactionData:$1.interactionData," + - "deleted:$1.deleted," + - "editHistory:$1.editHistory," + - "attachments:$1.attachments" + "Object.assign($&,{ deleted:$1.deleted, editHistory:$1.editHistory, attachments:$1.attachments })" }, // { From 869e71112e1555097ba453e227f8404d7c18ad12 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 23 May 2024 03:26:23 +0200 Subject: [PATCH 43/44] fix AnonymiseFilenames --- src/plugins/anonymiseFileNames/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/anonymiseFileNames/index.tsx b/src/plugins/anonymiseFileNames/index.tsx index b424b7a59..526ccd12e 100644 --- a/src/plugins/anonymiseFileNames/index.tsx +++ b/src/plugins/anonymiseFileNames/index.tsx @@ -73,13 +73,13 @@ export default definePlugin({ { find: "instantBatchUpload:function", replacement: { - match: /uploadFiles:(.{1,2}),/, + match: /uploadFiles:(\i),/, replace: "uploadFiles:(...args)=>(args[0].uploads.forEach(f=>f.filename=$self.anonymise(f)),$1(...args)),", }, }, { - find: "message.attachments", + find: 'addFilesTo:"message.attachments"', replacement: { match: /(\i.uploadFiles\((\i),)/, replace: "$2.forEach(f=>f.filename=$self.anonymise(f)),$1" From a0778f6a2e786889d11f2b627f2ac03f7696c2e5 Mon Sep 17 00:00:00 2001 From: Vendicated Date: Thu, 23 May 2024 03:35:02 +0200 Subject: [PATCH 44/44] work around discord unloading in background --- src/main/patcher.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/patcher.ts b/src/main/patcher.ts index 0d79a96f6..a85702a27 100644 --- a/src/main/patcher.ts +++ b/src/main/patcher.ts @@ -73,6 +73,9 @@ if (!IS_VANILLA) { const original = options.webPreferences.preload; options.webPreferences.preload = join(__dirname, IS_DISCORD_DESKTOP ? "preload.js" : "vencordDesktopPreload.js"); options.webPreferences.sandbox = false; + // work around discord unloading when in background + options.webPreferences.backgroundThrottling = false; + if (settings.frameless) { options.frame = false; } else if (process.platform === "win32" && settings.winNativeTitleBar) { @@ -128,14 +131,8 @@ if (!IS_VANILLA) { process.env.DATA_DIR = join(app.getPath("userData"), "..", "Vencord"); - // Monkey patch commandLine to disable WidgetLayering: Fix DevTools context menus https://github.com/electron/electron/issues/38790 - const originalAppend = app.commandLine.appendSwitch; - app.commandLine.appendSwitch = function (...args) { - if (args[0] === "disable-features" && !args[1]?.includes("WidgetLayering")) { - args[1] += ",WidgetLayering"; - } - return originalAppend.apply(this, args); - }; + // work around discord unloading when in background + app.commandLine.appendSwitch("disable-renderer-backgrounding"); } else { console.log("[Vencord] Running in vanilla mode. Not loading Vencord"); }