@plexcord/types 1.13.2 → 1.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/package.json +3 -3
  2. package/plugins/fakeProfileThemes/index.d.ts +1 -1
  3. package/webpack/common/utils.d.ts +2 -1
  4. package/components/settings/Switch.d.ts +0 -8
  5. package/components/settings/tabs/plexcord/languages.d.ts +0 -10
  6. package/plugins/clearURLs/defaultRules.d.ts +0 -1
  7. package/plugins/fakeProfileThemesAndEffects/components/Builder.d.ts +0 -5
  8. package/plugins/fakeProfileThemesAndEffects/components/BuilderButton.d.ts +0 -9
  9. package/plugins/fakeProfileThemesAndEffects/components/BuilderColorButton.d.ts +0 -6
  10. package/plugins/fakeProfileThemesAndEffects/components/index.d.ts +0 -54
  11. package/plugins/fakeProfileThemesAndEffects/components/settingsAboutComponent.d.ts +0 -1
  12. package/plugins/fakeProfileThemesAndEffects/index.d.ts +0 -124
  13. package/plugins/fakeProfileThemesAndEffects/lib/fpte.d.ts +0 -57
  14. package/plugins/fakeProfileThemesAndEffects/lib/index.d.ts +0 -4
  15. package/plugins/fakeProfileThemesAndEffects/lib/profileEffects.d.ts +0 -58
  16. package/plugins/fakeProfileThemesAndEffects/lib/profilePreview.d.ts +0 -11
  17. package/plugins/fakeProfileThemesAndEffects/lib/userProfile.d.ts +0 -7
  18. package/plugins/jumpToStart/index.d.ts +0 -15
  19. package/plugins/messageLoggerEnhanced/native/updater.d.ts +0 -15
  20. package/plugins/newPluginsManager/NewPluginsModal.d.ts +0 -7
  21. package/plugins/newPluginsManager/index.d.ts +0 -15
  22. package/plugins/newPluginsManager/knownPlugins.d.ts +0 -4
  23. package/plugins/statusWhilePlaying.desktop/index.d.ts +0 -42
  24. package/utils/i18n.d.ts +0 -5
  25. package/utils/langs/en.d.ts +0 -287
  26. package/utils/langs/index.d.ts +0 -576
  27. package/utils/langs/tr.d.ts +0 -287
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plexcord/types",
3
3
  "private": false,
4
- "version": "1.13.2",
4
+ "version": "1.17.1",
5
5
  "description": "",
6
6
  "types": "index.d.ts",
7
7
  "scripts": {
@@ -26,7 +26,7 @@
26
26
  "type-fest": "^4.35.0"
27
27
  },
28
28
  "peerDependencies": {
29
- "@types/react": "18.3.1",
30
- "@types/react-dom": "18.3.1"
29
+ "@types/react": "19.2.1",
30
+ "@types/react-dom": "19.2.0"
31
31
  }
32
32
  }
@@ -53,7 +53,7 @@ declare const _default: {
53
53
  })[];
54
54
  };
55
55
  }>, {}>;
56
- colorDecodeHook(user: UserProfile): UserProfile;
56
+ colorDecodeHook(user: UserProfile): any;
57
57
  addCopy3y3Button: import("react").FunctionComponent<Colors>;
58
58
  } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
59
59
  export default _default;
@@ -7,7 +7,8 @@ export declare const moment: typeof import("moment");
7
7
  export declare const hljs: typeof import("highlight.js").default;
8
8
  export declare const useDrag: any;
9
9
  export declare const useDrop: any;
10
- export declare const match: typeof import("ts-pattern").match, P: typeof import("ts-pattern/dist/patterns");
10
+ export declare const match: typeof import("ts-pattern").match;
11
+ export declare const P: any;
11
12
  export declare const lodash: typeof import("lodash");
12
13
  export declare const i18n: Record<"t" | "intl", any>;
13
14
  export declare let SnowflakeUtils: t.SnowflakeUtils;
