mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-23 11:28:48 +02:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e8979b641 | ||
|
|
7ba1229a4e | ||
|
|
4c2a715324 | ||
|
|
678ba216f1 | ||
|
|
07d15f5dca | ||
|
|
c84a091469 | ||
|
|
47fd13692f | ||
|
|
2ec9519b7d | ||
|
|
24606190e0 | ||
|
|
ed98d14b37 | ||
|
|
b882612dfa | ||
|
|
32291620b4 | ||
|
|
9b368c5f11 | ||
|
|
e167ef5a13 | ||
|
|
2f3df00967 | ||
|
|
215156d316 | ||
|
|
47d75db690 | ||
|
|
82768e0415 | ||
|
|
e44187fe4b |
64
CHANGELOG.md
64
CHANGELOG.md
@@ -1,3 +1,67 @@
|
|||||||
|
# [3.14.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.13.0...v3.14.0) (2022-12-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **toast:** add showToast/playSound to ToastData ([#64](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/64)) ([7ba1229](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/7ba1229a4e24fea587b96dc8b078200faf45ddee))
|
||||||
|
|
||||||
|
# [3.13.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.12.0...v3.13.0) (2022-11-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Menu:** add more missing props ([#60](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/60)) [CI SKIP] ([678ba21](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/678ba216f1e194986b0c391398e6f73536cd0102))
|
||||||
|
|
||||||
|
# [3.12.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.11.1...v3.12.0) (2022-11-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **MenuItem:** add missing props ([#59](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/59)) ([c84a091](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/c84a09146935f0942265b7a1e4aadc40e8cf22dc))
|
||||||
|
|
||||||
|
## [3.11.1](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.11.0...v3.11.1) (2022-11-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Footer:** add types for ActionDescriptionMap ([2ec9519](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/2ec9519b7d6d1cc0d232853ce05a773953b37c5a))
|
||||||
|
|
||||||
|
# [3.11.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.10.0...v3.11.0) (2022-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **classes:** add "appDetailsClasses" ([#55](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/55)) ([ed98d14](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/ed98d14b37cf09500afd88e7c8e9c03749119b38))
|
||||||
|
|
||||||
|
# [3.10.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.9.0...v3.10.0) (2022-11-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **classes:** add appDetailsHeaderClasses ([#54](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/54)) ([3229162](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/32291620b403f8b65cf378343454a3f2668fb6ee))
|
||||||
|
|
||||||
|
# [3.9.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.8.0...v3.9.0) (2022-11-16)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **Dialog:** add "focusable" button prop ([#51](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/51)) ([e167ef5](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/e167ef5a138a3edc004db2365334f8455c177132))
|
||||||
|
|
||||||
|
# [3.8.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.14...v3.8.0) (2022-11-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **routerhook:** add global components support ([215156d](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/215156d31688faac9028627379e5a3ac4d64ec46))
|
||||||
|
|
||||||
|
## [3.7.14](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.13...v3.7.14) (2022-11-05)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Menu:** fix on Steam beta ([82768e0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/82768e0415d084deb2af39beb3f9273a83e819de))
|
||||||
|
* **Modal:** fix on Steam beta ([e44187f](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/e44187fe4b9d3e3c9e94490669591599dc5246ba))
|
||||||
|
|
||||||
## [3.7.13](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.12...v3.7.13) (2022-11-02)
|
## [3.7.13](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.12...v3.7.13) (2022-11-02)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "decky-frontend-lib",
|
"name": "decky-frontend-lib",
|
||||||
"version": "3.7.13",
|
"version": "3.14.0",
|
||||||
"description": "A library for building decky plugins",
|
"description": "A library for building decky plugins",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -9,8 +9,35 @@ export interface DialogCommonProps extends RefAttributes<HTMLDivElement> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface DialogButtonProps extends DialogCommonProps, FooterLegendProps {
|
export interface DialogButtonProps extends DialogCommonProps, FooterLegendProps {
|
||||||
|
/**
|
||||||
|
* Enables/disables the focus around the button.
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
* Default value depends on context, so setting it to `false` will enable it.
|
||||||
|
*/
|
||||||
noFocusRing?: boolean;
|
noFocusRing?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Disables the button - assigned `on*` methods will not be invoked if clicked.
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
* Depending on where it is, it might still get focus. In such case it can be
|
||||||
|
* partially disabled separately.
|
||||||
|
*
|
||||||
|
* @see focusable.
|
||||||
|
*/
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables/disables the navigation based focus on button - you won't be able to navigate to
|
||||||
|
* it via the gamepad or keyboard.
|
||||||
|
*
|
||||||
|
* @note
|
||||||
|
* If set to `false`, it still can be clicked and **WILL** become focused until navigated away.
|
||||||
|
* Depending on the context of where the button is, even a disabled button can focused.
|
||||||
|
*/
|
||||||
|
focusable?: boolean;
|
||||||
|
|
||||||
onClick?(e: MouseEvent): void;
|
onClick?(e: MouseEvent): void;
|
||||||
onPointerDown?(e: PointerEvent): void;
|
onPointerDown?(e: PointerEvent): void;
|
||||||
onPointerUp?(e: PointerEvent): void;
|
onPointerUp?(e: PointerEvent): void;
|
||||||
|
|||||||
@@ -29,25 +29,24 @@ export enum GamepadButton {
|
|||||||
STEAM_GUIDE,
|
STEAM_GUIDE,
|
||||||
STEAM_QUICK_MENU,
|
STEAM_QUICK_MENU,
|
||||||
}
|
}
|
||||||
|
export declare enum NavEntryPositionPreferences {
|
||||||
export enum NavEntryPositionPreferences {
|
|
||||||
FIRST,
|
FIRST,
|
||||||
LAST,
|
LAST,
|
||||||
MAINTAIN_X,
|
MAINTAIN_X,
|
||||||
MAINTAIN_Y,
|
MAINTAIN_Y,
|
||||||
PREFERRED_CHILD,
|
PREFERRED_CHILD
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GamepadEventDetail {
|
export interface GamepadEventDetail {
|
||||||
button: number;
|
button: number;
|
||||||
is_repeat?: boolean;
|
is_repeat?: boolean;
|
||||||
source: number;
|
source: number;
|
||||||
}
|
}
|
||||||
|
export declare type ActionDescriptionMap = {
|
||||||
export type GamepadEvent = CustomEvent<GamepadEventDetail>;
|
[key in GamepadButton]?: string
|
||||||
|
}
|
||||||
|
export declare type GamepadEvent = CustomEvent<GamepadEventDetail>;
|
||||||
export interface FooterLegendProps {
|
export interface FooterLegendProps {
|
||||||
actionDescriptionMap?: unknown;
|
actionDescriptionMap?: ActionDescriptionMap;
|
||||||
onOKActionDescription?: string;
|
onOKActionDescription?: string;
|
||||||
onCancelActionDescription?: string;
|
onCancelActionDescription?: string;
|
||||||
onSecondaryActionDescription?: string;
|
onSecondaryActionDescription?: string;
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import { FC, ReactNode } from 'react';
|
import { FC, ReactNode } from 'react';
|
||||||
|
|
||||||
|
import { fakeRenderComponent } from '../utils';
|
||||||
import { findModuleChild } from '../webpack';
|
import { findModuleChild } from '../webpack';
|
||||||
|
import { FooterLegendProps } from './FooterLegend';
|
||||||
|
|
||||||
export const showContextMenu: (children: ReactNode, parent?: EventTarget) => void = findModuleChild((m) => {
|
export const showContextMenu: (children: ReactNode, parent?: EventTarget) => void = findModuleChild((m) => {
|
||||||
if (typeof m !== 'object') return undefined;
|
if (typeof m !== 'object') return undefined;
|
||||||
@@ -11,7 +13,7 @@ export const showContextMenu: (children: ReactNode, parent?: EventTarget) => voi
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export interface MenuProps {
|
export interface MenuProps extends FooterLegendProps {
|
||||||
label: string;
|
label: string;
|
||||||
onCancel?(): void;
|
onCancel?(): void;
|
||||||
cancelText?: string;
|
cancelText?: string;
|
||||||
@@ -38,15 +40,26 @@ export const MenuGroup: FC<MenuGroupProps> = findModuleChild((m) => {
|
|||||||
if (typeof m !== 'object') return undefined;
|
if (typeof m !== 'object') return undefined;
|
||||||
|
|
||||||
for (let prop in m) {
|
for (let prop in m) {
|
||||||
if (m[prop]?.prototype?.RenderSubMenu && m[prop]?.prototype?.ShowSubMenu) {
|
if (
|
||||||
|
(m[prop]?.toString()?.includes('bInGamepadUI:') &&
|
||||||
|
fakeRenderComponent(() => m[prop]())?.type?.prototype?.RenderSubMenu) ||
|
||||||
|
(m[prop]?.prototype?.RenderSubMenu && m[prop]?.prototype?.ShowSubMenu)
|
||||||
|
) {
|
||||||
return m[prop];
|
return m[prop];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export interface MenuItemProps {
|
export interface MenuItemProps extends FooterLegendProps {
|
||||||
onSelected?(): void;
|
bInteractableItem?: boolean;
|
||||||
|
onClick?(evt: Event): void;
|
||||||
|
onSelected?(evt: Event): void;
|
||||||
|
onMouseEnter?(evt: MouseEvent): void;
|
||||||
|
onMoveRight?(): void;
|
||||||
|
selected?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
bPlayAudio?: boolean;
|
||||||
|
tone?: 'positive' | 'emphasis' | 'destructive';
|
||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +67,10 @@ export const MenuItem: FC<MenuItemProps> = findModuleChild((m) => {
|
|||||||
if (typeof m !== 'object') return undefined;
|
if (typeof m !== 'object') return undefined;
|
||||||
|
|
||||||
for (let prop in m) {
|
for (let prop in m) {
|
||||||
if (m[prop]?.prototype?.OnOKButton && m[prop]?.prototype?.OnMouseEnter) {
|
if (
|
||||||
|
m[prop]?.render?.toString()?.includes('bPlayAudio:') ||
|
||||||
|
(m[prop]?.prototype?.OnOKButton && m[prop]?.prototype?.OnMouseEnter)
|
||||||
|
) {
|
||||||
return m[prop];
|
return m[prop];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { FC, ReactNode } from 'react';
|
import { FC, ReactNode } from 'react';
|
||||||
|
|
||||||
import { findSP } from '../utils';
|
import { findSP } from '../utils';
|
||||||
import { findModuleChild } from '../webpack';
|
import { findModule, findModuleChild } from '../webpack';
|
||||||
|
|
||||||
// All of the popout options + strTitle are related. Proper usage is not yet known...
|
// All of the popout options + strTitle are related. Proper usage is not yet known...
|
||||||
export interface ShowModalProps {
|
export interface ShowModalProps {
|
||||||
@@ -29,18 +29,57 @@ export interface ShowModalResult {
|
|||||||
Update: (modal: ReactNode) => void;
|
Update: (modal: ReactNode) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const showModalRaw: (modal: ReactNode, parent?: EventTarget, props?: ShowModalProps) => Promise<ShowModalResult> =
|
const showModalRaw:
|
||||||
findModuleChild((m) => {
|
| ((
|
||||||
if (typeof m !== 'object') return undefined;
|
modal: ReactNode,
|
||||||
for (let prop in m) {
|
parent?: EventTarget,
|
||||||
if (typeof m[prop] === 'function' && m[prop].toString().includes('bHideMainWindowForPopouts:!0')) {
|
title?: string,
|
||||||
return m[prop];
|
props?: ShowModalProps,
|
||||||
}
|
unknown1?: unknown,
|
||||||
|
hideActions?: { bHideActions?: boolean },
|
||||||
|
modalManager?: unknown,
|
||||||
|
) => Promise<ShowModalResult>)
|
||||||
|
| void = findModuleChild((m) => {
|
||||||
|
if (typeof m !== 'object') return undefined;
|
||||||
|
for (let prop in m) {
|
||||||
|
if (
|
||||||
|
typeof m[prop] === 'function' &&
|
||||||
|
m[prop].toString().includes('props.bDisableBackgroundDismiss') &&
|
||||||
|
!m[prop]?.prototype?.Cancel
|
||||||
|
) {
|
||||||
|
return m[prop];
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
export const showModal = (modal: ReactNode, parent?: EventTarget, props?: ShowModalProps): Promise<ShowModalResult> => {
|
const oldShowModalRaw:
|
||||||
return showModalRaw(modal, parent || findSP(), props);
|
| ((modal: ReactNode, parent?: EventTarget, props?: ShowModalProps) => Promise<ShowModalResult>)
|
||||||
|
| void = findModuleChild((m) => {
|
||||||
|
if (typeof m !== 'object') return undefined;
|
||||||
|
for (let prop in m) {
|
||||||
|
if (typeof m[prop] === 'function' && m[prop].toString().includes('bHideMainWindowForPopouts:!0')) {
|
||||||
|
return m[prop];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
export const showModal = (
|
||||||
|
modal: ReactNode,
|
||||||
|
parent?: EventTarget,
|
||||||
|
props: ShowModalProps = {
|
||||||
|
strTitle: 'Decky Dialog',
|
||||||
|
bHideMainWindowForPopouts: false,
|
||||||
|
},
|
||||||
|
): Promise<ShowModalResult> => {
|
||||||
|
if (showModalRaw) {
|
||||||
|
return showModalRaw(modal, parent || findSP(), props.strTitle, props, undefined, {
|
||||||
|
bHideActions: props.bHideActionIcons,
|
||||||
|
});
|
||||||
|
} else if (oldShowModalRaw) {
|
||||||
|
return oldShowModalRaw(modal, parent || findSP(), props);
|
||||||
|
} else {
|
||||||
|
throw new Error('[DFL:Modals]: Cannot find showModal function');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface ModalRootProps {
|
export interface ModalRootProps {
|
||||||
@@ -79,11 +118,26 @@ export const ConfirmModal = findModuleChild((m) => {
|
|||||||
}
|
}
|
||||||
}) as FC<ConfirmModalProps>;
|
}) as FC<ConfirmModalProps>;
|
||||||
|
|
||||||
export const ModalRoot = findModuleChild((m) => {
|
// new
|
||||||
if (typeof m !== 'object') return undefined;
|
export const ModalRoot = (Object.values(
|
||||||
for (let prop in m) {
|
findModule((m: any) => {
|
||||||
if (m[prop]?.prototype?.OK && m[prop]?.prototype?.Cancel && m[prop]?.prototype?.render) {
|
if (typeof m !== 'object') return false;
|
||||||
return m[prop];
|
|
||||||
|
for (let prop in m) {
|
||||||
|
if (m[prop]?.toString()?.includes('"ModalManager","DialogWrapper"')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}) as FC<ModalRootProps>;
|
return false;
|
||||||
|
}) || {},
|
||||||
|
)?.find((x: any) => x?.type?.toString()?.includes('((function(){')) ||
|
||||||
|
// old
|
||||||
|
findModuleChild((m) => {
|
||||||
|
if (typeof m !== 'object') return undefined;
|
||||||
|
for (let prop in m) {
|
||||||
|
if (m[prop]?.prototype?.OK && m[prop]?.prototype?.Cancel && m[prop]?.prototype?.render) {
|
||||||
|
return m[prop];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})) as FC<ModalRootProps>;
|
||||||
|
|||||||
@@ -349,6 +349,98 @@ type GamepadSliderClasses = Record<
|
|||||||
string
|
string
|
||||||
>;
|
>;
|
||||||
|
|
||||||
|
type AppDetailsHeaderClasses = Record<
|
||||||
|
| 'AddBoxSizer'
|
||||||
|
| 'Background'
|
||||||
|
| 'Bottom'
|
||||||
|
| 'BottomCenter'
|
||||||
|
| 'BottomLeft'
|
||||||
|
| 'BottomRight'
|
||||||
|
| 'BoxSizer'
|
||||||
|
| 'BoxSizerButtonContainer'
|
||||||
|
| 'BoxSizerContainer'
|
||||||
|
| 'BoxSizerDelete'
|
||||||
|
| 'BoxSizerDragBox'
|
||||||
|
| 'BoxSizerEdge'
|
||||||
|
| 'BoxSizerGridBox'
|
||||||
|
| 'BoxSizerInfo'
|
||||||
|
| 'BoxSizerSettings'
|
||||||
|
| 'BoxSizerValidRegion'
|
||||||
|
| 'CenterCenter'
|
||||||
|
| 'DialogButton'
|
||||||
|
| 'EdgeDown'
|
||||||
|
| 'FallbackArt'
|
||||||
|
| 'Features'
|
||||||
|
| 'FullscreenEnterActive'
|
||||||
|
| 'FullscreenEnterDone'
|
||||||
|
| 'FullscreenEnterStart'
|
||||||
|
| 'FullscreenExitActive'
|
||||||
|
| 'FullscreenExitDone'
|
||||||
|
| 'FullscreenExitStart'
|
||||||
|
| 'HeaderBackgroundImage'
|
||||||
|
| 'ImgBlur'
|
||||||
|
| 'ImgBlurBackdrop'
|
||||||
|
| 'ImgContainer'
|
||||||
|
| 'ImgSrc'
|
||||||
|
| 'Left'
|
||||||
|
| 'Loaded'
|
||||||
|
| 'Middle'
|
||||||
|
| 'NoArt'
|
||||||
|
| 'PinBox'
|
||||||
|
| 'Right'
|
||||||
|
| 'SVGTitle'
|
||||||
|
| 'SaveBoxSizer'
|
||||||
|
| 'TextNameSpace'
|
||||||
|
| 'TitleImageContainer'
|
||||||
|
| 'TitleLogo'
|
||||||
|
| 'TitleSection'
|
||||||
|
| 'Top'
|
||||||
|
| 'TopCapsule'
|
||||||
|
| 'TopGradient'
|
||||||
|
| 'TopLeft'
|
||||||
|
| 'TopRight'
|
||||||
|
| 'UpperCenter'
|
||||||
|
| 'UpperLeft'
|
||||||
|
| 'duration-app-launch',
|
||||||
|
string
|
||||||
|
>;
|
||||||
|
|
||||||
|
type AppDetailsClasses = Record<
|
||||||
|
| 'BreakNarrow'
|
||||||
|
| 'BreakShort'
|
||||||
|
| 'BreakTall'
|
||||||
|
| 'BreakUltraWide'
|
||||||
|
| 'BreakWide'
|
||||||
|
| 'Container'
|
||||||
|
| 'GamepadUIBreakNarrow'
|
||||||
|
| 'GamepadUIBreakShort'
|
||||||
|
| 'GamepadUIBreakWide'
|
||||||
|
| 'Glassy'
|
||||||
|
| 'Header'
|
||||||
|
| 'HeaderLoaded'
|
||||||
|
| 'InnerContainer'
|
||||||
|
| 'ItemFocusAnim-darkGrey'
|
||||||
|
| 'ItemFocusAnim-darkerGrey'
|
||||||
|
| 'ItemFocusAnim-darkerGrey-nocolor'
|
||||||
|
| 'ItemFocusAnim-green'
|
||||||
|
| 'ItemFocusAnim-grey'
|
||||||
|
| 'ItemFocusAnimBorder-darkGrey'
|
||||||
|
| 'PlayBar'
|
||||||
|
| 'PreventScrolling'
|
||||||
|
| 'RightBreakNarrow'
|
||||||
|
| 'RightBreakUltraNarrow'
|
||||||
|
| 'RightBreakUltraWide'
|
||||||
|
| 'RightBreakWide'
|
||||||
|
| 'ScrollContainer'
|
||||||
|
| 'ShowPlayBar'
|
||||||
|
| 'Throbber'
|
||||||
|
| 'duration-app-launch'
|
||||||
|
| 'fadein'
|
||||||
|
| 'focusAnimation'
|
||||||
|
| 'hoverAnimation',
|
||||||
|
string
|
||||||
|
>;
|
||||||
|
|
||||||
export const quickAccessMenuClasses: QuickAccessMenuClasses = findModule(
|
export const quickAccessMenuClasses: QuickAccessMenuClasses = findModule(
|
||||||
(mod) => typeof mod === 'object' && mod?.Title?.includes('quickaccessmenu'),
|
(mod) => typeof mod === 'object' && mod?.Title?.includes('quickaccessmenu'),
|
||||||
);
|
);
|
||||||
@@ -378,3 +470,9 @@ export const playSectionClasses: PlaySectionClasses = findModule(
|
|||||||
export const gamepadSliderClasses: GamepadSliderClasses = findModule(
|
export const gamepadSliderClasses: GamepadSliderClasses = findModule(
|
||||||
(mod) => typeof mod === 'object' && mod?.SliderControlPanelGroup?.includes('gamepadslider'),
|
(mod) => typeof mod === 'object' && mod?.SliderControlPanelGroup?.includes('gamepadslider'),
|
||||||
);
|
);
|
||||||
|
export const appDetailsHeaderClasses: AppDetailsHeaderClasses = findModule(
|
||||||
|
(mod) => typeof mod === 'object' && mod?.TopCapsule?.includes('sharedappdetailsheader'),
|
||||||
|
);
|
||||||
|
export const appDetailsClasses: AppDetailsClasses = findModule(
|
||||||
|
(mod) => typeof mod === 'object' && mod?.HeaderLoaded?.includes('appdetails_'),
|
||||||
|
);
|
||||||
|
|||||||
@@ -26,8 +26,10 @@ export type RoutePatch = (route: RouteProps) => RouteProps;
|
|||||||
export interface RouterHook {
|
export interface RouterHook {
|
||||||
addRoute(path: string, component: ComponentType, props?: Omit<RouteProps, 'path' | 'children'>): void;
|
addRoute(path: string, component: ComponentType, props?: Omit<RouteProps, 'path' | 'children'>): void;
|
||||||
addPatch(path: string, patch: RoutePatch): RoutePatch;
|
addPatch(path: string, patch: RoutePatch): RoutePatch;
|
||||||
removePatch(path: string, patch: RoutePatch): void;
|
addGlobalComponent(name: string, component: ComponentType): void;
|
||||||
removeRoute(path: string): void;
|
removeRoute(path: string): void;
|
||||||
|
removePatch(path: string, patch: RoutePatch): void;
|
||||||
|
removeGlobalComponent(name: string): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ToastData {
|
export interface ToastData {
|
||||||
@@ -40,6 +42,10 @@ export interface ToastData {
|
|||||||
contentClassName?: string;
|
contentClassName?: string;
|
||||||
duration?: number;
|
duration?: number;
|
||||||
critical?: boolean;
|
critical?: boolean;
|
||||||
|
eType?: number;
|
||||||
|
sound?: number;
|
||||||
|
playSound?: boolean;
|
||||||
|
showToast?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Toaster {
|
export interface Toaster {
|
||||||
|
|||||||
Reference in New Issue
Block a user