@plexcord/types 1.17.2 → 1.17.4

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 (40) hide show
  1. package/api/ChatButtons.d.ts +4 -4
  2. package/components/BaseText.d.ts +34 -0
  3. package/components/Button.d.ts +16 -0
  4. package/components/Divider.d.ts +4 -0
  5. package/components/FormSwitch.d.ts +1 -2
  6. package/components/Heading.d.ts +15 -0
  7. package/components/Paragraph.d.ts +3 -0
  8. package/components/Span.d.ts +3 -0
  9. package/components/Switch.d.ts +2 -3
  10. package/components/css.d.ts +1 -0
  11. package/components/index.d.ts +6 -1
  12. package/components/margins.d.ts +7 -0
  13. package/components/settings/tabs/plugins/PluginCard.d.ts +0 -1
  14. package/components/settings/tabs/plugins/components/Common.d.ts +2 -1
  15. package/package.json +1 -1
  16. package/plugins/{statusWhileActive.desktop → autoDndWhilePlaying.desktop}/index.d.ts +22 -11
  17. package/plugins/betterSessions/index.d.ts +1 -0
  18. package/plugins/customRPC/RPCSettings.d.ts +2 -0
  19. package/plugins/customRPC/index.d.ts +61 -278
  20. package/plugins/decodeBase64/index.d.ts +9 -2
  21. package/plugins/experiments/index.d.ts +4 -4
  22. package/plugins/musicControls/index.d.ts +0 -42
  23. package/plugins/musicControls/settings.d.ts +0 -42
  24. package/plugins/musicControls/tidal/lyrics/api.d.ts +1 -1
  25. package/plugins/musicControls/tidal/lyrics/types.d.ts +0 -22
  26. package/plugins/musicControls/youtubeMusic/YtmStore.d.ts +2 -2
  27. package/plugins/noBlockedMessages/index.d.ts +14 -5
  28. package/plugins/noNitroUpsell/index.d.ts +3 -7
  29. package/plugins/questify/index.d.ts +1 -0
  30. package/plugins/superReactionTweaks/index.d.ts +1 -1
  31. package/plugins/themeAttributes/index.d.ts +4 -0
  32. package/utils/css.d.ts +1 -0
  33. package/utils/discord.d.ts +1 -1
  34. package/utils/intlHash.d.ts +1 -0
  35. package/utils/margins.d.ts +1 -1
  36. package/utils/patches.d.ts +1 -1
  37. package/webpack/common/components.d.ts +10 -8
  38. package/webpack/common/stores.d.ts +1 -0
  39. package/components/FormDivider.d.ts +0 -4
  40. package/webpack/common/FormText.d.ts +0 -2
@@ -67,9 +67,9 @@ export declare const removeChatBarButton: (id: string) => boolean;
67
67
  export interface ChatBarButtonProps {
68
68
  children: ReactNode;
69
69
  tooltip: string;
70
- onClick: MouseEventHandler<HTMLButtonElement>;
71
- onContextMenu?: MouseEventHandler<HTMLButtonElement>;
72
- onAuxClick?: MouseEventHandler<HTMLButtonElement>;
73
- buttonProps?: Omit<HTMLProps<HTMLButtonElement>, "size" | "onClick" | "onContextMenu" | "onAuxClick" | "ref">;
70
+ onClick: MouseEventHandler;
71
+ onContextMenu?: MouseEventHandler;
72
+ onAuxClick?: MouseEventHandler;
73
+ buttonProps?: Omit<HTMLProps<HTMLDivElement>, "size" | "onClick" | "onContextMenu" | "onAuxClick">;
74
74
  }
75
75
  export declare const ChatBarButton: import("react").FunctionComponent<ChatBarButtonProps>;
