mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-23 11:28:48 +02:00
Compare commits
6 Commits
v4.10.0
...
globals-wo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39fdde9481 | ||
|
|
a4627a70c5 | ||
|
|
1f6611a10f | ||
|
|
c149711265 | ||
|
|
7a4c2af6ec | ||
|
|
fc5cde95d6 |
14
CHANGELOG.md
14
CHANGELOG.md
@@ -1,3 +1,17 @@
|
|||||||
|
## [4.10.2](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.10.1...v4.10.2) (2025-06-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **SteamClient:** export shared types for enums ([a4627a7](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/a4627a70c5a60a42cd39690b3b03f2c1d79ee3b4))
|
||||||
|
|
||||||
|
## [4.10.1](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.10.0...v4.10.1) (2025-06-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* fix <Menu /> for new Steam Client Beta ([fc5cde9](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/fc5cde95d6475c82856769c86ab648dfb22a4b10))
|
||||||
|
|
||||||
# [4.10.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.9.2...v4.10.0) (2025-04-23)
|
# [4.10.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.9.2...v4.10.0) (2025-04-23)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@decky/ui",
|
"name": "@decky/ui",
|
||||||
"version": "4.10.0",
|
"version": "4.10.2",
|
||||||
"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,6 +1,6 @@
|
|||||||
import { FC, ReactNode } from 'react';
|
import { FC, ReactNode } from 'react';
|
||||||
|
|
||||||
import { Export, findModuleByExport, findModuleExport } from '../webpack';
|
import { Export, findModuleByExport, findModuleDetailsByExport, findModuleExport } from '../webpack';
|
||||||
import { FooterLegendProps } from './FooterLegend';
|
import { FooterLegendProps } from './FooterLegend';
|
||||||
|
|
||||||
interface PopupCreationOptions {
|
interface PopupCreationOptions {
|
||||||
@@ -134,9 +134,11 @@ export interface MenuProps extends FooterLegendProps {
|
|||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Menu: FC<MenuProps> = findModuleExport(
|
const MenuModule = findModuleDetailsByExport((e: Export) => e?.render?.toString()?.includes('bPlayAudio:') || (e?.prototype?.OnOKButton && e?.prototype?.OnMouseEnter));
|
||||||
(e: Export) => e?.prototype?.HideIfSubmenu && e?.prototype?.HideMenu,
|
|
||||||
);
|
export const Menu: FC<MenuProps> =
|
||||||
|
findModuleExport((e: Export) => e?.prototype?.HideIfSubmenu && e?.prototype?.HideMenu) || // Legacy Menu
|
||||||
|
(Object.values(MenuModule?.[0] ?? {}).find((e) => e?.toString()?.includes?.(`useId`) && e?.toString()?.includes?.(`labelId`)) as FC<MenuProps>); // New Menu 6/15/2025
|
||||||
|
|
||||||
export interface MenuGroupProps {
|
export interface MenuGroupProps {
|
||||||
label: string;
|
label: string;
|
||||||
@@ -159,10 +161,7 @@ export interface MenuItemProps extends FooterLegendProps {
|
|||||||
children?: ReactNode;
|
children?: ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const MenuItem: FC<MenuItemProps> = findModuleExport(
|
export const MenuItem: FC<MenuItemProps> = MenuModule?.[1];
|
||||||
(e: Export) =>
|
|
||||||
e?.render?.toString?.()?.includes('bPlayAudio:') || (e?.prototype?.OnOKButton && e?.prototype?.OnMouseEnter),
|
|
||||||
);
|
|
||||||
|
|
||||||
export const MenuSeparator: FC = findModuleExport(
|
export const MenuSeparator: FC = findModuleExport(
|
||||||
(e: Export) => typeof e === 'function' && /className:.+?\.ContextMenuSeparator/.test(e.toString()),
|
(e: Export) => typeof e === 'function' && /className:.+?\.ContextMenuSeparator/.test(e.toString()),
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import {SteamClient} from "./steam-client";
|
import {SteamClient} from "./steam-client";
|
||||||
|
export * from "./steam-client/shared";
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
var SteamClient: SteamClient;
|
var SteamClient: SteamClient;
|
||||||
|
|||||||
Reference in New Issue
Block a user