From b5630d3ff2bd76da380c8d543bb43c0f86aa1802 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Sat, 26 Apr 2025 02:43:59 +0000 Subject: [PATCH] Preact: Improve teambuilder more - New export format - NOT FINAL, wow did Twitter freak out when they saw this - I have not made a decision on whether to keep this new export format - Stub details form - Checkbox for old export format - 510 EV limit - Show full search results (with windowing) - Choosing generations rather than specific formats - Searching/filtering/sorting results - Reverse sorting filter columns (move types/categories and pokemon types/abilities) is now possible even on oldclient Bugfixes: - Gen 1 (no item) species selection - "Add pokemon" button positioning - Dark mode results - Width (to fit the final column of results) - Highlighted line width --- package-lock.json | 15 +- package.json | 2 +- .../preactalpha.template.html | 8 +- .../src/battle-dex-search.ts | 20 +- play.pokemonshowdown.com/src/battle-log.ts | 2 +- .../src/battle-searchresults.tsx | 49 +- play.pokemonshowdown.com/src/client-main.ts | 6 + .../src/panel-teambuilder-team.tsx | 603 +++++++++++++++--- .../src/panel-teambuilder.tsx | 4 +- .../src/panel-teamdropdown.tsx | 152 +++-- play.pokemonshowdown.com/src/panels.tsx | 8 +- play.pokemonshowdown.com/style/battle-log.css | 6 +- .../style/battle-search.css | 62 ++ .../style/teambuilder.css | 16 +- 14 files changed, 748 insertions(+), 205 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9e1c2316b..cd1e282ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,7 @@ "eslint": "^9.20.1", "globals": "^16.0.0", "mocha": "^6.0.2", - "preact": "^8.3.1", + "preact": "^10.26.5", "source-map": "^0.7.3", "typescript": "^5.7.3", "typescript-eslint": "^8.24.1" @@ -5228,12 +5228,15 @@ } }, "node_modules/preact": { - "version": "8.5.3", - "resolved": "https://registry.npmjs.org/preact/-/preact-8.5.3.tgz", - "integrity": "sha512-O3kKP+1YdgqHOFsZF2a9JVdtqD+RPzCQc3rP+Ualf7V6rmRDchZ9MJbiGTT7LuyqFKZqlHSOyO/oMFmI2lVTsw==", + "version": "10.26.5", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.26.5.tgz", + "integrity": "sha512-fmpDkgfGU6JYux9teDWLhj9mKN55tyepwYbxHgQuIxbWQzgFg5vk7Mrrtfx7xRxq798ynkY4DDDxZr235Kk+4w==", "dev": true, - "hasInstallScript": true, - "license": "MIT" + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } }, "node_modules/prelude-ls": { "version": "1.2.1", diff --git a/package.json b/package.json index 6f0423407..125655fbc 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "eslint": "^9.20.1", "globals": "^16.0.0", "mocha": "^6.0.2", - "preact": "^8.3.1", + "preact": "^10.26.5", "source-map": "^0.7.3", "typescript": "^5.7.3", "typescript-eslint": "^8.24.1" diff --git a/play.pokemonshowdown.com/preactalpha.template.html b/play.pokemonshowdown.com/preactalpha.template.html index fe97131fe..833db91aa 100644 --- a/play.pokemonshowdown.com/preactalpha.template.html +++ b/play.pokemonshowdown.com/preactalpha.template.html @@ -29,7 +29,7 @@ https://psim.us/dev - +