update dependencies

This commit is contained in:
AAGaming
2024-06-13 17:00:50 -04:00
parent 1de8c5915b
commit 259aabf82f
9 changed files with 1323 additions and 816 deletions
+1 -1
View File
@@ -159,7 +159,7 @@ class PluginManager:
if ON_LINUX and await tab.has_global_var("deckyHasLoaded", False): if ON_LINUX and await tab.has_global_var("deckyHasLoaded", False):
await restart_webhelper() await restart_webhelper()
return # We'll catch the next tab in the main loop return # We'll catch the next tab in the main loop
await tab.evaluate_js("try{if (window.deckyHasLoaded){setTimeout(() => SteamClient.Browser.RestartJSContext(), 100)}else{window.deckyHasLoaded = true;(async()=>{try{while(!window.SP_REACT){await new Promise(r => setTimeout(r, 10))};await import('http://localhost:1337/frontend/index.js?v=%s')}catch(e){console.error(e)};})();}}catch(e){console.error(e)}" % (get_loader_version(), ), False, False, False) await tab.evaluate_js("try{if (window.deckyHasLoaded){setTimeout(() => SteamClient.Browser.RestartJSContext(), 100)}else{window.deckyHasLoaded = true;(async()=>{try{while(!window.webpackChunksteamui){await new Promise(r => setTimeout(r, 10))};await import('http://localhost:1337/frontend/index.js?v=%s')}catch(e){console.error(e)};})();}}catch(e){console.error(e)}" % (get_loader_version(), ), False, False, False)
except: except:
logger.info("Failed to inject JavaScript into tab\n" + format_exc()) logger.info("Failed to inject JavaScript into tab\n" + format_exc())
pass pass
+1
View File
@@ -35,6 +35,7 @@
echo "{\"python.defaultInterpreterPath\": \"''${PYTHONPATH}\"}" > "$FILE" echo "{\"python.defaultInterpreterPath\": \"''${PYTHONPATH}\"}" > "$FILE"
fi fi
''; '';
UV_USE_IO_URING = 0; # work around node#48444
buildInputs = with pkgs; [ buildInputs = with pkgs; [
nodejs_22 nodejs_22
nodePackages.pnpm nodePackages.pnpm
+26 -24
View File
@@ -2,6 +2,7 @@
"name": "@decky/loader-frontend", "name": "@decky/loader-frontend",
"private": true, "private": true,
"license": "GPLV2", "license": "GPLV2",
"type": "module",
"scripts": { "scripts": {
"prepare": "cd .. && husky install frontend/.husky", "prepare": "cd .. && husky install frontend/.husky",
"build": "rollup -c", "build": "rollup -c",
@@ -12,31 +13,32 @@
}, },
"devDependencies": { "devDependencies": {
"@decky/api": "^1.0.4", "@decky/api": "^1.0.4",
"@rollup/plugin-commonjs": "^21.1.0", "@rollup/plugin-commonjs": "^26.0.1",
"@rollup/plugin-image": "^3.0.3", "@rollup/plugin-image": "^3.0.3",
"@rollup/plugin-json": "^4.1.0", "@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^13.3.0", "@rollup/plugin-node-resolve": "^15.2.3",
"@rollup/plugin-replace": "^4.0.0", "@rollup/plugin-replace": "^5.0.7",
"@rollup/plugin-typescript": "^8.5.0", "@rollup/plugin-typescript": "^11.1.6",
"@types/react": "18.2.0", "@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@types/react-file-icon": "^1.0.4", "@types/react-file-icon": "^1.0.4",
"@types/react-router": "5.1.18", "@types/react-router": "5.1.20",
"@types/webpack": "^5.28.5", "@types/webpack": "^5.28.5",
"husky": "^8.0.3", "husky": "^9.0.11",
"i18next-parser": "^8.13.0", "i18next-parser": "^9.0.0",
"import-sort-style-module": "^6.0.0", "import-sort-style-module": "^6.0.0",
"inquirer": "^8.2.6", "inquirer": "^9.2.23",
"prettier": "^3.2.5", "prettier": "^3.3.2",
"prettier-plugin-import-sort": "^0.0.7", "prettier-plugin-import-sort": "^0.0.7",
"react": "18.2.0", "react": "18.3.1",
"react-dom": "18.2.0", "react-dom": "18.3.1",
"rollup": "^2.79.1", "rollup": "^4.18.0",
"rollup-plugin-delete": "^2.0.0", "rollup-plugin-delete": "^2.0.0",
"rollup-plugin-external-globals": "^0.6.1", "rollup-plugin-external-globals": "^0.10.0",
"rollup-plugin-polyfill-node": "^0.10.2", "rollup-plugin-polyfill-node": "^0.13.0",
"rollup-plugin-visualizer": "^5.12.0", "rollup-plugin-visualizer": "^5.12.0",
"tslib": "^2.6.2", "tslib": "^2.6.3",
"typescript": "^4.9.5" "typescript": "^5.4.5"
}, },
"importSort": { "importSort": {
".js, .jsx, .ts, .tsx": { ".js, .jsx, .ts, .tsx": {
@@ -45,14 +47,14 @@
} }
}, },
"dependencies": { "dependencies": {
"decky-frontend-lib": "3.25.0", "@decky/ui": "^4.0.2",
"filesize": "^10.1.2", "filesize": "^10.1.2",
"i18next": "^23.11.5", "i18next": "^23.11.5",
"i18next-http-backend": "^2.5.2", "i18next-http-backend": "^2.5.2",
"react-file-icon": "^1.4.0", "react-file-icon": "^1.5.0",
"react-i18next": "^12.3.1", "react-i18next": "^14.1.2",
"react-icons": "^4.12.0", "react-icons": "^5.2.1",
"react-markdown": "^8.0.7", "react-markdown": "^9.0.1",
"remark-gfm": "^3.0.1" "remark-gfm": "^4.0.0"
} }
} }
+1289 -783
View File
File diff suppressed because it is too large Load Diff
+2 -3
View File
@@ -1,7 +1,6 @@
import type { ToastData } from '@decky/api'; import type { ToastData } from '@decky/api';
import { joinClassNames } from '@decky/ui'; import { joinClassNames } from '@decky/ui';
import { FC, useEffect, useState } from 'react'; import { FC, useEffect, useState, ReactElement } from 'react';
import { ReactElement } from 'react-markdown/lib/react-markdown';
import { useDeckyToasterState } from './DeckyToasterState'; import { useDeckyToasterState } from './DeckyToasterState';
import Toast, { toastClasses } from './Toast'; import Toast, { toastClasses } from './Toast';
@@ -20,7 +19,7 @@ const DeckyToaster: FC<DeckyToasterProps> = () => {
if (toasts.size > 0) { if (toasts.size > 0) {
const [activeToast] = toasts; const [activeToast] = toasts;
if (!renderedToast || activeToast != renderedToast.data) { if (!renderedToast || activeToast != renderedToast.data) {
// TODO play toast sound // TODO play toast soundReactElement
console.log('rendering toast', activeToast); console.log('rendering toast', activeToast);
setRenderedToast({ component: <Toast key={Math.random()} toast={activeToast} />, data: activeToast }); setRenderedToast({ component: <Toast key={Math.random()} toast={activeToast} />, data: activeToast });
} }
+2 -2
View File
@@ -13,8 +13,8 @@ const Markdown: FunctionComponent<MarkdownProps> = (props) => {
<ReactMarkdown <ReactMarkdown
remarkPlugins={[remarkGfm]} remarkPlugins={[remarkGfm]}
components={{ components={{
div: (nodeProps) => <Focusable {...nodeProps.node.properties}>{nodeProps.children}</Focusable>, div: (nodeProps: any) => <Focusable {...nodeProps.node.properties}>{nodeProps.children}</Focusable>,
a: (nodeProps) => { a: (nodeProps: any) => {
const aRef = useRef<HTMLAnchorElement>(null); const aRef = useRef<HTMLAnchorElement>(null);
return ( return (
// TODO fix focus ring // TODO fix focus ring
+1 -1
View File
@@ -8,7 +8,7 @@ interface Window {
if (!window.SP_REACT) { if (!window.SP_REACT) {
console.debug('[Decky:Boot] Setting up React globals...'); console.debug('[Decky:Boot] Setting up React globals...');
// deliberate partial import // deliberate partial import
const DFLWebpack = await import('decky-frontend-lib/dist/webpack'); const DFLWebpack = await import('@decky/ui/dist/webpack');
window.SP_REACT = DFLWebpack.findModule((m) => m.Component && m.PureComponent && m.useLayoutEffect); window.SP_REACT = DFLWebpack.findModule((m) => m.Component && m.PureComponent && m.useLayoutEffect);
window.SP_REACTDOM = DFLWebpack.findModule((m) => m.createPortal && m.createRoot); window.SP_REACTDOM = DFLWebpack.findModule((m) => m.createPortal && m.createRoot);
} }
+1 -1
View File
@@ -59,7 +59,7 @@ class RouterHook extends Logger {
if (routes) { if (routes) {
if (!routeList[routerIndex - 1]?.length || routeList[routerIndex - 1]?.length !== routes.size) { if (!routeList[routerIndex - 1]?.length || routeList[routerIndex - 1]?.length !== routes.size) {
if (routeList[routerIndex - 1]?.length && routeList[routerIndex - 1].length !== routes.size) routerIndex--; if (routeList[routerIndex - 1]?.length && routeList[routerIndex - 1].length !== routes.size) routerIndex--;
const newRouterArray: ReactElement[] = []; const newRouterArray: (ReactElement | JSX.Element)[] = [];
routes.forEach(({ component, props }, path) => { routes.forEach(({ component, props }, path) => {
newRouterArray.push( newRouterArray.push(
<Route path={path} {...props}> <Route path={path} {...props}>
-1
View File
@@ -15,7 +15,6 @@
"noImplicitAny": true, "noImplicitAny": true,
"strict": true, "strict": true,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"resolveJsonModule": true "resolveJsonModule": true
}, },
"include": ["src", "index.d.ts"], "include": ["src", "index.d.ts"],