mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-22 19:08:46 +02:00
Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f3df00967 | ||
|
|
215156d316 | ||
|
|
47d75db690 | ||
|
|
82768e0415 | ||
|
|
e44187fe4b | ||
|
|
72af32436e | ||
|
|
e1f64a38de | ||
|
|
82ed48761d | ||
|
|
a81c342d2a | ||
|
|
68d630262d | ||
|
|
9c72a55aff | ||
|
|
92ffc76075 | ||
|
|
ce3860f73b | ||
|
|
d8b10a2133 | ||
|
|
1581304dcb | ||
|
|
60ddf474e0 | ||
|
|
52ae328e2e | ||
|
|
aa0fad2ecf | ||
|
|
dab9071d1e | ||
|
|
189a90ba31 | ||
|
|
8509ae8f9a | ||
|
|
a6ebfdcd7d | ||
|
|
5f7655baaf | ||
|
|
bca2dcc9bd | ||
|
|
546a4da043 |
4
.github/workflows/release.yaml
vendored
4
.github/workflows/release.yaml
vendored
@@ -1,6 +1,7 @@
|
|||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
pull_request:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@@ -20,9 +21,12 @@ jobs:
|
|||||||
node-version: 16
|
node-version: 16
|
||||||
- name: Setup | Dependencies
|
- name: Setup | Dependencies
|
||||||
run: npm i -g pnpm && pnpm i --frozen-lockfile
|
run: npm i -g pnpm && pnpm i --frozen-lockfile
|
||||||
|
- name: Build
|
||||||
|
run: pnpm run build
|
||||||
- name: Test
|
- name: Test
|
||||||
run: pnpm run test
|
run: pnpm run test
|
||||||
- name: Release
|
- name: Release
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|||||||
22
CHANGELOG.md
22
CHANGELOG.md
@@ -1,3 +1,25 @@
|
|||||||
|
# [3.8.0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.14...v3.8.0) (2022-11-11)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **routerhook:** add global components support ([215156d](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/215156d31688faac9028627379e5a3ac4d64ec46))
|
||||||
|
|
||||||
|
## [3.7.14](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.13...v3.7.14) (2022-11-05)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Menu:** fix on Steam beta ([82768e0](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/82768e0415d084deb2af39beb3f9273a83e819de))
|
||||||
|
* **Modal:** fix on Steam beta ([e44187f](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/e44187fe4b9d3e3c9e94490669591599dc5246ba))
|
||||||
|
|
||||||
|
## [3.7.13](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.12...v3.7.13) (2022-11-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **useQuickAccessVisible:** make it work in beta ([#49](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/49)) ([e1f64a3](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/e1f64a38de85073e5cea74ecea4b9cde9a783ecc))
|
||||||
|
|
||||||
## [3.7.12](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.11...v3.7.12) (2022-10-29)
|
## [3.7.12](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.11...v3.7.12) (2022-10-29)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "decky-frontend-lib",
|
"name": "decky-frontend-lib",
|
||||||
"version": "3.7.12",
|
"version": "3.8.0",
|
||||||
"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",
|
||||||
@@ -10,7 +10,6 @@
|
|||||||
"build": "shx rm -rf dist && tsc -b",
|
"build": "shx rm -rf dist && tsc -b",
|
||||||
"dev": "tsc -b -w",
|
"dev": "tsc -b -w",
|
||||||
"docs": "typedoc --tsconfig ./tsconfig.json src/**/*",
|
"docs": "typedoc --tsconfig ./tsconfig.json src/**/*",
|
||||||
"prepack": "npm run build",
|
|
||||||
"test": "echo 'No tests for now!'",
|
"test": "echo 'No tests for now!'",
|
||||||
"prepare": "husky install",
|
"prepare": "husky install",
|
||||||
"commit": "git-cz"
|
"commit": "git-cz"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export * from './usequickaccessvisible';
|
export * from './useQuickAccessVisible';
|
||||||
|
|||||||
@@ -4,6 +4,16 @@ declare global {
|
|||||||
var FocusNavController: any;
|
var FocusNavController: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getQuickAccessWindow(): Window | null {
|
||||||
|
try {
|
||||||
|
const navTrees = FocusNavController?.m_ActiveContext?.m_rgGamepadNavigationTrees || FocusNavController?.m_rgGamepadNavigationTrees;
|
||||||
|
return navTrees?.find((tree: any) => tree?.id === "QuickAccess-NA")?.m_Root?.m_element?.ownerDocument.defaultView ?? null;
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns state indicating the visibility of quick access menu.
|
* Returns state indicating the visibility of quick access menu.
|
||||||
*
|
*
|
||||||
@@ -42,12 +52,10 @@ declare global {
|
|||||||
* };
|
* };
|
||||||
*/
|
*/
|
||||||
export function useQuickAccessVisible(): boolean {
|
export function useQuickAccessVisible(): boolean {
|
||||||
// Assuming that the component is rendered in QAM already, so true by default...
|
const [isVisible, setIsVisible] = useState(getQuickAccessWindow()?.document.hasFocus() ?? true);
|
||||||
const [isVisible, setIsVisible] = useState(true);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const quickAccessWindow: Window | null =
|
const quickAccessWindow = getQuickAccessWindow();
|
||||||
FocusNavController?.GetGamepadNavTreeByID('QuickAccess-NA')?.m_Root?.m_element?.ownerDocument.defaultView ?? null;
|
|
||||||
if (quickAccessWindow === null) {
|
if (quickAccessWindow === null) {
|
||||||
console.error('Could not get window of QuickAccess menu!');
|
console.error('Could not get window of QuickAccess menu!');
|
||||||
return;
|
return;
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import { FC, ReactNode } from 'react';
|
import { FC, ReactNode } from 'react';
|
||||||
|
|
||||||
|
import { fakeRenderComponent } from '../utils';
|
||||||
import { findModuleChild } from '../webpack';
|
import { findModuleChild } from '../webpack';
|
||||||
|
|
||||||
export const showContextMenu: (children: ReactNode, parent?: EventTarget) => void = findModuleChild((m) => {
|
export const showContextMenu: (children: ReactNode, parent?: EventTarget) => void = findModuleChild((m) => {
|
||||||
@@ -38,7 +39,11 @@ export const MenuGroup: FC<MenuGroupProps> = findModuleChild((m) => {
|
|||||||
if (typeof m !== 'object') return undefined;
|
if (typeof m !== 'object') return undefined;
|
||||||
|
|
||||||
for (let prop in m) {
|
for (let prop in m) {
|
||||||
if (m[prop]?.prototype?.RenderSubMenu && m[prop]?.prototype?.ShowSubMenu) {
|
if (
|
||||||
|
(m[prop]?.toString()?.includes('bInGamepadUI:') &&
|
||||||
|
fakeRenderComponent(() => m[prop]())?.type?.prototype?.RenderSubMenu) ||
|
||||||
|
(m[prop]?.prototype?.RenderSubMenu && m[prop]?.prototype?.ShowSubMenu)
|
||||||
|
) {
|
||||||
return m[prop];
|
return m[prop];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -54,7 +59,10 @@ export const MenuItem: FC<MenuItemProps> = findModuleChild((m) => {
|
|||||||
if (typeof m !== 'object') return undefined;
|
if (typeof m !== 'object') return undefined;
|
||||||
|
|
||||||
for (let prop in m) {
|
for (let prop in m) {
|
||||||
if (m[prop]?.prototype?.OnOKButton && m[prop]?.prototype?.OnMouseEnter) {
|
if (
|
||||||
|
m[prop]?.render?.toString()?.includes('bPlayAudio:') ||
|
||||||
|
(m[prop]?.prototype?.OnOKButton && m[prop]?.prototype?.OnMouseEnter)
|
||||||
|
) {
|
||||||
return m[prop];
|
return m[prop];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { FC, ReactNode } from 'react';
|
import { FC, ReactNode } from 'react';
|
||||||
|
|
||||||
import { findSP } from '../utils';
|
import { findSP } from '../utils';
|
||||||
import { findModuleChild } from '../webpack';
|
import { findModule, findModuleChild } from '../webpack';
|
||||||
|
|
||||||
// All of the popout options + strTitle are related. Proper usage is not yet known...
|
// All of the popout options + strTitle are related. Proper usage is not yet known...
|
||||||
export interface ShowModalProps {
|
export interface ShowModalProps {
|
||||||
@@ -29,18 +29,57 @@ export interface ShowModalResult {
|
|||||||
Update: (modal: ReactNode) => void;
|
Update: (modal: ReactNode) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const showModalRaw: (modal: ReactNode, parent?: EventTarget, props?: ShowModalProps) => Promise<ShowModalResult> =
|
const showModalRaw:
|
||||||
findModuleChild((m) => {
|
| ((
|
||||||
if (typeof m !== 'object') return undefined;
|
modal: ReactNode,
|
||||||
for (let prop in m) {
|
parent?: EventTarget,
|
||||||
if (typeof m[prop] === 'function' && m[prop].toString().includes('bHideMainWindowForPopouts:!0')) {
|
title?: string,
|
||||||
return m[prop];
|
props?: ShowModalProps,
|
||||||
}
|
unknown1?: unknown,
|
||||||
|
hideActions?: { bHideActions?: boolean },
|
||||||
|
modalManager?: unknown,
|
||||||
|
) => Promise<ShowModalResult>)
|
||||||
|
| void = findModuleChild((m) => {
|
||||||
|
if (typeof m !== 'object') return undefined;
|
||||||
|
for (let prop in m) {
|
||||||
|
if (
|
||||||
|
typeof m[prop] === 'function' &&
|
||||||
|
m[prop].toString().includes('props.bDisableBackgroundDismiss') &&
|
||||||
|
!m[prop]?.prototype?.Cancel
|
||||||
|
) {
|
||||||
|
return m[prop];
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
export const showModal = (modal: ReactNode, parent?: EventTarget, props?: ShowModalProps): Promise<ShowModalResult> => {
|
const oldShowModalRaw:
|
||||||
return showModalRaw(modal, parent || findSP(), props);
|
| ((modal: ReactNode, parent?: EventTarget, props?: ShowModalProps) => Promise<ShowModalResult>)
|
||||||
|
| void = findModuleChild((m) => {
|
||||||
|
if (typeof m !== 'object') return undefined;
|
||||||
|
for (let prop in m) {
|
||||||
|
if (typeof m[prop] === 'function' && m[prop].toString().includes('bHideMainWindowForPopouts:!0')) {
|
||||||
|
return m[prop];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
export const showModal = (
|
||||||
|
modal: ReactNode,
|
||||||
|
parent?: EventTarget,
|
||||||
|
props: ShowModalProps = {
|
||||||
|
strTitle: 'Decky Dialog',
|
||||||
|
bHideMainWindowForPopouts: false,
|
||||||
|
},
|
||||||
|
): Promise<ShowModalResult> => {
|
||||||
|
if (showModalRaw) {
|
||||||
|
return showModalRaw(modal, parent || findSP(), props.strTitle, props, undefined, {
|
||||||
|
bHideActions: props.bHideActionIcons,
|
||||||
|
});
|
||||||
|
} else if (oldShowModalRaw) {
|
||||||
|
return oldShowModalRaw(modal, parent || findSP(), props);
|
||||||
|
} else {
|
||||||
|
throw new Error('[DFL:Modals]: Cannot find showModal function');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface ModalRootProps {
|
export interface ModalRootProps {
|
||||||
@@ -79,11 +118,26 @@ export const ConfirmModal = findModuleChild((m) => {
|
|||||||
}
|
}
|
||||||
}) as FC<ConfirmModalProps>;
|
}) as FC<ConfirmModalProps>;
|
||||||
|
|
||||||
export const ModalRoot = findModuleChild((m) => {
|
// new
|
||||||
if (typeof m !== 'object') return undefined;
|
export const ModalRoot = (Object.values(
|
||||||
for (let prop in m) {
|
findModule((m: any) => {
|
||||||
if (m[prop]?.prototype?.OK && m[prop]?.prototype?.Cancel && m[prop]?.prototype?.render) {
|
if (typeof m !== 'object') return false;
|
||||||
return m[prop];
|
|
||||||
|
for (let prop in m) {
|
||||||
|
if (m[prop]?.toString()?.includes('"ModalManager","DialogWrapper"')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}) as FC<ModalRootProps>;
|
return false;
|
||||||
|
}) || {},
|
||||||
|
)?.find((x: any) => x?.type?.toString()?.includes('((function(){')) ||
|
||||||
|
// old
|
||||||
|
findModuleChild((m) => {
|
||||||
|
if (typeof m !== 'object') return undefined;
|
||||||
|
for (let prop in m) {
|
||||||
|
if (m[prop]?.prototype?.OK && m[prop]?.prototype?.Cancel && m[prop]?.prototype?.render) {
|
||||||
|
return m[prop];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})) as FC<ModalRootProps>;
|
||||||
|
|||||||
300
src/deck-components/SteamClient.ts
Normal file
300
src/deck-components/SteamClient.ts
Normal file
@@ -0,0 +1,300 @@
|
|||||||
|
export interface Apps {
|
||||||
|
RegisterForAppOverviewChanges: any;
|
||||||
|
RegisterForAppDetails: any;
|
||||||
|
RegisterForLocalizationChanges: any;
|
||||||
|
RegisterForWorkshopChanges: any;
|
||||||
|
RegisterForWorkshopItemDownloads: any;
|
||||||
|
GetLibraryBootstrapData: any;
|
||||||
|
RegisterForAchievementChanges: any;
|
||||||
|
GetFriendAchievementsForApp: any;
|
||||||
|
GetMyAchievementsForApp: any;
|
||||||
|
AddUserTagToApps: any;
|
||||||
|
RemoveUserTagFromApps: any;
|
||||||
|
ClearUserTagsOnApps: any;
|
||||||
|
ClearAndSetUserTagsOnApp: any;
|
||||||
|
SetAppHidden: any;
|
||||||
|
ResetHiddenState: any;
|
||||||
|
SetAppLaunchOptions: any;
|
||||||
|
SetAppResolutionOverride: any;
|
||||||
|
SetAppCurrentLanguage: any;
|
||||||
|
SetAppAutoUpdateBehavior: any;
|
||||||
|
SetAppBackgroundDownloadsBehavior: any;
|
||||||
|
ToggleAppFamilyBlockedState: any;
|
||||||
|
ToggleAppSteamCloudEnabled: any;
|
||||||
|
ToggleAppSteamCloudSyncOnSuspendEnabled: any;
|
||||||
|
ToggleOverrideResolutionForInternalDisplay: any;
|
||||||
|
ToggleEnableSteamOverlayForApp: any;
|
||||||
|
ToggleEnableDesktopTheatreForApp: any;
|
||||||
|
BrowseLocalFilesForApp: any;
|
||||||
|
BrowseScreenshotsForApp: any;
|
||||||
|
BrowseScreenshotForApp: any;
|
||||||
|
BackupFilesForApp: any;
|
||||||
|
VerifyFilesForApp: any;
|
||||||
|
CreateDesktopShortcutForApp: any;
|
||||||
|
JoinAppContentBeta: any;
|
||||||
|
JoinAppContentBetaByPassword: any;
|
||||||
|
GetAchievementsInTimeRange: any;
|
||||||
|
GetSubscribedWorkshopItems: any;
|
||||||
|
SubscribeWorkshopItem: any;
|
||||||
|
GetDownloadedWorkshopItems: any;
|
||||||
|
DownloadWorkshopItem: any;
|
||||||
|
SetLocalScreenshotCaption: any;
|
||||||
|
SetLocalScreenshotSpoiler: any;
|
||||||
|
GetDetailsForScreenshotUpload: any;
|
||||||
|
UploadLocalScreenshot: any;
|
||||||
|
DeleteLocalScreenshot: any;
|
||||||
|
GetScreenshotsInTimeRange: any;
|
||||||
|
GetFriendsWhoPlay: any;
|
||||||
|
RequestLegacyCDKeysForApp: any;
|
||||||
|
GetSoundtrackDetails: any;
|
||||||
|
GetStoreTagLocalization: any;
|
||||||
|
GetLaunchOptionsForApp: any;
|
||||||
|
GetResolutionOverrideForApp: any;
|
||||||
|
ScanForShortcuts: any;
|
||||||
|
GetAllShortcuts: any;
|
||||||
|
GetShortcutData: any;
|
||||||
|
AddShortcut: any;
|
||||||
|
RemoveShortcut: any;
|
||||||
|
InstallFlatpakAppAndCreateShortcut: any;
|
||||||
|
ListFlatpakApps: any;
|
||||||
|
UninstallFlatpakApp: any;
|
||||||
|
ShowControllerConfigurator: any;
|
||||||
|
SetThirdPartyControllerConfiguration: any;
|
||||||
|
ToggleAllowDesktopConfiguration: any;
|
||||||
|
SetControllerRumblePreference: any;
|
||||||
|
GetCachedAppDetails: any;
|
||||||
|
SetCachedAppDetails: any;
|
||||||
|
ReportLibraryAssetCacheMiss: any;
|
||||||
|
SaveAchievementProgressCache: any;
|
||||||
|
SetStreamingClientForApp: any;
|
||||||
|
SetCustomArtworkForApp: any;
|
||||||
|
ClearCustomArtworkForApp: any;
|
||||||
|
SetCustomLogoPositionForApp: any;
|
||||||
|
ClearCustomLogoPositionForApp: any;
|
||||||
|
RequestIconDataForApp: any;
|
||||||
|
SpecifyCompatTool: any;
|
||||||
|
GetAvailableCompatTools: any;
|
||||||
|
SetShortcutName: any;
|
||||||
|
SetShortcutExe: any;
|
||||||
|
SetShortcutStartDir: any;
|
||||||
|
SetShortcutLaunchOptions: any;
|
||||||
|
SetShortcutIsVR: any;
|
||||||
|
PromptToChangeShortcut: any;
|
||||||
|
PromptToSelectShortcutIcon: any;
|
||||||
|
InstallApp: any;
|
||||||
|
RunGame: any;
|
||||||
|
VerifyApp: any;
|
||||||
|
StreamGame: any;
|
||||||
|
CancelLaunch: any;
|
||||||
|
TerminateApp: any;
|
||||||
|
UninstallApps: any;
|
||||||
|
ShowStore: any;
|
||||||
|
SetDLCEnabled: any;
|
||||||
|
ContinueGameAction: any;
|
||||||
|
CancelGameAction: any;
|
||||||
|
GetActiveGameActions: any;
|
||||||
|
GetGameActionDetails: any;
|
||||||
|
GetGameActionForApp: any;
|
||||||
|
SkipShaderProcessing: any;
|
||||||
|
MarkEulaAccepted: any;
|
||||||
|
MarkEulaRejected: any;
|
||||||
|
LoadEula: any;
|
||||||
|
GetConflictingFileTimestamps: any;
|
||||||
|
GetCloudPendingRemoteOperations: any;
|
||||||
|
ClearProton: any;
|
||||||
|
RegisterForMarketingMessages: any;
|
||||||
|
FetchMarketingMessages: any;
|
||||||
|
MarkMarketingMessageSeen: any;
|
||||||
|
ReportMarketingMessageSeen: any;
|
||||||
|
RegisterForGameActionStart: any;
|
||||||
|
RegisterForGameActionEnd: any;
|
||||||
|
RegisterForGameActionTaskChange: any;
|
||||||
|
RegisterForGameActionUserRequest: any;
|
||||||
|
RegisterForGameActionShowError: any;
|
||||||
|
RegisterForGameActionShowUI: any;
|
||||||
|
OpenAppSettingsDialog: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Window {
|
||||||
|
RegisterForExternalDisplayChanged: any;
|
||||||
|
SetManualDisplayScaleFactor: any;
|
||||||
|
SetAutoDisplayScale: any;
|
||||||
|
Minimize: any;
|
||||||
|
ProcessShuttingDown: any;
|
||||||
|
ToggleMaximize: any;
|
||||||
|
MoveTo: any;
|
||||||
|
ResizeTo: any;
|
||||||
|
SetMinSize: any;
|
||||||
|
SetResizeGrip: any;
|
||||||
|
SetComposition: any;
|
||||||
|
GamescopeBlur: any;
|
||||||
|
BringToFront: any;
|
||||||
|
SetForegroundWindow: any;
|
||||||
|
SetKeyFocus: any;
|
||||||
|
FlashWindow: any;
|
||||||
|
StopFlashWindow: any;
|
||||||
|
ShowWindow: any;
|
||||||
|
HideWindow: any;
|
||||||
|
SetWindowIcon: any;
|
||||||
|
GetWindowDimensions: any;
|
||||||
|
GetWindowRestoreDetails: any;
|
||||||
|
PositionWindowRelative: any;
|
||||||
|
GetMousePositionDetails: any;
|
||||||
|
IsWindowMinimized: any;
|
||||||
|
GetBrowserID: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SteamClient {
|
||||||
|
Apps: Apps;
|
||||||
|
Browser: any;
|
||||||
|
BrowserView: any;
|
||||||
|
ClientNotifications: any;
|
||||||
|
Cloud: any;
|
||||||
|
Console: any;
|
||||||
|
Downloads: any;
|
||||||
|
FamilySharing: any;
|
||||||
|
FriendSettings: any;
|
||||||
|
Friends: any;
|
||||||
|
GameSessions: any;
|
||||||
|
Input: any;
|
||||||
|
InstallFolder: any;
|
||||||
|
Installs: any;
|
||||||
|
MachineStorage: any;
|
||||||
|
Messaging: any;
|
||||||
|
Notifications: any;
|
||||||
|
OpenVR: any;
|
||||||
|
Overlay: any;
|
||||||
|
Parental: any;
|
||||||
|
RegisterIFrameNavigatedCallback: any;
|
||||||
|
RemotePlay: any;
|
||||||
|
RoamingStorage: any;
|
||||||
|
Screenshots: any;
|
||||||
|
Settings: any;
|
||||||
|
SharedConnection: any;
|
||||||
|
Stats: any;
|
||||||
|
Storage: any;
|
||||||
|
Streaming: any;
|
||||||
|
System: any;
|
||||||
|
UI: any;
|
||||||
|
URL: any;
|
||||||
|
Updates: any;
|
||||||
|
User: any;
|
||||||
|
WebChat: any;
|
||||||
|
Window: Window;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SteamShortcut {
|
||||||
|
appid: number;
|
||||||
|
data: {
|
||||||
|
bIsApplication: boolean;
|
||||||
|
strAppName: string;
|
||||||
|
strExePath: string;
|
||||||
|
strArguments: string;
|
||||||
|
strShortcutPath: string;
|
||||||
|
strSortAs: string;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @prop unAppID is not properly set by Steam for non-steam game shortcuts, so it defaults to 0 for them
|
||||||
|
*/
|
||||||
|
export interface LifetimeNotification {
|
||||||
|
unAppID: number;
|
||||||
|
nInstanceID: number;
|
||||||
|
bRunning: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type AppAchievements = {
|
||||||
|
nAchieved: number;
|
||||||
|
nTotal: number;
|
||||||
|
vecAchievedHidden: any[];
|
||||||
|
vecHighlight: any[];
|
||||||
|
vecUnachieved: any[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type AppLanguages = {
|
||||||
|
strDisplayName: string;
|
||||||
|
strShortName: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface AppDetails {
|
||||||
|
achievements: AppAchievements;
|
||||||
|
bCanMoveInstallFolder: boolean;
|
||||||
|
bCloudAvailable: boolean;
|
||||||
|
bCloudEnabledForAccount: boolean;
|
||||||
|
bCloudEnabledForApp: boolean;
|
||||||
|
bCloudSyncOnSuspendAvailable: boolean;
|
||||||
|
bCloudSyncOnSuspendEnabled: boolean;
|
||||||
|
bCommunityMarketPresence: boolean;
|
||||||
|
bEnableAllowDesktopConfiguration: boolean;
|
||||||
|
bFreeRemovableLicense: boolean;
|
||||||
|
bHasAllLegacyCDKeys: boolean;
|
||||||
|
bHasAnyLocalContent: boolean;
|
||||||
|
bHasLockedPrivateBetas: boolean;
|
||||||
|
bIsExcludedFromSharing: boolean;
|
||||||
|
bIsSubscribedTo: boolean;
|
||||||
|
bOverlayEnabled: boolean;
|
||||||
|
bOverrideInternalResolution: boolean;
|
||||||
|
bRequiresLegacyCDKey: boolean;
|
||||||
|
bShortcutIsVR: boolean;
|
||||||
|
bShowCDKeyInMenus: boolean;
|
||||||
|
bShowControllerConfig: boolean;
|
||||||
|
bSupportsCDKeyCopyToClipboard: boolean;
|
||||||
|
bVRGameTheatreEnabled: boolean;
|
||||||
|
bWorkshopVisible: boolean;
|
||||||
|
eAppOwnershipFlags: number;
|
||||||
|
eAutoUpdateValue: number;
|
||||||
|
eBackgroundDownloads: number;
|
||||||
|
eCloudSync: number;
|
||||||
|
eControllerRumblePreference: number;
|
||||||
|
eDisplayStatus: number;
|
||||||
|
eEnableThirdPartyControllerConfiguration: number;
|
||||||
|
eSteamInputControllerMask: number;
|
||||||
|
iInstallFolder: number;
|
||||||
|
lDiskUsageBytes: number;
|
||||||
|
lDlcUsageBytes: number;
|
||||||
|
nBuildID: number;
|
||||||
|
nCompatToolPriority: number;
|
||||||
|
nPlaytimeForever: number;
|
||||||
|
nScreenshots: number;
|
||||||
|
rtLastTimePlayed: number;
|
||||||
|
rtLastUpdated: number;
|
||||||
|
rtPurchased: number;
|
||||||
|
selectedLanguage: {
|
||||||
|
strDisplayName: string;
|
||||||
|
strShortName: string;
|
||||||
|
};
|
||||||
|
strCloudBytesAvailable: string;
|
||||||
|
strCloudBytesUsed: string;
|
||||||
|
strCompatToolDisplayName: string;
|
||||||
|
strCompatToolName: string;
|
||||||
|
strDeveloperName: string;
|
||||||
|
strDeveloperURL: string;
|
||||||
|
strDisplayName: string;
|
||||||
|
strExternalSubscriptionURL: string;
|
||||||
|
strFlatpakAppID: string;
|
||||||
|
strHomepageURL: string;
|
||||||
|
strLaunchOptions: string;
|
||||||
|
strManualURL: string;
|
||||||
|
strOwnerSteamID: string;
|
||||||
|
strResolutionOverride: string;
|
||||||
|
strSelectedBeta: string;
|
||||||
|
strShortcutExe: string;
|
||||||
|
strShortcutLaunchOptions: string;
|
||||||
|
strShortcutStartDir: string;
|
||||||
|
strSteamDeckBlogURL: string;
|
||||||
|
unAppID: number;
|
||||||
|
vecBetas: any[];
|
||||||
|
vecDLC: any[];
|
||||||
|
vecDeckCompatTestResults: any[];
|
||||||
|
vecLanguages: AppLanguages[];
|
||||||
|
vecLegacyCDKeys: any[];
|
||||||
|
vecMusicAlbums: any[];
|
||||||
|
vecPlatforms: string[];
|
||||||
|
vecScreenShots: any[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface SteamAppOverview {
|
||||||
|
display_name: string;
|
||||||
|
gameid: string;
|
||||||
|
}
|
||||||
@@ -21,3 +21,10 @@ export * from './Tabs';
|
|||||||
export * from './TextField';
|
export * from './TextField';
|
||||||
export * from './Toggle';
|
export * from './Toggle';
|
||||||
export * from './ToggleField';
|
export * from './ToggleField';
|
||||||
|
export * from './SteamClient';
|
||||||
|
|
||||||
|
import {SteamClient} from './SteamClient'
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
var SteamClient: SteamClient;
|
||||||
|
}
|
||||||
|
|||||||
@@ -26,8 +26,10 @@ export type RoutePatch = (route: RouteProps) => RouteProps;
|
|||||||
export interface RouterHook {
|
export interface RouterHook {
|
||||||
addRoute(path: string, component: ComponentType, props?: Omit<RouteProps, 'path' | 'children'>): void;
|
addRoute(path: string, component: ComponentType, props?: Omit<RouteProps, 'path' | 'children'>): void;
|
||||||
addPatch(path: string, patch: RoutePatch): RoutePatch;
|
addPatch(path: string, patch: RoutePatch): RoutePatch;
|
||||||
removePatch(path: string, patch: RoutePatch): void;
|
addGlobalComponent(name: string, component: ComponentType): void;
|
||||||
removeRoute(path: string): void;
|
removeRoute(path: string): void;
|
||||||
|
removePatch(path: string, patch: RoutePatch): void;
|
||||||
|
removeGlobalComponent(name: string): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ToastData {
|
export interface ToastData {
|
||||||
|
|||||||
Reference in New Issue
Block a user