mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-18 02:47:03 -04:00
Merge branch 'dev' into newDevTools
This commit is contained in:
commit
8bcfcf7ccd
41 changed files with 488 additions and 323 deletions
|
@ -53,6 +53,7 @@ export let RelationshipStore: Stores.RelationshipStore & t.FluxStore & {
|
|||
};
|
||||
|
||||
export let EmojiStore: t.EmojiStore;
|
||||
export let ThemeStore: t.ThemeStore;
|
||||
export let WindowStore: t.WindowStore;
|
||||
export let DraftStore: t.DraftStore;
|
||||
|
||||
|
@ -84,3 +85,4 @@ waitForStore("GuildChannelStore", m => GuildChannelStore = m);
|
|||
waitForStore("MessageStore", m => MessageStore = m);
|
||||
waitForStore("WindowStore", m => WindowStore = m);
|
||||
waitForStore("EmojiStore", m => EmojiStore = m);
|
||||
waitForStore("ThemeStore", m => ThemeStore = m);
|
||||
|
|
20
src/webpack/common/types/components.d.ts
vendored
20
src/webpack/common/types/components.d.ts
vendored
|
@ -91,7 +91,7 @@ export type Tooltip = ComponentType<{
|
|||
/** Tooltip.Colors.BLACK */
|
||||
color?: string;
|
||||
/** TooltipPositions.TOP */
|
||||
position?: string;
|
||||
position?: PopoutPosition;
|
||||
|
||||
tooltipClassName?: string;
|
||||
tooltipContentClassName?: string;
|
||||
|
@ -110,7 +110,7 @@ export type TooltipContainer = ComponentType<PropsWithChildren<{
|
|||
/** Tooltip.Colors.BLACK */
|
||||
color?: string;
|
||||
/** TooltipPositions.TOP */
|
||||
position?: string;
|
||||
position?: PopoutPosition;
|
||||
spacing?: number;
|
||||
|
||||
className?: string;
|
||||
|
@ -252,7 +252,7 @@ export type Select = ComponentType<PropsWithChildren<{
|
|||
look?: 0 | 1;
|
||||
className?: string;
|
||||
popoutClassName?: string;
|
||||
popoutPosition?: "top" | "left" | "right" | "bottom" | "center" | "window_center";
|
||||
popoutPosition?: PopoutPosition;
|
||||
optionClassName?: string;
|
||||
|
||||
autoFocus?: boolean;
|
||||
|
@ -293,7 +293,7 @@ export type SearchableSelect = ComponentType<PropsWithChildren<{
|
|||
className?: string;
|
||||
popoutClassName?: string;
|
||||
wrapperClassName?: string;
|
||||
popoutPosition?: "top" | "left" | "right" | "bottom" | "center" | "window_center";
|
||||
popoutPosition?: PopoutPosition;
|
||||
optionClassName?: string;
|
||||
|
||||
autoFocus?: boolean;
|
||||
|
@ -376,6 +376,8 @@ declare enum PopoutAnimation {
|
|||
FADE = "4"
|
||||
}
|
||||
|
||||
type PopoutPosition = "top" | "bottom" | "left" | "right" | "center" | "window_center";
|
||||
|
||||
export type Popout = ComponentType<{
|
||||
children(
|
||||
thing: {
|
||||
|
@ -387,7 +389,7 @@ export type Popout = ComponentType<{
|
|||
},
|
||||
data: {
|
||||
isShown: boolean;
|
||||
position: string;
|
||||
position: PopoutPosition;
|
||||
}
|
||||
): ReactNode;
|
||||
shouldShow?: boolean;
|
||||
|
@ -395,7 +397,7 @@ export type Popout = ComponentType<{
|
|||
closePopout(): void;
|
||||
isPositioned: boolean;
|
||||
nudge: number;
|
||||
position: string;
|
||||
position: PopoutPosition;
|
||||
setPopoutRef(ref: any): void;
|
||||
updatePosition(): void;
|
||||
}): ReactNode;
|
||||
|
@ -404,13 +406,13 @@ export type Popout = ComponentType<{
|
|||
onRequestClose?(): void;
|
||||
|
||||
/** "center" and others */
|
||||
align?: string;
|
||||
align?: "left" | "right" | "center";
|
||||
/** Popout.Animation */
|
||||
animation?: PopoutAnimation;
|
||||
autoInvert?: boolean;
|
||||
nudgeAlignIntoViewport?: boolean;
|
||||
/** "bottom" and others */
|
||||
position?: string;
|
||||
position?: PopoutPosition;
|
||||
positionKey?: string;
|
||||
spacing?: number;
|
||||
}> & {
|
||||
|
@ -459,7 +461,7 @@ export type ScrollerThin = ComponentType<PropsWithChildren<{
|
|||
style?: CSSProperties;
|
||||
|
||||
dir?: "ltr";
|
||||
orientation?: "horizontal" | "vertical";
|
||||
orientation?: "horizontal" | "vertical" | "auto";
|
||||
paddingFix?: boolean;
|
||||
fade?: boolean;
|
||||
|
||||
|
|
8
src/webpack/common/types/stores.d.ts
vendored
8
src/webpack/common/types/stores.d.ts
vendored
|
@ -220,6 +220,14 @@ export class GuildStore extends FluxStore {
|
|||
getAllGuildRoles(): Record<string, Record<string, Role>>;
|
||||
}
|
||||
|
||||
export class ThemeStore extends FluxStore {
|
||||
theme: "light" | "dark" | "darker" | "midnight";
|
||||
darkSidebar: boolean;
|
||||
isSystemThemeAvailable: boolean;
|
||||
systemPrefersColorScheme: "light" | "dark";
|
||||
systemTheme: null;
|
||||
}
|
||||
|
||||
export type useStateFromStores = <T>(
|
||||
stores: t.FluxStore[],
|
||||
mapper: () => T,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue