I did a bunch of testing of various ansi escape codes (including
italics) with all three char atlas implementations (none, static,
dynamic), with and without `drawBoldTextInBrightColors`, and with and
without `enableBold` to test all of the edge cases that I could.
There were two bugs:
- We need to clear the background of _tmpCtx instead of just drawing on
top if the background color is transparent.
- We should set the background to fully transparent if it's partially
transparent, to avoid drawing the transparent background twice.
This adds a very minimal implementation of DynamicCharAtlas using a LRU
cache.
I've got some optimizations that I'll add on top of this, but this
proves the concept.
This adds the logic needed to switch between multiple char atlas
implementations, and an example second implementation to test it out
with.
This also offers an escape hatch if something goes wrong with the char
atlas implementation(s).
- altIsMeta -> macOptionIsMeta
- Moved isThirdLevelShift into Terminal class
- Moved option check into isThirdLevelShift so it doesn't affect the Windows
case and also includes the keypress case
- Add public API and typings test
- Add option checkbox to demo
This change is largely just moving files with minor tweaks to them to fix,
the rest of the commit is build process changes:
- The addons/ and test/ dirs have been moved to src/
- The build directory has been removed
- TypeScript builds are output in out/, this is where tests are run
- The demo now relies on the dist/ build which is performed as part of ./bin/build
- Addons are now shipped under the ./build directory
Calling out that the insecurity is due to the barebones implementation
of the demo will prevent people thinking that the library is inherently
insecure.