@decky/ui 4.12.1 → 4.13.1

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.
@@ -13,7 +13,7 @@ export function findSP() {
13
13
  if (document.title == 'SP')
14
14
  return window;
15
15
  const navTrees = getGamepadNavigationTrees();
16
- return navTrees?.find((x) => x.m_ID == 'GamepadUI_Full_Root' || x.m_ID == 'root_1_')?.Root?.Element?.ownerDocument?.defaultView;
16
+ return navTrees?.find((x) => x.m_ID == 'GamepadUI_Full_Root' || x.m_ID == 'root_1_' || x.m_ID == 'GamepadUI_VR_Full_Root')?.Root?.Element?.ownerDocument?.defaultView;
17
17
  }
18
18
  export function getFocusNavController() {
19
19
  return window.GamepadNavTree?.m_context?.m_controller || window.FocusNavController;
@@ -1,5 +1,5 @@
1
1
  import { findClassModule } from '../class-mapper';
2
- export const quickAccessMenuClasses = findClassModule((m) => m.Title && m.QuickAccessMenu && m.BatteryDetailsLabels);
2
+ export const quickAccessMenuClasses = findClassModule((m) => m.Title && m.QuickAccessMenu);
3
3
  export const scrollPanelClasses = findClassModule((m) => m.ScrollPanel);
4
4
  export const gamepadDialogClasses = findClassModule((m) => m.GamepadDialogContent && !m.BindingButtons);
5
5
  export const quickAccessControlsClasses = findClassModule((m) => m.BatteryPercentageLabel && m.PanelSection && !m['vr-dashboard-bar-height'] && !m.QuickAccessMenu && !m.QuickAccess && !m.PerfProfileInfo);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decky/ui",
3
- "version": "4.12.1",
3
+ "version": "4.13.1",
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",
@@ -24,8 +24,11 @@ export function findSP(): Window {
24
24
  // old (SP as host)
25
25
  if (document.title == 'SP') return window;
26
26
  // new (SP as popup)
27
+ // GamepadUI_VR_Full_Root is the main window of the Steam Frame's VR dashboard
27
28
  const navTrees = getGamepadNavigationTrees();
28
- return navTrees?.find((x: any) => x.m_ID == 'GamepadUI_Full_Root' || x.m_ID == 'root_1_')?.Root?.Element?.ownerDocument?.defaultView;
29
+ return navTrees?.find(
30
+ (x: any) => x.m_ID == 'GamepadUI_Full_Root' || x.m_ID == 'root_1_' || x.m_ID == 'GamepadUI_VR_Full_Root',
31
+ )?.Root?.Element?.ownerDocument?.defaultView;
29
32
  }
30
33
 
31
34
  /**
@@ -1,5 +1,5 @@
1
1
  import { findClassModule } from '../class-mapper';
2
-
2
+ // TODO document how to generate these?
3
3
  type QuickAccessMenuClasses = Record<
4
4
  | 'ActiveTab'
5
5
  | 'AllTabContents'
@@ -1064,7 +1064,7 @@ type MainBrowserClasses = Record<
1064
1064
  string
1065
1065
  >;
1066
1066
 
1067
- export const quickAccessMenuClasses = findClassModule((m) => m.Title && m.QuickAccessMenu && m.BatteryDetailsLabels) as QuickAccessMenuClasses;
1067
+ export const quickAccessMenuClasses = findClassModule((m) => m.Title && m.QuickAccessMenu) as QuickAccessMenuClasses;
1068
1068
  export const scrollPanelClasses = findClassModule((m) => m.ScrollPanel) as ScrollPanelClasses;
1069
1069
  export const gamepadDialogClasses = findClassModule((m) => m.GamepadDialogContent && !m.BindingButtons) as GamepadDialogClasses;
1070
1070
  export const quickAccessControlsClasses = findClassModule((m) => m.BatteryPercentageLabel && m.PanelSection && !m['vr-dashboard-bar-height'] && !m.QuickAccessMenu && !m.QuickAccess && !m.PerfProfileInfo) as QuickAccessControlsClasses;