@vencord/types 1.13.7 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VencordNative.d.ts +6 -2
- package/api/Badges.d.ts +2 -1
- package/api/ChatButtons.d.ts +1 -1
- package/api/PluginManager.d.ts +1 -0
- package/api/SettingsSync/cloudSync.d.ts +1 -0
- package/api/Styles.d.ts +16 -20
- package/components/Button.d.ts +1 -1
- package/components/CodeBlock.d.ts +6 -0
- package/components/Icons.d.ts +2 -0
- package/components/TooltipContainer.d.ts +4 -0
- package/components/TooltipFallback.d.ts +3 -0
- package/components/settings/tabs/plugins/components/Common.d.ts +1 -1
- package/components/settings/tabs/plugins/index.d.ts +1 -1
- package/package.json +1 -1
- package/plugins/_api/badges/index.d.ts +3 -5
- package/plugins/_api/messagePopover.d.ts +1 -1
- package/plugins/_api/notices.d.ts +0 -6
- package/plugins/_core/settings.d.ts +3 -6
- package/plugins/alwaysExpandRoles/index.d.ts +1 -1
- package/plugins/betterSettings/index.d.ts +8 -5
- package/plugins/customRPC/index.d.ts +3 -3
- package/plugins/decor/ui/index.d.ts +2 -2
- package/plugins/fakeNitro/index.d.ts +3 -3
- package/plugins/fixImagesQuality/index.d.ts +23 -0
- package/plugins/friendsSince/index.d.ts +1 -0
- package/plugins/ignoreActivities/index.d.ts +2 -4
- package/plugins/memberCount/OnlineMemberCountStore.d.ts +3 -3
- package/plugins/memberCount/index.d.ts +1 -4
- package/plugins/moreQuickReactions/index.d.ts +31 -0
- package/plugins/permissionsViewer/index.d.ts +3 -2
- package/plugins/permissionsViewer/utils.d.ts +1 -1
- package/plugins/petpet/index.d.ts +1 -1
- package/plugins/plainFolderIcon/index.d.ts +1 -1
- package/plugins/relationshipNotifier/types.d.ts +0 -6
- package/plugins/reviewDB/utils.d.ts +1 -1
- package/plugins/roleColorEverywhere/index.d.ts +9 -2
- package/plugins/shikiCodeblocks.desktop/utils/misc.d.ts +1 -1
- package/plugins/showHiddenChannels/index.d.ts +1 -1
- package/plugins/showHiddenThings/index.d.ts +7 -0
- package/plugins/spotifyControls/SpotifyStore.d.ts +3 -3
- package/plugins/superReactionTweaks/index.d.ts +2 -7
- package/plugins/translate/utils.d.ts +1 -1
- package/plugins/userVoiceShow/index.d.ts +2 -9
- package/plugins/usrbg/index.d.ts +7 -0
- package/plugins/viewIcons/index.d.ts +1 -3
- package/plugins/voiceMessages/index.d.ts +1 -0
- package/plugins/webScreenShareFixes.web/index.d.ts +15 -0
- package/shared/IpcEvents.d.ts +6 -5
- package/utils/constants.d.ts +12 -0
- package/utils/css.d.ts +13 -1
- package/utils/discord.d.ts +0 -7
- package/utils/intlHash.d.ts +0 -1
- package/utils/patches.d.ts +1 -1
- package/utils/text.d.ts +1 -0
- package/utils/types.d.ts +4 -0
- package/utils/web-metadata.d.ts +3 -1
- package/webpack/common/components.d.ts +5 -68
- package/webpack/common/index.d.ts +0 -1
- package/webpack/common/internal.d.ts +2 -1
- package/webpack/common/stores.d.ts +26 -3
- package/webpack/webpack.d.ts +15 -7
- package/components/css.d.ts +0 -1
- package/plugins/voiceMessages/utils.d.ts +0 -2
- package/webpack/common/classes.d.ts +0 -2
package/VencordNative.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Settings } from "./api/Settings";
|
|
2
|
-
import { CspRequestResult } from "./main/csp/manager";
|
|
2
|
+
import type { CspRequestResult } from "./main/csp/manager";
|
|
3
3
|
import type { UserThemeHeader } from "./main/themes";
|
|
4
4
|
import { IpcEvents } from "./shared/IpcEvents";
|
|
5
|
-
import { IpcRes } from "./utils/types";
|
|
5
|
+
import type { IpcRes } from "./utils/types";
|
|
6
|
+
export declare function invoke<T = any>(event: IpcEvents, ...args: any[]): Promise<T>;
|
|
6
7
|
export declare function sendSync<T = any>(event: IpcEvents, ...args: any[]): T;
|
|
7
8
|
declare const _default: {
|
|
8
9
|
themes: {
|
|
@@ -31,10 +32,13 @@ declare const _default: {
|
|
|
31
32
|
addThemeChangeListener(cb: () => void): void;
|
|
32
33
|
openFile: () => Promise<void>;
|
|
33
34
|
openEditor: () => Promise<void>;
|
|
35
|
+
getEditorTheme: () => string;
|
|
34
36
|
};
|
|
35
37
|
native: {
|
|
36
38
|
getVersions: () => Partial<NodeJS.ProcessVersions>;
|
|
37
39
|
openExternal: (url: string) => Promise<void>;
|
|
40
|
+
getRendererCss: () => Promise<string>;
|
|
41
|
+
onRendererCssUpdate: (cb: (newCss: string) => void) => void;
|
|
38
42
|
};
|
|
39
43
|
csp: {
|
|
40
44
|
/**
|
package/api/Badges.d.ts
CHANGED
|
@@ -24,7 +24,8 @@ export interface ProfileBadge {
|
|
|
24
24
|
/** The badge name to display, Discord uses this. Required for component badges */
|
|
25
25
|
key?: string;
|
|
26
26
|
/**
|
|
27
|
-
* Allows dynamically returning multiple badges
|
|
27
|
+
* Allows dynamically returning multiple badges.
|
|
28
|
+
* Must not call hooks
|
|
28
29
|
*/
|
|
29
30
|
getBadges?(userInfo: BadgeUserArgs): ProfileBadge[];
|
|
30
31
|
}
|
package/api/ChatButtons.d.ts
CHANGED
|
@@ -75,7 +75,7 @@ export type ChatBarButtonData = {
|
|
|
75
75
|
* Don't use this directly, use {@link addChatBarButton} and {@link removeChatBarButton} instead.
|
|
76
76
|
*/
|
|
77
77
|
export declare const ChatBarButtonMap: Map<string, ChatBarButtonData>;
|
|
78
|
-
export declare function _injectButtons(buttons: ReactNode[], props: ChatBarProps):
|
|
78
|
+
export declare function _injectButtons(buttons: ReactNode[], props: ChatBarProps): void;
|
|
79
79
|
/**
|
|
80
80
|
* The icon argument is used only for Settings UI. Your render function must still render an icon,
|
|
81
81
|
* and it can be different from this one.
|
package/api/PluginManager.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { Plugins as plugins };
|
|
|
6
6
|
export declare const PMLogger: Logger;
|
|
7
7
|
export declare function isPluginEnabled(p: string): boolean;
|
|
8
8
|
export declare function addPatch(newPatch: Omit<Patch, "plugin">, pluginName: string, pluginPath?: string): void;
|
|
9
|
+
export declare function pluginRequiresRestart(p: Plugin): boolean;
|
|
9
10
|
export declare const startAllPlugins: (target: StartAt) => void;
|
|
10
11
|
export declare function startDependenciesRecursive(p: Plugin): {
|
|
11
12
|
restartNeeded: boolean;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare function shouldCloudSync(direction: "push" | "pull"): boolean;
|
|
1
2
|
export declare function putCloudSettings(manual?: boolean): Promise<void>;
|
|
2
3
|
export declare function getCloudSettings(shouldNotify?: boolean, force?: boolean): Promise<boolean | undefined>;
|
|
3
4
|
export declare function deleteCloudSettings(): Promise<void>;
|
package/api/Styles.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** @deprecated Import this from `@utils/css` instead */
|
|
2
|
+
export declare const classNameFactory: (prefix?: string) => (...args: import("../utils/css").ClassNameFactoryArg[]) => string;
|
|
1
3
|
export interface Style {
|
|
2
4
|
name: string;
|
|
3
5
|
source: string;
|
|
@@ -5,6 +7,20 @@ export interface Style {
|
|
|
5
7
|
dom: HTMLStyleElement | null;
|
|
6
8
|
}
|
|
7
9
|
export declare const styleMap: Map<string, Style>;
|
|
10
|
+
export declare const vencordRootNode: HTMLElement;
|
|
11
|
+
/**
|
|
12
|
+
* Houses all Vencord core styles. This includes all imported css files
|
|
13
|
+
*/
|
|
14
|
+
export declare const coreStyleRootNode: HTMLElement;
|
|
15
|
+
/**
|
|
16
|
+
* Houses all plugin specific managed styles
|
|
17
|
+
*/
|
|
18
|
+
export declare const managedStyleRootNode: HTMLElement;
|
|
19
|
+
/**
|
|
20
|
+
* Houses the user's themes and quick css
|
|
21
|
+
*/
|
|
22
|
+
export declare const userStyleRootNode: HTMLElement;
|
|
23
|
+
export declare function initStyles(): void;
|
|
8
24
|
export declare function requireStyle(name: string): Style;
|
|
9
25
|
/**
|
|
10
26
|
* A style's name can be obtained from importing a stylesheet with `?managed` at the end of the import
|
|
@@ -69,23 +85,3 @@ export declare const setStyleClassNames: (name: string, classNames: Record<strin
|
|
|
69
85
|
* @see {@link setStyleClassNames} for more info on style classnames
|
|
70
86
|
*/
|
|
71
87
|
export declare const compileStyle: (style: Style) => void;
|
|
72
|
-
/**
|
|
73
|
-
* @param name The classname
|
|
74
|
-
* @param prefix A prefix to add each class, defaults to `""`
|
|
75
|
-
* @return A css selector for the classname
|
|
76
|
-
* @example
|
|
77
|
-
* classNameToSelector("foo bar") // => ".foo.bar"
|
|
78
|
-
*/
|
|
79
|
-
export declare const classNameToSelector: (name: string, prefix?: string) => string;
|
|
80
|
-
type ClassNameFactoryArg = string | string[] | Record<string, unknown> | false | null | undefined | 0 | "";
|
|
81
|
-
/**
|
|
82
|
-
* @param prefix The prefix to add to each class, defaults to `""`
|
|
83
|
-
* @returns A classname generator function
|
|
84
|
-
* @example
|
|
85
|
-
* const cl = classNameFactory("plugin-");
|
|
86
|
-
*
|
|
87
|
-
* cl("base", ["item", "editable"], { selected: null, disabled: true })
|
|
88
|
-
* // => "plugin-base plugin-item plugin-editable plugin-disabled"
|
|
89
|
-
*/
|
|
90
|
-
export declare const classNameFactory: (prefix?: string) => (...args: ClassNameFactoryArg[]) => string;
|
|
91
|
-
export {};
|
package/components/Button.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import "./Button.css";
|
|
|
2
2
|
import type { Button as DiscordButton } from "@vencord/discord-types";
|
|
3
3
|
import type { ComponentPropsWithRef } from "react";
|
|
4
4
|
export type ButtonVariant = "primary" | "secondary" | "dangerPrimary" | "dangerSecondary" | "overlayPrimary" | "positive" | "link" | "none";
|
|
5
|
-
export type ButtonSize = "min" | "xs" | "small" | "medium";
|
|
5
|
+
export type ButtonSize = "min" | "xs" | "small" | "medium" | "iconOnly";
|
|
6
6
|
export type ButtonProps = ComponentPropsWithRef<"button"> & {
|
|
7
7
|
variant?: ButtonVariant;
|
|
8
8
|
size?: ButtonSize;
|
|
@@ -5,3 +5,9 @@ export declare function CodeBlock(props: {
|
|
|
5
5
|
content?: string;
|
|
6
6
|
lang: string;
|
|
7
7
|
}): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Renders inline code like `this`
|
|
10
|
+
*/
|
|
11
|
+
export declare function InlineCode({ children }: {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
}): import("react").JSX.Element;
|
package/components/Icons.d.ts
CHANGED
|
@@ -48,4 +48,6 @@ export declare function BackupRestoreIcon(props: IconProps): JSX.Element;
|
|
|
48
48
|
export declare function UpdaterIcon(props: IconProps): JSX.Element;
|
|
49
49
|
export declare function PatchHelperIcon(props: IconProps): JSX.Element;
|
|
50
50
|
export declare function VesktopSettingsIcon(props: IconProps): JSX.Element;
|
|
51
|
+
export declare function CloudDownloadIcon(props: IconProps): JSX.Element;
|
|
52
|
+
export declare function CloudUploadIcon(props: IconProps): JSX.Element;
|
|
51
53
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefinedSettings, PluginOptionBase } from "../../../../../utils/types";
|
|
2
2
|
import { PropsWithChildren } from "react";
|
|
3
|
-
export declare const cl: (...args: (
|
|
3
|
+
export declare const cl: (...args: import("../../../../../utils/css").ClassNameFactoryArg[]) => string;
|
|
4
4
|
interface SettingBaseProps<T> {
|
|
5
5
|
option: T;
|
|
6
6
|
onChange(newValue: any): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./styles.css";
|
|
2
2
|
import { Logger } from "../../../../utils/Logger";
|
|
3
|
-
export declare const cl: (...args: (
|
|
3
|
+
export declare const cl: (...args: import("../../../../utils/css").ClassNameFactoryArg[]) => string;
|
|
4
4
|
export declare const logger: Logger;
|
|
5
5
|
declare const _default: import("react").FunctionComponent<any>;
|
|
6
6
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import "./fixDiscordBadgePadding.css";
|
|
2
2
|
import { BadgePosition, BadgeUserArgs, ProfileBadge } from "../../../api/Badges";
|
|
3
|
-
import { User } from "@vencord/discord-types";
|
|
4
3
|
declare const _default: {
|
|
5
4
|
name: string;
|
|
6
5
|
description: string;
|
|
@@ -14,13 +13,13 @@ declare const _default: {
|
|
|
14
13
|
replacement: {
|
|
15
14
|
match: RegExp;
|
|
16
15
|
replace: string;
|
|
17
|
-
};
|
|
16
|
+
}[];
|
|
18
17
|
} | {
|
|
19
18
|
find: string;
|
|
20
19
|
replacement: {
|
|
21
20
|
match: RegExp;
|
|
22
21
|
replace: string;
|
|
23
|
-
}
|
|
22
|
+
};
|
|
24
23
|
})[];
|
|
25
24
|
readonly DonorBadges: Record<string, Record<"tooltip" | "badge", string>[]>;
|
|
26
25
|
toolboxActions: {
|
|
@@ -29,9 +28,8 @@ declare const _default: {
|
|
|
29
28
|
userProfileBadge: ProfileBadge;
|
|
30
29
|
start(): Promise<void>;
|
|
31
30
|
stop(): Promise<void>;
|
|
32
|
-
getBadges(
|
|
31
|
+
getBadges(profile: {
|
|
33
32
|
userId: string;
|
|
34
|
-
user?: User;
|
|
35
33
|
guildId: string;
|
|
36
34
|
}): ProfileBadge[];
|
|
37
35
|
renderBadgeComponent: import("react").FunctionComponent<ProfileBadge & BadgeUserArgs>;
|
|
@@ -9,7 +9,7 @@ declare const _default: {
|
|
|
9
9
|
find: string;
|
|
10
10
|
replacement: {
|
|
11
11
|
match: RegExp;
|
|
12
|
-
replace: (_: string, ReactButton: string,
|
|
12
|
+
replace: (_: string, ReactButton: string, ButtonComponent: string, showReactButton: string, message: string) => string;
|
|
13
13
|
};
|
|
14
14
|
}[];
|
|
15
15
|
} & Record<PropertyKey, any> & import("../../utils/types").Plugin;
|
|
@@ -11,15 +11,9 @@ declare const _default: {
|
|
|
11
11
|
replacement: ({
|
|
12
12
|
match: RegExp;
|
|
13
13
|
replace: string;
|
|
14
|
-
noWarn?: undefined;
|
|
15
|
-
} | {
|
|
16
|
-
match: RegExp;
|
|
17
|
-
replace: (m: string, notice: string) => string;
|
|
18
|
-
noWarn: true;
|
|
19
14
|
} | {
|
|
20
15
|
match: RegExp;
|
|
21
16
|
replace: (m: string, _: string, notice: string) => string;
|
|
22
|
-
noWarn?: undefined;
|
|
23
17
|
})[];
|
|
24
18
|
}[];
|
|
25
19
|
} & Record<PropertyKey, any> & import("../../utils/types").Plugin;
|
|
@@ -11,11 +11,13 @@ interface SettingsLayoutNode {
|
|
|
11
11
|
type: number;
|
|
12
12
|
key?: string;
|
|
13
13
|
legacySearchKey?: string;
|
|
14
|
+
getLegacySearchKey?(): string;
|
|
14
15
|
useLabel?(): string;
|
|
15
16
|
useTitle?(): string;
|
|
16
17
|
buildLayout?(): SettingsLayoutNode[];
|
|
17
18
|
icon?(): ReactNode;
|
|
18
19
|
render?(): ReactNode;
|
|
20
|
+
StronglyDiscouragedCustomComponent?(): ReactNode;
|
|
19
21
|
}
|
|
20
22
|
interface EntryOptions {
|
|
21
23
|
key: string;
|
|
@@ -66,12 +68,6 @@ declare const _default: {
|
|
|
66
68
|
match: RegExp;
|
|
67
69
|
replace: string;
|
|
68
70
|
})[];
|
|
69
|
-
} | {
|
|
70
|
-
find: string;
|
|
71
|
-
replacement: {
|
|
72
|
-
match: RegExp;
|
|
73
|
-
replace: (_: string, settingsPanel: string, section: string, openUserSettings: string) => string;
|
|
74
|
-
};
|
|
75
71
|
} | {
|
|
76
72
|
find: string;
|
|
77
73
|
replacement: {
|
|
@@ -80,6 +76,7 @@ declare const _default: {
|
|
|
80
76
|
};
|
|
81
77
|
})[];
|
|
82
78
|
buildEntry(options: EntryOptions): SettingsLayoutNode;
|
|
79
|
+
getSettingsSectionMappings(): string[][];
|
|
83
80
|
buildLayout(originalLayoutBuilder: SettingsLayoutBuilder): SettingsLayoutNode[];
|
|
84
81
|
/** @deprecated Use customEntries */
|
|
85
82
|
customSections: ((SectionTypes: SectionTypes) => any)[];
|
|
@@ -5,6 +5,10 @@ type SettingsEntry = {
|
|
|
5
5
|
section: string;
|
|
6
6
|
label: string;
|
|
7
7
|
};
|
|
8
|
+
interface TransformedSettingsEntry {
|
|
9
|
+
section: string;
|
|
10
|
+
items: SettingsEntry[];
|
|
11
|
+
}
|
|
8
12
|
interface LayerProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
13
|
mode: "SHOWN" | "HIDDEN";
|
|
10
14
|
baseLayer?: boolean;
|
|
@@ -55,6 +59,8 @@ declare const _default: {
|
|
|
55
59
|
restartNeeded: true;
|
|
56
60
|
};
|
|
57
61
|
}>, {}>;
|
|
62
|
+
start(): void;
|
|
63
|
+
stop(): void;
|
|
58
64
|
patches: ({
|
|
59
65
|
find: string;
|
|
60
66
|
replacement: {
|
|
@@ -85,10 +91,7 @@ declare const _default: {
|
|
|
85
91
|
buildPluginMenuEntries: typeof buildPluginMenuEntries;
|
|
86
92
|
buildThemeMenuEntries: typeof buildThemeMenuEntries;
|
|
87
93
|
Layer(props: LayerProps): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | Iterable<import("react").ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
88
|
-
transformSettingsEntries(list: SettingsEntry[]):
|
|
89
|
-
|
|
90
|
-
items: SettingsEntry[];
|
|
91
|
-
}[];
|
|
92
|
-
wrapMap(toWrap: any[]): any[];
|
|
94
|
+
transformSettingsEntries(list: SettingsEntry[], keyMap: Map<string, string>): TransformedSettingsEntry[];
|
|
95
|
+
wrapMap(toWrap: TransformedSettingsEntry[]): TransformedSettingsEntry[];
|
|
93
96
|
} & Record<PropertyKey, any> & import("../../utils/types").Plugin;
|
|
94
97
|
export default _default;
|
|
@@ -51,8 +51,7 @@ declare const _default: {
|
|
|
51
51
|
id: bigint;
|
|
52
52
|
}[];
|
|
53
53
|
dependencies: string[];
|
|
54
|
-
|
|
55
|
-
stop: () => Promise<void>;
|
|
54
|
+
requiresRestart: false;
|
|
56
55
|
settings: import("../../utils/types").DefinedSettings<{
|
|
57
56
|
config: {
|
|
58
57
|
type: OptionType.COMPONENT;
|
|
@@ -88,9 +87,10 @@ declare const _default: {
|
|
|
88
87
|
partySize?: number;
|
|
89
88
|
partyMaxSize?: number;
|
|
90
89
|
}>;
|
|
90
|
+
start: typeof setRpc;
|
|
91
|
+
stop: () => Promise<void>;
|
|
91
92
|
patches: {
|
|
92
93
|
find: string;
|
|
93
|
-
all: true;
|
|
94
94
|
replacement: {
|
|
95
95
|
match: RegExp;
|
|
96
96
|
replace: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const cl: (...args: (
|
|
2
|
-
export declare const
|
|
1
|
+
export declare const cl: (...args: import("../../../utils/css").ClassNameFactoryArg[]) => string;
|
|
2
|
+
export declare const DecorationModalClasses: Record<"spinner" | "modal" | "modalPreview" | "modalCloseButton", string>;
|
|
3
3
|
export declare const requireAvatarDecorationModal: () => Promise<boolean>;
|
|
4
4
|
export declare const requireCreateStickerModal: () => Promise<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OptionType, Patch } from "../../utils/types";
|
|
2
|
-
import type { Emoji, Message } from "@vencord/discord-types";
|
|
2
|
+
import type { Emoji, Message, Sticker } from "@vencord/discord-types";
|
|
3
3
|
import type { ReactElement, ReactNode } from "react";
|
|
4
4
|
declare const enum FakeNoticeType {
|
|
5
5
|
Sticker = 0,
|
|
@@ -155,9 +155,9 @@ declare const _default: {
|
|
|
155
155
|
filterAttachments(attachments: Message["attachments"]): import("@vencord/discord-types").MessageAttachment[];
|
|
156
156
|
shouldKeepEmojiLink(link: any): any;
|
|
157
157
|
addFakeNotice(type: FakeNoticeType, node: Array<ReactNode>, fake: boolean): ReactNode[];
|
|
158
|
-
getStickerLink(
|
|
158
|
+
getStickerLink({ format_type, id }: Sticker): string;
|
|
159
159
|
sendAnimatedSticker(stickerLink: string, stickerId: string, channelId: string): Promise<void>;
|
|
160
|
-
canUseEmote(e: Emoji, channelId: string):
|
|
160
|
+
canUseEmote(e: Emoji, channelId: string): boolean;
|
|
161
161
|
start(): void;
|
|
162
162
|
stop(): void;
|
|
163
163
|
} & Record<PropertyKey, any> & import("../../utils/types").Plugin;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OptionType } from "../../utils/types";
|
|
1
2
|
declare const _default: {
|
|
2
3
|
name: string;
|
|
3
4
|
description: string;
|
|
@@ -5,6 +6,19 @@ declare const _default: {
|
|
|
5
6
|
name: string;
|
|
6
7
|
id: bigint;
|
|
7
8
|
}[];
|
|
9
|
+
settings: import("../../utils/types").DefinedSettings<{
|
|
10
|
+
originalImagesInChat: {
|
|
11
|
+
type: OptionType.BOOLEAN;
|
|
12
|
+
description: string;
|
|
13
|
+
default: false;
|
|
14
|
+
};
|
|
15
|
+
}, import("../../utils/types").SettingsChecks<{
|
|
16
|
+
originalImagesInChat: {
|
|
17
|
+
type: OptionType.BOOLEAN;
|
|
18
|
+
description: string;
|
|
19
|
+
default: false;
|
|
20
|
+
};
|
|
21
|
+
}>, {}>;
|
|
8
22
|
patches: {
|
|
9
23
|
find: string;
|
|
10
24
|
replacement: {
|
|
@@ -12,5 +26,14 @@ declare const _default: {
|
|
|
12
26
|
replace: string;
|
|
13
27
|
};
|
|
14
28
|
}[];
|
|
29
|
+
settingsAboutComponent(): import("react").JSX.Element;
|
|
30
|
+
getSrc(props: {
|
|
31
|
+
src: string;
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
contentType: string;
|
|
35
|
+
mosaicStyleAlt?: boolean;
|
|
36
|
+
trigger?: string;
|
|
37
|
+
}, freeze?: boolean): string | undefined;
|
|
15
38
|
} & Record<PropertyKey, any> & import("../../utils/types").Plugin;
|
|
16
39
|
export default _default;
|
|
@@ -153,15 +153,13 @@ declare const _default: {
|
|
|
153
153
|
find: string;
|
|
154
154
|
replacement: {
|
|
155
155
|
match: RegExp;
|
|
156
|
-
replace: (m: string,
|
|
157
|
-
noWarn: true;
|
|
156
|
+
replace: (m: string, runningGames: string) => string;
|
|
158
157
|
};
|
|
159
158
|
} | {
|
|
160
159
|
find: string;
|
|
161
160
|
replacement: {
|
|
162
161
|
match: RegExp;
|
|
163
|
-
replace:
|
|
164
|
-
noWarn?: undefined;
|
|
162
|
+
replace: string;
|
|
165
163
|
};
|
|
166
164
|
})[];
|
|
167
165
|
start(): Promise<void>;
|
|
@@ -13,8 +13,8 @@ export declare const OnlineMemberCountStore: {
|
|
|
13
13
|
getDispatchToken(): string;
|
|
14
14
|
initialize(): void;
|
|
15
15
|
initializeIfNeeded(): void;
|
|
16
|
-
mustEmitChanges(
|
|
17
|
-
registerActionHandlers(actionHandlers: import("@vencord/discord-types").ActionHandlers): void;
|
|
18
|
-
syncWith(stores: import("@vencord/discord-types").FluxStore[], callback: import("@vencord/discord-types").
|
|
16
|
+
mustEmitChanges(callback?: import("@vencord/discord-types").ActionHandler): void;
|
|
17
|
+
registerActionHandlers(actionHandlers: import("@vencord/discord-types").ActionHandlers, band?: number): void;
|
|
18
|
+
syncWith(stores: import("@vencord/discord-types").FluxStore[], callback: import("@vencord/discord-types").SyncCallback, timeout?: number): void;
|
|
19
19
|
waitFor(...stores: import("@vencord/discord-types").FluxStore[]): void;
|
|
20
20
|
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { OptionType } from "../../utils/types";
|
|
3
3
|
import { FluxStore } from "@vencord/discord-types";
|
|
4
|
-
export declare const GuildMemberCountStore: FluxStore & {
|
|
5
|
-
getMemberCount(guildId?: string): number | null;
|
|
6
|
-
};
|
|
7
4
|
export declare const ChannelMemberStore: FluxStore & {
|
|
8
5
|
getProps(guildId?: string, channelId?: string): {
|
|
9
6
|
groups: {
|
|
@@ -58,7 +55,7 @@ export declare const settings: import("../../utils/types").DefinedSettings<{
|
|
|
58
55
|
};
|
|
59
56
|
}>, {}>;
|
|
60
57
|
export declare const numberFormat: (value: number) => string;
|
|
61
|
-
export declare const cl: (...args: (
|
|
58
|
+
export declare const cl: (...args: import("../../utils/css").ClassNameFactoryArg[]) => string;
|
|
62
59
|
declare const _default: {
|
|
63
60
|
name: string;
|
|
64
61
|
description: string;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { OptionType } from "../../utils/types";
|
|
2
|
+
declare const _default: {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
authors: {
|
|
6
|
+
name: string;
|
|
7
|
+
id: bigint;
|
|
8
|
+
}[];
|
|
9
|
+
settings: import("../../utils/types").DefinedSettings<{
|
|
10
|
+
reactionCount: {
|
|
11
|
+
description: string;
|
|
12
|
+
type: OptionType.NUMBER;
|
|
13
|
+
default: number;
|
|
14
|
+
};
|
|
15
|
+
}, import("../../utils/types").SettingsChecks<{
|
|
16
|
+
reactionCount: {
|
|
17
|
+
description: string;
|
|
18
|
+
type: OptionType.NUMBER;
|
|
19
|
+
default: number;
|
|
20
|
+
};
|
|
21
|
+
}>, {}>;
|
|
22
|
+
readonly reactionCount: number;
|
|
23
|
+
patches: {
|
|
24
|
+
find: string;
|
|
25
|
+
replacement: {
|
|
26
|
+
match: RegExp;
|
|
27
|
+
replace: string;
|
|
28
|
+
};
|
|
29
|
+
}[];
|
|
30
|
+
} & Record<PropertyKey, any> & import("../../utils/types").Plugin;
|
|
31
|
+
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./styles.css";
|
|
2
2
|
import { NavContextMenuPatchCallback } from "../../api/ContextMenu";
|
|
3
3
|
import { OptionType } from "../../utils/types";
|
|
4
|
-
import type { Guild
|
|
4
|
+
import type { Guild } from "@vencord/discord-types";
|
|
5
5
|
export declare const enum PermissionsSortOrder {
|
|
6
6
|
HighestRole = 0,
|
|
7
7
|
LowestRole = 1
|
|
@@ -79,8 +79,9 @@ declare const _default: {
|
|
|
79
79
|
};
|
|
80
80
|
}[];
|
|
81
81
|
ViewPermissionsButton: import("react").FunctionComponent<{
|
|
82
|
+
className: string;
|
|
82
83
|
guild: Guild;
|
|
83
|
-
|
|
84
|
+
userId: string;
|
|
84
85
|
}>;
|
|
85
86
|
contextMenus: {
|
|
86
87
|
"user-context": NavContextMenuPatchCallback;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Guild, GuildMember, Role } from "@vencord/discord-types";
|
|
2
2
|
export declare const getGuildPermissionSpecMap: any;
|
|
3
|
-
export declare const cl: (...args: (
|
|
3
|
+
export declare const cl: (...args: import("../../utils/css").ClassNameFactoryArg[]) => string;
|
|
4
4
|
export declare function getSortedRolesForMember({ id: guildId }: Guild, member: GuildMember): Role[];
|
|
5
5
|
export declare function sortUserRoles(roles: Role[]): Role[];
|
|
6
6
|
export declare function sortPermissionOverwrites<T extends {
|
|
@@ -32,7 +32,7 @@ declare const _default: {
|
|
|
32
32
|
description: string;
|
|
33
33
|
type: ApplicationCommandOptionType.BOOLEAN;
|
|
34
34
|
})[];
|
|
35
|
-
execute: (opts: CommandArgument[], cmdCtx: CommandContext) => Promise<
|
|
35
|
+
execute: (opts: CommandArgument[], cmdCtx: CommandContext) => Promise<import("@vencord/discord-types").Message | undefined>;
|
|
36
36
|
}[];
|
|
37
37
|
} & Record<PropertyKey, any> & import("../../utils/types").Plugin;
|
|
38
38
|
export default _default;
|
|
@@ -10,7 +10,7 @@ declare const _default: {
|
|
|
10
10
|
find: string;
|
|
11
11
|
replacement: {
|
|
12
12
|
match: RegExp;
|
|
13
|
-
replace: (
|
|
13
|
+
replace: (m: string, hasFolderButtonContent: string) => string;
|
|
14
14
|
}[];
|
|
15
15
|
}[];
|
|
16
16
|
} & Record<PropertyKey, any> & import("../../utils/types").Plugin;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Review } from "./entities";
|
|
2
|
-
export declare const cl: (...args: (
|
|
2
|
+
export declare const cl: (...args: import("../../utils/css").ClassNameFactoryArg[]) => string;
|
|
3
3
|
export declare function canDeleteReview(profileId: string, review: Review): boolean;
|
|
4
4
|
export declare function canBlockReviewAuthor(profileId: string, review: Review): boolean;
|
|
5
5
|
export declare function canReportReview(review: Review): boolean;
|
|
@@ -100,6 +100,13 @@ declare const _default: {
|
|
|
100
100
|
replace: string;
|
|
101
101
|
}[];
|
|
102
102
|
predicate: () => boolean;
|
|
103
|
+
} | {
|
|
104
|
+
find: string;
|
|
105
|
+
replacement: {
|
|
106
|
+
match: RegExp;
|
|
107
|
+
replace: (_: string, rest: string) => string;
|
|
108
|
+
}[];
|
|
109
|
+
predicate: () => boolean;
|
|
103
110
|
} | {
|
|
104
111
|
find: string;
|
|
105
112
|
replacement: {
|
|
@@ -115,9 +122,9 @@ declare const _default: {
|
|
|
115
122
|
} | null;
|
|
116
123
|
useMessageColorsStyle(message: any): {
|
|
117
124
|
color: string;
|
|
118
|
-
"--
|
|
125
|
+
"--text-strong": string;
|
|
119
126
|
"--text-muted": string;
|
|
120
|
-
} | null;
|
|
127
|
+
} | null | undefined;
|
|
121
128
|
RoleGroupColor: import("react").FunctionComponent<{
|
|
122
129
|
id: string;
|
|
123
130
|
count: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HighlighterProps } from "../components/Highlighter";
|
|
2
2
|
import { HljsSetting } from "../types";
|
|
3
|
-
export declare const cl: (...args: (
|
|
3
|
+
export declare const cl: (...args: import("../../../utils/css").ClassNameFactoryArg[]) => string;
|
|
4
4
|
export declare const shouldUseHljs: ({ lang, tryHljs, }: {
|
|
5
5
|
lang: HighlighterProps["lang"];
|
|
6
6
|
tryHljs: HljsSetting;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { OptionType } from "../../utils/types";
|
|
3
3
|
import type { Channel, Role } from "@vencord/discord-types";
|
|
4
|
-
export declare const cl: (...args: (
|
|
4
|
+
export declare const cl: (...args: import("../../utils/css").ClassNameFactoryArg[]) => string;
|
|
5
5
|
declare const enum ShowMode {
|
|
6
6
|
LockIcon = 0,
|
|
7
7
|
HiddenIconWithMutedStyle = 1
|
|
@@ -61,6 +61,13 @@ declare const _default: {
|
|
|
61
61
|
match: RegExp;
|
|
62
62
|
replace: string;
|
|
63
63
|
};
|
|
64
|
+
} | {
|
|
65
|
+
find: string;
|
|
66
|
+
predicate: () => boolean;
|
|
67
|
+
replacement: {
|
|
68
|
+
match: RegExp;
|
|
69
|
+
replace: (_: string, rest: string, roles: string) => string;
|
|
70
|
+
};
|
|
64
71
|
})[];
|
|
65
72
|
getHighestRole({ member }: {
|
|
66
73
|
member: GuildMember;
|
|
@@ -57,9 +57,9 @@ export declare const SpotifyStore: {
|
|
|
57
57
|
getDispatchToken(): string;
|
|
58
58
|
initialize(): void;
|
|
59
59
|
initializeIfNeeded(): void;
|
|
60
|
-
mustEmitChanges(
|
|
61
|
-
registerActionHandlers(actionHandlers: import("@vencord/discord-types").ActionHandlers): void;
|
|
62
|
-
syncWith(stores: import("@vencord/discord-types").FluxStore[], callback: import("@vencord/discord-types").
|
|
60
|
+
mustEmitChanges(callback?: import("@vencord/discord-types").ActionHandler): void;
|
|
61
|
+
registerActionHandlers(actionHandlers: import("@vencord/discord-types").ActionHandlers, band?: number): void;
|
|
62
|
+
syncWith(stores: import("@vencord/discord-types").FluxStore[], callback: import("@vencord/discord-types").SyncCallback, timeout?: number): void;
|
|
63
63
|
waitFor(...stores: import("@vencord/discord-types").FluxStore[]): void;
|
|
64
64
|
};
|
|
65
65
|
export {};
|
|
@@ -49,15 +49,10 @@ declare const _default: {
|
|
|
49
49
|
}[];
|
|
50
50
|
patches: ({
|
|
51
51
|
find: string;
|
|
52
|
-
replacement:
|
|
53
|
-
match: RegExp;
|
|
54
|
-
replace: (_: string, rest: string, playingCount: string) => string;
|
|
55
|
-
noWarn: true;
|
|
56
|
-
} | {
|
|
52
|
+
replacement: {
|
|
57
53
|
match: RegExp;
|
|
58
54
|
replace: (_: string, rest: string, playingCount: string) => string;
|
|
59
|
-
|
|
60
|
-
})[];
|
|
55
|
+
}[];
|
|
61
56
|
} | {
|
|
62
57
|
find: string;
|
|
63
58
|
replacement: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const cl: (...args: (
|
|
1
|
+
export declare const cl: (...args: import("../../utils/css").ClassNameFactoryArg[]) => string;
|
|
2
2
|
export interface TranslationValue {
|
|
3
3
|
sourceLanguage: string;
|
|
4
4
|
text: string;
|
|
@@ -47,21 +47,14 @@ declare const _default: {
|
|
|
47
47
|
restartNeeded: true;
|
|
48
48
|
};
|
|
49
49
|
}>, {}>;
|
|
50
|
-
patches:
|
|
51
|
-
find: string;
|
|
52
|
-
replacement: {
|
|
53
|
-
match: RegExp;
|
|
54
|
-
replace: (_: string, rest: string) => string;
|
|
55
|
-
};
|
|
56
|
-
predicate: () => boolean;
|
|
57
|
-
} | {
|
|
50
|
+
patches: {
|
|
58
51
|
find: string;
|
|
59
52
|
replacement: {
|
|
60
53
|
match: RegExp;
|
|
61
54
|
replace: string;
|
|
62
55
|
};
|
|
63
56
|
predicate: () => boolean;
|
|
64
|
-
}
|
|
57
|
+
}[];
|
|
65
58
|
start(): void;
|
|
66
59
|
stop(): void;
|
|
67
60
|
VoiceChannelIndicator: import("react").FunctionComponent<import("./components").VoiceChannelIndicatorProps>;
|
package/plugins/usrbg/index.d.ts
CHANGED
|
@@ -67,6 +67,13 @@ declare const _default: {
|
|
|
67
67
|
match: RegExp;
|
|
68
68
|
replace: string;
|
|
69
69
|
}[];
|
|
70
|
+
} | {
|
|
71
|
+
find: string;
|
|
72
|
+
predicate: () => boolean;
|
|
73
|
+
replacement: {
|
|
74
|
+
match: RegExp;
|
|
75
|
+
replace: string;
|
|
76
|
+
};
|
|
70
77
|
})[];
|
|
71
78
|
data: UsrbgApiReturn | null;
|
|
72
79
|
settingsAboutComponent: () => import("react").JSX.Element;
|
|
@@ -68,15 +68,13 @@ declare const _default: {
|
|
|
68
68
|
replacement: {
|
|
69
69
|
match: RegExp;
|
|
70
70
|
replace: string;
|
|
71
|
-
}
|
|
72
|
-
all: true;
|
|
71
|
+
};
|
|
73
72
|
} | {
|
|
74
73
|
find: string;
|
|
75
74
|
replacement: {
|
|
76
75
|
match: RegExp;
|
|
77
76
|
replace: (_: string, rest: string, bannerSrc: string) => string;
|
|
78
77
|
};
|
|
79
|
-
all?: undefined;
|
|
80
78
|
})[];
|
|
81
79
|
} & Record<PropertyKey, any> & import("../../utils/types").Plugin;
|
|
82
80
|
export default _default;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import "./styles.css";
|
|
2
2
|
import { NavContextMenuPatchCallback } from "../../api/ContextMenu";
|
|
3
3
|
import { ComponentType } from "react";
|
|
4
|
+
export declare const cl: (...args: import("../../utils/css").ClassNameFactoryArg[]) => string;
|
|
4
5
|
export type VoiceRecorder = ComponentType<{
|
|
5
6
|
setAudioBlob(blob: Blob): void;
|
|
6
7
|
onRecordingChange?(recording: boolean): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OptionType } from "../../utils/types";
|
|
1
2
|
declare const _default: {
|
|
2
3
|
name: string;
|
|
3
4
|
authors: {
|
|
@@ -6,6 +7,19 @@ declare const _default: {
|
|
|
6
7
|
}[];
|
|
7
8
|
description: string;
|
|
8
9
|
enabledByDefault: true;
|
|
10
|
+
settings: import("../../utils/types").DefinedSettings<{
|
|
11
|
+
experimentalAV1Support: {
|
|
12
|
+
type: OptionType.BOOLEAN;
|
|
13
|
+
description: string;
|
|
14
|
+
default: false;
|
|
15
|
+
};
|
|
16
|
+
}, import("../../utils/types").SettingsChecks<{
|
|
17
|
+
experimentalAV1Support: {
|
|
18
|
+
type: OptionType.BOOLEAN;
|
|
19
|
+
description: string;
|
|
20
|
+
default: false;
|
|
21
|
+
};
|
|
22
|
+
}>, {}>;
|
|
9
23
|
patches: {
|
|
10
24
|
find: string;
|
|
11
25
|
replacement: ({
|
|
@@ -16,5 +30,6 @@ declare const _default: {
|
|
|
16
30
|
replace: string;
|
|
17
31
|
})[];
|
|
18
32
|
}[];
|
|
33
|
+
getCodecs(Codecs: Record<string, string>): string[];
|
|
19
34
|
} & Record<PropertyKey, any> & import("../../utils/types").Plugin;
|
|
20
35
|
export default _default;
|
package/shared/IpcEvents.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare const enum IpcEvents {
|
|
2
|
+
INIT_FILE_WATCHERS = "VencordInitFileWatchers",
|
|
2
3
|
OPEN_QUICKCSS = "VencordOpenQuickCss",
|
|
3
4
|
GET_QUICK_CSS = "VencordGetQuickCss",
|
|
4
5
|
SET_QUICK_CSS = "VencordSetQuickCss",
|
|
@@ -8,8 +9,6 @@ export declare const enum IpcEvents {
|
|
|
8
9
|
GET_THEMES_LIST = "VencordGetThemesList",
|
|
9
10
|
GET_THEME_DATA = "VencordGetThemeData",
|
|
10
11
|
GET_THEME_SYSTEM_VALUES = "VencordGetThemeSystemValues",
|
|
11
|
-
UPLOAD_THEME = "VencordUploadTheme",
|
|
12
|
-
DELETE_THEME = "VencordDeleteTheme",
|
|
13
12
|
THEME_UPDATE = "VencordThemeUpdate",
|
|
14
13
|
OPEN_EXTERNAL = "VencordOpenExternal",
|
|
15
14
|
OPEN_THEMES_FOLDER = "VencordOpenThemesFolder",
|
|
@@ -19,10 +18,12 @@ export declare const enum IpcEvents {
|
|
|
19
18
|
UPDATE = "VencordUpdate",
|
|
20
19
|
BUILD = "VencordBuild",
|
|
21
20
|
OPEN_MONACO_EDITOR = "VencordOpenMonacoEditor",
|
|
21
|
+
GET_MONACO_THEME = "VencordGetMonacoTheme",
|
|
22
22
|
GET_PLUGIN_IPC_METHOD_MAP = "VencordGetPluginIpcMethodMap",
|
|
23
|
-
OPEN_IN_APP__RESOLVE_REDIRECT = "VencordOIAResolveRedirect",
|
|
24
|
-
VOICE_MESSAGES_READ_RECORDING = "VencordVMReadRecording",
|
|
25
23
|
CSP_IS_DOMAIN_ALLOWED = "VencordCspIsDomainAllowed",
|
|
26
24
|
CSP_REMOVE_OVERRIDE = "VencordCspRemoveOverride",
|
|
27
|
-
CSP_REQUEST_ADD_OVERRIDE = "VencordCspRequestAddOverride"
|
|
25
|
+
CSP_REQUEST_ADD_OVERRIDE = "VencordCspRequestAddOverride",
|
|
26
|
+
GET_RENDERER_CSS = "VencordGetRendererCss",
|
|
27
|
+
RENDERER_CSS_UPDATE = "VencordRendererCssUpdate",
|
|
28
|
+
PRELOAD_GET_RENDERER_JS = "VencordPreloadGetRendererJs"
|
|
28
29
|
}
|
package/utils/constants.d.ts
CHANGED
|
@@ -465,6 +465,10 @@ export declare const Devs: Readonly<{
|
|
|
465
465
|
name: string;
|
|
466
466
|
id: bigint;
|
|
467
467
|
};
|
|
468
|
+
iamme: {
|
|
469
|
+
name: string;
|
|
470
|
+
id: bigint;
|
|
471
|
+
};
|
|
468
472
|
Byeoon: {
|
|
469
473
|
name: string;
|
|
470
474
|
id: bigint;
|
|
@@ -593,5 +597,13 @@ export declare const Devs: Readonly<{
|
|
|
593
597
|
name: string;
|
|
594
598
|
id: bigint;
|
|
595
599
|
};
|
|
600
|
+
u32: {
|
|
601
|
+
name: string;
|
|
602
|
+
id: bigint;
|
|
603
|
+
};
|
|
604
|
+
prism: {
|
|
605
|
+
name: string;
|
|
606
|
+
id: bigint;
|
|
607
|
+
};
|
|
596
608
|
}>;
|
|
597
609
|
export declare const DevsById: Record<string, Dev>;
|
package/utils/css.d.ts
CHANGED
|
@@ -1 +1,13 @@
|
|
|
1
|
-
export declare function createAndAppendStyle(id: string, target
|
|
1
|
+
export declare function createAndAppendStyle(id: string, target: HTMLElement): HTMLStyleElement;
|
|
2
|
+
export declare const classNameToSelector: (name: string, prefix?: string) => string;
|
|
3
|
+
export type ClassNameFactoryArg = string | string[] | Record<string, unknown> | false | null | undefined | 0 | "";
|
|
4
|
+
/**
|
|
5
|
+
* @param prefix The prefix to add to each class, defaults to `""`
|
|
6
|
+
* @returns A classname generator function
|
|
7
|
+
* @example
|
|
8
|
+
* const cl = classNameFactory("plugin-");
|
|
9
|
+
*
|
|
10
|
+
* cl("base", ["item", "editable"], { selected: null, disabled: true })
|
|
11
|
+
* // => "plugin-base plugin-item plugin-editable plugin-disabled"
|
|
12
|
+
*/
|
|
13
|
+
export declare const classNameFactory: (prefix?: string) => (...args: ClassNameFactoryArg[]) => string;
|
package/utils/discord.d.ts
CHANGED
|
@@ -78,13 +78,6 @@ export declare function fetchUserProfile(id: string, options?: FetchUserProfileO
|
|
|
78
78
|
* Get the unique username for a user. Returns user.username for pomelo people, user.tag otherwise
|
|
79
79
|
*/
|
|
80
80
|
export declare function getUniqueUsername(user: User): string;
|
|
81
|
-
/**
|
|
82
|
-
* Get the URL for an emoji. This function always returns a gif URL for animated emojis, instead of webp
|
|
83
|
-
* @param id The emoji id
|
|
84
|
-
* @param animated Whether the emoji is animated
|
|
85
|
-
* @param size The size for the emoji
|
|
86
|
-
*/
|
|
87
|
-
export declare function getEmojiURL(id: string, animated: boolean, size: number): string;
|
|
88
81
|
export declare function getGuildAcronym(guild: Guild): string;
|
|
89
82
|
export declare function hasGuildFeature(guild: Guild, feature: GuildFeatures): boolean;
|
|
90
83
|
export {};
|
package/utils/intlHash.d.ts
CHANGED
package/utils/patches.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Patch, PatchReplacement, ReplaceFn } from "./types";
|
|
2
|
-
export declare function canonicalizeMatch<T extends RegExp | string>(match: T): T
|
|
2
|
+
export declare function canonicalizeMatch<T extends RegExp | string>(match: T): T;
|
|
3
3
|
export declare function canonicalizeReplace<T extends string | ReplaceFn>(replace: T, pluginPath: string): T;
|
|
4
4
|
export declare function canonicalizeDescriptor<T>(descriptor: TypedPropertyDescriptor<T>, canonicalize: (value: T) => T): TypedPropertyDescriptor<T>;
|
|
5
5
|
export declare function canonicalizeReplacement(replacement: Pick<PatchReplacement, "match" | "replace">, pluginPath: string): void;
|
package/utils/text.d.ts
CHANGED
|
@@ -35,4 +35,5 @@ export declare function makeCodeblock(text: string, language?: string): string;
|
|
|
35
35
|
export declare function stripIndent(strings: TemplateStringsArray, ...values: any[]): string;
|
|
36
36
|
export declare const ZWSP = "\u200B";
|
|
37
37
|
export declare function toInlineCode(s: string): string;
|
|
38
|
+
export declare const escapeRegExp: (s: string) => string;
|
|
38
39
|
export {};
|
package/utils/types.d.ts
CHANGED
|
@@ -95,6 +95,10 @@ export interface PluginDef {
|
|
|
95
95
|
* Whether this plugin should be enabled by default, but can be disabled
|
|
96
96
|
*/
|
|
97
97
|
enabledByDefault?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* Whether enabling or disabling this plugin requires a restart. Defaults to true if the plugin has patches.
|
|
100
|
+
*/
|
|
101
|
+
requiresRestart?: boolean;
|
|
98
102
|
/**
|
|
99
103
|
* When to call the start() method
|
|
100
104
|
* @default StartAt.WebpackReady
|
package/utils/web-metadata.d.ts
CHANGED
|
@@ -17,48 +17,10 @@ export declare const Text: t.Text;
|
|
|
17
17
|
export declare const Button: t.Button;
|
|
18
18
|
/** @deprecated Use FormSwitch from Vencord */
|
|
19
19
|
export declare const Switch: never;
|
|
20
|
-
/** @deprecated Use Card from Vencord */
|
|
21
|
-
export declare const Card: never;
|
|
22
20
|
export declare const Checkbox: import("../../utils/lazyReact").LazyComponentWrapper<t.Checkbox>;
|
|
23
|
-
export declare const Tooltip: import("../../utils/lazyReact").LazyComponentWrapper<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
onClick(): void;
|
|
27
|
-
onMouseEnter(): void;
|
|
28
|
-
onMouseLeave(): void;
|
|
29
|
-
onContextMenu(): void;
|
|
30
|
-
onFocus(): void;
|
|
31
|
-
onBlur(): void;
|
|
32
|
-
"aria-label"?: string;
|
|
33
|
-
}>;
|
|
34
|
-
"aria-label"?: string;
|
|
35
|
-
allowOverflow?: boolean;
|
|
36
|
-
forceOpen?: boolean;
|
|
37
|
-
hide?: boolean;
|
|
38
|
-
hideOnClick?: boolean;
|
|
39
|
-
shouldShow?: boolean;
|
|
40
|
-
spacing?: number;
|
|
41
|
-
color?: string;
|
|
42
|
-
position?: t.PopoutPosition;
|
|
43
|
-
tooltipClassName?: string;
|
|
44
|
-
tooltipContentClassName?: string;
|
|
45
|
-
}>>;
|
|
46
|
-
export declare const TooltipContainer: import("../../utils/lazyReact").LazyComponentWrapper<import("react").ComponentType<import("react").PropsWithChildren<{
|
|
47
|
-
text: import("react").ReactNode;
|
|
48
|
-
element?: "div" | "span";
|
|
49
|
-
"aria-label"?: string | false;
|
|
50
|
-
delay?: number;
|
|
51
|
-
color?: string;
|
|
52
|
-
position?: t.PopoutPosition;
|
|
53
|
-
spacing?: number;
|
|
54
|
-
className?: string;
|
|
55
|
-
tooltipClassName?: string | null;
|
|
56
|
-
tooltipContentClassName?: string | null;
|
|
57
|
-
allowOverflow?: boolean;
|
|
58
|
-
forceOpen?: boolean;
|
|
59
|
-
hideOnClick?: boolean;
|
|
60
|
-
disableTooltipPointerEvents?: boolean;
|
|
61
|
-
}>>>;
|
|
21
|
+
export declare const Tooltip: import("../../utils/lazyReact").LazyComponentWrapper<t.Tooltip>;
|
|
22
|
+
/** @deprecated import from @vencord/components */
|
|
23
|
+
export declare const TooltipContainer: never;
|
|
62
24
|
export declare const TextInput: import("../../utils/lazyReact").LazyComponentWrapper<t.TextInput>;
|
|
63
25
|
export declare const TextArea: import("../../utils/lazyReact").LazyComponentWrapper<t.TextArea>;
|
|
64
26
|
export declare const Select: import("../../utils/lazyReact").LazyComponentWrapper<t.Select>;
|
|
@@ -74,8 +36,8 @@ export declare const ColorPicker: import("../../utils/lazyReact").LazyComponentW
|
|
|
74
36
|
export declare const UserSummaryItem: import("../../utils/lazyReact").LazyComponentWrapper<import("react").ComponentType<any> & Record<string, any>>;
|
|
75
37
|
export declare let createScroller: (scrollbarClassName: string, fadeClassName: string, customThemeClassName: string) => t.ScrollerThin;
|
|
76
38
|
export declare let createListScroller: (scrollBarClassName: string, fadeClassName: string, someOtherClassIdkMan: string, resizeObserverClass: typeof ResizeObserver) => t.ListScrollerThin;
|
|
77
|
-
export declare
|
|
78
|
-
export declare
|
|
39
|
+
export declare const scrollerClasses: Record<"auto" | "none" | "thin" | "fade" | "customTheme", string>;
|
|
40
|
+
export declare const listScrollerClasses: Record<"auto" | "thin" | "fade", string>;
|
|
79
41
|
export declare const ScrollerNone: import("../../utils/lazyReact").LazyComponentWrapper<import("react").ComponentType<import("react").PropsWithChildren<t.ScrollerBaseProps & {
|
|
80
42
|
orientation?: "horizontal" | "vertical" | "auto";
|
|
81
43
|
fade?: boolean;
|
|
@@ -88,31 +50,6 @@ export declare const ScrollerAuto: import("../../utils/lazyReact").LazyComponent
|
|
|
88
50
|
orientation?: "horizontal" | "vertical" | "auto";
|
|
89
51
|
fade?: boolean;
|
|
90
52
|
}>>>;
|
|
91
|
-
export declare const ListScrollerNone: import("../../utils/lazyReact").LazyComponentWrapper<import("react").ComponentType<t.ScrollerBaseProps & {
|
|
92
|
-
sections: number[];
|
|
93
|
-
renderSection?: (item: t.ListSection) => React.ReactNode;
|
|
94
|
-
renderRow: (item: t.ListRow) => React.ReactNode;
|
|
95
|
-
renderFooter?: (item: any) => React.ReactNode;
|
|
96
|
-
renderSidebar?: (listVisible: boolean, sidebarVisible: boolean) => React.ReactNode;
|
|
97
|
-
wrapSection?: (section: number, children: React.ReactNode) => React.ReactNode;
|
|
98
|
-
sectionHeight: number;
|
|
99
|
-
rowHeight: number;
|
|
100
|
-
footerHeight?: number;
|
|
101
|
-
sidebarHeight?: number;
|
|
102
|
-
chunkSize?: number;
|
|
103
|
-
paddingTop?: number;
|
|
104
|
-
paddingBottom?: number;
|
|
105
|
-
fade?: boolean;
|
|
106
|
-
onResize?: Function;
|
|
107
|
-
getAnchorId?: any;
|
|
108
|
-
innerTag?: string;
|
|
109
|
-
innerId?: string;
|
|
110
|
-
innerClassName?: string;
|
|
111
|
-
innerRole?: string;
|
|
112
|
-
innerAriaLabel?: string;
|
|
113
|
-
innerAriaMultiselectable?: boolean;
|
|
114
|
-
innerAriaOrientation?: "vertical" | "horizontal";
|
|
115
|
-
}>>;
|
|
116
53
|
export declare const ListScrollerThin: import("../../utils/lazyReact").LazyComponentWrapper<import("react").ComponentType<t.ScrollerBaseProps & {
|
|
117
54
|
sections: number[];
|
|
118
55
|
renderSection?: (item: t.ListSection) => React.ReactNode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LazyComponentWrapper } from "../../utils/react";
|
|
2
2
|
import { FilterFn } from "../webpack";
|
|
3
|
-
|
|
3
|
+
import { ComponentType } from "react";
|
|
4
|
+
export declare function waitForComponent<T extends ComponentType<any> = ComponentType<any> & Record<string, any>>(name: string, filter: FilterFn | string | string[], fallbackValue?: ComponentType<any> | null): LazyComponentWrapper<T>;
|
|
4
5
|
export declare function waitForStore(name: string, cb: (v: any) => void): void;
|
|
@@ -5,15 +5,19 @@ export declare const DraftType: any;
|
|
|
5
5
|
export declare let MessageStore: Omit<t.MessageStore, "getMessages"> & GenericStore & {
|
|
6
6
|
getMessages(chanId: string): any;
|
|
7
7
|
};
|
|
8
|
-
export declare let PermissionStore:
|
|
9
|
-
export declare let GuildChannelStore:
|
|
10
|
-
export declare let ReadStateStore:
|
|
8
|
+
export declare let PermissionStore: t.PermissionStore;
|
|
9
|
+
export declare let GuildChannelStore: t.GuildChannelStore;
|
|
10
|
+
export declare let ReadStateStore: t.ReadStateStore;
|
|
11
11
|
export declare let PresenceStore: t.PresenceStore;
|
|
12
|
+
export declare let AccessibilityStore: t.AccessibilityStore;
|
|
12
13
|
export declare let GuildStore: t.GuildStore;
|
|
13
14
|
export declare let GuildRoleStore: t.GuildRoleStore;
|
|
15
|
+
export declare let GuildScheduledEventStore: t.GuildScheduledEventStore;
|
|
16
|
+
export declare let GuildMemberCountStore: t.GuildMemberCountStore;
|
|
14
17
|
export declare let GuildMemberStore: t.GuildMemberStore;
|
|
15
18
|
export declare let UserStore: t.UserStore;
|
|
16
19
|
export declare let AuthenticationStore: t.AuthenticationStore;
|
|
20
|
+
export declare let ApplicationStore: t.ApplicationStore;
|
|
17
21
|
export declare let UserProfileStore: t.UserProfileStore;
|
|
18
22
|
export declare let SelectedChannelStore: t.SelectedChannelStore;
|
|
19
23
|
export declare let SelectedGuildStore: t.SelectedGuildStore;
|
|
@@ -27,6 +31,25 @@ export declare let ThemeStore: t.ThemeStore;
|
|
|
27
31
|
export declare let WindowStore: t.WindowStore;
|
|
28
32
|
export declare let DraftStore: t.DraftStore;
|
|
29
33
|
export declare let StreamerModeStore: t.StreamerModeStore;
|
|
34
|
+
export declare let SpotifyStore: t.SpotifyStore;
|
|
35
|
+
export declare let MediaEngineStore: t.MediaEngineStore;
|
|
36
|
+
export declare let NotificationSettingsStore: t.NotificationSettingsStore;
|
|
37
|
+
export declare let SpellCheckStore: t.SpellCheckStore;
|
|
38
|
+
export declare let UploadAttachmentStore: t.UploadAttachmentStore;
|
|
39
|
+
export declare let OverridePremiumTypeStore: t.OverridePremiumTypeStore;
|
|
40
|
+
export declare let RunningGameStore: t.RunningGameStore;
|
|
41
|
+
export declare let ActiveJoinedThreadsStore: t.ActiveJoinedThreadsStore;
|
|
42
|
+
export declare let UserGuildSettingsStore: t.UserGuildSettingsStore;
|
|
43
|
+
export declare let UserSettingsProtoStore: t.UserSettingsProtoStore;
|
|
44
|
+
export declare let CallStore: t.CallStore;
|
|
45
|
+
export declare let ChannelRTCStore: t.ChannelRTCStore;
|
|
46
|
+
export declare let FriendsStore: t.FriendsStore;
|
|
47
|
+
export declare let InstantInviteStore: t.InstantInviteStore;
|
|
48
|
+
export declare let InviteStore: t.InviteStore;
|
|
49
|
+
export declare let LocaleStore: t.LocaleStore;
|
|
50
|
+
export declare let RTCConnectionStore: t.RTCConnectionStore;
|
|
51
|
+
export declare let SoundboardStore: t.SoundboardStore;
|
|
52
|
+
export declare let PopoutWindowStore: t.PopoutWindowStore;
|
|
30
53
|
/**
|
|
31
54
|
* @see jsdoc of {@link t.useStateFromStores}
|
|
32
55
|
*/
|
package/webpack/webpack.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FluxStore } from "@vencord/discord-types";
|
|
2
|
-
import type { ModuleExports, WebpackRequire } from "@vencord/discord-types/webpack";
|
|
2
|
+
import type { ModuleExports, ModuleFactory, WebpackRequire } from "@vencord/discord-types/webpack";
|
|
3
3
|
import type { AnyModuleFactory, AnyWebpackRequire } from "./types";
|
|
4
4
|
export declare let _resolveReady: () => void;
|
|
5
5
|
/**
|
|
@@ -15,11 +15,13 @@ export type PropsFilter = Array<string>;
|
|
|
15
15
|
export type CodeFilter = Array<string | RegExp>;
|
|
16
16
|
export type StoreNameFilter = string;
|
|
17
17
|
export declare const stringMatches: (s: string, filter: CodeFilter) => boolean;
|
|
18
|
+
export declare function makeClassNameRegex(className: string): RegExp;
|
|
18
19
|
export declare const filters: {
|
|
19
20
|
byProps: (...props: PropsFilter) => FilterFn;
|
|
20
21
|
byCode: (...code: CodeFilter) => FilterFn;
|
|
21
22
|
byStoreName: (name: StoreNameFilter) => FilterFn;
|
|
22
23
|
componentByCode: (...code: CodeFilter) => FilterFn;
|
|
24
|
+
byClassNames: (...classes: string[]) => FilterFn;
|
|
23
25
|
};
|
|
24
26
|
export type CallbackFn = (module: ModuleExports, id: PropertyKey) => void;
|
|
25
27
|
export type FactoryListernFn = (factory: AnyModuleFactory, moduleId: PropertyKey) => void;
|
|
@@ -32,11 +34,14 @@ export declare function handleModuleNotFound(method: string, ...filter: unknown[
|
|
|
32
34
|
/**
|
|
33
35
|
* Find the first module that matches the filter
|
|
34
36
|
*/
|
|
35
|
-
export declare const find: (filter: FilterFn, { isIndirect, isWaitFor }?: {
|
|
37
|
+
export declare const find: (filter: FilterFn, { isIndirect, isWaitFor, topLevelOnly }?: {
|
|
36
38
|
isIndirect?: boolean;
|
|
37
39
|
isWaitFor?: boolean;
|
|
40
|
+
topLevelOnly?: boolean;
|
|
38
41
|
}) => any;
|
|
39
|
-
export declare function findAll(filter: FilterFn
|
|
42
|
+
export declare function findAll(filter: FilterFn, { topLevelOnly }?: {
|
|
43
|
+
topLevelOnly?: boolean;
|
|
44
|
+
}): any[];
|
|
40
45
|
/**
|
|
41
46
|
* Same as {@link find} but in bulk
|
|
42
47
|
* @param filterFns Array of filters. Please note that this array will be modified in place, so if you still
|
|
@@ -53,8 +58,8 @@ export declare const findModuleId: (...code: CodeFilter) => string | null;
|
|
|
53
58
|
* Find the first module factory that includes all the given code
|
|
54
59
|
* @returns The module factory or null
|
|
55
60
|
*/
|
|
56
|
-
export declare function findModuleFactory(...code: CodeFilter):
|
|
57
|
-
export declare const lazyWebpackSearchHistory: Array<["find" | "findByProps" | "findByCode" | "findStore" | "findComponent" | "findComponentByCode" | "findExportedComponent" | "waitFor" | "waitForComponent" | "waitForStore" | "proxyLazyWebpack" | "LazyComponentWebpack" | "extractAndLoadChunks" | "mapMangledModule", any[]]>;
|
|
61
|
+
export declare function findModuleFactory(...code: CodeFilter): ModuleFactory | null;
|
|
62
|
+
export declare const lazyWebpackSearchHistory: Array<["find" | "findByProps" | "findByCode" | "findCssClasses" | "findStore" | "findComponent" | "findComponentByCode" | "findExportedComponent" | "waitFor" | "waitForComponent" | "waitForStore" | "proxyLazyWebpack" | "LazyComponentWebpack" | "extractAndLoadChunks" | "mapMangledModule", any[]]>;
|
|
58
63
|
/**
|
|
59
64
|
* This is just a wrapper around {@link proxyLazy} to make our reporter test for your webpack finds.
|
|
60
65
|
*
|
|
@@ -121,6 +126,9 @@ export declare function findComponentByCodeLazy<T extends object = any>(...code:
|
|
|
121
126
|
* Finds the first component that is exported by the first prop name, lazily
|
|
122
127
|
*/
|
|
123
128
|
export declare function findExportedComponentLazy<T extends object = any>(...props: PropsFilter): import("../utils/lazyReact").LazyComponentWrapper<import("react").ComponentType<T>>;
|
|
129
|
+
export declare function mapMangledCssClasses<S extends string>(mappedModule: object, classes: S[] | ReadonlyArray<S>): Record<S, string>;
|
|
130
|
+
export declare function findCssClasses<S extends string>(...classes: S[]): Record<S, string>;
|
|
131
|
+
export declare function findCssClassesLazy<S extends string>(...classes: S[]): Record<S, string>;
|
|
124
132
|
/**
|
|
125
133
|
* Finds a mangled module by the provided code "code" (must be unique and can be anywhere in the module)
|
|
126
134
|
* then maps it into an easily usable module via the specified mappers.
|
|
@@ -181,6 +189,6 @@ export declare function search(...code: CodeFilter): Record<number, Function>;
|
|
|
181
189
|
* to view a massive file. extract then returns the extracted module so you can jump to it.
|
|
182
190
|
* As mentioned above, note that this extracted module is not actually used,
|
|
183
191
|
* so putting breakpoints or similar will have no effect.
|
|
184
|
-
* @param
|
|
192
|
+
* @param moduleId The id of the module to extract
|
|
185
193
|
*/
|
|
186
|
-
export declare function extract(
|
|
194
|
+
export declare function extract(moduleId: PropertyKey): ModuleFactory | null;
|
package/components/css.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function addVencordUiStyles(): void;
|