@plexcord/types 1.19.2 → 1.19.3

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/api/Settings.d.ts CHANGED
@@ -91,10 +91,10 @@ export declare const Settings: Settings;
91
91
  * @returns Settings
92
92
  */
93
93
  export declare function useSettings(paths?: UseSettings<Settings>[]): Settings;
94
- export declare function migratePluginToSettings(newName: string, oldName: string, ...settingNames: string[]): void;
95
94
  export declare function migratePluginSettings(name: string, ...oldNames: string[]): void;
96
95
  export declare function migratePluginSetting(pluginName: string, newSetting: string, oldSetting: string): void;
97
- export declare function migrateSettingFromPlugin(newPlugin: string, newSetting: string, oldPlugin: string, oldSetting: string): void;
96
+ export declare function migratePluginToSettings(deleteOldSettings: boolean, newName: string, oldName: string, ...settingNames: string[]): void;
97
+ export declare function migrateSettingsFromPlugin(newPlugin: string, oldPlugin: string, ...settings: string[]): void;
98
98
  export declare function definePluginSettings<Def extends SettingsDefinition, Checks extends SettingsChecks<Def>, PrivateSettings extends object = {}>(def: Def, checks?: Checks): DefinedSettings<Def, Checks, PrivateSettings>;
99
99
  type UseSettings<T extends object> = ResolveUseSettings<T>[keyof T];
100
100
  type ResolveUseSettings<T extends object> = {
package/locales/en.d.ts CHANGED
@@ -1059,10 +1059,6 @@ declare const translations: {
1059
1059
  readonly cancel: "Cancel";
1060
1060
  };
1061
1061
  };
1062
- readonly amITyping: {
1063
- readonly name: "AmITyping";
1064
- readonly description: "Shows you if other people can see you typing.";
1065
- };
1066
1062
  readonly anonymiseFileNames: {
1067
1063
  readonly name: "AnonymiseFileNames";
1068
1064
  readonly description: "Anonymise uploaded file names";
@@ -8904,6 +8900,10 @@ declare const translations: {
8904
8900
  readonly label: "Alternative Formatting";
8905
8901
  readonly description: "Show a more useful message when several users are typing";
8906
8902
  };
8903
+ readonly amITyping: {
8904
+ readonly label: "Am I Typing";
8905
+ readonly description: "Shows you if other people can see you typing";
8906
+ };
8907
8907
  };
8908
8908
  readonly others: {
8909
8909
  readonly areTyping: "and {{count}} others are typing...";
@@ -10634,10 +10634,6 @@ export declare const plugin: DeepKeyProxy<{
10634
10634
  readonly cancel: "Cancel";
10635
10635
  };
10636
10636
  };
10637
- readonly amITyping: {
10638
- readonly name: "AmITyping";
10639
- readonly description: "Shows you if other people can see you typing.";
10640
- };
10641
10637
  readonly anonymiseFileNames: {
10642
10638
  readonly name: "AnonymiseFileNames";
10643
10639
  readonly description: "Anonymise uploaded file names";
@@ -18479,6 +18475,10 @@ export declare const plugin: DeepKeyProxy<{
18479
18475
  readonly label: "Alternative Formatting";
18480
18476
  readonly description: "Show a more useful message when several users are typing";
18481
18477
  };
18478
+ readonly amITyping: {
18479
+ readonly label: "Am I Typing";
18480
+ readonly description: "Shows you if other people can see you typing";
18481
+ };
18482
18482
  };
18483
18483
  readonly others: {
18484
18484
  readonly areTyping: "and {{count}} others are typing...";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plexcord/types",
3
3
  "private": false,
4
- "version": "1.19.2",
4
+ "version": "1.19.3",
5
5
  "description": "",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
@@ -17,6 +17,6 @@ declare const _default: {
17
17
  }, styles: {
18
18
  iconForeground?: string;
19
19
  }): import("react").JSX.Element[];
20
- shouldHideTooltips(): any;
20
+ shouldHideTooltips(): boolean;
21
21
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
22
22
  export default _default;
@@ -342,7 +342,7 @@ declare const _default: {
342
342
  };
343
343
  FolderSideBar: import("react").FunctionComponent<any>;
344
344
  closeFolders: typeof closeFolders;