@@ -0,0 +1,34 @@
1
+ import "./BaseText.css";
2
+ import type { Text as DiscordText } from "@plexcord/discord-types";
3
+ import type { ComponentPropsWithoutRef, ReactNode } from "react";
4
+ declare const Sizes: {
5
+ readonly xxs: "0.625rem";
6
+ readonly xs: "0.75rem";
7
+ readonly sm: "0.875rem";
8
+ readonly md: "1rem";
9
+ readonly lg: "1.25rem";
10
+ readonly xl: "1.5rem";
11
+ readonly xxl: "2rem";
12
+ };
13
+ declare const Weights: {
14
+ readonly thin: "100";
15
+ readonly extralight: "200";
16
+ readonly light: "300";
17
+ readonly normal: "400";
18
+ readonly medium: "500";
19
+ readonly semibold: "600";
20
+ readonly bold: "700";
21
+ readonly extrabold: "800";
22
+ };
23
+ export declare function generateTextCss(): string;
24
+ export type TextSize = keyof typeof Sizes;
25
+ export type TextWeight = keyof typeof Weights;
26
+ export type TextTag = "div" | "span" | "p" | `h${1 | 2 | 3 | 4 | 5 | 6}`;
27
+ export type BaseTextProps<Tag extends TextTag = "div"> = ComponentPropsWithoutRef<Tag> & {
28
+ size?: TextSize;
29
+ weight?: TextWeight;
30
+ tag?: Tag;
31
+ };
32
+ export declare function BaseText<T extends TextTag = "div">(props: BaseTextProps<T>): ReactNode;
33
+ export declare const TextCompat: DiscordText;
34
+ export {};
@@ -0,0 +1,16 @@
1
+ import "./Button.css";
2
+ import type { Button as DiscordButton } from "@plexcord/discord-types";
3
+ import type { ComponentPropsWithRef } from "react";
4
+ export type ButtonVariant = "primary" | "secondary" | "dangerPrimary" | "dangerSecondary" | "overlayPrimary" | "positive" | "link" | "none";
5
+ export type ButtonSize = "min" | "xs" | "small" | "medium";
6
+ export type ButtonProps = ComponentPropsWithRef<"button"> & {
7
+ variant?: ButtonVariant;
8
+ size?: ButtonSize;
9
+ };
10
+ export declare function Button({ variant, size, children, className, ...restProps }: ButtonProps): import("react").JSX.Element;
11
+ export type TextButtonVariant = "primary" | "secondary" | "danger" | "link";
12
+ export type TextButtonProps = ComponentPropsWithRef<"button"> & {
13
+ variant?: TextButtonVariant;
14
+ };
15
+ export declare function TextButton({ variant, className, ...restProps }: TextButtonProps): import("react").JSX.Element;
16
+ export declare const ButtonCompat: DiscordButton;
@@ -0,0 +1,4 @@
1
+ import "./Divider.css";
2
+ import type { ComponentPropsWithoutRef } from "react";
3
+ export type DividerProps = ComponentPropsWithoutRef<"hr">;
4
+ export declare function Divider({ className, ...restProps }: DividerProps): import("react").JSX.Element;
@@ -10,5 +10,4 @@ export interface FormSwitchProps {
10
10
  hideBorder?: boolean;
11
11
  }
12
12
  export declare function FormSwitch({ onChange, title, value, description, disabled, className, hideBorder }: FormSwitchProps): import("react").JSX.Element;
13
- /** Compatibility with Discord's old FormSwitch */
14
- export declare function FormSwitchCompat(props: PropsWithChildren<any>): import("react").JSX.Element;
13
+ export declare function FormSwitchCompat({ note, children, ...restProps }: PropsWithChildren<any>): import("react").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import "./Heading.css";
2
+ import type { ComponentPropsWithoutRef } from "react";
3
+ export type HeadingTag = `h${1 | 2 | 3 | 4 | 5 | 6}`;
4
+ export type HeadingProps<Tag extends HeadingTag> = ComponentPropsWithoutRef<Tag> & {
5
+ tag?: Tag;
6
+ };
7
+ /**
8
+ * A simple heading component that automatically sizes according to the tag used.
9
+ *
10
+ * If you need more control, use the BaseText component instead.
11
+ */
12
+ export declare function Heading<T extends HeadingTag>(props: HeadingProps<T>): import("react").JSX.Element;
13
+ export declare function HeadingPrimary({ children, ...restProps }: HeadingProps<"h2">): import("react").JSX.Element;
14
+ export declare function HeadingSecondary({ children, ...restProps }: HeadingProps<"h3">): import("react").JSX.Element;
15
+ export declare function HeadingTertiary({ children, ...restProps }: HeadingProps<"h4">): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { type BaseTextProps } from "./BaseText";
2
+ export type ParagraphProps = BaseTextProps<"p">;
3
+ export declare function Paragraph({ children, size, weight, ...restProps }: ParagraphProps): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { type BaseTextProps } from "./BaseText";
2
+ export type SpanProps = BaseTextProps<"span">;
3
+ export declare function Span({ children, ...restProps }: SpanProps): import("react").JSX.Element;
@@ -1,8 +1,7 @@
1
1
  import "./Switch.css";
