mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-21 10:29:00 +02:00
Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8167be7642 | ||
|
|
a09af357c7 | ||
|
|
e48180d7bb | ||
|
|
490a1f77fa | ||
|
|
d1b47d21ed | ||
|
|
af98a76b86 | ||
|
|
d18b1ba1ed | ||
|
|
6be06446f2 | ||
|
|
bb8a6df115 | ||
|
|
a672230b00 | ||
|
|
4644df8202 | ||
|
|
7d3b5e8123 |
42
CHANGELOG.md
42
CHANGELOG.md
@@ -1,3 +1,45 @@
|
|||||||
|
## [1.7.8](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v1.7.7...v1.7.8) (2022-08-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Dropdown:** correct Dropdown types ([#15](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/15)) ([a09af35](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/a09af357c7e750377feefad86ab417b19484cb60))
|
||||||
|
|
||||||
|
## [1.7.7](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v1.7.6...v1.7.7) (2022-08-20)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **FieldProps:** Add "bottomSeparator" option ([#16](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/16)) ([490a1f7](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/490a1f77fa98a988f0cae61d74370bf3fa96336c))
|
||||||
|
|
||||||
|
## [1.7.6](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v1.7.5...v1.7.6) (2022-08-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **TextFieldProps:** Add "disabled" option to TextFieldProps ([#14](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/14)) ([af98a76](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/af98a76b86fb05942b9554adb369adbeaf27e70f))
|
||||||
|
|
||||||
|
## [1.7.5](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v1.7.4...v1.7.5) (2022-08-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **ButtonItem:** update to account for both prop settings ([6be0644](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/6be06446f2a7e0357b830be116fd25810c427dd5))
|
||||||
|
|
||||||
|
## [1.7.4](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v1.7.3...v1.7.4) (2022-08-18)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* updates for webpack v5 ([a672230](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/a672230b0051dd942988554ec663ea7bfcd61cfe))
|
||||||
|
|
||||||
|
## [1.7.3](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v1.7.2...v1.7.3) (2022-08-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Router:** Add more members to Router interface ([#12](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/12)) ([7d3b5e8](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/7d3b5e8123f6eeead1e2e227985069e54fe52572))
|
||||||
|
|
||||||
## [1.7.2](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v1.7.1...v1.7.2) (2022-08-17)
|
## [1.7.2](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v1.7.1...v1.7.2) (2022-08-17)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "decky-frontend-lib",
|
"name": "decky-frontend-lib",
|
||||||
"version": "1.7.2",
|
"version": "1.7.8",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "decky-frontend-lib",
|
"name": "decky-frontend-lib",
|
||||||
"version": "1.7.2",
|
"version": "1.7.8",
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": "^1.2.6"
|
"minimist": "^1.2.6"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "decky-frontend-lib",
|
"name": "decky-frontend-lib",
|
||||||
"version": "1.7.2",
|
"version": "1.7.8",
|
||||||
"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,5 +9,5 @@ export interface ButtonItemProps extends ItemProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const ButtonItem = Object.values(CommonUIModule).find((mod: any) =>
|
export const ButtonItem = Object.values(CommonUIModule).find((mod: any) =>
|
||||||
mod?.render?.toString()?.includes('childrenContainerWidth:"min"'),
|
mod?.render?.toString()?.includes('"highlightOnFocus","childrenContainerWidth"') || mod?.render?.toString()?.includes('childrenContainerWidth:"min"'),
|
||||||
) as FC<ButtonItemProps>;
|
) as FC<ButtonItemProps>;
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ import { CommonUIModule } from '../webpack';
|
|||||||
import { ItemProps } from './Item';
|
import { ItemProps } from './Item';
|
||||||
|
|
||||||
export interface SingleDropdownOption {
|
export interface SingleDropdownOption {
|
||||||
data: number;
|
data: any;
|
||||||
label: string;
|
label: ReactNode;
|
||||||
|
|
||||||
options?: never;
|
options?: never;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface MultiDropdownOption {
|
export interface MultiDropdownOption {
|
||||||
label: string;
|
label: ReactNode;
|
||||||
options: DropdownOption[];
|
options: DropdownOption[];
|
||||||
|
|
||||||
data?: never;
|
data?: never;
|
||||||
@@ -21,7 +21,7 @@ export type DropdownOption = SingleDropdownOption | MultiDropdownOption;
|
|||||||
|
|
||||||
export interface DropdownProps {
|
export interface DropdownProps {
|
||||||
rgOptions: DropdownOption[];
|
rgOptions: DropdownOption[];
|
||||||
selectedOption: number | null;
|
selectedOption: any;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
onMenuWillOpen?(showMenu: () => void): void;
|
onMenuWillOpen?(showMenu: () => void): void;
|
||||||
onMenuOpened?(): void;
|
onMenuOpened?(): void;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { findModuleChild } from '../webpack';
|
|||||||
|
|
||||||
export interface FieldProps extends HTMLAttributes<HTMLDivElement> {
|
export interface FieldProps extends HTMLAttributes<HTMLDivElement> {
|
||||||
label?: string | ReactNode;
|
label?: string | ReactNode;
|
||||||
|
bottomSeparator?: boolean;
|
||||||
description?: string | ReactNode;
|
description?: string | ReactNode;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
icon?: ReactNode;
|
icon?: ReactNode;
|
||||||
|
|||||||
@@ -69,14 +69,24 @@ export interface Router {
|
|||||||
GetQuickAccessTab(): QuickAccessTab;
|
GetQuickAccessTab(): QuickAccessTab;
|
||||||
Navigate(path: string): void;
|
Navigate(path: string): void;
|
||||||
NavigateBackOrOpenMenu(): void;
|
NavigateBackOrOpenMenu(): void;
|
||||||
|
NavigateToAppProperties(): void
|
||||||
|
NavigateToBugForum(): void
|
||||||
NavigateToExternalWeb(url: string): void;
|
NavigateToExternalWeb(url: string): void;
|
||||||
|
NavigateToHelp(): void
|
||||||
|
NavigateToInvites(): void
|
||||||
NavigateToRunningApp(replace?: boolean): void;
|
NavigateToRunningApp(replace?: boolean): void;
|
||||||
NavigateToStore(): void;
|
NavigateToStorage(): void
|
||||||
|
NavigateToStore(): void
|
||||||
|
NavigateToStoreApp(appId: number | string): void
|
||||||
|
NavigateToStoreFreeToPlay(): void
|
||||||
|
NavigateToStoreManual(): void
|
||||||
|
NavigateToStoreNewReleases(): void
|
||||||
|
NavigateToStoreOnSale(): void
|
||||||
ToggleSideMenu(sideMenu: SideMenu): void;
|
ToggleSideMenu(sideMenu: SideMenu): void;
|
||||||
CloseSideMenus(): void;
|
CloseSideMenus(): void;
|
||||||
OpenSideMenu(sideMenu: SideMenu): void;
|
OpenSideMenu(sideMenu: SideMenu): void;
|
||||||
OpenPowerMenu(unknown?: any): void;
|
OpenPowerMenu(unknown?: any): void;
|
||||||
get RunningApps(): any;
|
get RunningApps(): AppOverview[];
|
||||||
get MainRunningApp(): AppOverview | undefined;
|
get MainRunningApp(): AppOverview | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export interface TextFieldProps {
|
|||||||
label?: ReactNode;
|
label?: ReactNode;
|
||||||
requiredLabel?: ReactNode;
|
requiredLabel?: ReactNode;
|
||||||
description?: ReactNode;
|
description?: ReactNode;
|
||||||
|
disabled?: boolean;
|
||||||
bShowCopyAction?: boolean;
|
bShowCopyAction?: boolean;
|
||||||
bShowClearAction?: boolean;
|
bShowClearAction?: boolean;
|
||||||
bAlwaysShowClearAction?: boolean;
|
bAlwaysShowClearAction?: boolean;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
declare global {
|
declare global {
|
||||||
interface Window {
|
interface Window {
|
||||||
webpackJsonp: any;
|
webpackJsonp: any;
|
||||||
|
webpackChunksteamui: any;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -9,14 +10,33 @@ export type Module = any;
|
|||||||
type FilterFn = (module: any) => boolean;
|
type FilterFn = (module: any) => boolean;
|
||||||
type FindFn = (module: any) => any;
|
type FindFn = (module: any) => any;
|
||||||
|
|
||||||
const wpRequire = window.webpackJsonp.push([
|
export let webpackCache: any = {};
|
||||||
[],
|
let hasWebpack5 = false;
|
||||||
{ get_require: (mod: any, _exports: any, wpRequire: any) => (mod.exports = wpRequire) },
|
|
||||||
[['get_require']],
|
|
||||||
]);
|
|
||||||
|
|
||||||
export const allModules: Module[] = Object.keys(wpRequire.c)
|
if (window.webpackJsonp && !window.webpackJsonp.deckyShimmed) {
|
||||||
.map((x) => wpRequire.c[x].exports)
|
// Webpack 4, currently on stable
|
||||||
|
const wpRequire = window.webpackJsonp.push([
|
||||||
|
[],
|
||||||
|
{ get_require: (mod: any, _exports: any, wpRequire: any) => (mod.exports = wpRequire) },
|
||||||
|
[['get_require']],
|
||||||
|
]);
|
||||||
|
|
||||||
|
delete wpRequire.m.get_require;
|
||||||
|
delete wpRequire.c.get_require;
|
||||||
|
webpackCache = wpRequire.c;
|
||||||
|
} else {
|
||||||
|
// Webpack 5, currently on beta
|
||||||
|
hasWebpack5 = true;
|
||||||
|
const id = Math.random();
|
||||||
|
let initReq: any;
|
||||||
|
window.webpackChunksteamui.push([[ id ], {}, (r: any) => { initReq = r }]);
|
||||||
|
for (let i of Object.keys(initReq.m)) {
|
||||||
|
webpackCache[i] = initReq(i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const allModules: Module[] = hasWebpack5 ? Object.values(webpackCache).filter((x) => x) : Object.keys(webpackCache)
|
||||||
|
.map((x) => webpackCache[x].exports)
|
||||||
.filter((x) => x);
|
.filter((x) => x);
|
||||||
|
|
||||||
export const findModule = (filter: FilterFn) => {
|
export const findModule = (filter: FilterFn) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user