github varabyte/kobweb v0.9.5

latest releases: v0.24.0, v0.23.3, v0.23.2...
pre-release4 years ago

A very tiny patch release that comes with a breaking change in Canvas

Normally this fix on its own wouldn't be worth releasing, except I just pushed out a blog post talking about the canvas widget exposing the colorMode value, and, whoops, my memory was wrong. Instead, it exposes a SilkPalette field.

The SilkPalette class used to expose the current color mode but that changed at some point, and now it's better to expose the color mode instead. You can get a palette from the color mode but not the other way around.

If you get a compile error, here's how to fix it.

Before:

Canvas2d(...) {
   val someColor = palette.color
   ...
}

After:

Canvas2d(...) {
   val palette = colorMode.toSilkPalette()
   val someColor = palette.color 
   ...
}

Don't miss a new kobweb release

NewReleases is sending notifications on new releases.