diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index a915f03..0000000 --- a/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "printWidth": 90, - "trailingComma": "es5", - "tabWidth": 4, - "semi": false, - "singleQuote": true -} \ No newline at end of file diff --git a/package.json b/package.json index b2d7c90..c11f2f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "PlayTime", - "version": "2.0.8", + "version": "2.0.9", "description": "PlayTime", "type": "module", "scripts": { @@ -19,11 +19,11 @@ "@types/node": "^22.10.2", "@types/react": "18.3.3", "mobx": "^6.12.0", - "rollup": "^4.30.0", + "rollup": "^4.30.1", "shx": "^0.3.4", "ts-essentials": "^10.0.4", "tslib": "^2.8.1", - "typescript": "^5.7.2" + "typescript": "^5.7.3" }, "dependencies": { "@decky/api": "^1.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a046c0c..4e9c097 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,20 +46,20 @@ importers: specifier: ^6.12.0 version: 6.12.0 rollup: - specifier: ^4.30.0 - version: 4.30.0 + specifier: ^4.30.1 + version: 4.30.1 shx: specifier: ^0.3.4 version: 0.3.4 ts-essentials: specifier: ^10.0.4 - version: 10.0.4(typescript@5.7.2) + version: 10.0.4(typescript@5.7.3) tslib: specifier: ^2.8.1 version: 2.8.1 typescript: - specifier: ^5.7.2 - version: 5.7.2 + specifier: ^5.7.3 + version: 5.7.3 packages: @@ -210,98 +210,98 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.30.0': - resolution: {integrity: sha512-qFcFto9figFLz2g25DxJ1WWL9+c91fTxnGuwhToCl8BaqDsDYMl/kOnBXAyAqkkzAWimYMSWNPWEjt+ADAHuoQ==} + '@rollup/rollup-android-arm-eabi@4.30.1': + resolution: {integrity: sha512-pSWY+EVt3rJ9fQ3IqlrEUtXh3cGqGtPDH1FQlNZehO2yYxCHEX1SPsz1M//NXwYfbTlcKr9WObLnJX9FsS9K1Q==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.30.0': - resolution: {integrity: sha512-vqrQdusvVl7dthqNjWCL043qelBK+gv9v3ZiqdxgaJvmZyIAAXMjeGVSqZynKq69T7062T5VrVTuikKSAAVP6A==} + '@rollup/rollup-android-arm64@4.30.1': + resolution: {integrity: sha512-/NA2qXxE3D/BRjOJM8wQblmArQq1YoBVJjrjoTSBS09jgUisq7bqxNHJ8kjCHeV21W/9WDGwJEWSN0KQ2mtD/w==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.30.0': - resolution: {integrity: sha512-617pd92LhdA9+wpixnzsyhVft3szYiN16aNUMzVkf2N+yAk8UXY226Bfp36LvxYTUt7MO/ycqGFjQgJ0wlMaWQ==} + '@rollup/rollup-darwin-arm64@4.30.1': + resolution: {integrity: sha512-r7FQIXD7gB0WJ5mokTUgUWPl0eYIH0wnxqeSAhuIwvnnpjdVB8cRRClyKLQr7lgzjctkbp5KmswWszlwYln03Q==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.30.0': - resolution: {integrity: sha512-Y3b4oDoaEhCypg8ajPqigKDcpi5ZZovemQl9Edpem0uNv6UUjXv7iySBpGIUTSs2ovWOzYpfw9EbFJXF/fJHWw==} + '@rollup/rollup-darwin-x64@4.30.1': + resolution: {integrity: sha512-x78BavIwSH6sqfP2xeI1hd1GpHL8J4W2BXcVM/5KYKoAD3nNsfitQhvWSw+TFtQTLZ9OmlF+FEInEHyubut2OA==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.30.0': - resolution: {integrity: sha512-3REQJ4f90sFIBfa0BUokiCdrV/E4uIjhkWe1bMgCkhFXbf4D8YN6C4zwJL881GM818qVYE9BO3dGwjKhpo2ABA==} + '@rollup/rollup-freebsd-arm64@4.30.1': + resolution: {integrity: sha512-HYTlUAjbO1z8ywxsDFWADfTRfTIIy/oUlfIDmlHYmjUP2QRDTzBuWXc9O4CXM+bo9qfiCclmHk1x4ogBjOUpUQ==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.30.0': - resolution: {integrity: sha512-ZtY3Y8icbe3Cc+uQicsXG5L+CRGUfLZjW6j2gn5ikpltt3Whqjfo5mkyZ86UiuHF9Q3ZsaQeW7YswlHnN+lAcg==} + '@rollup/rollup-freebsd-x64@4.30.1': + resolution: {integrity: sha512-1MEdGqogQLccphhX5myCJqeGNYTNcmTyaic9S7CG3JhwuIByJ7J05vGbZxsizQthP1xpVx7kd3o31eOogfEirw==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.30.0': - resolution: {integrity: sha512-bsPGGzfiHXMhQGuFGpmo2PyTwcrh2otL6ycSZAFTESviUoBOuxF7iBbAL5IJXc/69peXl5rAtbewBFeASZ9O0g==} + '@rollup/rollup-linux-arm-gnueabihf@4.30.1': + resolution: {integrity: sha512-PaMRNBSqCx7K3Wc9QZkFx5+CX27WFpAMxJNiYGAXfmMIKC7jstlr32UhTgK6T07OtqR+wYlWm9IxzennjnvdJg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.30.0': - resolution: {integrity: sha512-kvyIECEhs2DrrdfQf++maCWJIQ974EI4txlz1nNSBaCdtf7i5Xf1AQCEJWOC5rEBisdaMFFnOWNLYt7KpFqy5A==} + '@rollup/rollup-linux-arm-musleabihf@4.30.1': + resolution: {integrity: sha512-B8Rcyj9AV7ZlEFqvB5BubG5iO6ANDsRKlhIxySXcF1axXYUyqwBok+XZPgIYGBgs7LDXfWfifxhw0Ik57T0Yug==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.30.0': - resolution: {integrity: sha512-CFE7zDNrokaotXu+shwIrmWrFxllg79vciH4E/zeK7NitVuWEaXRzS0mFfFvyhZfn8WfVOG/1E9u8/DFEgK7WQ==} + '@rollup/rollup-linux-arm64-gnu@4.30.1': + resolution: {integrity: sha512-hqVyueGxAj3cBKrAI4aFHLV+h0Lv5VgWZs9CUGqr1z0fZtlADVV1YPOij6AhcK5An33EXaxnDLmJdQikcn5NEw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.30.0': - resolution: {integrity: sha512-MctNTBlvMcIBP0t8lV/NXiUwFg9oK5F79CxLU+a3xgrdJjfBLVIEHSAjQ9+ipofN2GKaMLnFFXLltg1HEEPaGQ==} + '@rollup/rollup-linux-arm64-musl@4.30.1': + resolution: {integrity: sha512-i4Ab2vnvS1AE1PyOIGp2kXni69gU2DAUVt6FSXeIqUCPIR3ZlheMW3oP2JkukDfu3PsexYRbOiJrY+yVNSk9oA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loongarch64-gnu@4.30.0': - resolution: {integrity: sha512-fBpoYwLEPivL3q368+gwn4qnYnr7GVwM6NnMo8rJ4wb0p/Y5lg88vQRRP077gf+tc25akuqd+1Sxbn9meODhwA==} + '@rollup/rollup-linux-loongarch64-gnu@4.30.1': + resolution: {integrity: sha512-fARcF5g296snX0oLGkVxPmysetwUk2zmHcca+e9ObOovBR++9ZPOhqFUM61UUZ2EYpXVPN1redgqVoBB34nTpQ==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.30.0': - resolution: {integrity: sha512-1hiHPV6dUaqIMXrIjN+vgJqtfkLpqHS1Xsg0oUfUVD98xGp1wX89PIXgDF2DWra1nxAd8dfE0Dk59MyeKaBVAw==} + '@rollup/rollup-linux-powerpc64le-gnu@4.30.1': + resolution: {integrity: sha512-GLrZraoO3wVT4uFXh67ElpwQY0DIygxdv0BNW9Hkm3X34wu+BkqrDrkcsIapAY+N2ATEbvak0XQ9gxZtCIA5Rw==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.30.0': - resolution: {integrity: sha512-U0xcC80SMpEbvvLw92emHrNjlS3OXjAM0aVzlWfar6PR0ODWCTQtKeeB+tlAPGfZQXicv1SpWwRz9Hyzq3Jx3g==} + '@rollup/rollup-linux-riscv64-gnu@4.30.1': + resolution: {integrity: sha512-0WKLaAUUHKBtll0wvOmh6yh3S0wSU9+yas923JIChfxOaaBarmb/lBKPF0w/+jTVozFnOXJeRGZ8NvOxvk/jcw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.30.0': - resolution: {integrity: sha512-VU/P/IODrNPasgZDLIFJmMiLGez+BN11DQWfTVlViJVabyF3JaeaJkP6teI8760f18BMGCQOW9gOmuzFaI1pUw==} + '@rollup/rollup-linux-s390x-gnu@4.30.1': + resolution: {integrity: sha512-GWFs97Ruxo5Bt+cvVTQkOJ6TIx0xJDD/bMAOXWJg8TCSTEK8RnFeOeiFTxKniTc4vMIaWvCplMAFBt9miGxgkA==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.30.0': - resolution: {integrity: sha512-laQVRvdbKmjXuFA3ZiZj7+U24FcmoPlXEi2OyLfbpY2MW1oxLt9Au8q9eHd0x6Pw/Kw4oe9gwVXWwIf2PVqblg==} + '@rollup/rollup-linux-x64-gnu@4.30.1': + resolution: {integrity: sha512-UtgGb7QGgXDIO+tqqJ5oZRGHsDLO8SlpE4MhqpY9Llpzi5rJMvrK6ZGhsRCST2abZdBqIBeXW6WPD5fGK5SDwg==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.30.0': - resolution: {integrity: sha512-3wzKzduS7jzxqcOvy/ocU/gMR3/QrHEFLge5CD7Si9fyHuoXcidyYZ6jyx8OPYmCcGm3uKTUl+9jUSAY74Ln5A==} + '@rollup/rollup-linux-x64-musl@4.30.1': + resolution: {integrity: sha512-V9U8Ey2UqmQsBT+xTOeMzPzwDzyXmnAoO4edZhL7INkwQcaW1Ckv3WJX3qrrp/VHaDkEWIBWhRwP47r8cdrOow==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.30.0': - resolution: {integrity: sha512-jROwnI1+wPyuv696rAFHp5+6RFhXGGwgmgSfzE8e4xfit6oLRg7GyMArVUoM3ChS045OwWr9aTnU+2c1UdBMyw==} + '@rollup/rollup-win32-arm64-msvc@4.30.1': + resolution: {integrity: sha512-WabtHWiPaFF47W3PkHnjbmWawnX/aE57K47ZDT1BXTS5GgrBUEpvOzq0FI0V/UYzQJgdb8XlhVNH8/fwV8xDjw==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.30.0': - resolution: {integrity: sha512-duzweyup5WELhcXx5H1jokpr13i3BV9b48FMiikYAwk/MT1LrMYYk2TzenBd0jj4ivQIt58JWSxc19y4SvLP4g==} + '@rollup/rollup-win32-ia32-msvc@4.30.1': + resolution: {integrity: sha512-pxHAU+Zv39hLUTdQQHUVHf4P+0C47y/ZloorHpzs2SXMRqeAWmGghzAhfOlzFHHwjvgokdFAhC4V+6kC1lRRfw==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.30.0': - resolution: {integrity: sha512-DYvxS0M07PvgvavMIybCOBYheyrqlui6ZQBHJs6GqduVzHSZ06TPPvlfvnYstjODHQ8UUXFwt5YE+h0jFI8kwg==} + '@rollup/rollup-win32-x64-msvc@4.30.1': + resolution: {integrity: sha512-D6qjsXGcvhTjv0kI4fU8tUuBDF/Ueee4SVX79VfNDXZa64TfCW1Slkb6Z7O1p7vflqZjcmOVdZlqf8gvJxc6og==} cpu: [x64] os: [win32] @@ -803,8 +803,8 @@ packages: rollup-pluginutils@2.8.2: resolution: {integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==} - rollup@4.30.0: - resolution: {integrity: sha512-sDnr1pcjTgUT69qBksNF1N1anwfbyYG6TBQ22b03bII8EdiUQ7J0TlozVaTMjT/eEJAO49e1ndV7t+UZfL1+vA==} + rollup@4.30.1: + resolution: {integrity: sha512-mlJ4glW020fPuLi7DkM/lN97mYEZGWeqBnrljzN0gs7GLctqX3lNWxKQ7Gl712UAX+6fog/L3jh4gb7R6aVi3w==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -878,8 +878,8 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - typescript@5.7.2: - resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} + typescript@5.7.3: + resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} engines: {node: '>=14.17'} hasBin: true @@ -953,18 +953,18 @@ snapshots: '@decky/rollup@1.0.1': dependencies: - '@rollup/plugin-commonjs': 26.0.3(rollup@4.30.0) - '@rollup/plugin-json': 6.1.0(rollup@4.30.0) - '@rollup/plugin-node-resolve': 15.3.1(rollup@4.30.0) - '@rollup/plugin-replace': 5.0.7(rollup@4.30.0) - '@rollup/plugin-typescript': 11.1.6(rollup@4.30.0)(tslib@2.8.1)(typescript@5.7.2) + '@rollup/plugin-commonjs': 26.0.3(rollup@4.30.1) + '@rollup/plugin-json': 6.1.0(rollup@4.30.1) + '@rollup/plugin-node-resolve': 15.3.1(rollup@4.30.1) + '@rollup/plugin-replace': 5.0.7(rollup@4.30.1) + '@rollup/plugin-typescript': 11.1.6(rollup@4.30.1)(tslib@2.8.1)(typescript@5.7.3) merge-anything: 6.0.2 - rollup: 4.30.0 - rollup-plugin-delete: 2.1.0(rollup@4.30.0) - rollup-plugin-external-globals: 0.11.0(rollup@4.30.0) - rollup-plugin-import-assets: 1.1.1(rollup@4.30.0) + rollup: 4.30.1 + rollup-plugin-delete: 2.1.0(rollup@4.30.1) + rollup-plugin-external-globals: 0.11.0(rollup@4.30.1) + rollup-plugin-import-assets: 1.1.1(rollup@4.30.1) tslib: 2.8.1 - typescript: 5.7.2 + typescript: 5.7.3 '@decky/ui@4.9.0': {} @@ -994,112 +994,112 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@rollup/plugin-commonjs@26.0.3(rollup@4.30.0)': + '@rollup/plugin-commonjs@26.0.3(rollup@4.30.1)': dependencies: - '@rollup/pluginutils': 5.1.4(rollup@4.30.0) + '@rollup/pluginutils': 5.1.4(rollup@4.30.1) commondir: 1.0.1 estree-walker: 2.0.2 glob: 10.4.5 is-reference: 1.2.1 magic-string: 0.30.17 optionalDependencies: - rollup: 4.30.0 + rollup: 4.30.1 - '@rollup/plugin-json@6.1.0(rollup@4.30.0)': + '@rollup/plugin-json@6.1.0(rollup@4.30.1)': dependencies: - '@rollup/pluginutils': 5.1.4(rollup@4.30.0) + '@rollup/pluginutils': 5.1.4(rollup@4.30.1) optionalDependencies: - rollup: 4.30.0 + rollup: 4.30.1 - '@rollup/plugin-node-resolve@15.3.1(rollup@4.30.0)': + '@rollup/plugin-node-resolve@15.3.1(rollup@4.30.1)': dependencies: - '@rollup/pluginutils': 5.1.4(rollup@4.30.0) + '@rollup/pluginutils': 5.1.4(rollup@4.30.1) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-module: 1.0.0 resolve: 1.22.9 optionalDependencies: - rollup: 4.30.0 + rollup: 4.30.1 - '@rollup/plugin-replace@5.0.7(rollup@4.30.0)': + '@rollup/plugin-replace@5.0.7(rollup@4.30.1)': dependencies: - '@rollup/pluginutils': 5.1.4(rollup@4.30.0) + '@rollup/pluginutils': 5.1.4(rollup@4.30.1) magic-string: 0.30.17 optionalDependencies: - rollup: 4.30.0 + rollup: 4.30.1 - '@rollup/plugin-typescript@11.1.6(rollup@4.30.0)(tslib@2.8.1)(typescript@5.7.2)': + '@rollup/plugin-typescript@11.1.6(rollup@4.30.1)(tslib@2.8.1)(typescript@5.7.3)': dependencies: - '@rollup/pluginutils': 5.1.4(rollup@4.30.0) + '@rollup/pluginutils': 5.1.4(rollup@4.30.1) resolve: 1.22.9 - typescript: 5.7.2 + typescript: 5.7.3 optionalDependencies: - rollup: 4.30.0 + rollup: 4.30.1 tslib: 2.8.1 - '@rollup/pluginutils@5.1.4(rollup@4.30.0)': + '@rollup/pluginutils@5.1.4(rollup@4.30.1)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 4.0.2 optionalDependencies: - rollup: 4.30.0 + rollup: 4.30.1 - '@rollup/rollup-android-arm-eabi@4.30.0': + '@rollup/rollup-android-arm-eabi@4.30.1': optional: true - '@rollup/rollup-android-arm64@4.30.0': + '@rollup/rollup-android-arm64@4.30.1': optional: true - '@rollup/rollup-darwin-arm64@4.30.0': + '@rollup/rollup-darwin-arm64@4.30.1': optional: true - '@rollup/rollup-darwin-x64@4.30.0': + '@rollup/rollup-darwin-x64@4.30.1': optional: true - '@rollup/rollup-freebsd-arm64@4.30.0': + '@rollup/rollup-freebsd-arm64@4.30.1': optional: true - '@rollup/rollup-freebsd-x64@4.30.0': + '@rollup/rollup-freebsd-x64@4.30.1': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.30.0': + '@rollup/rollup-linux-arm-gnueabihf@4.30.1': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.30.0': + '@rollup/rollup-linux-arm-musleabihf@4.30.1': optional: true - '@rollup/rollup-linux-arm64-gnu@4.30.0': + '@rollup/rollup-linux-arm64-gnu@4.30.1': optional: true - '@rollup/rollup-linux-arm64-musl@4.30.0': + '@rollup/rollup-linux-arm64-musl@4.30.1': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.30.0': + '@rollup/rollup-linux-loongarch64-gnu@4.30.1': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.30.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.30.1': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.30.0': + '@rollup/rollup-linux-riscv64-gnu@4.30.1': optional: true - '@rollup/rollup-linux-s390x-gnu@4.30.0': + '@rollup/rollup-linux-s390x-gnu@4.30.1': optional: true - '@rollup/rollup-linux-x64-gnu@4.30.0': + '@rollup/rollup-linux-x64-gnu@4.30.1': optional: true - '@rollup/rollup-linux-x64-musl@4.30.0': + '@rollup/rollup-linux-x64-musl@4.30.1': optional: true - '@rollup/rollup-win32-arm64-msvc@4.30.0': + '@rollup/rollup-win32-arm64-msvc@4.30.1': optional: true - '@rollup/rollup-win32-ia32-msvc@4.30.0': + '@rollup/rollup-win32-ia32-msvc@4.30.1': optional: true - '@rollup/rollup-win32-x64-msvc@4.30.0': + '@rollup/rollup-win32-x64-msvc@4.30.1': optional: true '@types/d3-array@3.2.1': {} @@ -1549,22 +1549,22 @@ snapshots: dependencies: glob: 7.2.3 - rollup-plugin-delete@2.1.0(rollup@4.30.0): + rollup-plugin-delete@2.1.0(rollup@4.30.1): dependencies: del: 5.1.0 - rollup: 4.30.0 + rollup: 4.30.1 - rollup-plugin-external-globals@0.11.0(rollup@4.30.0): + rollup-plugin-external-globals@0.11.0(rollup@4.30.1): dependencies: - '@rollup/pluginutils': 5.1.4(rollup@4.30.0) + '@rollup/pluginutils': 5.1.4(rollup@4.30.1) estree-walker: 3.0.3 is-reference: 3.0.3 magic-string: 0.30.17 - rollup: 4.30.0 + rollup: 4.30.1 - rollup-plugin-import-assets@1.1.1(rollup@4.30.0): + rollup-plugin-import-assets@1.1.1(rollup@4.30.1): dependencies: - rollup: 4.30.0 + rollup: 4.30.1 rollup-pluginutils: 2.8.2 url-join: 4.0.1 @@ -1572,29 +1572,29 @@ snapshots: dependencies: estree-walker: 0.6.1 - rollup@4.30.0: + rollup@4.30.1: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.30.0 - '@rollup/rollup-android-arm64': 4.30.0 - '@rollup/rollup-darwin-arm64': 4.30.0 - '@rollup/rollup-darwin-x64': 4.30.0 - '@rollup/rollup-freebsd-arm64': 4.30.0 - '@rollup/rollup-freebsd-x64': 4.30.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.30.0 - '@rollup/rollup-linux-arm-musleabihf': 4.30.0 - '@rollup/rollup-linux-arm64-gnu': 4.30.0 - '@rollup/rollup-linux-arm64-musl': 4.30.0 - '@rollup/rollup-linux-loongarch64-gnu': 4.30.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.30.0 - '@rollup/rollup-linux-riscv64-gnu': 4.30.0 - '@rollup/rollup-linux-s390x-gnu': 4.30.0 - '@rollup/rollup-linux-x64-gnu': 4.30.0 - '@rollup/rollup-linux-x64-musl': 4.30.0 - '@rollup/rollup-win32-arm64-msvc': 4.30.0 - '@rollup/rollup-win32-ia32-msvc': 4.30.0 - '@rollup/rollup-win32-x64-msvc': 4.30.0 + '@rollup/rollup-android-arm-eabi': 4.30.1 + '@rollup/rollup-android-arm64': 4.30.1 + '@rollup/rollup-darwin-arm64': 4.30.1 + '@rollup/rollup-darwin-x64': 4.30.1 + '@rollup/rollup-freebsd-arm64': 4.30.1 + '@rollup/rollup-freebsd-x64': 4.30.1 + '@rollup/rollup-linux-arm-gnueabihf': 4.30.1 + '@rollup/rollup-linux-arm-musleabihf': 4.30.1 + '@rollup/rollup-linux-arm64-gnu': 4.30.1 + '@rollup/rollup-linux-arm64-musl': 4.30.1 + '@rollup/rollup-linux-loongarch64-gnu': 4.30.1 + '@rollup/rollup-linux-powerpc64le-gnu': 4.30.1 + '@rollup/rollup-linux-riscv64-gnu': 4.30.1 + '@rollup/rollup-linux-s390x-gnu': 4.30.1 + '@rollup/rollup-linux-x64-gnu': 4.30.1 + '@rollup/rollup-linux-x64-musl': 4.30.1 + '@rollup/rollup-win32-arm64-msvc': 4.30.1 + '@rollup/rollup-win32-ia32-msvc': 4.30.1 + '@rollup/rollup-win32-x64-msvc': 4.30.1 fsevents: 2.3.3 run-parallel@1.2.0: @@ -1652,13 +1652,13 @@ snapshots: dependencies: is-number: 7.0.0 - ts-essentials@10.0.4(typescript@5.7.2): + ts-essentials@10.0.4(typescript@5.7.3): optionalDependencies: - typescript: 5.7.2 + typescript: 5.7.3 tslib@2.8.1: {} - typescript@5.7.2: {} + typescript@5.7.3: {} undici-types@6.20.0: {} diff --git a/src/app/middleware.ts b/src/app/middleware.ts index 98e609a..eaa9a23 100644 --- a/src/app/middleware.ts +++ b/src/app/middleware.ts @@ -131,6 +131,36 @@ class SteamEventMiddleware implements Mountable { } }), ); + + this.activeHooks.push( + (() => { + const originalInitiateSleep = SuspendResumeStore.InitiateSleep; + const instance = this; + + SuspendResumeStore.InitiateSleep = function () { + for (const app of SteamUIStore.RunningApps) { + instance.eventBus.emit({ + type: "Suspended", + createdAt: instance.clock.getTimeMs(), + game: { + id: `${app.appid}`, + name: app.display_name, + }, + }); + } + + originalInitiateSleep.apply(this); + }; + + return { + unregister: () => { + SuspendResumeStore.InitiateSleep = function () { + originalInitiateSleep.apply(this); + }; + }, + }; + })(), + ); } public async unMount() { diff --git a/src/types/SuspendResumeStore.d.ts b/src/types/SuspendResumeStore.d.ts new file mode 100644 index 0000000..247f4dc --- /dev/null +++ b/src/types/SuspendResumeStore.d.ts @@ -0,0 +1,17 @@ +// NOTE(ynhhoJ): https://github.com/ricewind012/steam-sharedjscontext-types/blob/master/generated/SuspendResumeStore.ts +export interface SuspendResumeStore { + m_bResuming: boolean; + m_bShowResumeUI: boolean; + m_bSuspending: boolean; + m_cSuspendBlockers: number; + m_eSuspendResumeProgress: number; + m_nSuspendSleepMS: number; + + BShowSuspendResumeDialogs(); + BlockSuspendAction(); + GetSuspendResumeState(); + Init(); + InitiateResume(); + InitiateSleep(); + NotifyResumeUIDone(); +} diff --git a/src/types/steam.d.ts b/src/types/steam.d.ts index a6b8c12..29a4af6 100644 --- a/src/types/steam.d.ts +++ b/src/types/steam.d.ts @@ -6,4 +6,5 @@ declare global { let appInfoStore: AppInfoStore; let SteamUIStore: SteamUIStore; let SteamClient: SteamClient; + let SuspendResumeStore: SuspendResumeStore; }