345
- wrapGuildNodeComponent(node: any, originalComponent: () => ReactNode, isBetterFolders: boolean, expandedFolderIds?: Set<any>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactPortal | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
345
+ wrapGuildNodeComponent(node: any, originalComponent: () => ReactNode, isBetterFolders: boolean, expandedFolderIds?: Set<any>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
346
346
  makeGuildsBarGuildListFilter(isBetterFolders: boolean): (child: any) => boolean;
347
347
  makeGuildsBarSidebarFilter(isBetterFolders: boolean): (child: any) => boolean;
348
348
  shouldShowFolderIconAndBackground(isBetterFolders: boolean, expandedFolderIds?: Set<any>): boolean;
@@ -96,7 +96,7 @@ declare const _default: {
96
96
  })[];
97
97
  buildPluginMenuEntries: typeof buildPluginMenuEntries;
98
98
  buildThemeMenuEntries: typeof buildThemeMenuEntries;
99
- 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;
99
+ Layer(props: LayerProps): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
100
100
  transformSettingsEntries(list: SettingsEntry[], keyMap: Map<string, string>): TransformedSettingsEntry[];
101
101
  wrapMap(toWrap: TransformedSettingsEntry[]): TransformedSettingsEntry[];
102
102
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
@@ -65,6 +65,6 @@ declare const _default: {
65
65
  })[];
66
66
  patchTimeslots(timeslots: SelectOption[]): SelectOption[];
67
67
  patchFramerates(framerates: SelectOption[]): SelectOption[];
68
- getApplicationId(activityName: string): string | null;
68
+ getApplicationId(activityName: string): string | null | undefined;
69
69
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
70
70
  export default _default;
@@ -9,5 +9,5 @@ export declare function cleanupUserObject(user: User): {
9
9
  avatar: string;
10
10
  id: string;
11
11
  bot: boolean;
12
- public_flags: number;
12
+ public_flags: import("@plexcord/discord-types/enums").UserFlags;
13
13
  };
@@ -1,14 +1,2 @@
1
- import { Guild } from "@plexcord/discord-types";
2
- export declare const enum PermissionType {
3
- Role = 0,
4
- User = 1,
5
- Owner = 2
6
- }
7
- export interface RoleOrUserPermission {
8
- type: PermissionType;
9
- id?: string;
10
- permissions?: bigint;
11
- overwriteAllow?: bigint;
12
- overwriteDeny?: bigint;
13
- }
1
+ import { Guild, RoleOrUserPermission } from "@plexcord/discord-types";
14
2
  export default function openRolesAndUsersPermissionsModal(permissions: Array<RoleOrUserPermission>, guild: Guild, header: string): string;
@@ -35,10 +35,23 @@ declare const _default: {
35
35
  }>, {}>;
36
36
  patches: {
37
37
  find: string;
38
- replacement: {
38
+ replacement: ({
39
39
  match: RegExp;
40
40
  replace: string;
41
- };
41
+ predicate?: undefined;
42
+ } | {
43
+ predicate: () => boolean;
44
+ match: RegExp;
45
+ replace: string;
46
+ })[];
42
47
  }[];
48
+ deleteMessage({ channel_id, id }: {
49
+ channel_id: any;
50
+ id: any;
51
+ }): void;
52
+ toggleMessagePin({ channel, message }: {
53
+ channel: any;
54
+ message: any;
55
+ }): any;
43
56
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
44
57
  export default _default;
@@ -1,32 +1,5 @@
1
1
  import type { Channel } from "@plexcord/discord-types";
2
- declare const enum SortOrderTypes {
3
- LATEST_ACTIVITY = 0,
4
- CREATION_DATE = 1
5
- }
6
- declare const enum ForumLayoutTypes {
7
- DEFAULT = 0,
8
- LIST = 1,
9
- GRID = 2
10
- }
11
- interface DefaultReaction {
12
- emojiId: string | null;
13
- emojiName: string | null;
14
- }
15
- interface Tag {
16
- id: string;
17
- name: string;
18
- emojiId: string | null;
19
- emojiName: string | null;
20
- moderated: boolean;
21
- }
22
- interface ExtendedChannel extends Channel {
23
- defaultThreadRateLimitPerUser?: number;
24
- defaultSortOrder?: SortOrderTypes | null;
25
- defaultForumLayout?: ForumLayoutTypes;
26
- defaultReactionEmoji?: DefaultReaction | null;
27
- availableTags?: Array<Tag>;
28
- }
29
2
  declare const _default: import("react").FunctionComponent<{
30
- channel: ExtendedChannel;
3
+ channel: Channel;
31
4
  }>;
