@plexcord/types 1.17.9 → 1.18.2

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.
Files changed (127) hide show
  1. package/Plexcord.d.ts +2 -4
  2. package/api/Badges.d.ts +1 -1
  3. package/api/ChatButtons.d.ts +18 -1
  4. package/api/MessagePopover.d.ts +15 -2
  5. package/{plugins/index.d.ts → api/PluginManager.d.ts} +3 -3
  6. package/api/Settings.d.ts +14 -1
  7. package/{utils/cloud.d.ts → api/SettingsSync/cloudSetup.d.ts} +2 -2
  8. package/api/SettingsSync/cloudSync.d.ts +4 -0
  9. package/{utils/settingsSync.d.ts → api/SettingsSync/offline.d.ts} +0 -3
  10. package/api/Styles.d.ts +4 -10
  11. package/api/Themes.d.ts +2 -0
  12. package/api/i18n.d.ts +1 -1
  13. package/api/index.d.ts +6 -0
  14. package/components/Button.d.ts +5 -0
  15. package/components/Card.d.ts +8 -0
  16. package/components/ErrorBoundary.d.ts +3 -1
  17. package/components/Flex.d.ts +8 -5
  18. package/components/Icons.d.ts +5 -0
  19. package/components/index.d.ts +2 -0
  20. package/components/settings/DonateButton.d.ts +4 -2
  21. package/components/settings/tabs/BaseTab.d.ts +1 -0
  22. package/components/settings/tabs/changelog/changelogManager.d.ts +0 -1
  23. package/components/settings/tabs/index.d.ts +1 -1
  24. package/components/settings/tabs/plugins/UIElements.d.ts +2 -0
  25. package/components/settings/tabs/updater/index.d.ts +0 -1
  26. package/package.json +1 -1
  27. package/plugins/_api/badges/index.d.ts +4 -6
  28. package/plugins/bannersEverywhere/index.d.ts +2 -2
  29. package/plugins/betterSettings/index.d.ts +3 -2
  30. package/plugins/channelTabs/index.d.ts +14 -0
  31. package/plugins/channelTabs/util/constants.d.ts +14 -0
  32. package/plugins/clientSideBlock/index.d.ts +16 -1
  33. package/plugins/customTimestamps/index.d.ts +1 -1
  34. package/plugins/decodeBase64/index.d.ts +11 -9
  35. package/plugins/findReply/index.d.ts +13 -1
  36. package/plugins/fixSpotifyEmbeds.desktop/index.d.ts +10 -1
  37. package/plugins/gameActivityToggle/index.d.ts +31 -0
  38. package/plugins/githubRepos/components/GitHubReposComponent.d.ts +0 -1
  39. package/plugins/githubRepos/index.d.ts +1 -0
  40. package/plugins/hideChatButtons/index.d.ts +4 -4
  41. package/plugins/hideMedia/index.d.ts +11 -9
  42. package/plugins/holyNotes/components/icons/NoteButton.d.ts +4 -4
  43. package/plugins/holyNotes/index.d.ts +11 -1
  44. package/plugins/holyNotes/utils.d.ts +2 -1
  45. package/plugins/iRememberYou/index.d.ts +1 -1
  46. package/plugins/invisibleChat.desktop/index.d.ts +9 -10
  47. package/plugins/meow/index.d.ts +6 -1
  48. package/plugins/messageFetchTimer/index.d.ts +6 -2
  49. package/plugins/messageLoggerEnhanced/index.d.ts +4 -4
  50. package/plugins/messageLoggerEnhanced/settings.d.ts +4 -4
  51. package/plugins/newPluginsManager/NewPluginsModal.d.ts +10 -0
  52. package/plugins/newPluginsManager/index.d.ts +20 -0
  53. package/plugins/newPluginsManager/knownSettings.d.ts +10 -0
  54. package/plugins/platformSpoofer/index.d.ts +1 -0
  55. package/plugins/plexcordToolbox/index.d.ts +32 -1
  56. package/plugins/plexcordToolbox/menu.d.ts +4 -0
  57. package/plugins/previewMessage/index.d.ts +5 -2
  58. package/plugins/questify/utils/misc.d.ts +8 -3
  59. package/plugins/quickMention/index.d.ts +15 -8
  60. package/plugins/quoter/index.d.ts +65 -11
  61. package/plugins/quoter/types.d.ts +52 -0
  62. package/plugins/quoter/utils.d.ts +9 -2
  63. package/plugins/randomVoice/index.d.ts +12 -12
  64. package/plugins/relationshipNotifier/index.d.ts +25 -12
  65. package/plugins/relationshipNotifier/settings.d.ts +24 -12
  66. package/plugins/remix/index.d.ts +1 -0
  67. package/plugins/repeatMessages/index.d.ts +29 -0
  68. package/plugins/replaceGoogleSearch/index.d.ts +8 -4
  69. package/plugins/replyPingControl/index.d.ts +17 -8
  70. package/plugins/replyTimestamp/index.d.ts +1 -0
  71. package/plugins/revealAllSpoilers/index.d.ts +1 -0
  72. package/plugins/reverseImageSearch/index.d.ts +1 -0
  73. package/plugins/reviewDB/index.d.ts +21 -8
  74. package/plugins/reviewDB/settings.d.ts +20 -8
  75. package/plugins/roleColorEverywhere/index.d.ts +32 -16
  76. package/plugins/searchFix/index.d.ts +1 -0
  77. package/plugins/secretRingTone/index.d.ts +5 -2
  78. package/plugins/seeSummaries/index.d.ts +5 -2
  79. package/plugins/selfForward/index.d.ts +1 -0
  80. package/plugins/sendTimestamps/index.d.ts +10 -4
  81. package/plugins/serverInfo/index.d.ts +17 -12
  82. package/plugins/serverListIndicators/index.d.ts +25 -16
  83. package/plugins/serverSearch/index.d.ts +1 -0
  84. package/plugins/shikiCodeblocks.desktop/index.d.ts +47 -31
  85. package/plugins/shikiCodeblocks.desktop/settings.d.ts +46 -31
  86. package/plugins/showAllMessageButtons/index.d.ts +9 -4
  87. package/plugins/showBadgesInChat/index.d.ts +45 -26
  88. package/plugins/showBadgesInChat/settings.d.ts +44 -26
  89. package/plugins/showConnections/index.d.ts +11 -6
  90. package/plugins/showHiddenChannels/index.d.ts +33 -20
  91. package/plugins/showHiddenThings/index.d.ts +13 -6
  92. package/plugins/signature/index.d.ts +9 -22
  93. package/plugins/silentMessageToggle/index.d.ts +5 -2
  94. package/plugins/silentTyping/index.d.ts +5 -2
  95. package/plugins/soundBoardLogger/components/Icons.d.ts +2 -5
  96. package/plugins/soundBoardLogger/index.d.ts +4 -0
  97. package/plugins/translate/TranslateIcon.d.ts +2 -5
  98. package/plugins/translate/index.d.ts +15 -9
  99. package/plugins/unitConverter/ConverterAccessory.d.ts +2 -5
  100. package/plugins/unitConverter/index.d.ts +12 -1
  101. package/plugins/viewRaw/index.d.ts +13 -9
  102. package/plugins/voiceButtons/index.d.ts +138 -44
  103. package/plugins/voiceButtons/settings.d.ts +138 -44
  104. package/plugins/voiceMessages/{DesktopRecorder.d.ts → components/DesktopRecorder.d.ts} +1 -1
  105. package/plugins/voiceMessages/{WebRecorder.d.ts → components/WebRecorder.d.ts} +1 -1
  106. package/plugins/voiceMessages/index.d.ts +30 -6
  107. package/shared/SettingsStore.d.ts +17 -3
  108. package/utils/apng.d.ts +46 -0
  109. package/utils/constants.d.ts +13 -0
  110. package/utils/dependencies.d.ts +0 -37
  111. package/utils/discord.d.ts +3 -2
  112. package/utils/index.d.ts +1 -0
  113. package/utils/misc.d.ts +0 -2
  114. package/utils/react.d.ts +1 -1
  115. package/utils/text.d.ts +1 -0
  116. package/utils/types.d.ts +30 -6
  117. package/webpack/common/components.d.ts +6 -2
  118. package/webpack/common/stores.d.ts +1 -1
  119. package/webpack/common/utils.d.ts +2 -0
  120. package/webpack/webpack.d.ts +1 -1
  121. package/plugins/betterSettings/PluginsSubmenu.d.ts +0 -1
  122. package/plugins/quoter/components.d.ts +0 -1
  123. package/plugins/remixMe/index.d.ts +0 -11
  124. package/plugins/voiceMessages/settings.d.ts +0 -24
  125. package/plugins/voiceMessages/utils.d.ts +0 -1
  126. package/utils/quickCss.d.ts +0 -1
  127. /package/plugins/voiceMessages/{VoicePreview.d.ts → components/VoicePreview.d.ts} +0 -0