2
- interface SwitchProps {
2
+ export interface SwitchProps {
3
+ disabled?: boolean;
3
4
  checked: boolean;
4
5
  onChange: (checked: boolean) => void;
5
- disabled?: boolean;
6
6
  }
7
7
  export declare function Switch({ checked, onChange, disabled }: SwitchProps): import("react").JSX.Element;
8
- export {};
@@ -0,0 +1 @@
1
+ export declare function addPlexcordUiStyles(): void;
@@ -1,13 +1,18 @@
1
+ export * from "./BaseText";
1
2
  export * from "./CheckedTextInput";
2
3
  export * from "./CodeBlock";
4
+ export * from "./Divider";
3
5
  export { default as ErrorBoundary } from "./ErrorBoundary";
4
6
  export * from "./ErrorCard";
5
7
  export * from "./Flex";
6
- export * from "./FormDivider";
7
8
  export * from "./FormSwitch";
8
9
  export * from "./Grid";
10
+ export * from "./Heading";
9
11
  export * from "./Heart";
10
12
  export * from "./Icons";
11
13
  export * from "./Link";
14
+ export * from "./margins";
15
+ export * from "./Paragraph";
12
16
  export * from "./settings";
17
+ export * from "./Span";
13
18
  export * from "./Switch";
@@ -0,0 +1,7 @@
1
+ declare const Directions: readonly ["top", "bottom", "left", "right"];
2
+ declare const Sizes: readonly [8, 16, 20];
3
+ export type MarginDirection = (typeof Directions)[number];
4
+ export type MarginSize = (typeof Sizes)[number];
5
+ export declare const Margins: Record<`${MarginDirection}${MarginSize}`, string>;
6
+ export declare function generateMarginCss(): string;
7
+ export {};
@@ -1,5 +1,4 @@
1
1
  import { Plugin } from "../../../../utils/types";
2
- export declare const ButtonClasses: any;
3
2
  interface PluginCardProps {
4
3
  plugin: Plugin;
5
4
  disabled?: boolean;
@@ -20,6 +20,7 @@ interface SettingsSectionProps extends PropsWithChildren {
20
20
  label?: string;
21
21
  error?: string | null;
22
22
  inlineSetting?: boolean;
23
+ tag?: "label" | "div";
23
24
  }
24
- export declare function SettingsSection({ name, description, label, error, inlineSetting, children }: SettingsSectionProps): import("react").JSX.Element;
25
+ export declare function SettingsSection({ tag: Tag, name, description, label, error, inlineSetting, children }: SettingsSectionProps): import("react").JSX.Element;
25
26
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plexcord/types",
3
3
  "private": false,
4
- "version": "1.17.2",
4
+ "version": "1.17.4",
5
5
  "description": "",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
@@ -1,4 +1,3 @@
1
- import { VoiceState } from "@plexcord/discord-types";
2
1
  import { OptionType } from "../../utils/types";
3
2
  declare const _default: {
4
3
  name: string;
@@ -9,38 +8,50 @@ declare const _default: {
9
8
  }[];
10
9
  settings: import("../../utils/types").DefinedSettings<{
11
10
  statusToSet: {
11
+ readonly label: string;
12
+ readonly description: string;
12
13
  type: OptionType.SELECT;
13
- description: string;
14
- options: ({
14
+ readonly options: ({
15
15
  label: string;
16
16
  value: string;
17
17
  default?: undefined;
18
18
  } | {
19
19
  label: string;
20
20
  value: string;
21
- default: true;
21
+ default: boolean;
22
22
  })[];
23
23
  };
24
+ excludeInvisible: {
25
+ readonly label: string;
26
+ readonly description: string;
27
+ type: OptionType.BOOLEAN;
28
+ default: false;
29
+ };
24
30
  }, import("../../utils/types").SettingsChecks<{
25
31
  statusToSet: {
32
+ readonly label: string;
33
+ readonly description: string;
26
34
  type: OptionType.SELECT;
27
- description: string;
28
- options: ({
35
+ readonly options: ({
29
36
  label: string;
30
37
  value: string;
31
38
  default?: undefined;
32
39
  } | {
33
40
  label: string;
34
41
  value: string;
35
- default: true;
42
+ default: boolean;
36
43
  })[];
37
44
  };
45
+ excludeInvisible: {
46
+ readonly label: string;
47
+ readonly description: string;
48
+ type: OptionType.BOOLEAN;
49
+ default: false;
50
+ };
38
51
  }>, {}>;
52
+ readonly displayDescription: string;
39
53
  flux: {
40
- VOICE_STATE_UPDATES({ voiceStates }: {
41
- voiceStates: VoiceState[];
42
- }): void;
43
- VOICE_CHANNEL_STATUS_UPDATE(): void;
54
+ RUNNING_GAMES_CHANGE({ games }: any): void;
44
55
  };
45
56
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
46
57
  export default _default;
@@ -1,3 +1,4 @@
1
+ import "./styles.css";
1
2
  import { OptionType } from "../../utils/types";
2
3
  import { Session, SessionInfo } from "./types";
3
4
  declare const _default: {
@@ -0,0 +1,2 @@
1
+ import "./settings.css";
2
+ export declare function RPCSettings(): import("react").JSX.Element;
@@ -1,17 +1,44 @@
1
1
  import { ActivityType } from "@plexcord/discord-types/enums";
2
2
  import { OptionType } from "../../utils/types";
3
+ import { RPCSettings } from "./RPCSettings";
3
4
  export declare const enum TimestampMode {
4
5
  NONE = 0,
5
6
  NOW = 1,
6
7
  TIME = 2,
7
8
  CUSTOM = 3
8
9
  }
9
- declare function onChange(): void;
10
- declare function isStreamLinkDisabled(): boolean;
11
- declare function isStreamLinkValid(value: string): string | true;
12
- declare function isTimestampDisabled(): boolean;
13
- declare function isImageKeyValid(value: string): string | true;
14
- declare function setRpc(disable?: boolean): Promise<void>;
10
+ export declare const settings: import("../../utils/types").DefinedSettings<{
11
+ config: {
12
+ type: OptionType.COMPONENT;
13
+ component: typeof RPCSettings;
14
+ };
15
+ }, import("../../utils/types").SettingsChecks<{
16
+ config: {
17
+ type: OptionType.COMPONENT;
18
+ component: typeof RPCSettings;
19
+ };
20
+ }>, {
21
+ appID?: string;
22
+ appName?: string;
23
+ details?: string;
24
+ state?: string;
25
+ type?: ActivityType;
26
+ streamLink?: string;
27
+ timestampMode?: TimestampMode;
28
+ startTime?: number;
29
+ endTime?: number;
30
+ imageBig?: string;
31
+ imageBigTooltip?: string;
32
+ imageSmall?: string;
33
+ imageSmallTooltip?: string;
34
+ buttonOneText?: string;
35
+ buttonOneURL?: string;
36
+ buttonTwoText?: string;
37
+ buttonTwoURL?: string;
38
+ partySize?: number;
39
+ partyMaxSize?: number;
40
+ }>;
41
+ export declare function setRpc(disable?: boolean): Promise<void>;
15
42
  declare const _default: {
16
43
  name: string;
17
44
  description: string;
@@ -23,280 +50,36 @@ declare const _default: {
23
50
  start: typeof setRpc;
24
51
  stop: () => Promise<void>;
25
52
  settings: import("../../utils/types").DefinedSettings<{
26
- appID: {
27
- readonly label: string;
28
- readonly description: string;
29
- type: OptionType.STRING;
30
- onChange: typeof onChange;
31
- isValid: (value: string) => string | true;
32
- };
33
- appName: {
34
- readonly label: string;
35
- readonly description: string;
36
- type: OptionType.STRING;
37
- onChange: typeof onChange;
38
- isValid: (value: string) => string | true;
39
- };
40
- details: {
41
- readonly label: string;
42
- readonly description: string;
43
- type: OptionType.STRING;
44
- onChange: typeof onChange;
45
- isValid: (value: string) => string | true;
46
- };
47
- state: {
48
- readonly label: string;
49
- readonly description: string;
50
- type: OptionType.STRING;
51
- onChange: typeof onChange;
52
- isValid: (value: string) => string | true;
53
- };
54
- type: {
55
- readonly label: string;
56
- readonly description: string;
57
- type: OptionType.SELECT;
58
- onChange: typeof onChange;
59
- readonly options: ({
60
- label: string;
61
- value: ActivityType;
62
- default: boolean;
63
- } | {
64
- label: string;
65
- value: ActivityType;
66
- default?: undefined;
67
- })[];
68
- };
69
- streamLink: {
70
- readonly label: string;
71
- readonly description: string;
72
- type: OptionType.STRING;
73
- onChange: typeof onChange;
74
- disabled: typeof isStreamLinkDisabled;
75
- isValid: typeof isStreamLinkValid;
76
- };
77
- timestampMode: {
78
- readonly label: string;
79
- readonly description: string;
80
- type: OptionType.SELECT;
81
- onChange: typeof onChange;
82
- readonly options: ({
83
- label: string;
84
- value: TimestampMode;
85
- default: boolean;
86
- } | {
87
- label: string;
88
- value: TimestampMode;
89
- default?: undefined;
90
- })[];
91
- };
92
- startTime: {
93
- readonly label: string;
94
- readonly description: string;
95
- type: OptionType.NUMBER;
96
- onChange: typeof onChange;
97
- disabled: typeof isTimestampDisabled;
98
- isValid: (value: number) => string | true;
99
- };
100
- endTime: {
101
- readonly label: string;
102
- readonly description: string;
103
- type: OptionType.NUMBER;
104
- onChange: typeof onChange;
105
- disabled: typeof isTimestampDisabled;
106
- isValid: (value: number) => string | true;
107
- };
108
- imageBig: {
109
- readonly label: string;
110
- readonly description: string;
111
- type: OptionType.STRING;
112
- onChange: typeof onChange;
113
- isValid: typeof isImageKeyValid;
114
- };
115
- imageBigTooltip: {
116
- readonly label: string;
117
- readonly description: string;
118
- type: OptionType.STRING;
119
- onChange: typeof onChange;
120
- isValid: (value: string) => string | true;
121
- };
122
- imageSmall: {
123
- readonly label: string;
124
- readonly description: string;
125
- type: OptionType.STRING;
126
- onChange: typeof onChange;
127
- isValid: typeof isImageKeyValid;
128
- };
129
- imageSmallTooltip: {
130
- readonly label: string;
131
- readonly description: string;
132
- type: OptionType.STRING;
133
- onChange: typeof onChange;
134
- isValid: (value: string) => string | true;
135
- };
136
- buttonOneText: {
137
- readonly label: string;
138
- readonly description: string;
139
- type: OptionType.STRING;
140
- onChange: typeof onChange;
141
- isValid: (value: string) => string | true;
142
- };
143
- buttonOneURL: {
144
- readonly label: string;
145
- readonly description: string;
146
- type: OptionType.STRING;
147
- onChange: typeof onChange;
148
- };
149
- buttonTwoText: {
150
- readonly label: string;
151
- readonly description: string;
152
- type: OptionType.STRING;
153
- onChange: typeof onChange;
154
- isValid: (value: string) => string | true;
155
- };
156
- buttonTwoURL: {
157
- readonly label: string;
158
- readonly description: string;
159
- type: OptionType.STRING;
160
- onChange: typeof onChange;
53
+ config: {
54
+ type: OptionType.COMPONENT;
55
+ component: typeof RPCSettings;
161
56
  };
162
57
  }, import("../../utils/types").SettingsChecks<{
163
- appID: {
164
- readonly label: string;
165
- readonly description: string;
166
- type: OptionType.STRING;
167
- onChange: typeof onChange;
168
- isValid: (value: string) => string | true;
169
- };
170
- appName: {
171
- readonly label: string;
172
- readonly description: string;
173
- type: OptionType.STRING;
174
- onChange: typeof onChange;
175
- isValid: (value: string) => string | true;
176
- };
177
- details: {
178
- readonly label: string;
179
- readonly description: string;
180
- type: OptionType.STRING;
181
- onChange: typeof onChange;
182
- isValid: (value: string) => string | true;
183
- };
184
- state: {
185
- readonly label: string;
186
- readonly description: string;
187
- type: OptionType.STRING;
188
- onChange: typeof onChange;
189
- isValid: (value: string) => string | true;
190
- };
191
- type: {
192
- readonly label: string;
193
- readonly description: string;
194
- type: OptionType.SELECT;
195
- onChange: typeof onChange;
196
- readonly options: ({
197
- label: string;
198
- value: ActivityType;
199
- default: boolean;
200
- } | {
201
- label: string;
202
- value: ActivityType;
203
- default?: undefined;
204
- })[];
205
- };
206
- streamLink: {
207
- readonly label: string;
208
- readonly description: string;
209
- type: OptionType.STRING;
210
- onChange: typeof onChange;
211
- disabled: typeof isStreamLinkDisabled;
212
- isValid: typeof isStreamLinkValid;
213
- };
214
- timestampMode: {
215
- readonly label: string;
216
- readonly description: string;
217
- type: OptionType.SELECT;
218
- onChange: typeof onChange;
219
- readonly options: ({
220
- label: string;
221
- value: TimestampMode;
222
- default: boolean;
223
- } | {
224
- label: string;
225
- value: TimestampMode;
226
- default?: undefined;
227
- })[];
228
- };
229
- startTime: {
230
- readonly label: string;
231
- readonly description: string;
232
- type: OptionType.NUMBER;
233
- onChange: typeof onChange;
234
- disabled: typeof isTimestampDisabled;
235
- isValid: (value: number) => string | true;
236
- };
237
- endTime: {
238
- readonly label: string;
239
- readonly description: string;
240
- type: OptionType.NUMBER;
241
- onChange: typeof onChange;
242
- disabled: typeof isTimestampDisabled;
243
- isValid: (value: number) => string | true;
244
- };
245
- imageBig: {
246
- readonly label: string;
247
- readonly description: string;
248
- type: OptionType.STRING;
249
- onChange: typeof onChange;
250
- isValid: typeof isImageKeyValid;
251
- };
252
- imageBigTooltip: {
253
- readonly label: string;
254
- readonly description: string;
255
- type: OptionType.STRING;
256
- onChange: typeof onChange;
257
- isValid: (value: string) => string | true;
258
- };
259
- imageSmall: {
260
- readonly label: string;
261
- readonly description: string;
262
- type: OptionType.STRING;
263
- onChange: typeof onChange;
264
- isValid: typeof isImageKeyValid;
265
- };
266
- imageSmallTooltip: {
267
- readonly label: string;
268
- readonly description: string;
269
- type: OptionType.STRING;
270
- onChange: typeof onChange;
271
- isValid: (value: string) => string | true;
272
- };
273
- buttonOneText: {
274
- readonly label: string;
275
- readonly description: string;
276
- type: OptionType.STRING;
277
- onChange: typeof onChange;
278
- isValid: (value: string) => string | true;
279
- };
280
- buttonOneURL: {
281
- readonly label: string;
282
- readonly description: string;
283
- type: OptionType.STRING;
284
- onChange: typeof onChange;
285
- };
286
- buttonTwoText: {
287
- readonly label: string;
288
- readonly description: string;
289
- type: OptionType.STRING;
290
- onChange: typeof onChange;
291
- isValid: (value: string) => string | true;
292
- };
293
- buttonTwoURL: {
294
- readonly label: string;
295
- readonly description: string;
296
- type: OptionType.STRING;
297
- onChange: typeof onChange;
298
- };
299
- }>, {}>;
58
+ config: {
59
+ type: OptionType.COMPONENT;
60
+ component: typeof RPCSettings;
61
+ };
62
+ }>, {
63
+ appID?: string;
64
+ appName?: string;
65
+ details?: string;
66
+ state?: string;
67
+ type?: ActivityType;
68
+ streamLink?: string;
69
+ timestampMode?: TimestampMode;
70
+ startTime?: number;
71
+ endTime?: number;
72
+ imageBig?: string;
73
+ imageBigTooltip?: string;
74
+ imageSmall?: string;
75
+ imageSmallTooltip?: string;
76
+ buttonOneText?: string;
77
+ buttonOneURL?: string;
78
+ buttonTwoText?: string;
79
+ buttonTwoURL?: string;
80
+ partySize?: number;
81
+ partyMaxSize?: number;
82
+ }>;
300
83
  readonly displayDescription: string;
301
84
  patches: {
302
85
  find: string;
@@ -1,4 +1,5 @@
1
1
  import { OptionType } from "../../utils/types";
2
+ declare function DecodeIcon(): import("react").JSX.Element;
2
3
  declare const _default: {
3
4
  name: string;
4
5
  description: string;
@@ -39,7 +40,13 @@ declare const _default: {
39
40
  };
40
41
  }>, {}>;
41
42
  readonly displayDescription: string;
42
- start(): void;
43
- stop(): void;
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;
50
+ };
44
51
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
45
52
  export default _default;
@@ -34,17 +34,17 @@ declare const _default: {
34
34
  } | {
35
35
  find: string;
36
36
  replacement: {
37
- match: string;
37
+ match: RegExp;
38
38
  replace: string;
39
39
  };
40
- predicate?: undefined;
40
+ predicate: () => boolean;
41
41
  } | {
42
42
  find: string;
43
43
  replacement: {
44
44
  match: RegExp;
45
- replace: string;
45
+ replace: (_: string, rest: string) => string;
46
46
  };
47
- predicate: () => boolean;
47
+ predicate?: undefined;
48
48
  } | {
49
49
  find: string;
50
50
  replacement: {
@@ -49,27 +49,6 @@ declare const _default: {
49
49
  type: import("../../utils/types").OptionType.BOOLEAN;
50
50
  default: false;
51
51
  };
52
- TidalLyricFetch: {
53
- description: string;
54
- type: import("../../utils/types").OptionType.STRING;
55
- default: string;
56
- placeholder: string;
57
- onChange: (value: string) => void;
58
- };
59
- TidalSyncMode: {
60
- description: string;
61
- type: import("../../utils/types").OptionType.SELECT;
62
- options: ({
63
- value: string;
64
- label: string;
65
- default: true;
66
- } | {
67
- value: string;
68
- label: string;
69
- default?: undefined;
70
- })[];
71
- default: string;
72
- };
73
52
  YtmSectionTitle: {
74
53
  type: import("../../utils/types").OptionType.COMPONENT;
75
54
  component: () => import("react").JSX.Element;
@@ -215,27 +194,6 @@ declare const _default: {
215
194
  type: import("../../utils/types").OptionType.BOOLEAN;
216
195
  default: false;
217
196
  };
218
- TidalLyricFetch: {
219
- description: string;
220
- type: import("../../utils/types").OptionType.STRING;
221
- default: string;
222
- placeholder: string;
223
- onChange: (value: string) => void;
224
- };
225
- TidalSyncMode: {
226
- description: string;
227
- type: import("../../utils/types").OptionType.SELECT;
228
- options: ({
229
- value: string;
230
- label: string;
231
- default: true;
232
- } | {
233
- value: string;
234
- label: string;
235
- default?: undefined;
236
- })[];
237
- default: string;
238
- };
239
197
  YtmSectionTitle: {
240
198
  type: import("../../utils/types").OptionType.COMPONENT;
241
199
  component: () => import("react").JSX.Element;
@@ -44,27 +44,6 @@ export declare const settings: import("../../utils/types").DefinedSettings<{
44
44
  type: OptionType.BOOLEAN;
45
45
  default: false;
46
46
  };
47
- TidalLyricFetch: {
48
- description: string;
49
- type: OptionType.STRING;
50
- default: string;
51
- placeholder: string;
52
- onChange: (value: string) => void;
53
- };
54
- TidalSyncMode: {
55
- description: string;
56
- type: OptionType.SELECT;
57
- options: ({
58
- value: string;
59
- label: string;
60
- default: true;
61
- } | {
62
- value: string;
63
- label: string;
64
- default?: undefined;
65
- })[];
66
- default: string;
67
- };
68
47
  YtmSectionTitle: {
69
48
  type: OptionType.COMPONENT;
70
49
  component: () => import("react").JSX.Element;
@@ -210,27 +189,6 @@ export declare const settings: import("../../utils/types").DefinedSettings<{
210
189
  type: OptionType.BOOLEAN;
211
190
  default: false;
212
191
  };
213
- TidalLyricFetch: {
214
- description: string;
215
- type: OptionType.STRING;
216
- default: string;
217
- placeholder: string;
218
- onChange: (value: string) => void;
219
- };
220
- TidalSyncMode: {
221
- description: string;
222
- type: OptionType.SELECT;
223
- options: ({
224
- value: string;
225
- label: string;
226
- default: true;
227
- } | {
228
- value: string;
229
- label: string;
230
- default?: undefined;
231
- })[];
232
- default: string;
233
- };
234
192
  YtmSectionTitle: {
235
193
  type: OptionType.COMPONENT;
236
194
  component: () => import("react").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import { Track } from "../TidalStore";
2
2
  import { EnhancedLyric } from "./types";
3
- export declare function getLyrics(track: Track | null, url?: string, retries?: number): Promise<EnhancedLyric[] | null>;
3
+ export declare function getLyrics(track: Track | null, retries?: number): Promise<EnhancedLyric[] | null>;
@@ -1,26 +1,4 @@
1
1
  export interface EnhancedLyric {
2
2
  time: number;
3
3
  text: string;
4
- words: Word[];
5
- confidence: null;
6
- characters: Character[];
7
4
  }
8
- interface Character {
9
- time: number;
10
- char: string;
11
- endTime: number;
12
- isVowel: boolean;
13
- isSilent: boolean;
14
- confidence: number | null;
15
- phoneme: string;
16
- }
17
- interface Word {
18
- time: number;
19
- word: string;
20
- endTime: number;
21
- isParenthetical: boolean;
22
- confidence: null;
23
- syllableCount: number;
24
- characters: Character[];
25
- }
26
- export {};
@@ -29,7 +29,7 @@ interface IYoutubeMusicStore {
29
29
  volume: number;
30
30
  muted: boolean;
31
31
  isSettingPosition: boolean;
32
- socket: YoutubemusicSocket;
32
+ socket: YoutubeMusicSocket;
33
33
  openExternal(path: string): void;
34
34
  position: number;
35
35
  prev(): void;
@@ -81,7 +81,7 @@ type PlayerInfo = {
81
81
  export type Repeat = "NONE" | "ONE" | "ALL";
82
82
  export declare const logger: Logger;
83
83
  type PlayerState = Partial<Omit<PlayerInfo, "type">>;
84
- declare class YoutubemusicSocket {
84
+ declare class YoutubeMusicSocket {
85
85
  onChange: (e: PlayerState) => void;
86
86
  private ready;
87
87
  private connecting;
@@ -109,12 +109,21 @@ declare const _default: {
109
109
  replace: string;
110
110
  }[];
111
111
  })[];
112
- hideSuppressedMessage(userId: string): boolean;
113
- shouldKeepMessage(message: Message): any[];
114
- disableNotification(message: Message): any;
112
+ keepSuppressedMessage(userId: string): boolean;
113
+ shouldKeepMessage(message: Message): (boolean | {
114
+ suppressed: any;
115
+ hide: any;
116
+ })[];
117
+ disableNotification(message: Message): boolean;
115
118
  filterStream(channelStream: [ChannelStreamGroupProps | ChannelStreamMessageProps | ChannelStreamDividerProps]): [ChannelStreamDividerProps | ChannelStreamMessageProps | ChannelStreamGroupProps];
116
- isReplyToSuppressed(message: Message): false | Message | undefined;
117
- isSuppressed(message: Message): any;
119
+ isReplyToSuppressed(message: Message): {
120
+ suppressed: boolean;
121
+ hide: boolean;
122
+ };
123
+ isSuppressed(message: Message): {
124
+ suppressed: any;
125
+ hide: any;
126
+ };
118
127
  getRelationshipStatus(user: User): {
119
128
  ignored: boolean;
120
129
  blocked: boolean;
@@ -5,13 +5,9 @@ declare const _default: {
5
5
  name: string;
6
6
  id: bigint;
7
7
  }[];
8
- patches: {
9
- find: string;
10
- replacement: {
11
- match: RegExp;
12
- replace: string;
13
- }[];
14
- }[];
8
+ flux: {
9
+ CONNECTION_OPEN(): void;
10
+ };
15
11
  start(): void;
16
12
  stop(): void;
17
13
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
@@ -44,6 +44,7 @@ declare function getQuestAcceptedButtonProps(quest: Quest, text: string): {
44
44
  disabled: boolean;
45
45
  text: string;
46
46
  onClick: () => void;
47
+ icon: () => void;
47
48
  };
48
49
  declare const _default: {
49
50
  name: string;
@@ -107,6 +107,6 @@ declare const _default: {
107
107
  };
108
108
  }, {}>;
109
109
  shouldPlayBurstReaction(playingCount: number): boolean;
110
- readonly shouldSuperReactByDefault: any;
110
+ readonly shouldSuperReactByDefault: boolean;
111
111
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
112
112
  export default _default;
@@ -22,6 +22,10 @@ declare const _default: {
22
22
  "data-author-id": string;
23
23
  "data-author-username": string;
24
24
  "data-is-self": boolean | "";
25
+ } | {
26
+ "data-author-id"?: undefined;
27
+ "data-author-username"?: undefined;
28
+ "data-is-self"?: undefined;
25
29
  };
26
30
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
27
31
  export default _default;
package/utils/css.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function createAndAppendStyle(id: string, target?: HTMLElement): HTMLStyleElement;
@@ -7,7 +7,7 @@ import { MediaModalItem, MediaModalProps } from "./modal";
7
7
  * @param key The plain message key
8
8
  * @param values The values to interpolate, if it's a rich message
9
9
  */
10
- export declare function getIntlMessage(key: string, values?: Record<PropertyKey, any>): any;
10
+ export declare function getIntlMessage(key: string, values?: Record<PropertyKey, any>, legacy?: boolean): any;
11
11
  /**
12
12
  * Get an internationalized message from a hashed key
13
13
  * @param hashedKey The hashed message key
@@ -13,3 +13,4 @@
13
13
  * `@discord/intl-loader-core`, to be able to hash names at runtime.
14
14
  */
15
15
  export declare function runtimeHashMessageKey(key: string): string;
16
+ export declare function runtimeHashMessageKeyLegacy(key: string): string;
@@ -1 +1 @@
1
- export declare const Margins: Record<`${"top" | "bottom" | "left" | "right"}${8 | 16 | 20}`, string>;
1
+ export { Margins } from "../components/margins";
@@ -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 extends RegExp ? RegExp : string | RegExp;
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;
@@ -1,15 +1,19 @@
1
+ import { Heading } from "../../components/Heading";
2
+ import { Paragraph } from "../../components/Paragraph";
1
3
  import * as t from "@plexcord/discord-types";
2
4
  export declare const Forms: {
3
- FormTitle: import("../../utils/lazyReact").LazyComponentWrapper<t.FormTitle>;
4
- FormText: t.FormText;
5
+ FormTitle: typeof Heading;
6
+ FormText: typeof Paragraph;
5
7
  /** @deprecated don't use this */
6
8
  FormSection: never;
7
- FormDivider: import("../../utils/lazyReact").LazyComponentWrapper<t.FormDivider>;
9
+ /** @deprecated use `@components/Divider` */
10
+ FormDivider: never;
8
11
  };
9
- export declare const Card: import("../../utils/lazyReact").LazyComponentWrapper<t.Card>;
10
- export declare const Button: import("../../utils/lazyReact").LazyComponentWrapper<t.Button>;
12
+ export declare const Text: t.Text;
13
+ export declare const Button: t.Button;
11
14
  /** @deprecated Use FormSwitch from Plexcord */
12
15
  export declare const Switch: never;
16
+ export declare const Card: import("../../utils/lazyReact").LazyComponentWrapper<t.Card>;
13
17
  export declare const Checkbox: import("../../utils/lazyReact").LazyComponentWrapper<t.Checkbox>;
14
18
  export declare const Tooltip: import("../../utils/lazyReact").LazyComponentWrapper<import("react").ComponentType<{
15
19
  text: import("react").ReactNode | import("react").ComponentType;
@@ -52,9 +56,7 @@ export declare const TooltipContainer: import("../../utils/lazyReact").LazyCompo
52
56
  }>>>;
53
57
  export declare const TextInput: import("../../utils/lazyReact").LazyComponentWrapper<t.TextInput>;
54
58
  export declare const TextArea: import("../../utils/lazyReact").LazyComponentWrapper<t.TextArea>;
55
- export declare const Text: import("../../utils/lazyReact").LazyComponentWrapper<t.Text>;
56
- export declare const Heading: import("../../utils/lazyReact").LazyComponentWrapper<t.Heading>;
57
- export declare const Select: t.Select;
59
+ export declare const Select: import("../../utils/lazyReact").LazyComponentWrapper<t.Select>;
58
60
  export declare const SearchableSelect: import("../../utils/lazyReact").LazyComponentWrapper<t.SearchableSelect>;
59
61
  export declare const Slider: import("../../utils/lazyReact").LazyComponentWrapper<t.Slider>;
60
62
  export declare const Popout: import("../../utils/lazyReact").LazyComponentWrapper<t.Popout>;
@@ -29,6 +29,7 @@ export declare let DraftStore: t.DraftStore;
29
29
  export declare let MediaEngineStore: t.MediaEngineStore;
30
30
  export declare let StreamerModeStore: t.StreamerModeStore;
31
31
  export declare let SpellCheckStore: t.SpellCheckStore;
32
+ export declare let OverridePremiumTypeStore: GenericStore;
32
33
  /**
33
34
  * @see jsdoc of {@link t.useStateFromStores}
34
35
  */
@@ -1,4 +0,0 @@
1
- import "./FormDivider.css";
2
- export declare function FormDivider({ className }: {
3
- className?: string;
4
- }): import("react").JSX.Element;
@@ -1,2 +0,0 @@
1
- import * as t from "@plexcord/discord-types";
2
- export declare const FormText: t.FormText;