mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-20 10:00:08 +02:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf6572cd7b | ||
|
|
779b1ae0de | ||
|
|
366357d9a3 | ||
|
|
37dd88513e | ||
|
|
ed87f73602 | ||
|
|
3d5de65077 | ||
|
|
33d224bc3f | ||
|
|
aa0678c857 | ||
|
|
39fdde9481 | ||
|
|
a4627a70c5 | ||
|
|
1f6611a10f | ||
|
|
c149711265 | ||
|
|
7a4c2af6ec | ||
|
|
fc5cde95d6 |
42
CHANGELOG.md
42
CHANGELOG.md
@@ -1,3 +1,45 @@
|
||||
## [4.10.6](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.10.5...v4.10.6) (2025-09-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ci:** update to resolve deprecation in sem. rel. due to octokit ([779b1ae](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/779b1ae0defac84dd0d93517858d5aa5e51a2328))
|
||||
|
||||
## [4.10.5](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.10.4...v4.10.5) (2025-08-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **DialogHeader:** valve rewrote component on beta, update filter to search for both versions ([37dd885](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/37dd88513ed7360d3bcdc99630d6cb0c8d31db3e))
|
||||
|
||||
## [4.10.4](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.10.3...v4.10.4) (2025-07-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **modals:** fix ModalRoot on beta ([3d5de65](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/3d5de65077098ff3fb5192cb55fb1534336411f5))
|
||||
|
||||
## [4.10.3](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.10.2...v4.10.3) (2025-07-09)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **modals:** fix `<ConfirmModal />` for new Steam beta ([#123](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/123)) ([aa0678c](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/aa0678c857e07f58de58e5d20565bf2718fff6dc))
|
||||
|
||||
## [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)
|
||||
|
||||
|
||||
|
||||
24
package.json
24
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@decky/ui",
|
||||
"version": "4.10.0",
|
||||
"version": "4.10.6",
|
||||
"description": "A library for interacting with the Steam frontend in Decky plugins and elsewhere.",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@@ -41,30 +41,30 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^19.3.0",
|
||||
"@commitlint/config-conventional": "^19.2.2",
|
||||
"@commitlint/cz-commitlint": "^19.2.0",
|
||||
"@commitlint/cli": "^19.8.1",
|
||||
"@commitlint/config-conventional": "^19.8.1",
|
||||
"@commitlint/cz-commitlint": "^19.8.1",
|
||||
"@semantic-release/changelog": "^6.0.3",
|
||||
"@semantic-release/git": "^10.0.1",
|
||||
"@types/jest": "^29.5.12",
|
||||
"@types/jest": "^29.5.14",
|
||||
"@types/react": "18.3.3",
|
||||
"@types/react-dom": "18.3.0",
|
||||
"@types/react-router": "5.1.20",
|
||||
"commitizen": "^4.3.0",
|
||||
"husky": "^9.0.11",
|
||||
"commitizen": "^4.3.1",
|
||||
"husky": "^9.1.7",
|
||||
"import-sort-style-module": "^6.0.0",
|
||||
"jest": "^29.7.0",
|
||||
"minimist": "^1.2.8",
|
||||
"prettier": "^3.3.2",
|
||||
"prettier": "^3.6.2",
|
||||
"prettier-plugin-import-sort": "^0.0.7",
|
||||
"semantic-release": "^24.0.0",
|
||||
"semantic-release": "^24.2.7",
|
||||
"shx": "^0.3.4",
|
||||
"ts-jest": "^29.1.4",
|
||||
"ts-jest": "^29.4.1",
|
||||
"typedoc": "^0.25.13",
|
||||
"typedoc-plugin-mdn-links": "^3.1.29",
|
||||
"typedoc-plugin-mdn-links": "^3.3.8",
|
||||
"typedoc-plugin-missing-exports": "^2.3.0",
|
||||
"typedoc-wikijs-theme": "^1.0.5",
|
||||
"typescript": "^5.4.5"
|
||||
"typescript": "^5.9.2"
|
||||
},
|
||||
"pnpm": {
|
||||
"peerDependencyRules": {
|
||||
|
||||
2728
pnpm-lock.yaml
generated
2728
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
import { CSSProperties, FC, ReactNode, RefAttributes } from 'react';
|
||||
|
||||
import { CommonUIModule } from '../webpack';
|
||||
import { CommonUIModule, Module } from '../webpack';
|
||||
import { FooterLegendProps } from './FooterLegend';
|
||||
|
||||
export interface DialogCommonProps extends RefAttributes<HTMLDivElement> {
|
||||
@@ -68,7 +68,12 @@ const MappedDialogDivs = new Map(
|
||||
}),
|
||||
);
|
||||
|
||||
export const DialogHeader = MappedDialogDivs.get('DialogHeader') as FC<DialogCommonProps>;
|
||||
// Old | New
|
||||
export const DialogHeader = (MappedDialogDivs.get('DialogHeader') || Object.values(CommonUIModule).find((component: Module) => {
|
||||
const str = component?.render?.toString?.();
|
||||
return str?.includes("role:\"heading\"") && str.includes(")(\"DialogHeader\",");
|
||||
})) as FC<DialogCommonProps>;
|
||||
|
||||
export const DialogSubHeader = MappedDialogDivs.get('DialogSubHeader') as FC<DialogCommonProps>;
|
||||
export const DialogFooter = MappedDialogDivs.get('DialogFooter') as FC<DialogCommonProps>;
|
||||
export const DialogLabel = MappedDialogDivs.get('DialogLabel') as FC<DialogCommonProps>;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { FC, ReactNode } from 'react';
|
||||
|
||||
import { Export, findModuleByExport, findModuleExport } from '../webpack';
|
||||
import { Export, findModuleByExport, findModuleDetailsByExport, findModuleExport } from '../webpack';
|
||||
import { FooterLegendProps } from './FooterLegend';
|
||||
|
||||
interface PopupCreationOptions {
|
||||
@@ -134,9 +134,11 @@ export interface MenuProps extends FooterLegendProps {
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export const Menu: FC<MenuProps> = findModuleExport(
|
||||
(e: Export) => e?.prototype?.HideIfSubmenu && e?.prototype?.HideMenu,
|
||||
);
|
||||
const MenuModule = findModuleDetailsByExport((e: Export) => e?.render?.toString()?.includes('bPlayAudio:') || (e?.prototype?.OnOKButton && e?.prototype?.OnMouseEnter));
|
||||
|
||||
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 {
|
||||
label: string;
|
||||
@@ -159,10 +161,7 @@ export interface MenuItemProps extends FooterLegendProps {
|
||||
children?: ReactNode;
|
||||
}
|
||||
|
||||
export const MenuItem: FC<MenuItemProps> = findModuleExport(
|
||||
(e: Export) =>
|
||||
e?.render?.toString?.()?.includes('bPlayAudio:') || (e?.prototype?.OnOKButton && e?.prototype?.OnMouseEnter),
|
||||
);
|
||||
export const MenuItem: FC<MenuItemProps> = MenuModule?.[1];
|
||||
|
||||
export const MenuSeparator: FC = findModuleExport(
|
||||
(e: Export) => typeof e === 'function' && /className:.+?\.ContextMenuSeparator/.test(e.toString()),
|
||||
|
||||
@@ -83,22 +83,26 @@ export interface ConfirmModalProps extends ModalRootProps {
|
||||
}
|
||||
|
||||
export const ConfirmModal = findModuleExport(
|
||||
(e: Export) => !e?.prototype?.OK && e?.prototype?.Cancel && e?.prototype?.render,
|
||||
(e: Export) => e?.toString()?.includes('bUpdateDisabled') && e?.toString()?.includes('closeModal') && e?.toString()?.includes('onGamepadCancel'),
|
||||
) as FC<ConfirmModalProps>;
|
||||
|
||||
export const ModalRoot = Object.values(
|
||||
findModule((m: any) => {
|
||||
if (typeof m !== 'object') return false;
|
||||
export const ModalRoot =
|
||||
// new
|
||||
findModuleExport((e: Export) => typeof e === 'function' && e.toString().includes('Either closeModal or onCancel should be passed to GenericDialog. Classes: ')) ||
|
||||
// old
|
||||
Object.values(
|
||||
findModule((m: any) => {
|
||||
if (typeof m !== 'object') return false;
|
||||
|
||||
for (let prop in m) {
|
||||
if (m[prop]?.m_mapModalManager && Object.values(m)?.find((x: any) => x?.type)) {
|
||||
return true;
|
||||
for (let prop in m) {
|
||||
if (m[prop]?.m_mapModalManager && Object.values(m)?.find((x: any) => x?.type)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}) || {},
|
||||
)?.find((x: any) => x?.type?.toString?.()?.includes('((function(){')) as FC<ModalRootProps>;
|
||||
return false;
|
||||
}) || {},
|
||||
)?.find((x: any) => x?.type?.toString?.()?.includes('((function(){')) as FC<ModalRootProps>;
|
||||
|
||||
interface SimpleModalProps {
|
||||
active?: boolean;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {SteamClient} from "./steam-client";
|
||||
export * from "./steam-client/shared";
|
||||
|
||||
declare global {
|
||||
var SteamClient: SteamClient;
|
||||
|
||||
Reference in New Issue
Block a user