This adds GitHub login via Firebase, as a foundation for adding a gallery (#26). Currently it just adds a login/logout button to the Debug page.
At an architectural level, this adds an `AuthContext` React context, whose interface is generic enough that it's not coupled to Firebase or GitHub. In fact, the default context is a "null context" whose operations are all no-ops.
Fixes#128.
A number of hook-related warnings were brought up, which this PR also fixes. Note that from now on, if there are any warnings raised by the eslint, CI will fail.
This replaces Parcel with [esbuild][].
esbuild has a number of advantages over Parcel:
* It is much, much, *much* faster. A Parcel build takes several seconds on my system, while esbuild takes 60-70 _milliseconds_.
* Parcel hard-crashes when I switch branches on Windows, esbuild doesn't.
The one disadvantage is that, as far as I can tell, esbuild doesn't support any kind of auto-reloading in the browser when you change things. IMO this isn't that big a deal and the benefits outweigh this minor inconvenience (and anyways, auto-reload has historically backfired so many times that I usually have been manually reloading the page whenever I make changes).
[esbuild]: https://esbuild.github.io/
This ensures that whenever our site is rebuilt, the `CNAME` file will be in its root directory, so that GitHub can properly serve the site at a custom domain.
Made the new rule the default, but its now easy to play with to adjust the exact color rule we are using. This new one pick 3 values (with a bit of randomness), picks a random hue (then picks 2 more with a small chance of taking the opposite hue), and picks a saturation level that tends to be high.
This addresses #61 by making mandalas permalinked.
The URL to a mandala will change whenever the user stops fiddling with it for 250 ms. This means that the user can always reload the page to get a reasonably recent version of what they were creating, and they can use the browser's "back" and "next" buttons to effectively undo/redo recent changes. They can also copy the URL to share it with others.
## About the serialization format
Originally, I stored the state of the user's mandala in the URL using JSON. This had a number of drawbacks, though:
* **It was really long.** A mandala serialization was almost 1k characters, which was a very big URL, and one that some sharing platforms might even reject.
* **It wasn't type-checked in any way.** Unless I added some kind of JSON schema validation (which I didn't), the serialization was simply deserialized and assumed to be in the proper format. This could result in confusing exceptions during render time, rather than decisively exploding at deserialization time.
To resolve these limitations, and because I thought it would be fun, I decided to store the mandala state using a serialization format called [Apache Avro][]. I first read about this in Kleppmann's [Designing Data-Intensive Applications][kleppmann] and was intrigued by both its compactness (a serialized mandala is around 80-120 characters) and schema evolution properties.
It might be going a bit overboard, but again, I thought it would be fun and I wanted to play around with Avro. Also, I tried architecting things in such a way that all the Avro code is in its own file, and can easily be removed (or swapped out for another serialization format) if we decide it's dumb.
[Apache Avro]: http://avro.apache.org/
[kleppmann]: https://dataintensive.net/
## Other changes
This PR also makes a few other changes:
* Tests can now import files with JSX in them (I don't think this was required for the final state of this PR, but I figured I'd leave it in there for its almost inevitable use in the future).
* The value labels for number sliders now have a fixed width, which eliminates a weird "jitter" effect that sometimes occurred when using them.
This fixes#20 by adding support for TOML-based metadata for symbols.
There's now a template TOML file in `svg/_template.toml` that documents all the different metadata properties. The file can be copied to match the name of an SVG file (but with a `.toml` extension) and it will be processed by the vocabulary builder when the site is generated.
Currently there are only two properties documented, `always_nest` and `always_be_nested` (as per the needs outlined in https://github.com/toolness/mystic-symbolic/issues/17#issuecomment-786696966), but they don't actually do anything yet (actual support for _using_ the metadata will come in another file).
Right now the TOML files are validated quite stringently: if a file contains the name of a property it doesn't understand, or the type of the property is wrong, it will raise an error. We can revisit this if it becomes burdensome.