package/Plexcord.d.ts CHANGED
@@ -18,14 +18,12 @@
18
18
  */
19
19
  import "~plugins";
20
20
  export * as Api from "./api";
21
+ export * as Plugins from "./api/PluginManager";
22
+ export * as QuickCss from "./api/Themes";
21
23
  export * as Components from "./components";
22
- export * as Plugins from "./plugins";
23
24
  export * as Util from "./utils";
24
- export * as QuickCss from "./utils/quickCss";
25
25
  export * as Updater from "./utils/updater";
26
26
  export * as Webpack from "./webpack";
27
27
  export * as WebpackPatcher from "./webpack/patchWebpack";
28
28
  export { PlainSettings, Settings };
29
- import "./utils/quickCss";
30
- import "./webpack/patchWebpack";
31
29
  import { PlainSettings, Settings } from "./api/Settings";
package/api/Badges.d.ts CHANGED
@@ -9,7 +9,7 @@ export interface ProfileBadge {
9
9
  /** Custom component for the badge (tooltip not included) */
10
10
  component?: ComponentType<ProfileBadge & BadgeUserArgs>;
11
11
  /** The custom image to use */
12
- image?: string;
12
+ iconSrc?: string;
13
13
  link?: string;
14
14
  /** Action to perform when you click the badge */
15
15
  onClick?(event: React.MouseEvent, props: ProfileBadge & BadgeUserArgs): void;
@@ -1,5 +1,6 @@
1
1
  import "./ChatButton.css";
2
2
  import { Channel } from "@plexcord/discord-types";
3
+ import { IconComponent } from "../utils/types";
3
4
  import { HTMLProps, JSX, MouseEventHandler, ReactNode } from "react";
4
5
  export interface ChatBarProps {
5
6
  channel: Channel;
@@ -61,8 +62,24 @@ export interface ChatBarProps {
61
62
  export type ChatBarButtonFactory = (props: ChatBarProps & {
62
63
  isMainChat: boolean;
63
64
  }) => JSX.Element | null;
65
+ export type ChatBarButtonData = {
66
+ render: ChatBarButtonFactory;
67
+ /**
68
+ * This icon is used only for Settings UI. Your render function must still render an icon,
69
+ * and it can be different from this one.
70
+ */
71
+ icon: IconComponent;
72
+ };
73
+ /**
74
+ * Don't use this directly, use {@link addChatBarButton} and {@link removeChatBarButton} instead.
75
+ */
76
+ export declare const ChatBarButtonMap: Map<string, ChatBarButtonData>;
64
77
  export declare function _injectButtons(buttons: ReactNode[], props: ChatBarProps): ReactNode[] | undefined;
65
- export declare const addChatBarButton: (id: string, button: ChatBarButtonFactory) => Map<string, ChatBarButtonFactory>;
78
+ /**
79
+ * The icon argument is used only for Settings UI. Your render function must still render an icon,
80
+ * and it can be different from this one.
81
+ */
82
+ export declare const addChatBarButton: (id: string, render: ChatBarButtonFactory, icon: IconComponent) => Map<string, ChatBarButtonData>;
66
83
  export declare const removeChatBarButton: (id: string) => boolean;
67
84
  export interface ChatBarButtonProps {
68
85
  children: ReactNode;
@@ -1,4 +1,5 @@
1
1
  import { Channel, Message } from "@plexcord/discord-types";
2
+ import { IconComponent } from "../utils/types";
2
3
  import type { ComponentType, MouseEventHandler } from "react";
3
4
  export interface MessagePopoverButtonItem {
4
5
  key?: string;
@@ -10,7 +11,19 @@ export interface MessagePopoverButtonItem {
10
11
  onContextMenu?: MouseEventHandler<HTMLButtonElement>;
11
12
  }
12
13
  export type MessagePopoverButtonFactory = (message: Message) => MessagePopoverButtonItem | null;
13
- export declare const buttons: Map<string, MessagePopoverButtonFactory>;
14
- export declare function addMessagePopoverButton(identifier: string, item: MessagePopoverButtonFactory): void;
14
+ export type MessagePopoverButtonData = {
15
+ render: MessagePopoverButtonFactory;
16
+ /**
17
+ * This icon is used only for Settings UI. Your render function must still return an icon,
18
+ * and it can be different from this one.
19
+ */
20
+ icon: IconComponent;
21
+ };
22
+ export declare const MessagePopoverButtonMap: Map<string, MessagePopoverButtonData>;
23
+ /**
24
+ * The icon argument is used only for Settings UI. Your render function must still return an icon,
25
+ * and it can be different from this one.
26
+ */
27
+ export declare function addMessagePopoverButton(identifier: string, render: MessagePopoverButtonFactory, icon: IconComponent): void;
15
28
  export declare function removeMessagePopoverButton(identifier: string): void;
16
29
  export declare function _buildPopoverElements(Component: React.ComponentType<MessagePopoverButtonItem>, message: Message): import("react").JSX.Element;
@@ -1,10 +1,9 @@
1
1
  import { Logger } from "../utils/Logger";
2
+ export { Plugins as plugins };
2
3
  import { Patch, Plugin, StartAt } from "../utils/types";
3
4
  import { FluxDispatcher } from "../webpack/common";
4
- import { patches } from "../webpack/patchWebpack";
5
+ import Plugins from "~plugins";
5
6
  export declare const PMLogger: Logger;
6
- export declare const plugins: Record<string, Plugin>;
7
- export { patches };
8
7
  /**
9
8
  * Whether a plugin is required (or dependency of another enabled plugin)
10
9
  */
@@ -25,3 +24,4 @@ export declare function unsubscribePluginFluxEvents(p: Plugin, fluxDispatcher: t
25
24
  export declare function subscribeAllPluginsFluxEvents(fluxDispatcher: typeof FluxDispatcher): void;
26
25
  export declare const startPlugin: (p: Plugin) => boolean;
27
26
  export declare const stopPlugin: (p: Plugin) => boolean;
27
+ export declare const initPluginManager: () => void;
package/api/Settings.d.ts CHANGED
@@ -1,5 +1,14 @@
1
1
  import { SettingsStore as SettingsStoreClass } from "../shared/SettingsStore";
2
2
  import { DefinedSettings, SettingsChecks, SettingsDefinition } from "../utils/types";
3
+ export interface SettingsPluginUiElement {
4
+ enabled: boolean;
5
+ /** not implemented for now */
6
+ order?: number;
7
+ }
8
+ export type SettingsPluginUiElements = {
9
+ /** id will be whatever id the element was registered with. Usually, but not always, the plugin name */
10
+ [id: string]: SettingsPluginUiElement;
11
+ };
3
12
  export interface Settings {
4
13
  autoUpdate: boolean;
5
14
  autoUpdateNotification: boolean;
@@ -26,6 +35,10 @@ export interface Settings {
26
35
  [setting: string]: any;
27
36
  };
28
37
  };
38
+ uiElements: {
39
+ messagePopoverButtons: SettingsPluginUiElements;
40
+ chatBarButtons: SettingsPluginUiElements;
41
+ };
29
42
  notifications: {
30
43
  timeout: number;
31
44
  position: "top-right" | "bottom-right";
@@ -77,6 +90,6 @@ export declare function migrateSettingFromPlugin(newPlugin: string, newSetting:
77
90
  export declare function definePluginSettings<Def extends SettingsDefinition, Checks extends SettingsChecks<Def>, PrivateSettings extends object = {}>(def: Def, checks?: Checks): DefinedSettings<Def, Checks, PrivateSettings>;
78
91
  type UseSettings<T extends object> = ResolveUseSettings<T>[keyof T];
79
92
  type ResolveUseSettings<T extends object> = {
80
- [Key in keyof T]: Key extends string ? T[Key] extends Record<string, unknown> ? UseSettings<T[Key]> extends string ? `${Key}.${UseSettings<T[Key]>}` : never : Key : never;
93
+ [Key in keyof T]: Key extends string ? T[Key] extends Record<string, unknown> ? `${Key}.*` | (ResolveUseSettings<T[Key]> extends Record<string, string> ? `${Key}.${ResolveUseSettings<T[Key]>[keyof T[Key]]}` : never) : Key : never;
81
94
  };
82
95
  export {};
@@ -1,5 +1,5 @@
1
- import { Logger } from "./Logger";
2
- export declare const cloudLogger: Logger;
1
+ import { Logger } from "../../utils/Logger";
2
+ export declare const logger: Logger;
3
3
  export declare const getCloudUrl: () => URL;
4
4
  export declare function checkCloudUrlCsp(): Promise<boolean>;
5
5
  export declare function getAuthorization(): Promise<string>;
@@ -0,0 +1,4 @@
1
+ export declare function putCloudSettings(manual?: boolean): Promise<void>;
2
+ export declare function getCloudSettings(shouldNotify?: boolean, force?: boolean): Promise<boolean | undefined>;
3
+ export declare function deleteCloudSettings(): Promise<void>;
4
+ export declare function eraseAllCloudData(): Promise<void>;
@@ -16,7 +16,4 @@ export declare function downloadSettingsBackup(type: BackupType, { minify }?: {
16
16
  minify?: boolean;
17
17
  }): Promise<void>;
18
18
  export declare function uploadSettingsBackup(showToast?: boolean): Promise<void>;
19
- export declare function putCloudSettings(manual?: boolean): Promise<void>;
20
- export declare function getCloudSettings(shouldNotify?: boolean, force?: boolean): Promise<boolean | undefined>;
21
- export declare function deleteCloudSettings(): Promise<void>;
22
19
  export {};
package/api/Styles.d.ts CHANGED
@@ -1,17 +1,11 @@
1
- type MapValue<T extends Map<any, any>> = T extends Map<any, infer V> ? V : never;
2
- export type Style = MapValue<typeof PlexcordStyles>;
3
- export declare const styleMap: Map<string, {
1
+ export interface Style {
4
2
  name: string;
5
3
  source: string;
6
4
  classNames: Record<string, string>;
7
5
  dom: HTMLStyleElement | null;
8
- }>;
9
- export declare function requireStyle(name: string): {
10
- name: string;
11
- source: string;
12
- classNames: Record<string, string>;
13
- dom: HTMLStyleElement | null;
14
- };
6
+ }
7
+ export declare const styleMap: Map<string, Style>;
8
+ export declare function requireStyle(name: string): Style;
15
9
  /**
16
10
  * A style's name can be obtained from importing a stylesheet with `?managed` at the end of the import
17
11
  * @param name The name of the style
@@ -0,0 +1,2 @@
1
+ import { ThemeStore } from "@plexcord/discord-types";
2
+ export declare function initQuickCssThemeStore(themeStore: ThemeStore): void;
package/api/i18n.d.ts CHANGED
@@ -62,6 +62,6 @@ export declare const getCurrentLocale: () => string;
62
62
  export declare function useGlobalLocale(): string;
63
63
  export declare function useForceUpdateOnLocaleChange(): void;
64
64
  export declare function withI18n<P extends object>(Component: React.ComponentType<P>): {
65
- (props: P): import("react").ReactElement<P, string | import("react").JSXElementConstructor<any>>;
65
+ (props: P): any;
66
66
  displayName: string;
67
67
  };
package/api/index.d.ts CHANGED
@@ -14,9 +14,11 @@ import * as $MessageUpdater from "./MessageUpdater";
14
14
  import * as $NicknameIcons from "./NicknameIcons";
15
15
  import * as $Notices from "./Notices";
16
16
  import * as $Notifications from "./Notifications";
17
+ export * as PluginManager from "./PluginManager";
17
18
  import * as $ServerList from "./ServerList";
18
19
  import * as $Settings from "./Settings";
19
20
  import * as $Styles from "./Styles";
21
+ import * as $Themes from "./Themes";
20
22
  import * as $UserSettings from "./UserSettings";
21
23
  /**
22
24
  * An API allowing you to listen to Message Clicks or run your own logic
@@ -115,6 +117,10 @@ export declare const NicknameIcons: typeof $NicknameIcons;
115
117
  * An API allowing you to play internal Discord audio files or external audio URLs/URIs.
116
118
  */
117
119
  export declare const AudioPlayer: typeof $AudioPlayer;
120
+ /**
121
+ * Don't use this
122
+ */
123
+ export declare const Themes: typeof $Themes;
118
124
  /**
119
125
  * LocaleLoader for managing plugin translations
120
126
  */
@@ -7,7 +7,12 @@ export type ButtonProps = ComponentPropsWithRef<"button"> & {
7
7
  variant?: ButtonVariant;
8
8
  size?: ButtonSize;
9
9
  };
10
+ export type LinkButtonProps = ComponentPropsWithRef<"a"> & {
11
+ size?: ButtonSize;
12
+ variant?: ButtonVariant;
13
+ };
10
14
  export declare function Button({ variant, size, children, className, ...restProps }: ButtonProps): import("react").JSX.Element;
15
+ export declare function LinkButton({ variant, size, className, children, ...restProps }: LinkButtonProps): import("react").JSX.Element;
11
16
  export type TextButtonVariant = "primary" | "secondary" | "danger" | "link";
12
17
  export type TextButtonProps = ComponentPropsWithRef<"button"> & {
13
18
  variant?: TextButtonVariant;
@@ -0,0 +1,8 @@
1
+ import "./Card.css";
2
+ import { ComponentPropsWithRef } from "react";
3
+ export interface CardProps extends ComponentPropsWithRef<"div"> {
4
+ variant?: "normal" | "warning" | "danger";
5
+ /** Add a default padding of 1em to the card. This is implied if no className prop is passed */
6
+ defaultPadding?: boolean;
7
+ }
8
+ export declare function Card({ variant, defaultPadding, children, className, ...restProps }: CardProps): import("react").JSX.Element;
@@ -21,6 +21,8 @@ interface Props<T = any> {
21
21
  wrappedProps?: T;
22
22
  }
23
23
  declare const ErrorBoundary: LazyComponentWrapper<React.ComponentType<React.PropsWithChildren<Props>> & {
24
- wrap<T extends object = any>(Component: React.ComponentType<T>, errorBoundaryProps?: Omit<Props<T>, "wrappedProps">): React.FunctionComponent<T>;
24
+ wrap<T extends object = any>(Component: React.ComponentType<T>, errorBoundaryProps?: Omit<Props<T>, "wrappedProps"> & {
25
+ displayName?: string;
26
+ }): React.FunctionComponent<T>;
25
27
  }>;
26
28
  export default ErrorBoundary;
@@ -1,5 +1,8 @@
1
- export declare function Flex(props: React.PropsWithChildren<{
2
- flexDirection?: React.CSSProperties["flexDirection"];
3
- style?: React.CSSProperties;
4
- className?: string;
5
- } & React.HTMLProps<HTMLDivElement>>): import("react").JSX.Element;
1
+ import type { CSSProperties, HTMLAttributes } from "react";
2
+ export interface FlexProps extends HTMLAttributes<HTMLDivElement> {
3
+ flexDirection?: CSSProperties["flexDirection"];
4
+ gap?: CSSProperties["gap"];
5
+ justifyContent?: CSSProperties["justifyContent"];
6
+ alignItems?: CSSProperties["alignItems"];
7
+ }
8
+ export declare function Flex({ flexDirection, gap, justifyContent, alignItems, children, style, ...restProps }: FlexProps): import("react").JSX.Element;
@@ -37,6 +37,11 @@ export declare function RestartIcon(props: IconProps): import("react").JSX.Eleme
37
37
  export declare function IDIcon(props: IconProps): import("react").JSX.Element;
38
38
  export declare function PaintbrushIcon(props: IconProps): import("react").JSX.Element;
39
39
  export declare function PencilIcon(props: IconProps): import("react").JSX.Element;
40
+ export declare function QuoteIcon(): import("react").JSX.Element;
40
41
  export declare function GithubIcon(props: IconProps): import("react").JSX.Element;
41
42
  export declare function WebsiteIcon(props: IconProps): import("react").JSX.Element;
43
+ /**
44
+ * A question mark inside a square, used as a placeholder icon when no other icon is available
45
+ */
46
+ export declare function PlaceholderIcon(props: IconProps): import("react").JSX.Element;
42
47
  export {};
@@ -1,4 +1,6 @@
1
1
  export * from "./BaseText";
2
+ export * from "./Button";
3
+ export * from "./Card";
2
4
  export * from "./CheckedTextInput";
3
5
  export * from "./CodeBlock";
4
6
  export * from "./Divider";
@@ -1,2 +1,4 @@
1
- import { ButtonProps } from "@plexcord/discord-types";
2
- export default function DonateButton({ look, color, ...props }: Partial<ButtonProps>): import("react").JSX.Element;
1
+ export default function DonateButton({ variant, ...props }: {
2
+ [x: string]: any;
3
+ variant?: string | undefined;
4
+ }): import("react").JSX.Element;
@@ -5,3 +5,4 @@ export declare function SettingsTab({ title, children }: PropsWithChildren<{
5
5
  }>): import("react").JSX.Element;
6
6
  export declare const handleSettingsTabError: typeof handleComponentFailed;
7
7
  export declare function wrapTab(component: ComponentType<any>, tab: string): import("react").FunctionComponent<any>;
8
+ export declare function openSettingsTabModal(Tab: ComponentType<any>): void;
@@ -36,5 +36,4 @@ export declare function clearIndividualLog(logId: string): Promise<void>;
36
36
  export declare function initializeChangelog(): Promise<void>;
37
37
  export declare function getLastRepositoryCheckHash(): Promise<string | null>;
38
38
  export declare function setLastRepositoryCheckHash(hash: string): Promise<void>;
39
- export declare function formatTimestamp(timestamp: number): string;
40
39
  export {};
@@ -9,4 +9,4 @@ export { openPluginModal } from "./plugins/PluginModal";
9
9
  export { default as BackupAndRestoreTab } from "./sync/BackupAndRestoreTab";
10
10
  export { default as CloudTab } from "./sync/CloudTab";
11
11
  export { default as ThemesTab } from "./themes";
12
- export { openUpdaterModal, default as UpdaterTab } from "./updater";
12
+ export { default as UpdaterTab } from "./updater";
@@ -0,0 +1,2 @@
1
+ import "./UIElements.css";
2
+ export declare function UIElementsButton(): import("react").JSX.Element;
@@ -1,3 +1,2 @@
1
1
  declare const _default: import("react").FunctionComponent<any> | null;
2
2
  export default _default;
3
- export declare const openUpdaterModal: (() => void) | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plexcord/types",
3
3
  "private": false,
4
- "version": "1.17.9",
4
+ "version": "1.18.2",
5
5
  "description": "",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
@@ -1,6 +1,7 @@
1
1
  import "./fixDiscordBadgePadding.css";
2
2
  import { BadgePosition, BadgeUserArgs, ProfileBadge } from "../../../api/Badges";
3
3
  import { User } from "@plexcord/discord-types";
4
+ export declare function openDonorModal(props: any): import("react").JSX.Element;
4
5
  declare const _default: {
5
6
  name: string;
6
7
  description: string;
@@ -18,13 +19,10 @@ declare const _default: {
18
19
  };
19
20
  } | {
20
21
  find: string;
21
- replacement: ({
22
- match: RegExp;
23
- replace: (_: string, rest: string, originalSrc: string, badge: string) => string;
24
- } | {
22
+ replacement: {
25
23
  match: RegExp;
26
24
  replace: string;
27
- })[];
25
+ }[];
28
26
  })[];
29
27
  readonly DonorBadges: Record<string, Record<"tooltip" | "badge", string>[]>;
30
28
  readonly toolboxActions: {
@@ -42,7 +40,7 @@ declare const _default: {
42
40
  renderBadgeComponent: import("react").FunctionComponent<ProfileBadge & BadgeUserArgs>;
43
41
  getBadgeMouseEventHandlers(badge: ProfileBadge & BadgeUserArgs): Record<string, (e: React.MouseEvent) => void>;
44
42
  getDonorBadges(userId: string): {
45
- image: string;
43
+ iconSrc: string;
46
44
  description: string;
47
45
  position: BadgePosition.START;
48
46
  props: {
@@ -1,5 +1,5 @@
1
1
  import { User } from "@plexcord/discord-types";
2
- import { OptionType, Plugin } from "../../utils/types";
2
+ import { OptionType } from "../../utils/types";
3
3
  interface Nameplate {
4
4
  imgAlt: string;
5
5
  palette: {
@@ -64,5 +64,5 @@ declare const _default: {
64
64
  memberListBannerHook(user: User, nameplate: Nameplate | undefined): import("react").JSX.Element | undefined;
65
65
  gifToPng(url: string): Promise<string>;
66
66
  getBanner(userId: string): string | undefined;
67
- } & Record<PropertyKey, any> & Plugin;
67
+ } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
68
68
  export default _default;
@@ -1,6 +1,6 @@
1
+ import { buildPluginMenuEntries, buildThemeMenuEntries } from "../plexcordToolbox/menu";
1
2
  import { OptionType } from "../../utils/types";
2
3
  import type { HTMLAttributes, ReactElement } from "react";
3
- import PluginsSubmenu from "./PluginsSubmenu";
4
4
  type SettingsEntry = {
5
5
  section: string;
6
6
  label: string;
@@ -89,7 +89,8 @@ declare const _default: {
89
89
  })[];
90
90
  predicate?: undefined;
91
91
  })[];
92
- PluginsSubmenu: typeof PluginsSubmenu;
92
+ buildPluginMenuEntries: typeof buildPluginMenuEntries;
93
+ buildThemeMenuEntries: typeof buildThemeMenuEntries;
93
94
  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;
94
95
  transformSettingsEntries(list: SettingsEntry[]): {
95
96
  label: string | null;
@@ -379,6 +379,13 @@ declare const _default: {
379
379
  default: false;
380
380
  restartNeeded: false;
381
381
  };
382
+ newTabButtonBehavior: {
383
+ readonly label: string;
384
+ readonly description: string;
385
+ type: import("../../utils/types").OptionType.BOOLEAN;
386
+ default: true;
387
+ restartNeeded: false;
388
+ };
382
389
  oneTabPerServer: {
383
390
  readonly label: string;
384
391
  readonly description: string;
@@ -748,6 +755,13 @@ declare const _default: {
748
755
  default: false;
749
756
  restartNeeded: false;
750
757
  };
758
+ newTabButtonBehavior: {
759
+ readonly label: string;
760
+ readonly description: string;
761
+ type: import("../../utils/types").OptionType.BOOLEAN;
762
+ default: true;
763
+ restartNeeded: false;
764
+ };
751
765
  oneTabPerServer: {
752
766
  readonly label: string;
753
767
  readonly description: string;
@@ -368,6 +368,13 @@ export declare const settings: import("../../../utils/types").DefinedSettings<{
368
368
  default: false;
369
369
  restartNeeded: false;
370
370
  };
371
+ newTabButtonBehavior: {
372
+ readonly label: string;
373
+ readonly description: string;
374
+ type: OptionType.BOOLEAN;
375
+ default: true;
376
+ restartNeeded: false;
377
+ };
371
378
  oneTabPerServer: {
372
379
  readonly label: string;
373
380
  readonly description: string;
@@ -737,6 +744,13 @@ export declare const settings: import("../../../utils/types").DefinedSettings<{
737
744
  default: false;
738
745
  restartNeeded: false;
739
746
  };
747
+ newTabButtonBehavior: {
748
+ readonly label: string;
749
+ readonly description: string;
750
+ type: OptionType.BOOLEAN;
751
+ default: true;
752
+ restartNeeded: false;
753
+ };
740
754
  oneTabPerServer: {
741
755
  readonly label: string;
742
756
  readonly description: string;
@@ -2,6 +2,7 @@ import { OptionType } from "../../utils/types";
2
2
  declare function shouldHideUser(userId: string, channelId?: string): boolean;
3
3
  declare function isRoleAllBlockedMembers(roleId: any, guildId: any): boolean;
4
4
  declare function hiddenReplyComponent(): import("react").JSX.Element | null | undefined;
5
+ declare function activeNowView(cards: any): any;
5
6
  declare const _default: {
6
7
  name: string;
7
8
  description: string;
@@ -12,6 +13,13 @@ declare const _default: {
12
13
  id: bigint;
13
14
  }[];
14
15
  settings: import("../../utils/types").DefinedSettings<{
16
+ hideVc: {
17
+ readonly label: string;
18
+ readonly description: string;
19
+ type: OptionType.BOOLEAN;
20
+ default: false;
21
+ restartNeeded: true;
22
+ };
15
23
  usersToBlock: {
16
24
  readonly label: string;
17
25
  readonly description: string;
@@ -70,6 +78,13 @@ declare const _default: {
70
78
  default: string;
71
79
  };
72
80
  }, import("../../utils/types").SettingsChecks<{
81
+ hideVc: {
82
+ readonly label: string;
83
+ readonly description: string;
84
+ type: OptionType.BOOLEAN;
85
+ default: false;
86
+ restartNeeded: true;
87
+ };
73
88
  usersToBlock: {
74
89
  readonly label: string;
75
90
  readonly description: string;
@@ -128,6 +143,7 @@ declare const _default: {
128
143
  default: string;
129
144
  };
130
145
  }>, {}>;
146
+ activeNowView: typeof activeNowView;
131
147
  shouldHideUser: typeof shouldHideUser;
132
148
  hiddenReplyComponent: typeof hiddenReplyComponent;
133
149
  isRoleAllBlockedMembers: typeof isRoleAllBlockedMembers;
@@ -153,6 +169,5 @@ declare const _default: {
153
169
  }[];
154
170
  predicate?: undefined;
155
171
  })[];
156
- activeNowView(cards: any): any;
157
172
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
158
173
  export default _default;
@@ -40,7 +40,7 @@ declare const _default: {
40
40
  replace: string;
41
41
  }[];
42
42
  } | {
43
- find: string;
43
+ find: RegExp;
44
44
  replacement: {
45
45
  match: RegExp;
46
46
  replace: string;
@@ -1,5 +1,4 @@
1
- import { OptionType } from "../../utils/types";
2
- declare function DecodeIcon(): import("react").JSX.Element;
1
+ import { IconComponent, OptionType } from "../../utils/types";
3
2
  declare const _default: {
4
3
  name: string;
5
4
  description: string;
@@ -40,13 +39,16 @@ declare const _default: {
40
39
  };
41
40
  }>, {}>;
42
41
  readonly displayDescription: string;
43
- renderMessagePopoverButton(msg: import("@plexcord/discord-types").Message): {
44
- label: string;
45
- icon: typeof DecodeIcon;
46
- message: import("@plexcord/discord-types").Message;
47
- channel: import("@plexcord/discord-types").Channel;
48
- onClick: () => void;
49
- onContextMenu: (e: any) => void;
42
+ messagePopoverButton: {
43
+ icon: IconComponent;
44
+ render(msg: import("@plexcord/discord-types").Message): {
45
+ label: string;
46
+ icon: IconComponent;
47
+ message: import("@plexcord/discord-types").Message;
48
+ channel: import("@plexcord/discord-types").Channel;
49
+ onClick: () => void;
50
+ onContextMenu: (e: any) => void;
51
+ };
50
52
  };
51
53
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
52
54
  export default _default;
@@ -1,4 +1,5 @@
1
- import { OptionType } from "../../utils/types";
1
+ import { Message } from "@plexcord/discord-types";
2
+ import { IconComponent, OptionType } from "../../utils/types";
2
3
  export declare const jumper: any;
3
4
  declare const _default: {
4
5
  name: string;
@@ -7,6 +8,7 @@ declare const _default: {
7
8
  name: string;
8
9
  id: bigint;
9
10
  }[];
11
+ dependencies: string[];
10
12
  settings: import("../../utils/types").DefinedSettings<{
11
13
  includePings: {
12
14
  readonly label: string;
@@ -55,5 +57,15 @@ declare const _default: {
55
57
  readonly displayDescription: string;
56
58
  start(): void;
57
59
  stop(): void;
60
+ messagePopoverButton: {
61
+ icon: IconComponent;
62
+ render(message: Message): {
63
+ label: string;
64
+ icon: IconComponent;
65
+ message: Message;
66
+ channel: import("@plexcord/discord-types").Channel;
67
+ onClick: () => Promise<void>;
68
+ } | null;
69
+ };
58
70
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
59
71
  export default _default;
@@ -16,6 +16,15 @@ declare const _default: {
16
16
  stickToMarkers: false;
17
17
  default: number;
18
18
  };
19
- }, {}, {}>;
19
+ }, import("../../utils/types").SettingsChecks<{
20
+ volume: {
21
+ readonly label: string;
22
+ readonly description: string;
23
+ type: OptionType.SLIDER;
24
+ markers: number[];
25
+ stickToMarkers: false;
26
+ default: number;
27
+ };
28
+ }>, {}>;
20
29
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
21
30
  export default _default;