mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-20 10:00:08 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
73b8d52c7f | ||
|
|
2b8d2ae4db | ||
|
|
48de8928e4 |
@@ -1,3 +1,10 @@
|
||||
# [4.6.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.5.0...v4.6.0) (2024-07-26)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **classMapper:** add findClassByName back ([2b8d2ae](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/2b8d2ae4dbd9a0c4a59a43be0101a0a8fe1c518f))
|
||||
|
||||
# [4.5.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v4.4.0...v4.5.0) (2024-07-24)
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@decky/ui",
|
||||
"version": "4.5.0",
|
||||
"version": "4.6.0",
|
||||
"description": "A library for interacting with the Steam frontend in Decky plugins and elsewhere.",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@@ -17,15 +17,18 @@ export const classModuleMap: Map<ModuleID, ClassModule> = createModuleMapping((m
|
||||
return false;
|
||||
});
|
||||
|
||||
export const classMap = classModuleMap.values();
|
||||
export const classMap = [...classModuleMap.values()];
|
||||
|
||||
export function findClass(id: string, name: string): string | void {
|
||||
return classModuleMap.get(id)?.[name];
|
||||
}
|
||||
|
||||
export function findClassByName(name: string): string | void {
|
||||
return classMap.find((m) => m[name])?.[name];
|
||||
}
|
||||
|
||||
export function findClassModule(filter: (module: any) => boolean): ClassModule | void {
|
||||
// TODO optimize
|
||||
return [...classModuleMap.values()].find((m) => filter(m));
|
||||
return classMap.find((m) => filter(m));
|
||||
}
|
||||
|
||||
export function unminifyClass(minifiedClass: string): string | void {
|
||||
|
||||
@@ -11,12 +11,14 @@ function getQuickAccessWindow(): Window | null {
|
||||
|
||||
/**
|
||||
* Returns state indicating the visibility of quick access menu.
|
||||
*
|
||||
* @deprecated moved to @decky/api
|
||||
*
|
||||
* @returns `true` if quick access menu is visible and `false` otherwise.
|
||||
*
|
||||
* @example
|
||||
* import { FC, useEffect } from "react";
|
||||
* import { useQuickAccessVisible } from "decky-frontend-lib";
|
||||
* import { useQuickAccessVisible } from "@decky/ui";
|
||||
*
|
||||
* export const PluginPanelView: FC<{}> = ({ }) => {
|
||||
* const isVisible = useQuickAccessVisible();
|
||||
|
||||
Reference in New Issue
Block a user