mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-31 15:06:58 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
723e2ff76e | ||
|
|
241b22cad7 |
@@ -1,3 +1,10 @@
|
|||||||
|
## [4.7.4](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.7.3...v4.7.4) (2024-10-04)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **DialogCheckbox:** don't access getters to prevent their side effects from breaking the component ([241b22c](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/241b22cad711621a1695dfd11da857f13c3fffdf))
|
||||||
|
|
||||||
## [4.7.3](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.7.2...v4.7.3) (2024-10-03)
|
## [4.7.3](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.7.2...v4.7.3) (2024-10-03)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@decky/ui",
|
"name": "@decky/ui",
|
||||||
"version": "4.7.3",
|
"version": "4.7.4",
|
||||||
"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 { findModule } from '../webpack';
|
import { findModuleExport } from '../webpack';
|
||||||
import { DialogCommonProps } from './Dialog';
|
import { DialogCommonProps } from './Dialog';
|
||||||
import { FooterLegendProps } from './FooterLegend';
|
import { FooterLegendProps } from './FooterLegend';
|
||||||
|
|
||||||
@@ -18,22 +18,15 @@ export interface DialogCheckboxProps extends DialogCommonProps, FooterLegendProp
|
|||||||
onClick?(evt: Event): void;
|
onClick?(evt: Event): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DialogCheckbox = Object.values(
|
// Do not access KeyDown, SetChecked, Toggle here as they are getters and accessing them outside of a render breaks them globally
|
||||||
findModule((m: any) => {
|
export const DialogCheckbox = findModuleExport(e =>
|
||||||
if (typeof m !== 'object') return false;
|
e.prototype &&
|
||||||
for (const prop in m) {
|
"GetPanelElementProps" in e?.prototype &&
|
||||||
if (m[prop]?.prototype?.GetPanelElementProps) return true;
|
"SetChecked" in e?.prototype &&
|
||||||
}
|
"Toggle" in e?.prototype &&
|
||||||
return false;
|
// beta || stable as of oct 2 2024
|
||||||
}),
|
(e?.prototype?.render?.toString().includes('="DialogCheckbox"') || (
|
||||||
).find(
|
e.contextType &&
|
||||||
(m: any) =>
|
e.prototype?.render?.toString().includes('fallback:')
|
||||||
m?.prototype?.SetChecked &&
|
))
|
||||||
m?.prototype?.Toggle &&
|
|
||||||
m?.prototype?.GetPanelElementProps &&
|
|
||||||
// beta || stable as of oct 2 2024
|
|
||||||
(m?.prototype?.render?.toString().includes('="DialogCheckbox"') || (
|
|
||||||
m.contextType &&
|
|
||||||
m.prototype?.render.toString().includes('fallback:')
|
|
||||||
))
|
|
||||||
) as FC<DialogCheckboxProps>;
|
) as FC<DialogCheckboxProps>;
|
||||||
|
|||||||
Reference in New Issue
Block a user