Compare commits

...

6 Commits

Author SHA1 Message Date
semantic-release-bot
23af4c0bb4 chore(release): 3.7.9 [CI SKIP] 2022-10-28 22:43:16 +00:00
AAGaming
a074277bb5 fix(tabs): fix on stable for real this time i think 2022-10-28 18:42:28 -04:00
semantic-release-bot
fb49d64fd3 chore(release): 3.7.8 [CI SKIP] 2022-10-26 21:54:08 +00:00
Lukas Senionis
cfef1dc320 fix(Field): fix this time for real (#44) 2022-10-26 17:53:41 -04:00
semantic-release-bot
f6b4d6b254 chore(release): 3.7.7 [CI SKIP] 2022-10-26 21:49:50 +00:00
Lukas Senionis
0010a1fcee fix(Field): remove incompatible properties (#42)
* fix(Field): remove incompatible properties

* fix(Field): remove the override
2022-10-26 17:49:14 -04:00
4 changed files with 45 additions and 21 deletions

View File

@@ -1,3 +1,24 @@
## [3.7.9](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.8...v3.7.9) (2022-10-28)
### Bug Fixes
* **tabs:** fix on stable for real this time i think ([a074277](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/a074277bb58428a64295154ebf96aceb96e654a7))
## [3.7.8](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.7...v3.7.8) (2022-10-26)
### Bug Fixes
* **Field:** fix this time for real ([#44](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/44)) ([cfef1dc](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/cfef1dc320a5f649d66c3af365cd6aa2d88e46ea))
## [3.7.7](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.6...v3.7.7) (2022-10-26)
### Bug Fixes
* **Field:** remove incompatible properties ([#42](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/42)) ([0010a1f](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/0010a1fceedc417aa25b709d066341da97d42444))
## [3.7.6](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.5...v3.7.6) (2022-10-26) ## [3.7.6](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.5...v3.7.6) (2022-10-26)

View File

@@ -1,6 +1,6 @@
{ {
"name": "decky-frontend-lib", "name": "decky-frontend-lib",
"version": "3.7.6", "version": "3.7.9",
"description": "A library for building decky plugins", "description": "A library for building decky plugins",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

View File

@@ -1,9 +1,9 @@
import { FC, HTMLAttributes, ReactNode, RefAttributes } from 'react'; import { FC, ReactNode, RefAttributes } from 'react';
import { findModuleChild } from '../webpack'; import { findModuleChild } from '../webpack';
import { FooterLegendProps } from './FooterLegend'; import { FooterLegendProps } from './FooterLegend';
export interface FieldProps extends HTMLAttributes<HTMLDivElement>, FooterLegendProps { export interface FieldProps extends FooterLegendProps {
label?: ReactNode; label?: ReactNode;
bottomSeparator?: 'standard' | 'thick' | 'none'; bottomSeparator?: 'standard' | 'thick' | 'none';
description?: ReactNode; description?: ReactNode;
@@ -20,7 +20,7 @@ export interface FieldProps extends HTMLAttributes<HTMLDivElement>, FooterLegend
verticalAlignment?: 'center' | 'none'; // Alligns inline label with children verticalAlignment?: 'center' | 'none'; // Alligns inline label with children
focusable?: boolean; // Allows to get focus without any focusable children or on* callbacks focusable?: boolean; // Allows to get focus without any focusable children or on* callbacks
onActivate?: (e: CustomEvent | MouseEvent) => void; onActivate?: (e: CustomEvent | MouseEvent) => void;
override onClick?: (e: CustomEvent | MouseEvent) => void; onClick?: (e: CustomEvent | MouseEvent) => void;
} }
export const Field = findModuleChild((m) => { export const Field = findModuleChild((m) => {

View File

@@ -109,27 +109,30 @@ try {
} }
return false; return false;
}); });
if (oldTabsModule) oldTabs = Object.values(oldTabsModule).find((x: any) => x?.type?.toString()?.includes("((function(") && x?.type?.toString()?.includes("[\"tabs\"")); if (oldTabsModule)
oldTabs = Object.values(oldTabsModule).find((x: any) => x?.type?.toString()?.includes('((function(){'));
} catch (e) { } catch (e) {
console.error("Error finding oldTabs:", e) console.error('Error finding oldTabs:', e);
} }
/** /**
* Tabs component as used in the library and media tabs. See {@link TabsProps} * Tabs component as used in the library and media tabs. See {@link TabsProps}
* Unlike other components in `decky-frontend-lib`, this requires Decky Loader to be running. * Unlike other components in `decky-frontend-lib`, this requires Decky Loader to be running.
*/ */
export const Tabs = oldTabs || ((props: TabsProps) => { export const Tabs =
const found = tabsComponent; oldTabs ||
const [tc, setTC] = useState<FC<TabsProps>>(found); (((props: TabsProps) => {
useEffect(() => { const found = tabsComponent;
if (found) return; const [tc, setTC] = useState<FC<TabsProps>>(found);
(async () => { useEffect(() => {
console.debug('[DFL:Tabs]: Finding component...'); if (found) return;
const t = await getTabs(); (async () => {
console.debug('[DFL:Tabs]: Found!'); console.debug('[DFL:Tabs]: Finding component...');
setTC(t); const t = await getTabs();
})(); console.debug('[DFL:Tabs]: Found!');
}, []); setTC(t);
console.log('tc', tc); })();
return tc ? createElement(tc, props) : <SteamSpinner />; }, []);
}) as FC<TabsProps>; console.log('tc', tc);
return tc ? createElement(tc, props) : <SteamSpinner />;
}) as FC<TabsProps>);