@plexcord/types 1.17.3 → 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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plexcord/types",
3
3
  "private": false,
4
- "version": "1.17.3",
4
+ "version": "1.17.4",
5
5
  "description": "",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
@@ -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;
@@ -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;
@@ -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;
@@ -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,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,46 +0,0 @@
1
- import { VoiceState } from "@plexcord/discord-types";
2
- import { OptionType } from "../../utils/types";
3
- declare const _default: {
4
- name: string;
5
- description: string;
6
- authors: {
7
- name: string;
8
- id: bigint;
9
- }[];
10
- settings: import("../../utils/types").DefinedSettings<{
11
- statusToSet: {
12
- type: OptionType.SELECT;
13
- description: string;
14
- options: ({
15
- label: string;
16
- value: string;
17
- default?: undefined;
18
- } | {
19
- label: string;
20
- value: string;
21
- default: true;
22
- })[];
23
- };
24
- }, import("../../utils/types").SettingsChecks<{
25
- statusToSet: {
26
- type: OptionType.SELECT;
27
- description: string;
28
- options: ({
29
- label: string;
30
- value: string;
31
- default?: undefined;
32
- } | {
33
- label: string;
34
- value: string;
35
- default: true;
36
- })[];
37
- };
38
- }>, {}>;
39
- flux: {
40
- VOICE_STATE_UPDATES({ voiceStates }: {
41
- voiceStates: VoiceState[];
42
- }): void;
43
- VOICE_CHANNEL_STATUS_UPDATE(): void;
44
- };
45
- } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
46
- export default _default;