32
5
  export default _default;
@@ -20,6 +20,7 @@ declare const _default: {
20
20
  "expression-picker": NavContextMenuPatchCallback;
21
21
  };
22
22
  start(): void;
23
+ isBlocked(stickerId: any): boolean;
23
24
  blockedComponent: React.FunctionComponent<any>;
24
25
  settings: import("../../utils/types").DefinedSettings<{
25
26
  showGif: {
@@ -32,6 +32,13 @@ declare const _default: {
32
32
  type: OptionType.BOOLEAN;
33
33
  default: true;
34
34
  };
35
+ amITyping: {
36
+ label: () => string;
37
+ description: () => string;
38
+ type: OptionType.BOOLEAN;
39
+ default: false;
40
+ restartNeeded: true;
41
+ };
35
42
  }, import("../../utils/types").SettingsChecks<{
36
43
  showAvatars: {
37
44
  label: () => string;
@@ -51,9 +58,16 @@ declare const _default: {
51
58
  type: OptionType.BOOLEAN;
52
59
  default: true;
53
60
  };
61
+ amITyping: {
62
+ label: () => string;
63
+ description: () => string;
64
+ type: OptionType.BOOLEAN;
65
+ default: false;
66
+ restartNeeded: true;
67
+ };
54
68
  }>, {}>;
55
69
  managedStyle: string;
56
- patches: {
70
+ patches: ({
57
71
  find: string;
58
72
  group: true;
59
73
  replacement: ({
@@ -65,7 +79,16 @@ declare const _default: {
65
79
  replace: string;
66
80
  predicate: () => boolean;
67
81
  })[];
68
- }[];
82
+ predicate?: undefined;
83
+ } | {
84
+ find: string;
85
+ predicate: () => boolean;
86
+ replacement: {
87
+ match: RegExp;
88
+ replace: string;
89
+ };
90
+ group?: undefined;
91
+ })[];
69
92
  useTypingUsers(channel: Channel | undefined): User[];
70
93
  buildSeveralUsers: import("react").FunctionComponent<{
71
94
  users: User[];
@@ -78,13 +78,6 @@ export declare function fetchUserProfile(id: string, options?: FetchUserProfileO
78
78
  * Get the unique username for a user. Returns user.username for pomelo people, user.tag otherwise
79
79
  */
80
80
  export declare function getUniqueUsername(user: User): string;
81
- /**
82
- * Get the URL for an emoji. This function always returns a gif URL for animated emojis, instead of webp
83
- * @param id The emoji id
84
- * @param animated Whether the emoji is animated
85
- * @param size The size for the emoji
86
- */
87
- export declare function getEmojiURL(id: string, animated: boolean, size: number): string;
88
81
  export declare function getGuildAcronym(guild: Guild): string;
89
82
  export declare function hasGuildFeature(guild: Guild, feature: GuildFeatures): boolean;
90
83
  export {};
@@ -49,6 +49,8 @@ export declare let InviteStore: t.InviteStore;
49
49
  export declare let LocaleStore: t.LocaleStore;
50
50
  export declare let RTCConnectionStore: t.RTCConnectionStore;
51
51
  export declare let SoundboardStore: t.SoundboardStore;
52
+ export declare let PopoutWindowStore: t.PopoutWindowStore;
53
+ export declare let ApplicationCommandIndexStore: GenericStore;
52
54
  /**
53
55
  * @see jsdoc of {@link t.useStateFromStores}
54
56
  */
@@ -80,6 +80,8 @@ export declare const ChannelActionCreators: any;
80
80
  export declare const VoiceActions: any;
81
81
  export declare const GuildActions: any;
82
82
  export declare const ChannelActions: any;
83
+ export declare const DraftActions: any;
84
+ export declare const PinActions: any;
83
85
  export declare const IconUtils: t.IconUtils;
84
86
  export declare const ReadStateUtils: Record<"ackChannel", any>;
85
87
  export declare const ExpressionPickerStore: t.ExpressionPickerStore;