fix various webpack finds
This commit is contained in:
parent
ca04b2665c
commit
21fd2eae88
12 changed files with 24 additions and 31 deletions
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
import { cl } from "@plugins/decor/ui";
|
||||
import { classes } from "@utils/misc";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { findCssClasses } from "@webpack";
|
||||
import { React } from "@webpack/common";
|
||||
import { JSX } from "react";
|
||||
|
||||
import Grid, { GridProps } from "./Grid";
|
||||
|
||||
const ScrollerClasses = findByPropsLazy("managedReactiveScroller");
|
||||
const ScrollerClasses = findCssClasses("managedReactiveScroller", "thin");
|
||||
|
||||
type Section<SectionT, ItemT> = SectionT & {
|
||||
items: Array<ItemT>;
|
||||
|
|
|
|||
|
|
@ -27,15 +27,14 @@ import { Devs } from "@utils/constants";
|
|||
import { classes } from "@utils/misc";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import type { Guild } from "@vencord/discord-types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { findCssClassesLazy } from "@webpack";
|
||||
import { Button, ChannelStore, Dialog, GuildMemberStore, GuildRoleStore, GuildStore, match, Menu, PermissionsBits, Popout, useRef, UserStore } from "@webpack/common";
|
||||
|
||||
import openRolesAndUsersPermissionsModal, { PermissionType, RoleOrUserPermission } from "./components/RolesAndUsersPermissions";
|
||||
import UserPermissions from "./components/UserPermissions";
|
||||
import { getSortedRolesForMember, sortPermissionOverwrites } from "./utils";
|
||||
|
||||
const PopoutClasses = findByPropsLazy("container", "scroller", "list");
|
||||
const RoleButtonClasses = findByPropsLazy("button", "icon");
|
||||
const PopoutClasses = findCssClassesLazy("container", "scroller", "list");
|
||||
|
||||
export const enum PermissionsSortOrder {
|
||||
HighestRole,
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import { Devs } from "@utils/constants";
|
|||
import { classes } from "@utils/misc";
|
||||
import definePlugin, { OptionType, StartAt } from "@utils/types";
|
||||
import { Channel } from "@vencord/discord-types";
|
||||
import { findByPropsLazy, findStoreLazy } from "@webpack";
|
||||
import { findCssClassesLazy, findStoreLazy } from "@webpack";
|
||||
import { Clickable, ContextMenuApi, FluxDispatcher, Menu, React } from "@webpack/common";
|
||||
|
||||
import { contextMenus } from "./components/contextMenu";
|
||||
|
|
@ -26,7 +26,7 @@ interface ChannelComponentProps {
|
|||
selected: boolean;
|
||||
}
|
||||
|
||||
const headerClasses = findByPropsLazy("privateChannelsHeaderContainer");
|
||||
const headerClasses = findCssClassesLazy("privateChannelsHeaderContainer", "headerText");
|
||||
|
||||
export const PrivateChannelSortStore = findStoreLazy("PrivateChannelSortStore") as { getPrivateChannelIds: () => string[]; };
|
||||
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@ import ErrorBoundary from "@components/ErrorBoundary";
|
|||
import { Devs } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import type { Message } from "@vencord/discord-types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { findCssClassesLazy } from "@webpack";
|
||||
import { DateUtils, Timestamp } from "@webpack/common";
|
||||
import type { HTMLAttributes } from "react";
|
||||
|
||||
const MessageClasses = findByPropsLazy("separator", "latin24CompactTimeStamp");
|
||||
const MessageClasses = findCssClassesLazy("separator", "latin24CompactTimeStamp");
|
||||
|
||||
function Sep(props: HTMLAttributes<HTMLElement>) {
|
||||
return <i className={MessageClasses.separator} aria-hidden={true} {...props} />;
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@
|
|||
|
||||
import { Devs, IS_MAC } from "@utils/constants";
|
||||
import definePlugin from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { findCssClassesLazy } from "@webpack";
|
||||
|
||||
const SpoilerClasses = findByPropsLazy("spoilerContent");
|
||||
const MessagesClasses = findByPropsLazy("messagesWrapper", "navigationDescription");
|
||||
const SpoilerClasses = findCssClassesLazy("spoilerContent", "hidden");
|
||||
const MessagesClasses = findCssClassesLazy("messagesWrapper", "navigationDescription");
|
||||
|
||||
export default definePlugin({
|
||||
name: "RevealAllSpoilers",
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@
|
|||
|
||||
import { DeleteIcon } from "@components/Icons";
|
||||
import { classes } from "@utils/misc";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { findCssClassesLazy } from "@webpack";
|
||||
import { Tooltip } from "@webpack/common";
|
||||
|
||||
const iconClasses = findByPropsLazy("button", "wrapper", "disabled", "separator");
|
||||
const iconClasses = findCssClassesLazy("button", "wrapper", "disabled", "separator", "dangerous");
|
||||
|
||||
export function DeleteButton({ onClick }: { onClick(): void; }) {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ import { classes } from "@utils/misc";
|
|||
import { ModalRoot, ModalSize, openModal } from "@utils/modal";
|
||||
import { useAwaiter } from "@utils/react";
|
||||
import { Guild, User } from "@vencord/discord-types";
|
||||
import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
|
||||
import { findComponentByCodeLazy, findCssClassesLazy } from "@webpack";
|
||||
import { FluxDispatcher, Forms, GuildChannelStore, GuildMemberStore, GuildRoleStore, IconUtils, Parser, PresenceStore, RelationshipStore, ScrollerThin, SnowflakeUtils, TabBar, Timestamp, useEffect, UserStore, UserUtils, useState, useStateFromStores } from "@webpack/common";
|
||||
|
||||
const IconClasses = findByPropsLazy("icon", "acronym", "childWrapper");
|
||||
const IconClasses = findCssClassesLazy("icon", "acronym", "childWrapper");
|
||||
const FriendRow = findComponentByCodeLazy("discriminatorClass:", ".isMobileOnline", "getAvatarURL");
|
||||
|
||||
const cl = classNameFactory("vc-gp-");
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import { sortPermissionOverwrites } from "@plugins/permissionsViewer/utils";
|
|||
import { classes } from "@utils/misc";
|
||||
import { formatDuration } from "@utils/text";
|
||||
import type { Channel } from "@vencord/discord-types";
|
||||
import { findByPropsLazy, findComponentByCodeLazy } from "@webpack";
|
||||
import { findByPropsLazy, findComponentByCodeLazy, findCssClassesLazy } from "@webpack";
|
||||
import { EmojiStore, FluxDispatcher, GuildMemberStore, GuildStore, Parser, PermissionsBits, PermissionStore, SnowflakeUtils, Text, Timestamp, Tooltip, useEffect, useState } from "@webpack/common";
|
||||
|
||||
import { cl, settings } from "..";
|
||||
|
|
@ -81,8 +81,7 @@ const enum ChannelFlags {
|
|||
}
|
||||
|
||||
|
||||
const ChatScrollClasses = findByPropsLazy("auto", "managedReactiveScroller");
|
||||
const ChatClasses = findByPropsLazy("chat", "content", "noChat", "chatContent");
|
||||
const ChatScrollClasses = findCssClassesLazy("auto", "managedReactiveScroller", "customTheme");
|
||||
const ChannelBeginHeader = findComponentByCodeLazy("#{intl::ROLE_REQUIRED_SINGLE_USER_MESSAGE}");
|
||||
const TagComponent = findComponentByCodeLazy("#{intl::FORUM_TAG_A11Y_FILTER_BY_TAG}");
|
||||
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@ import ErrorBoundary from "@components/ErrorBoundary";
|
|||
import { getIntlMessage } from "@utils/discord";
|
||||
import { classes } from "@utils/misc";
|
||||
import { Message } from "@vencord/discord-types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { findCssClassesLazy } from "@webpack";
|
||||
import { Tooltip, UserStore } from "@webpack/common";
|
||||
|
||||
import { settings } from "./settings";
|
||||
import { useFormattedPronouns } from "./utils";
|
||||
|
||||
const styles: Record<string, string> = findByPropsLazy("timestampInline");
|
||||
const TimestampClasses = findCssClassesLazy("timestampInline", "timestamp");
|
||||
const MessageDisplayCompact = getUserSettingLazy("textAndImages", "messageDisplayCompact")!;
|
||||
|
||||
const AUTO_MODERATION_ACTION = 24;
|
||||
|
|
@ -49,7 +49,7 @@ function PronounsChatComponent({ message }: { message: Message; }) {
|
|||
{tooltipProps => (
|
||||
<span
|
||||
{...tooltipProps}
|
||||
className={classes(styles.timestampInline, styles.timestamp)}
|
||||
className={classes(TimestampClasses.timestampInline, TimestampClasses.timestamp)}
|
||||
>• {pronouns}</span>
|
||||
)}
|
||||
</Tooltip>
|
||||
|
|
|
|||
|
|
@ -10,18 +10,15 @@ import ShowHiddenChannelsPlugin from "@plugins/showHiddenChannels";
|
|||
import { classNameFactory } from "@utils/css";
|
||||
import { classes } from "@utils/misc";
|
||||
import { Channel } from "@vencord/discord-types";
|
||||
import { filters, findByPropsLazy, mapMangledModuleLazy } from "@webpack";
|
||||
import { findByPropsLazy, findCssClassesLazy } from "@webpack";
|
||||
import { ChannelRouter, ChannelStore, Parser, PermissionsBits, PermissionStore, React, showToast, Text, Toasts, Tooltip, useMemo, UserStore, UserSummaryItem, useStateFromStores, VoiceStateStore } from "@webpack/common";
|
||||
import { PropsWithChildren } from "react";
|
||||
|
||||
const cl = classNameFactory("vc-uvs-");
|
||||
|
||||
const { selectVoiceChannel } = findByPropsLazy("selectVoiceChannel", "selectChannel");
|
||||
const { useChannelName } = mapMangledModuleLazy("#{intl::GROUP_DM_ALONE}", {
|
||||
useChannelName: filters.byCode("()=>null==")
|
||||
});
|
||||
|
||||
const ActionButtonClasses = findByPropsLazy("actionButton", "highlight");
|
||||
const ActionButtonClasses = findCssClassesLazy("actionButton", "highlight");
|
||||
|
||||
type IconProps = Omit<React.ComponentPropsWithoutRef<"div">, "children"> & {
|
||||
size?: number;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import definePlugin from "@utils/types";
|
|||
import { chooseFile } from "@utils/web";
|
||||
import { CloudUpload as TCloudUpload } from "@vencord/discord-types";
|
||||
import { CloudUploadPlatform } from "@vencord/discord-types/enums";
|
||||
import { findByPropsLazy, findLazy, findStoreLazy } from "@webpack";
|
||||
import { findCssClassesLazy, findLazy, findStoreLazy } from "@webpack";
|
||||
import { Button, Constants, FluxDispatcher, Forms, lodash, Menu, MessageActions, PermissionsBits, PermissionStore, RestAPI, SelectedChannelStore, showToast, SnowflakeUtils, Toasts, useEffect, useState } from "@webpack/common";
|
||||
import { ComponentType } from "react";
|
||||
|
||||
|
|
@ -43,7 +43,7 @@ import { VoiceRecorderWeb } from "./WebRecorder";
|
|||
|
||||
const CloudUpload: typeof TCloudUpload = findLazy(m => m.prototype?.trackUploadFinished);
|
||||
const PendingReplyStore = findStoreLazy("PendingReplyStore");
|
||||
const OptionClasses = findByPropsLazy("optionName", "optionIcon", "optionLabel");
|
||||
const OptionClasses = findCssClassesLazy("optionName", "optionIcon", "optionLabel");
|
||||
|
||||
export const cl = classNameFactory("vc-vmsg-");
|
||||
export type VoiceRecorder = ComponentType<{
|
||||
|
|
|
|||
|
|
@ -23,10 +23,8 @@ import { Queue } from "@utils/Queue";
|
|||
import { useForceUpdater } from "@utils/react";
|
||||
import definePlugin from "@utils/types";
|
||||
import { CustomEmoji, Message, ReactionEmoji, User } from "@vencord/discord-types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { ChannelStore, Constants, FluxDispatcher, React, RestAPI, useEffect, useLayoutEffect, UserStore, UserSummaryItem } from "@webpack/common";
|
||||
|
||||
const AvatarStyles = findByPropsLazy("moreUsers", "emptyUser", "avatarContainer", "clickableAvatar");
|
||||
let Scroll: any = null;
|
||||
const queue = new Queue();
|
||||
let reactions: Record<string, ReactionCacheEntry>;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue