mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-25 12:28:53 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b5fd78bc2 | ||
|
|
d64c42ac31 |
@@ -1,3 +1,10 @@
|
|||||||
|
## [4.3.1](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.3.0...v4.3.1) (2024-07-17)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Menu/MenuGroup:** rewrite filter to work on beta and prevent future errors ([d64c42a](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/d64c42ac310d3c3266c4ff610d9ec5ab6c7707b6))
|
||||||
|
|
||||||
# [4.3.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.2.2...v4.3.0) (2024-07-09)
|
# [4.3.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.2.2...v4.3.0) (2024-07-09)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@decky/ui",
|
"name": "@decky/ui",
|
||||||
"version": "4.3.0",
|
"version": "4.3.1",
|
||||||
"description": "A library for interacting with the Steam frontend in Decky plugins and elsewhere.",
|
"description": "A library for interacting with the Steam frontend in Decky plugins and elsewhere.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { FC, ReactNode } from 'react';
|
import { FC, ReactNode } from 'react';
|
||||||
|
|
||||||
import { fakeRenderComponent } from '../utils';
|
import { Export, findModuleByExport, findModuleExport } from '../webpack';
|
||||||
import { Export, findModuleExport } from '../webpack';
|
|
||||||
import { FooterLegendProps } from './FooterLegend';
|
import { FooterLegendProps } from './FooterLegend';
|
||||||
|
|
||||||
export const showContextMenu: (children: ReactNode, parent?: EventTarget) => void = findModuleExport(
|
export const showContextMenu: (children: ReactNode, parent?: EventTarget) => void = findModuleExport(
|
||||||
@@ -26,12 +25,8 @@ export interface MenuGroupProps {
|
|||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const MenuGroup: FC<MenuGroupProps> = findModuleExport(
|
const MenuGoupModule = findModuleByExport(e => e?.prototype?.Focus && e?.prototype?.OnOKButton && e?.prototype?.render?.toString().includes?.(`"emphasis"==this.props.tone`));
|
||||||
(e: Export) =>
|
export const MenuGroup: FC<MenuGroupProps> = MenuGoupModule && Object.values(MenuGoupModule).find((e: Export) => typeof e == "function" && e?.toString()?.includes("bInGamepadUI:"));
|
||||||
(e?.toString()?.includes?.('bInGamepadUI:') &&
|
|
||||||
fakeRenderComponent(() => e({ overview: { appid: 7 } }), {useContext: () => ({IN_GAMEPADUI: true})})?.type?.prototype?.RenderSubMenu) ||
|
|
||||||
(e?.prototype?.RenderSubMenu && e?.prototype?.ShowSubMenu)
|
|
||||||
);
|
|
||||||
export interface MenuItemProps extends FooterLegendProps {
|
export interface MenuItemProps extends FooterLegendProps {
|
||||||
bInteractableItem?: boolean;
|
bInteractableItem?: boolean;
|
||||||
onClick?(evt: Event): void;
|
onClick?(evt: Event): void;
|
||||||
|
|||||||
Reference in New Issue
Block a user