@plexcord/types 1.18.5 → 1.19.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/PlexcordNative.d.ts +6 -2
- package/api/Badges.d.ts +2 -1
- package/api/HeaderBar.d.ts +94 -21
- package/api/PluginManager.d.ts +1 -0
- package/api/Settings.d.ts +1 -1
- package/api/SettingsSync/offline.d.ts +6 -14
- package/api/Styles.d.ts +18 -20
- package/api/UserArea.d.ts +38 -0
- package/api/index.d.ts +5 -0
- package/components/BaseText.d.ts +17 -5
- package/components/Flex.d.ts +2 -1
- package/components/Heart.d.ts +5 -1
- package/components/Icons.d.ts +1 -0
- package/components/Link.d.ts +4 -3
- package/components/Span.d.ts +1 -1
- 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/locales/en.d.ts +248 -68
- package/package.json +1 -1
- package/plugins/_api/badges/index.d.ts +3 -11
- package/plugins/_api/nicknameIcons.d.ts +1 -1
- package/plugins/{questCompleter/index.d.ts → _api/userArea.d.ts} +6 -3
- package/plugins/_core/settings.d.ts +61 -11
- package/plugins/_core/supportHelper.d.ts +10 -0
- package/plugins/allCallTimers/index.d.ts +1 -1
- package/plugins/betterActivities/utils.d.ts +1 -1
- package/plugins/betterInvites/index.d.ts +2 -1
- package/plugins/cakeday/index.d.ts +25 -1
- package/plugins/customRPC/index.d.ts +3 -3
- package/plugins/decor/ui/index.d.ts +1 -1
- package/plugins/fakeNitro/index.d.ts +3 -3
- package/plugins/fixImagesQuality/index.d.ts +24 -0
- package/plugins/followUser/index.d.ts +7 -8
- package/plugins/friendsSince/index.d.ts +1 -0
- package/plugins/friendshipRanks/index.d.ts +1 -0
- package/plugins/fullVcPfp/index.d.ts +0 -10
- package/plugins/gameActivityToggle/index.d.ts +9 -11
- package/plugins/githubRepos/index.d.ts +1 -1
- package/plugins/holyNotes/index.d.ts +6 -8
- package/plugins/instantScreenshare/index.d.ts +37 -2
- package/plugins/instantScreenshare/utils.d.ts +26 -0
- package/plugins/jumpTo/index.d.ts +3 -1
- package/plugins/loginWithQR/ui/index.d.ts +1 -1
- package/plugins/memberCount/OnlineMemberCountStore.d.ts +3 -3
- package/plugins/memberCount/index.d.ts +1 -4
- package/plugins/messageLoggerEnhanced/LoggedMessageManager.d.ts +1 -1
- package/plugins/messageLoggerEnhanced/db.d.ts +2 -0
- package/plugins/messageLoggerEnhanced/index.d.ts +31 -1
- package/plugins/messageLoggerEnhanced/settings.d.ts +24 -0
- package/plugins/musicControls/spotify/SpotifyStore.d.ts +3 -3
- package/plugins/musicControls/spotify/lyrics/components/util.d.ts +1 -1
- package/plugins/musicControls/spotify/lyrics/providers/store.d.ts +3 -3
- package/plugins/musicControls/tidal/lyrics/components/util.d.ts +1 -1
- package/plugins/musicControls/tidal/lyrics/providers/store.d.ts +3 -3
- package/plugins/permissionsViewer/index.d.ts +5 -2
- package/plugins/permissionsViewer/utils.d.ts +1 -1
- package/plugins/petpet/index.d.ts +1 -1
- package/plugins/plexcordToolbox/index.d.ts +7 -9
- package/plugins/questify/index.d.ts +33 -4
- package/plugins/questify/native.d.ts +5 -0
- package/plugins/questify/settings.d.ts +28 -0
- package/plugins/questify/utils/components.d.ts +8 -0
- package/plugins/questify/utils/misc.d.ts +2 -1
- package/plugins/randomVoice/index.d.ts +9 -10
- package/plugins/relationshipNotifier/types.d.ts +0 -6
- package/plugins/reviewDB/utils.d.ts +1 -1
- package/plugins/roleColorEverywhere/index.d.ts +2 -2
- package/plugins/shikiCodeblocks.desktop/api/languages.d.ts +3 -3
- package/plugins/shikiCodeblocks.desktop/utils/misc.d.ts +1 -1
- package/plugins/showHiddenChannels/index.d.ts +1 -1
- package/plugins/sidebarChat/store.d.ts +3 -3
- package/plugins/soundBoardLogger/index.d.ts +6 -9
- package/plugins/soundBoardLogger/utils.d.ts +1 -1
- package/plugins/spotifyActivityToggle/index.d.ts +61 -7
- package/plugins/streamingCodecDisabler/index.d.ts +1 -1
- package/plugins/toastNotifications/types.d.ts +0 -6
- package/plugins/translate/utils.d.ts +1 -1
- package/plugins/usrbg/index.d.ts +8 -0
- package/plugins/voiceChannelLog.dev/index.d.ts +1 -1
- package/plugins/voiceMessages/index.d.ts +1 -1
- package/plugins/wallpaperFree/store.d.ts +3 -3
- package/shared/IpcEvents.d.ts +6 -5
- package/utils/css.d.ts +13 -1
- package/utils/intlHash.d.ts +0 -1
- package/utils/types.d.ts +8 -2
- package/utils/web-metadata.d.ts +3 -1
- package/webpack/common/components.d.ts +3 -39
- package/webpack/common/internal.d.ts +2 -1
- package/webpack/common/stores.d.ts +25 -6
- package/components/css.d.ts +0 -1
- package/plugins/questFocused/index.d.ts +0 -17
package/PlexcordNative.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: {
|
|
@@ -33,10 +34,13 @@ declare const _default: {
|
|
|
33
34
|
addThemeChangeListener(cb: () => void): void;
|
|
34
35
|
openFile: () => Promise<void>;
|
|
35
36
|
openEditor: () => Promise<void>;
|
|
37
|
+
getEditorTheme: () => string;
|
|
36
38
|
};
|
|
37
39
|
native: {
|
|
38
40
|
getVersions: () => Partial<NodeJS.ProcessVersions>;
|
|
39
41
|
openExternal: (url: string) => Promise<void>;
|
|
42
|
+
getRendererCss: () => Promise<string>;
|
|
43
|
+
onRendererCssUpdate: (cb: (newCss: string) => void) => void;
|
|
40
44
|
};
|
|
41
45
|
i18n: {
|
|
42
46
|
updateMainLocale: (locale?: string) => Promise<boolean>;
|
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
|
+
* May call hooks but then you must not use shouldShow
|
|
28
29
|
*/
|
|
29
30
|
getBadges?(userInfo: BadgeUserArgs): ProfileBadge[];
|
|
30
31
|
}
|
package/api/HeaderBar.d.ts
CHANGED
|
@@ -1,41 +1,114 @@
|
|
|
1
|
-
import type { ComponentType, JSX, MouseEventHandler, ReactNode
|
|
2
|
-
export type HeaderBarButtonFactory = () => JSX.Element | null;
|
|
3
|
-
export interface HeaderBarButtonData {
|
|
4
|
-
render: HeaderBarButtonFactory;
|
|
5
|
-
icon: ComponentType<any>;
|
|
6
|
-
priority?: number;
|
|
7
|
-
}
|
|
8
|
-
interface HeaderBarButton {
|
|
9
|
-
render: HeaderBarButtonFactory;
|
|
10
|
-
priority: number;
|
|
11
|
-
}
|
|
12
|
-
export declare const buttons: Map<string, HeaderBarButton>;
|
|
1
|
+
import type { ComponentType, JSX, MouseEventHandler, ReactNode } from "react";
|
|
13
2
|
export interface HeaderBarButtonProps {
|
|
3
|
+
/** The icon component to render inside the button */
|
|
14
4
|
icon: ComponentType<any>;
|
|
5
|
+
/** Tooltip text shown on hover. Pass null to disable tooltip */
|
|
15
6
|
tooltip: ReactNode;
|
|
7
|
+
/** Called when the button is clicked */
|
|
16
8
|
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
9
|
+
/** Called when the button is right-clicked */
|
|
17
10
|
onContextMenu?: MouseEventHandler<HTMLDivElement>;
|
|
11
|
+
/** Additional CSS class names */
|
|
18
12
|
className?: string;
|
|
13
|
+
/** CSS class name for the icon element */
|
|
19
14
|
iconClassName?: string;
|
|
15
|
+
/** Tooltip position relative to the button */
|
|
20
16
|
position?: "top" | "bottom" | "left" | "right";
|
|
17
|
+
/** Whether the button appears in a selected/active state */
|
|
21
18
|
selected?: boolean;
|
|
19
|
+
/** Whether the button is disabled */
|
|
22
20
|
disabled?: boolean;
|
|
21
|
+
/** Whether to show a notification badge */
|
|
23
22
|
showBadge?: boolean;
|
|
23
|
+
/** Position of the notification badge */
|
|
24
24
|
badgePosition?: "top" | "bottom";
|
|
25
|
-
|
|
25
|
+
/** Size of the icon in pixels */
|
|
26
|
+
iconSize?: number;
|
|
27
|
+
/** Ref to the button element */
|
|
28
|
+
ref?: React.RefObject<any>;
|
|
29
|
+
}
|
|
30
|
+
export type HeaderBarButtonFactory = () => JSX.Element | null;
|
|
31
|
+
export interface HeaderBarButtonData {
|
|
32
|
+
/** Function that renders the button component */
|
|
33
|
+
render: HeaderBarButtonFactory;
|
|
34
|
+
/** Icon component used for settings UI display */
|
|
35
|
+
icon: ComponentType<any>;
|
|
36
|
+
/** Higher priority buttons appear further right. Default: 0 */
|
|
37
|
+
priority?: number;
|
|
38
|
+
/** Where to render the button. Default: "headerbar" */
|
|
39
|
+
location?: "headerbar" | "channeltoolbar";
|
|
26
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* Button component for the top header bar (title bar area).
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* <HeaderBarButton
|
|
46
|
+
* icon={MyIcon}
|
|
47
|
+
* tooltip="My Button"
|
|
48
|
+
* onClick={() => console.log("clicked")}
|
|
49
|
+
* />
|
|
50
|
+
*/
|
|
27
51
|
export declare const HeaderBarButton: ComponentType<HeaderBarButtonProps>;
|
|
28
52
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* @
|
|
53
|
+
* Button component for the channel toolbar (below the search bar).
|
|
54
|
+
* Automatically handles selected state styling.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* <ChannelToolbarButton
|
|
58
|
+
* icon={MyIcon}
|
|
59
|
+
* tooltip={isOpen ? null : "My Button"}
|
|
60
|
+
* onClick={() => setOpen(v => !v)}
|
|
61
|
+
* selected={isOpen}
|
|
62
|
+
* />
|
|
63
|
+
*/
|
|
64
|
+
export declare function ChannelToolbarButton(props: HeaderBarButtonProps): JSX.Element;
|
|
65
|
+
/**
|
|
66
|
+
* Adds a button to the header bar (title bar area).
|
|
67
|
+
*
|
|
68
|
+
* @param id - Unique identifier for the button (e.g., "my-plugin-button")
|
|
69
|
+
* @param render - Function that returns the button JSX
|
|
70
|
+
* @param priority - Higher values appear further right. Default: 0
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* addHeaderBarButton("my-button", () => (
|
|
74
|
+
* <HeaderBarButton
|
|
75
|
+
* icon={MyIcon}
|
|
76
|
+
* tooltip="My Button"
|
|
77
|
+
* onClick={handleClick}
|
|
78
|
+
* />
|
|
79
|
+
* ));
|
|
33
80
|
*/
|
|
34
81
|
export declare function addHeaderBarButton(id: string, render: HeaderBarButtonFactory, priority?: number): void;
|
|
35
82
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
83
|
+
* Removes a button from the header bar.
|
|
84
|
+
*
|
|
85
|
+
* @param id - The identifier used when adding the button
|
|
38
86
|
*/
|
|
39
87
|
export declare function removeHeaderBarButton(id: string): void;
|
|
40
|
-
|
|
41
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Adds a button to the channel toolbar (below the search bar, next to pins/members).
|
|
90
|
+
*
|
|
91
|
+
* @param id - Unique identifier for the button (e.g., "my-plugin-toolbar")
|
|
92
|
+
* @param render - Function that returns the button JSX
|
|
93
|
+
* @param priority - Higher values appear further right. Default: 0
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* addChannelToolbarButton("my-toolbar", () => (
|
|
97
|
+
* <ChannelToolbarButton
|
|
98
|
+
* icon={MyIcon}
|
|
99
|
+
* tooltip="My Button"
|
|
100
|
+
* onClick={handleClick}
|
|
101
|
+
* />
|
|
102
|
+
* ));
|
|
103
|
+
*/
|
|
104
|
+
export declare function addChannelToolbarButton(id: string, render: HeaderBarButtonFactory, priority?: number): void;
|
|
105
|
+
/**
|
|
106
|
+
* Removes a button from the channel toolbar.
|
|
107
|
+
*
|
|
108
|
+
* @param id - The identifier used when adding the button
|
|
109
|
+
*/
|
|
110
|
+
export declare function removeChannelToolbarButton(id: string): void;
|
|
111
|
+
/** @internal Injected by HeaderBarAPI patch (do NOT call directly) */
|
|
112
|
+
export declare function _addHeaderBarButtons(): JSX.Element[];
|
|
113
|
+
/** @internal Injected by HeaderBarAPI patch (do NOT call directly) */
|
|
114
|
+
export declare function _addChannelToolbarButtons(toolbar: ReactNode[]): void;
|
package/api/PluginManager.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare function isPluginRequired(name: string): boolean | undefined;
|
|
|
14
14
|
export declare const calculatePluginDependencyMap: () => Record<string, string[]>;
|
|
15
15
|
export declare function isPluginEnabled(p: string): boolean;
|
|
16
16
|
export declare function addPatch(newPatch: Omit<Patch, "plugin">, pluginName: string, pluginPath?: string): void;
|
|
17
|
+
export declare function pluginRequiresRestart(p: Plugin): boolean;
|
|
17
18
|
export declare const startAllPlugins: (target: StartAt) => void;
|
|
18
19
|
export declare function startDependenciesRecursive(p: Plugin): {
|
|
19
20
|
restartNeeded: boolean;
|
package/api/Settings.d.ts
CHANGED
|
@@ -88,7 +88,7 @@ export declare const Settings: Settings;
|
|
|
88
88
|
* @returns Settings
|
|
89
89
|
*/
|
|
90
90
|
export declare function useSettings(paths?: UseSettings<Settings>[]): Settings;
|
|
91
|
-
export declare function
|
|
91
|
+
export declare function migratePluginToSettings(newName: string, oldName: string, ...settingNames: string[]): void;
|
|
92
92
|
export declare function migratePluginSettings(name: string, ...oldNames: string[]): void;
|
|
93
93
|
export declare function migratePluginSetting(pluginName: string, newSetting: string, oldSetting: string): void;
|
|
94
94
|
export declare function migrateSettingFromPlugin(newPlugin: string, newSetting: string, oldPlugin: string, oldSetting: string): void;
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
1
|
+
type BackupType = "all" | "plugins" | "css" | "datastore";
|
|
2
|
+
export declare function importSettings(data: string, type?: BackupType, cloud?: boolean): Promise<void>;
|
|
3
|
+
export declare function exportSettings({ syncDataStore, type, minify }: {
|
|
3
4
|
syncDataStore?: boolean;
|
|
5
|
+
type?: BackupType;
|
|
4
6
|
minify?: boolean;
|
|
5
7
|
}): Promise<string>;
|
|
6
|
-
export declare function
|
|
7
|
-
minify?: boolean;
|
|
8
|
-
}): Promise<string>;
|
|
9
|
-
export declare function exportCSS({ minify }?: {
|
|
10
|
-
minify?: boolean;
|
|
11
|
-
}): Promise<string>;
|
|
12
|
-
export declare function exportDataStores({ minify }?: {
|
|
13
|
-
minify?: boolean;
|
|
14
|
-
}): Promise<string>;
|
|
15
|
-
type BackupType = "settings" | "plugins" | "css" | "datastore";
|
|
16
|
-
export declare function downloadSettingsBackup(type: BackupType, { minify }?: {
|
|
8
|
+
export declare function downloadSettingsBackup(type?: BackupType, { minify }?: {
|
|
17
9
|
minify?: boolean;
|
|
18
10
|
}): Promise<void>;
|
|
19
|
-
export declare function uploadSettingsBackup(showToast?: boolean): Promise<void>;
|
|
11
|
+
export declare function uploadSettingsBackup(type?: BackupType, showToast?: boolean): Promise<void>;
|
|
20
12
|
export {};
|
package/api/Styles.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/** @deprecated Import this from `@utils/css` instead */
|
|
2
|
+
export declare const classNameFactory: (prefix?: string) => (...args: import("../utils/css").ClassNameFactoryArg[]
|
|
3
|
+
/** @deprecated Import this from `@utils/css` instead */
|
|
4
|
+
) => string;
|
|
1
5
|
export interface Style {
|
|
2
6
|
name: string;
|
|
3
7
|
source: string;
|
|
@@ -5,6 +9,20 @@ export interface Style {
|
|
|
5
9
|
dom: HTMLStyleElement | null;
|
|
6
10
|
}
|
|
7
11
|
export declare const styleMap: Map<string, Style>;
|
|
12
|
+
export declare const plexcordRootNode: HTMLElement;
|
|
13
|
+
/**
|
|
14
|
+
* Houses all Plexcord core styles. This includes all imported css files
|
|
15
|
+
*/
|
|
16
|
+
export declare const coreStyleRootNode: HTMLElement;
|
|
17
|
+
/**
|
|
18
|
+
* Houses all plugin specific managed styles
|
|
19
|
+
*/
|
|
20
|
+
export declare const managedStyleRootNode: HTMLElement;
|
|
21
|
+
/**
|
|
22
|
+
* Houses the user's themes and quick css
|
|
23
|
+
*/
|
|
24
|
+
export declare const userStyleRootNode: HTMLElement;
|
|
25
|
+
export declare function initStyles(): void;
|
|
8
26
|
export declare function requireStyle(name: string): Style;
|
|
9
27
|
/**
|
|
10
28
|
* A style's name can be obtained from importing a stylesheet with `?managed` at the end of the import
|
|
@@ -69,23 +87,3 @@ export declare const setStyleClassNames: (name: string, classNames: Record<strin
|
|
|
69
87
|
* @see {@link setStyleClassNames} for more info on style classnames
|
|
70
88
|
*/
|
|
71
89
|
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 {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ComponentType, MouseEventHandler, ReactNode } from "react";
|
|
2
|
+
export interface UserAreaButtonProps {
|
|
3
|
+
icon: ReactNode;
|
|
4
|
+
tooltipText?: ReactNode;
|
|
5
|
+
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
6
|
+
onContextMenu?: MouseEventHandler<HTMLDivElement>;
|
|
7
|
+
className?: string;
|
|
8
|
+
role?: string;
|
|
9
|
+
"aria-label"?: string;
|
|
10
|
+
"aria-checked"?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
plated?: boolean;
|
|
13
|
+
redGlow?: boolean;
|
|
14
|
+
orangeGlow?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface UserAreaRenderProps {
|
|
17
|
+
nameplate?: any;
|
|
18
|
+
iconForeground?: string;
|
|
19
|
+
hideTooltips?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export type UserAreaButtonFactory = (props: UserAreaRenderProps) => ReactNode;
|
|
22
|
+
export interface UserAreaButtonData {
|
|
23
|
+
render: UserAreaButtonFactory;
|
|
24
|
+
icon: ComponentType<{
|
|
25
|
+
className?: string;
|
|
26
|
+
}>;
|
|
27
|
+
priority?: number;
|
|
28
|
+
}
|
|
29
|
+
interface ButtonEntry {
|
|
30
|
+
render: UserAreaButtonFactory;
|
|
31
|
+
priority: number;
|
|
32
|
+
}
|
|
33
|
+
export declare const UserAreaButton: ComponentType<UserAreaButtonProps>;
|
|
34
|
+
export declare const buttons: Map<string, ButtonEntry>;
|
|
35
|
+
export declare function addUserAreaButton(id: string, render: UserAreaButtonFactory, priority?: number): void;
|
|
36
|
+
export declare function removeUserAreaButton(id: string): void;
|
|
37
|
+
export declare function _renderButtons(props: UserAreaRenderProps): import("react").JSX.Element[];
|
|
38
|
+
export {};
|
package/api/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ import * as $ServerList from "./ServerList";
|
|
|
20
20
|
import * as $Settings from "./Settings";
|
|
21
21
|
import * as $Styles from "./Styles";
|
|
22
22
|
import * as $Themes from "./Themes";
|
|
23
|
+
import * as $UserArea from "./UserArea";
|
|
23
24
|
import * as $UserSettings from "./UserSettings";
|
|
24
25
|
/**
|
|
25
26
|
* An API allowing you to listen to Message Clicks or run your own logic
|
|
@@ -122,6 +123,10 @@ export declare const NicknameIcons: typeof $NicknameIcons;
|
|
|
122
123
|
* An API allowing you to play internal Discord audio files or external audio URLs/URIs.
|
|
123
124
|
*/
|
|
124
125
|
export declare const AudioPlayer: typeof $AudioPlayer;
|
|
126
|
+
/**
|
|
127
|
+
* An API allowing you to add buttons to the user area panel.
|
|
128
|
+
*/
|
|
129
|
+
export declare const UserArea: typeof $UserArea;
|
|
125
130
|
/**
|
|
126
131
|
* Don't use this
|
|
127
132
|
*/
|
package/components/BaseText.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./BaseText.css";
|
|
2
2
|
import type { Text as DiscordText } from "@plexcord/discord-types";
|
|
3
3
|
import type { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
4
|
-
declare const
|
|
4
|
+
export declare const TextSizes: {
|
|
5
5
|
readonly xxs: "0.625rem";
|
|
6
6
|
readonly xs: "0.75rem";
|
|
7
7
|
readonly sm: "0.875rem";
|
|
@@ -10,7 +10,7 @@ declare const Sizes: {
|
|
|
10
10
|
readonly xl: "1.5rem";
|
|
11
11
|
readonly xxl: "2rem";
|
|
12
12
|
};
|
|
13
|
-
declare const
|
|
13
|
+
export declare const TextWeights: {
|
|
14
14
|
readonly thin: "100";
|
|
15
15
|
readonly extralight: "200";
|
|
16
16
|
readonly light: "300";
|
|
@@ -20,15 +20,27 @@ declare const Weights: {
|
|
|
20
20
|
readonly bold: "700";
|
|
21
21
|
readonly extrabold: "800";
|
|
22
22
|
};
|
|
23
|
+
export declare const TextColors: {
|
|
24
|
+
readonly "text-default": "var(--text-default)";
|
|
25
|
+
readonly "text-muted": "var(--text-muted)";
|
|
26
|
+
readonly "text-link": "var(--text-link)";
|
|
27
|
+
readonly "text-danger": "var(--redesign-button-danger-background)";
|
|
28
|
+
readonly "text-brand": "var(--text-brand)";
|
|
29
|
+
readonly "text-strong": "var(--text-strong)";
|
|
30
|
+
readonly "text-subtle": "var(--text-subtle)";
|
|
31
|
+
readonly "control-text-critical": "var(--control-text-critical-secondary-default)";
|
|
32
|
+
readonly "control-text-primary": "var(--control-primary-text-default)";
|
|
33
|
+
};
|
|
23
34
|
export declare function generateTextCss(): string;
|
|
24
|
-
export type TextSize = keyof typeof
|
|
25
|
-
export type TextWeight = keyof typeof
|
|
35
|
+
export type TextSize = keyof typeof TextSizes;
|
|
36
|
+
export type TextWeight = keyof typeof TextWeights;
|
|
37
|
+
export type TextColor = keyof typeof TextColors;
|
|
26
38
|
export type TextTag = "div" | "span" | "p" | `h${1 | 2 | 3 | 4 | 5 | 6}`;
|
|
27
39
|
export type BaseTextProps<Tag extends TextTag = "div"> = ComponentPropsWithoutRef<Tag> & {
|
|
28
40
|
size?: TextSize;
|
|
29
41
|
weight?: TextWeight;
|
|
42
|
+
color?: TextColor;
|
|
30
43
|
tag?: Tag;
|
|
31
44
|
};
|
|
32
45
|
export declare function BaseText<T extends TextTag = "div">(props: BaseTextProps<T>): ReactNode;
|
|
33
46
|
export declare const TextCompat: DiscordText;
|
|
34
|
-
export {};
|
package/components/Flex.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export interface FlexProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
4
4
|
gap?: CSSProperties["gap"];
|
|
5
5
|
justifyContent?: CSSProperties["justifyContent"];
|
|
6
6
|
alignItems?: CSSProperties["alignItems"];
|
|
7
|
+
flexWrap?: CSSProperties["flexWrap"];
|
|
7
8
|
}
|
|
8
|
-
export declare function Flex({ flexDirection, gap, justifyContent, alignItems, children, style, ...restProps }: FlexProps): import("react").JSX.Element;
|
|
9
|
+
export declare function Flex({ flexDirection, gap, justifyContent, alignItems, flexWrap, children, style, ...restProps }: FlexProps): import("react").JSX.Element;
|
package/components/Heart.d.ts
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import { SVGAttributes } from "react";
|
|
2
|
-
|
|
2
|
+
interface HeartProps extends SVGAttributes<SVGSVGElement> {
|
|
3
|
+
fill?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function Heart({ fill, ...props }: HeartProps): import("react").JSX.Element;
|
|
6
|
+
export {};
|
package/components/Icons.d.ts
CHANGED
|
@@ -49,6 +49,7 @@ export declare function PluginsIcon(props: IconProps): import("react").JSX.Eleme
|
|
|
49
49
|
export declare function CloudIcon(props: IconProps): import("react").JSX.Element;
|
|
50
50
|
export declare function BackupRestoreIcon(props: IconProps): import("react").JSX.Element;
|
|
51
51
|
export declare function UpdaterIcon(props: IconProps): import("react").JSX.Element;
|
|
52
|
+
export declare function ChangelogIcon(props: IconProps): import("react").JSX.Element;
|
|
52
53
|
export declare function PatchHelperIcon(props: IconProps): import("react").JSX.Element;
|
|
53
54
|
export declare function PlextronSettingsIcon(props: IconProps): import("react").JSX.Element;
|
|
54
55
|
export declare function EyeIcon(props: IconProps): import("react").JSX.Element;
|
package/components/Link.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import "./Link.css";
|
|
2
|
+
import type { AnchorHTMLAttributes, PropsWithChildren } from "react";
|
|
3
|
+
export interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
2
4
|
disabled?: boolean;
|
|
3
5
|
}
|
|
4
|
-
export declare function Link(
|
|
5
|
-
export {};
|
|
6
|
+
export declare function Link({ disabled, className, children, ...restProps }: PropsWithChildren<LinkProps>): import("react").JSX.Element;
|
package/components/Span.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type BaseTextProps } from "./BaseText";
|
|
2
2
|
export type SpanProps = BaseTextProps<"span">;
|
|
3
|
-
export declare function Span({ children, ...restProps }: SpanProps): import("react").JSX.Element;
|
|
3
|
+
export declare function Span({ children, size, weight, ...restProps }: SpanProps): import("react").JSX.Element;
|
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
import "./styles.css";
|
|
2
2
|
import { Logger } from "../../../../utils/Logger";
|
|
3
3
|
import { JSX } from "react";
|
|
4
|
-
export declare const cl: (...args: (
|
|
4
|
+
export declare const cl: (...args: import("../../../../utils/css").ClassNameFactoryArg[]) => string;
|
|
5
5
|
export declare const logger: Logger;
|
|
6
6
|
export declare function showErrorToast(message: string): void;
|
|
7
7
|
export declare function getExcludedReasons(): Record<"web" | "discordDesktop" | "plextron" | "desktop" | "dev", string>;
|