Compare commits

...

4 Commits

Author SHA1 Message Date
semantic-release-bot
0b4fcb8d49 chore(release): 3.3.0 [CI SKIP] 2022-10-02 01:31:47 +00:00
Barend Du Toit
4233128c7e feat(Menu): add nested menu groups + more props (#30) 2022-10-01 21:31:18 -04:00
TrainDoctor
43cb2726d8 chore(license): remove un-needed exceptions 2022-09-30 21:50:23 -07:00
TrainDoctor
5d9c506fe7 Update package.json 2022-09-30 21:48:33 -07:00
5 changed files with 31 additions and 23 deletions

View File

@@ -1,3 +1,10 @@
# [3.3.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.2.2...v3.3.0) (2022-10-02)
### Features
* **Menu:** add nested menu groups + more props ([#30](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/30)) ([4233128](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/4233128c7ee8c6e5ab4ee74385c7b1b911d507a6))
## [3.2.2](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.2.1...v3.2.2) (2022-09-29)

20
LICENSE
View File

@@ -1,4 +1,4 @@
GNU LESSER GENERAL PUBLIC LICENSE (DECKY-FRONTEND-LIB v1)
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
@@ -457,24 +457,6 @@ DAMAGES.
END OF TERMS AND CONDITIONS
EXCEPTION NOTICE
1. The exception is that you may use, copy, link, modify and distribute
under your own terms, binary object code versions of works based on the
Library.
2. If you copy code from files distributed under the terms of the GNU
General Public Licence or the GNU Library General Public Licence into a
copy of this library, as this licence permits, the exception does not apply
to the code that you add in this way. To avoid misleading anyone as to the
status of such modified files, you must delete this exception notice from
such code and/or adjust the licensing conditions notice accordingly.
3. If you write modifications of your own for this library, it is your
choice whether to permit this exception to apply to your modifications. If
you do not wish that, you must delete the exception notice from such code
and/or adjust the licensing conditions notice accordingly.
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "decky-frontend-lib",
"version": "3.2.2",
"version": "3.3.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "decky-frontend-lib",
"version": "3.2.2",
"version": "3.3.0",
"license": "GPL-2.0-or-later",
"dependencies": {
"minimist": "^1.2.6"

View File

@@ -1,6 +1,6 @@
{
"name": "decky-frontend-lib",
"version": "3.2.2",
"version": "3.3.0",
"description": "A library for building decky plugins",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -30,7 +30,7 @@
"components"
],
"author": "Jonas Dellinger <jonas@dellinger.dev>",
"license": "LGPL-2.1-with-decky-exceptions",
"license": "LGPL-2.1",
"bugs": {
"url": "https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues"
},

View File

@@ -15,6 +15,7 @@ export interface MenuProps {
label: string;
onCancel?(): void;
cancelText?: string;
children?: ReactNode;
}
export const Menu: FC<MenuProps> = findModuleChild((m) => {
@@ -27,8 +28,26 @@ export const Menu: FC<MenuProps> = findModuleChild((m) => {
}
});
export interface MenuGroupProps {
label: string;
disabled?: boolean;
children?: ReactNode;
}
export const MenuGroup: FC<MenuGroupProps> = findModuleChild((m) => {
if (typeof m !== 'object') return undefined;
for (let prop in m) {
if (m[prop]?.prototype?.RenderSubMenu && m[prop]?.prototype?.ShowSubMenu) {
return m[prop];
}
}
});
export interface MenuItemProps {
onSelected?(): void;
disabled?: boolean;
children?: ReactNode;
}
export const MenuItem: FC<MenuItemProps> = findModuleChild((m) => {