Using arrow keys to switch rooms is now in! Unlike in the old client,
the new system supports switching to all rooms, and supports arrow keys
in all situations, rather than only being able to switch between chat
rooms, and only with textareas focused.
Also, focusing chat rooms now focuses the input box. This was
surprisingly hard to implement with React, which has an annoying
all-or-nothing approach to state it doesn't control.
Unlike the old router, this one has no dependencies, and also tracks
left/right panel state, for more accurate back/forward button support.
It also sets the URL to the last selected panel, instead of always
using the left panel.
Considering all the individual panels start with `panel-`, this should
make it easier to find and in general be a more intuitive name.
All other tsx files will start with `panel-`, putting them together in
one place when sorting alphabetically.
This is kind of a break of purity, because it reads
`window.offsetWidth`, but this is the lowest-overhead way to
automatically recalculate the leftRoom width whenever PS updates
(i.e. whenever leftRoom or rightRoom change).
This is just code to support using details/summary for a "read more"
system. The entire summary portion can be clicked to expand/collapse,
but the overall usability feels "better than before" to me.
"Suggested spread" is now renamed "Guessed spread", to make it clearer
that it's not exactly a suggestion, more of a guess of what might be a
good spread.
Speed EVs are now suggested a lot more often, with the new basic
threshold at 80+ Spe instead of 95+. (71+ Spe is still enough to get
Spe EVs on a non-bulky stat spread.)
EV spreads are now guessed based on post-Mega stats (so e.g. Mega
Metagross gets Spe EVs).
In addition, Speed EVs are now suggested for support spreads above 110
base Spe (mostly for support Starmie sets).
I wouldn't call the EV guesser _good_ by any means, but I still
strongly believe it's better than nothing.
I mostly wanted this to be in TypeScript before I did any further work
on it, and also with the teambuilder at 3k lines, it needs to be broken
apart anyway.
I feel mildly bad about introducing ~600 lines of code that replays
will never need, but the EV suggester does fall under the general
category of "set insights" and is relevant to tooltips.