@decky/ui 4.0.2 → 4.0.3

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.
@@ -3,6 +3,6 @@ import { findModuleExport } from '../webpack';
3
3
  export const showContextMenu = findModuleExport((e) => typeof e === 'function' && e.toString().includes('stopPropagation))'));
4
4
  export const Menu = findModuleExport((e) => e?.prototype?.HideIfSubmenu && e?.prototype?.HideMenu);
5
5
  export const MenuGroup = findModuleExport((e) => (e?.toString()?.includes?.('bInGamepadUI:') &&
6
- fakeRenderComponent(() => e({ overview: { appid: 7 } }))?.type?.prototype?.RenderSubMenu) ||
6
+ fakeRenderComponent(() => e({ overview: { appid: 7 } }), { useContext: () => ({ IN_GAMEPADUI: true }) })?.type?.prototype?.RenderSubMenu) ||
7
7
  (e?.prototype?.RenderSubMenu && e?.prototype?.ShowSubMenu));
8
8
  export const MenuItem = findModuleExport((e) => e?.render?.toString()?.includes('bPlayAudio:') || (e?.prototype?.OnOKButton && e?.prototype?.OnMouseEnter));
@@ -1,3 +1,7 @@
1
+ var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
2
+ if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
3
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
4
+ };
1
5
  export function fakeRenderComponent(fun, customHooks = {}) {
2
6
  const hooks = window.SP_REACT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher
3
7
  .current;
@@ -42,6 +46,7 @@ export function wrapReactClass(node, prop = 'type') {
42
46
  const cls = node[prop];
43
47
  const wrappedCls = (_a = class extends cls {
44
48
  },
49
+ __setFunctionName(_a, "wrappedCls"),
45
50
  _a.__DECKY_WRAPPED = true,
46
51
  _a);
47
52
  return (node[prop] = wrappedCls);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decky/ui",
3
- "version": "4.0.2",
3
+ "version": "4.0.3",
4
4
  "description": "A library for interacting with the Steam frontend in Decky plugins and elsewhere.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -41,29 +41,30 @@
41
41
  }
42
42
  },
43
43
  "devDependencies": {
44
- "@commitlint/cli": "^17.0.2",
45
- "@commitlint/config-conventional": "^17.0.2",
46
- "@commitlint/cz-commitlint": "^17.0.0",
47
- "@semantic-release/changelog": "^6.0.1",
44
+ "@commitlint/cli": "^19.3.0",
45
+ "@commitlint/config-conventional": "^19.2.2",
46
+ "@commitlint/cz-commitlint": "^19.2.0",
47
+ "@semantic-release/changelog": "^6.0.3",
48
48
  "@semantic-release/git": "^10.0.1",
49
- "@types/jest": "^27.4.1",
50
- "@types/react": "18.2.0",
51
- "@types/react-router": "5.1.18",
52
- "commitizen": "^4.2.4",
53
- "husky": "^8.0.1",
49
+ "@types/jest": "^29.5.12",
50
+ "@types/react": "18.3.3",
51
+ "@types/react-dom": "18.3.0",
52
+ "@types/react-router": "5.1.20",
53
+ "commitizen": "^4.3.0",
54
+ "husky": "^9.0.11",
54
55
  "import-sort-style-module": "^6.0.0",
55
- "jest": "^27.5.1",
56
- "minimist": "^1.2.6",
57
- "prettier": "^2.7.1",
56
+ "jest": "^29.7.0",
57
+ "minimist": "^1.2.8",
58
+ "prettier": "^3.3.2",
58
59
  "prettier-plugin-import-sort": "^0.0.7",
59
- "semantic-release": "^19.0.3",
60
+ "semantic-release": "^24.0.0",
60
61
  "shx": "^0.3.4",
61
- "ts-jest": "^27.1.4",
62
- "typedoc": "^0.23.24",
63
- "typedoc-plugin-mdn-links": "^2.0.0",
64
- "typedoc-plugin-missing-exports": "^1.0.0",
62
+ "ts-jest": "^29.1.4",
63
+ "typedoc": "^0.25.13",
64
+ "typedoc-plugin-mdn-links": "^3.1.29",
65
+ "typedoc-plugin-missing-exports": "^2.3.0",
65
66
  "typedoc-wikijs-theme": "^1.0.5",
66
- "typescript": "^4.9.5"
67
+ "typescript": "^5.4.5"
67
68
  },
68
69
  "pnpm": {
69
70
  "peerDependencyRules": {
@@ -71,6 +72,12 @@
71
72
  "react",
72
73
  "react-dom"
73
74
  ]
75
+ },
76
+ "updateConfig": {
77
+ "ignoreDependencies": [
78
+ "react",
79
+ "react-dom"
80
+ ]
74
81
  }
75
82
  },
76
83
  "importSort": {
@@ -28,8 +28,8 @@ export interface MenuGroupProps {
28
28
  export const MenuGroup: FC<MenuGroupProps> = findModuleExport(
29
29
  (e: Export) =>
30
30
  (e?.toString()?.includes?.('bInGamepadUI:') &&
31
- fakeRenderComponent(() => e({ overview: { appid: 7 } }))?.type?.prototype?.RenderSubMenu) ||
32
- (e?.prototype?.RenderSubMenu && e?.prototype?.ShowSubMenu),
31
+ fakeRenderComponent(() => e({ overview: { appid: 7 } }), {useContext: () => ({IN_GAMEPADUI: true})})?.type?.prototype?.RenderSubMenu) ||
32
+ (e?.prototype?.RenderSubMenu && e?.prototype?.ShowSubMenu)
33
33
  );
34
34
  export interface MenuItemProps extends FooterLegendProps {
35
35
  bInteractableItem?: boolean;