@@ -1,8 +0,0 @@
1
- import "./Switch.css";
2
- interface SwitchProps {
3
- checked: boolean;
4
- onChange: (checked: boolean) => void;
5
- disabled?: boolean;
6
- }
7
- export declare function Switch({ checked, onChange, disabled }: SwitchProps): import("react").JSX.Element;
8
- export {};
@@ -1,10 +0,0 @@
1
- export declare const UI_LANGUAGES: readonly [{
2
- readonly value: "auto";
3
- readonly label: "Auto";
4
- }, {
5
- readonly value: "en";
6
- readonly label: "English";
7
- }, {
8
- readonly value: "tr";
9
- readonly label: "Türkçe";
10
- }];
@@ -1 +0,0 @@
1
- export declare const defaultRules: string[];
@@ -1,5 +0,0 @@
1
- import type { Guild } from "@plexcord/discord-types";
2
- export interface BuilderProps {
3
- guild?: Guild | undefined;
4
- }
5
- export declare function Builder({ guild }: BuilderProps): import("react").JSX.Element;
@@ -1,9 +0,0 @@
1
- import type { ComponentProps, RefObject } from "react";
2
- export interface BuilderButtonProps {
3
- label?: string | undefined;
4
- tooltip?: string | undefined;
5
- selectedStyle?: ComponentProps<"div">["style"];
6
- buttonProps?: ComponentProps<"div"> | undefined;
7
- buttonRef?: RefObject<null>;
8
- }
9
- export declare const BuilderButton: ({ buttonRef, label, tooltip, selectedStyle, buttonProps }: BuilderButtonProps) => import("react").JSX.Element;
@@ -1,6 +0,0 @@
1
- import { type BuilderButtonProps, type CustomColorPickerProps } from ".";
2
- export interface BuilderColorButtonProps extends Pick<BuilderButtonProps, "label">, Pick<CustomColorPickerProps, "suggestedColors"> {
3
- color: number | null;
4
- setColor: (color: number | null) => void;
5
- }
6
- export declare function BuilderColorButton({ label, color, setColor, suggestedColors }: BuilderColorButtonProps): import("react").JSX.Element;
@@ -1,54 +0,0 @@
1
- import type { Guild, useToken } from "@plexcord/discord-types";
2
- import type { ProfileEffectConfig } from "../lib/profileEffects";
3
- import { type ModalProps } from "../../../utils/modal";
4
- import type { ComponentType, FunctionComponent, PropsWithChildren, ReactNode } from "react";
5
- export * from "./Builder";
6
- export * from "./BuilderButton";
7
- export * from "./BuilderColorButton";
8
- export * from "./settingsAboutComponent";
9
- export interface CustomizationSectionProps extends PropsWithChildren {
10
- borderType?: FeatureBorderType | undefined;
11
- className?: string | undefined;
12
- description?: ReactNode;
13
- disabled?: boolean | undefined;
14
- errors?: string[] | undefined;
15
- forcedDivider?: boolean | undefined;
16
- hasBackground?: boolean | undefined;
17
- hideDivider?: boolean | undefined;
18
- showBorder?: boolean | undefined;
19
- showPremiumIcon?: boolean | undefined;
20
- title?: ReactNode;
21
- titleIcon?: ReactNode;
22
- titleId?: string | undefined;
23
- }
24
- export declare const enum FeatureBorderType {
25
- LIMITED = "limited",
26
- PREMIUM = "premium"
27
- }
28
- export declare const CustomizationSection: ComponentType<CustomizationSectionProps>;
29
- export declare const tokens: {
30
- unsafe_rawColors: Record<string, Parameters<useToken>[0]>;
31
- };
32
- export declare const useAvatarColors: (avatarURL: string | null | undefined, fallbackColor: string, desaturateColors?: boolean | undefined) => [string, string, ...string[]];
33
- export interface CustomColorPickerProps {
34
- className?: string | undefined;
35
- eagerUpdate?: boolean | undefined;
36
- footer?: ReactNode;
37
- middle?: ReactNode;
38
- onChange: (color: number) => void;
39
- onClose?: (() => void) | undefined;
40
- showEyeDropper?: boolean | undefined;
41
- suggestedColors?: string[] | null | undefined;
42
- wrapperComponentType?: ComponentType | null | undefined;
43
- value?: string | number | null | undefined;
44
- }
45
- export declare const CustomColorPicker: import("../../../utils").LazyComponentWrapper<ComponentType<CustomColorPickerProps>>;
46
- interface ProfileEffectModalProps extends ModalProps {
47
- analyticsLocations?: string[] | undefined;
48
- guild?: Guild | null | undefined;
49
- initialSelectedEffectId?: string | undefined;
50
- onApply: (effect: ProfileEffectConfig | null) => void;
51
- }
52
- declare let ProfileEffectModal: FunctionComponent<ProfileEffectModalProps>;
53
- export declare function setProfileEffectModal(comp: typeof ProfileEffectModal): void;
54
- export declare function openProfileEffectModal(initialEffectId: ProfileEffectModalProps["initialSelectedEffectId"], onApply: ProfileEffectModalProps["onApply"], guild?: ProfileEffectModalProps["guild"]): Promise<void>;
@@ -1 +0,0 @@
1
- export declare const settingsAboutComponent: () => import("react").JSX.Element;
@@ -1,124 +0,0 @@
1
- import { OptionType } from "../../utils/types";
2
- import { type BuilderProps, setProfileEffectModal } from "./components";
3
- import { profilePreviewHook } from "./lib/profilePreview";
4
- import { decodeAboutMeFPTEHook } from "./lib/userProfile";
5
- export declare const settings: import("../../utils/types").DefinedSettings<{
6
- prioritizeNitro: {
7
- description: string;
8
- type: OptionType.SELECT;
9
- options: ({
10
- label: string;
11
- value: true;
12
- default?: undefined;
13
- } | {
14
- label: string;
15
- value: false;
16
- default: true;
17
- })[];
18
- };
19
- hideBuilder: {
20
- description: string;
21
- type: OptionType.BOOLEAN;
22
- default: false;
23
- };
24
- }, import("../../utils/types").SettingsChecks<{
25
- prioritizeNitro: {
26
- description: string;
27
- type: OptionType.SELECT;
28
- options: ({
29
- label: string;
30
- value: true;
31
- default?: undefined;
32
- } | {
33
- label: string;
34
- value: false;
35
- default: true;
36
- })[];
37
- };
38
- hideBuilder: {
39
- description: string;
40
- type: OptionType.BOOLEAN;
41
- default: false;
42
- };
43
- }>, {}>;
44
- declare const _default: {
45
- name: string;
46
- description: string;
47
- authors: {
48
- name: string;
49
- id: bigint;
50
- }[];
51
- patches: ({
52
- find: string;
53
- replacement: {
54
- match: RegExp;
55
- replace: string;
56
- };
57
- group?: undefined;
58
- } | {
59
- find: string;
60
- group: true;
61
- replacement: {
62
- match: RegExp;
63
- replace: (match: string, func: string, funcName: string) => string;
64
- }[];
65
- } | {
66
- find: string;
67
- replacement: {
68
- match: RegExp;
69
- replace: (match: string, _: string, func: string) => string;
70
- };
71
- group?: undefined;
72
- })[];
73
- addFPTEBuilder: (guild?: BuilderProps["guild"]) => import("react").JSX.Element | null;
74
- onApply(_effectId?: string): void;
75
- ProfileEffectModal: Parameters<typeof setProfileEffectModal>[0];
76
- ProfileEffectSelection: () => null;
77
- usePurchases: () => Map<string, {
78
- items: import("./lib/profileEffects").ProfileEffectRecordInstance;
79
- }>;
80
- useProfileEffectSections: (origSections: Record<string, any>[]) => Record<string, any>[];
81
- settings: import("../../utils/types").DefinedSettings<{
82
- prioritizeNitro: {
83
- description: string;
84
- type: OptionType.SELECT;
85
- options: ({
86
- label: string;
87
- value: true;
88
- default?: undefined;
89
- } | {
90
- label: string;
91
- value: false;
92
- default: true;
93
- })[];
94
- };
95
- hideBuilder: {
96
- description: string;
97
- type: OptionType.BOOLEAN;
98
- default: false;
99
- };
100
- }, import("../../utils/types").SettingsChecks<{
101
- prioritizeNitro: {
102
- description: string;
103
- type: OptionType.SELECT;
104
- options: ({
105
- label: string;
106
- value: true;
107
- default?: undefined;
108
- } | {
109
- label: string;
110
- value: false;
111
- default: true;
112
- })[];
113
- };
114
- hideBuilder: {
115
- description: string;
116
- type: OptionType.BOOLEAN;
117
- default: false;
118
- };
119
- }>, {}>;
120
- settingsAboutComponent: () => import("react").JSX.Element;
121
- decodeAboutMeFPTEHook: typeof decodeAboutMeFPTEHook;
122
- profilePreviewHook: typeof profilePreviewHook;
123
- } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
124
- export default _default;
@@ -1,57 +0,0 @@
1
- /**
2
- * Builds a theme color string in the legacy format: `[#primary,#accent]`, where primary and accent are
3
- * 24-bit colors as base-16 strings, with each codepoint of the string offset by +{@link STARTING_CODEPOINT}.
4
- * @param primary The 24-bit primary color.
5
- * @param accent The 24-bit accent color.
6
- * @returns The built legacy-format theme color string.
7
- */
8
- export declare function encodeColorsLegacy(primary: number, accent: number): string;
9
- /**
10
- * Extracts the theme colors from a legacy-format string.
11
- * @param str The legacy-format string to extract the theme colors from.
12
- * @returns The profile theme colors. Colors will be -1 if not found.
13
- * @see {@link encodeColorsLegacy}
14
- */
15
- export declare function decodeColorsLegacy(str: string): [primaryColor: number, accentColor: number];
16
- /**
17
- * Converts a 24-bit color to a base-{@link RADIX} string with each codepoint offset by +{@link STARTING_CODEPOINT}.
18
- * @param color The 24-bit color to be converted.
19
- * @returns The converted base-{@link RADIX} string with +{@link STARTING_CODEPOINT} offset.
20
- */
21
- export declare function encodeColor(color: number): string;
22
- /**
23
- * Converts a no-offset base-{@link RADIX} string to a 24-bit color.
24
- * @param str The no-offset base-{@link RADIX} string to be converted.
25
- * @returns The converted 24-bit color.
26
- * Will be -1 if `str` is empty and -2 if the color is greater than the maximum 24-bit color, 0xFFFFFF.
27
- */
28
- export declare function decodeColor(str: string): number;
29
- /**
30
- * Converts an effect ID to a base-{@link RADIX} string with each code point offset by +{@link STARTING_CODEPOINT}.
31
- * @param id The effect ID to be converted.
32
- * @returns The converted base-{@link RADIX} string with +{@link STARTING_CODEPOINT} offset.
33
- */
34
- export declare function encodeEffect(id: bigint): string;
35
- /**
36
- * Converts a no-offset base-{@link RADIX} string to an effect ID.
37
- * @param str The no-offset base-{@link RADIX} string to be converted.
38
- * @returns The converted effect ID.
39
- * Will be -1n if `str` is empty and -2n if the color is greater than the maximum effect ID.
40
- */
41
- export declare function decodeEffect(str: string): bigint;
42
- /**
43
- * Builds a FPTE string containing the given primary/accent colors and effect ID. If the FPTE Builder is NOT set to backwards
44
- * compatibility mode, the primary and accent colors will be converted to base-{@link RADIX} before they are encoded.
45
- * @param primary The primary profile theme color. Must be negative if unset.
46
- * @param accent The accent profile theme color. Must be negative if unset.
47
- * @param effect The profile effect ID. Must be empty if unset.
48
- * @param legacy Whether the primary and accent colors should be legacy encoded.
49
- * @returns The built FPTE string. Will be empty if the given colors and effect are all unset.
50
- */
51
- export declare function buildFPTE(primary: number, accent: number, effect: string, legacy: boolean): string;
52
- /**
53
- * Extracts the delimiter-separated values of the first FPTE substring in a string.
54
- * @param str The string to be searched for a FPTE substring.
55
- * @returns An array of the found FPTE substring's extracted values. Values will be empty if not found.
56
- */
57
- export declare function extractFPTE(str: string): [maybePrimaryOrLegacy: string, maybeAccentOrEffect: string, maybeEffect: string];
@@ -1,4 +0,0 @@
1
- export * from "./fpte";
2
- export * from "./profileEffects";
3
- export * from "./profilePreview";
4
- export * from "./userProfile";
@@ -1,58 +0,0 @@
1
- import type { FluxStore } from "@plexcord/discord-types";
2
- import type { SnakeCasedProperties } from "type-fest";
3
- export declare const ProfileEffectStore: FluxStore & {
4
- canFetch: () => boolean;
5
- getProfileEffectById: (effectId: string) => ProfileEffect | undefined;
6
- hasFetched: () => boolean;
7
- readonly fetchError: Error | undefined;
8
- readonly isFetching: boolean;
9
- readonly profileEffects: ProfileEffect[];
10
- readonly tryItOutId: string | null;
11
- };
12
- export declare const ProfileEffectRecord: {
13
- new (profileEffectProperties: ProfileEffectProperties): ProfileEffectRecordInstance;
14
- fromServer: (profileEffectFromServer: SnakeCasedProperties<ProfileEffectProperties>) => ProfileEffectRecordInstance;
15
- };
16
- export type ProfileEffectProperties = Omit<ProfileEffectRecordInstance, "type">;
17
- export interface ProfileEffectRecordInstance {
18
- id: string;
19
- skuId: string;
20
- type: CollectiblesItemType.PROFILE_EFFECT;
21
- }
22
- export interface ProfileEffect {
23
- config: ProfileEffectConfig;
24
- id: string;
25
- skuId: string;
26
- }
27
- export interface ProfileEffectConfig {
28
- accessibilityLabel: string;
29
- animationType: number;
30
- description: string;
31
- effects: {
32
- duartion: number;
33
- height: number;
34
- loop: boolean;
35
- loopDelay: number;
36
- position: {
37
- x: number;
38
- y: number;
39
- };
40
- src: string;
41
- start: number;
42
- width: number;
43
- zIndex: number;
44
- }[];
45
- id: string;
46
- reducedMotionSrc: string;
47
- sku_id: string;
48
- staticFrameSrc?: string;
49
- thumbnailPreviewSrc: string;
50
- title: string;
51
- type: CollectiblesItemType.PROFILE_EFFECT;
52
- }
53
- export declare const enum CollectiblesItemType {
54
- AVATAR_DECORATION = 0,
55
- PROFILE_EFFECT = 1,
56
- NONE = 100,
57
- BUNDLE = 1000
58
- }
@@ -1,11 +0,0 @@
1
- import type { ProfileEffectConfig } from "./profileEffects";
2
- declare let primaryColor: number | null;
3
- export declare function usePrimaryColor(initialState: typeof primaryColor): readonly [number | null, (color: typeof primaryColor) => void];
4
- declare let accentColor: number | null;
5
- export declare function useAccentColor(initialState: typeof accentColor): readonly [number | null, (color: typeof accentColor) => void];
6
- declare let profileEffect: ProfileEffectConfig | null;
7
- export declare function useProfileEffect(initialState: typeof profileEffect): readonly [ProfileEffectConfig | null, (effect: typeof profileEffect) => void];
8
- declare let showPreview: boolean;
9
- export declare function useShowPreview(initialState: typeof showPreview): readonly [boolean, (preview: typeof showPreview) => void];
10
- export declare function profilePreviewHook(props: Record<string, any>): void;
11
- export {};
@@ -1,7 +0,0 @@
1
- export interface UserProfile {
2
- bio: string;
3
- premiumType: number | null | undefined;
4
- profileEffectId: string | undefined;
5
- themeColors: [primaryColor: number, accentColor: number] | undefined;
6
- }
7
- export declare function decodeAboutMeFPTEHook(profile?: UserProfile): UserProfile | undefined;
@@ -1,15 +0,0 @@
1
- import { NavContextMenuPatchCallback } from "../../api/ContextMenu";
2
- declare const _default: {
3
- name: string;
4
- description: string;
5
- authors: {
6
- name: string;
7
- id: bigint;
8
- }[];
9
- contextMenus: {
10
- "channel-context": NavContextMenuPatchCallback;
11
- "user-context": NavContextMenuPatchCallback;
12
- "thread-context": NavContextMenuPatchCallback;
13
- };
14
- } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
15
- export default _default;
@@ -1,15 +0,0 @@
1
- import type { GitResult } from "../types";
2
- export declare function update(): Promise<GitResult>;
3
- export declare function getCommitHash(): Promise<GitResult>;
4
- export interface GitInfo {
5
- repo: string;
6
- gitHash: string;
7
- }
8
- export declare function getRepoInfo(): Promise<GitResult>;
9
- export interface Commit {
10
- hash: string;
11
- longHash: string;
12
- message: string;
13
- author: string;
14
- }
15
- export declare function getNewCommits(): Promise<GitResult>;
@@ -1,7 +0,0 @@
1
- import { ModalProps } from "../../utils/modal";
2
- import { JSX } from "react";
3
- export declare function NewPluginsModal({ modalProps, newPlugins }: {
4
- modalProps: ModalProps;
5
- newPlugins: Set<string>;
6
- }): JSX.Element;
7
- export declare function openNewPluginsModal(): Promise<void>;
@@ -1,15 +0,0 @@
1
- import { openNewPluginsModal } from "./NewPluginsModal";
2
- declare const _default: {
3
- name: string;
4
- description: string;
5
- authors: {
6
- name: string;
7
- id: bigint;
8
- }[];
9
- flux: {
10
- POST_CONNECTION_OPEN(): Promise<void>;
11
- };
12
- openNewPluginsModal: typeof openNewPluginsModal;
13
- KNOWN_PLUGINS_DATA_KEY: string;
14
- } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
15
- export default _default;
@@ -1,4 +0,0 @@
1
- export declare const KNOWN_PLUGINS_DATA_KEY = "NewPluginsManager_KnownPlugins";
2
- export declare function getKnownPlugins(): Promise<Set<string>>;
3
- export declare function getNewPlugins(): Promise<Set<string>>;
4
- export declare function writeKnownPlugins(): Promise<void>;
@@ -1,42 +0,0 @@
1
- import { OptionType } from "../../utils/types";
2
- declare const _default: {
3
- name: string;
4
- description: string;
5
- authors: {
6
- name: string;
7
- id: bigint;
8
- }[];
9
- settings: import("../../utils/types").DefinedSettings<{
10
- statusToSet: {
11
- type: OptionType.SELECT;
12
- description: string;
13
- options: ({
14
- label: string;
15
- value: string;
16
- default?: undefined;
17
- } | {
18
- label: string;
19
- value: string;
20
- default: true;
21
- })[];
22
- };
23
- }, import("../../utils/types").SettingsChecks<{
24
- statusToSet: {
25
- type: OptionType.SELECT;
26
- description: string;
27
- options: ({
28
- label: string;
29
- value: string;
30
- default?: undefined;
31
- } | {
32
- label: string;
33
- value: string;
34
- default: true;
35
- })[];
36
- };
37
- }>, {}>;
38
- flux: {
39
- RUNNING_GAMES_CHANGE(event: any): void;
40
- };
41
- } & Record<PropertyKey, any> & import("../../utils/types").Plugin;
42
- export default _default;
package/utils/i18n.d.ts DELETED
@@ -1,5 +0,0 @@
1
- /**
2
- * Discord'un mevcut dil ayarını al
3
- */
4
- export declare function getDiscordLocale(): string;
5
- export declare function t(key: string, fallback?: string, params?: Record<string, any>): string;