@decky/ui 4.10.0 → 4.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/components/Menu.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { findModuleByExport, findModuleExport } from '../webpack';
|
|
1
|
+
import { findModuleByExport, findModuleDetailsByExport, findModuleExport } from '../webpack';
|
|
2
2
|
export const showContextMenu = findModuleExport((e) => typeof e === 'function' &&
|
|
3
3
|
e.toString().includes('GetContextMenuManagerFromWindow(') &&
|
|
4
4
|
e.toString().includes('.CreateContextMenuInstance('));
|
|
5
|
-
|
|
5
|
+
const MenuModule = findModuleDetailsByExport((e) => e?.render?.toString()?.includes('bPlayAudio:') || (e?.prototype?.OnOKButton && e?.prototype?.OnMouseEnter));
|
|
6
|
+
export const Menu = findModuleExport((e) => e?.prototype?.HideIfSubmenu && e?.prototype?.HideMenu) ||
|
|
7
|
+
Object.values(MenuModule?.[0] ?? {}).find((e) => e?.toString()?.includes?.(`useId`) && e?.toString()?.includes?.(`labelId`));
|
|
6
8
|
const MenuGoupModule = findModuleByExport(e => e?.prototype?.Focus && e?.prototype?.OnOKButton && e?.prototype?.render?.toString().includes?.(`"emphasis"==this.props.tone`));
|
|
7
9
|
export const MenuGroup = MenuGoupModule && Object.values(MenuGoupModule).find((e) => typeof e == "function" && e?.toString?.()?.includes("bInGamepadUI:"));
|
|
8
|
-
export const MenuItem =
|
|
10
|
+
export const MenuItem = MenuModule?.[1];
|
|
9
11
|
export const MenuSeparator = findModuleExport((e) => typeof e === 'function' && /className:.+?\.ContextMenuSeparator/.test(e.toString()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./steam-client/shared";
|
package/package.json
CHANGED
package/src/components/Menu.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
import { Export, findModuleByExport, findModuleExport } from '../webpack';
|
|
3
|
+
import { Export, findModuleByExport, findModuleDetailsByExport, findModuleExport } from '../webpack';
|
|
4
4
|
import { FooterLegendProps } from './FooterLegend';
|
|
5
5
|
|
|
6
6
|
interface PopupCreationOptions {
|
|
@@ -134,9 +134,11 @@ export interface MenuProps extends FooterLegendProps {
|
|
|
134
134
|
children?: ReactNode;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
const MenuModule = findModuleDetailsByExport((e: Export) => e?.render?.toString()?.includes('bPlayAudio:') || (e?.prototype?.OnOKButton && e?.prototype?.OnMouseEnter));
|
|
138
|
+
|
|
139
|
+
export const Menu: FC<MenuProps> =
|
|
140
|
+
findModuleExport((e: Export) => e?.prototype?.HideIfSubmenu && e?.prototype?.HideMenu) || // Legacy Menu
|
|
141
|
+
(Object.values(MenuModule?.[0] ?? {}).find((e) => e?.toString()?.includes?.(`useId`) && e?.toString()?.includes?.(`labelId`)) as FC<MenuProps>); // New Menu 6/15/2025
|
|
140
142
|
|
|
141
143
|
export interface MenuGroupProps {
|
|
142
144
|
label: string;
|
|
@@ -159,10 +161,7 @@ export interface MenuItemProps extends FooterLegendProps {
|
|
|
159
161
|
children?: ReactNode;
|
|
160
162
|
}
|
|
161
163
|
|
|
162
|
-
export const MenuItem: FC<MenuItemProps> =
|
|
163
|
-
(e: Export) =>
|
|
164
|
-
e?.render?.toString?.()?.includes('bPlayAudio:') || (e?.prototype?.OnOKButton && e?.prototype?.OnMouseEnter),
|
|
165
|
-
);
|
|
164
|
+
export const MenuItem: FC<MenuItemProps> = MenuModule?.[1];
|
|
166
165
|
|
|
167
166
|
export const MenuSeparator: FC = findModuleExport(
|
|
168
167
|
(e: Export) => typeof e === 'function' && /className:.+?\.ContextMenuSeparator/.test(e.toString()),
|