Releases: varabyte/kobweb
cli-v0.9.10
This fix includes some minor Kobweb CLI tweaks, particularly in preparation for multimodule support, which is going to land very soon.
(Multimodule changes the assumption that Kobweb projects are always grounded to the root directory. Some Kobweb logic needed to be updated to handle it. Older binaries will still work for all previous projects but will not detect the multimodule sample)
Changes
- Latest kobweb binary will be able to detect the multimodule sample (when it is eventually released)
- Improved the logic around surfacing exceptions
- Before, exceptions directly from Gradle would be missed, requiring the user to have to scroll all the way up past the gigantic callstack. Now, they are included in the list of errors and warnings that Kobweb shows.
- Other misc. background changes that simplify the code a bit but won't be visible to the end user.
v0.10.6
Multimodule support is planned to release a day or two after this release. These are the miscellaneous bug fixes I wanted to get in first before that change, as that one will cause the "major" version to go up (from 0.10.x to 0.11.x)
Core
- Added support for
SpaceAround
,SpaceBetween
, andSpaceEvenly
Arrangement
s. - Added special
Arrangement.FromStyle
andAlignment.FromStyle
values, useful for cases where you know what you're doing and plan to specify the flex style yourself using CSS modifiers. - Added
disabled
modifier - Added
flexBasis
modifier - Fixed bug with
Color.rgba
method not working. - Deprecated
asAttributesBuilder
, nowtoAttrs
for conciseness / consistency with other APIs. - Fixed an
IndexOutOfBounds
exception caused by query parameters that were just keys without values- For example,
https://site.com/hello?test
would crash when trying to parse thetest
parameter
- For example,
Silk
- Added support for disabling
Button
widgets. - Added
replaceComponentVariant
methods (before, we only hadreplaceComponentStyle
methods).- These can be used to override some variant provided by Silk.
- Fixed a bug where the
extraModifier
parameter didn't work when defining variants.
Markdown
- Improved generated markdown code if no Composable root was explicitly specified.
- Before, it dropped all text into a
Box
, which had the effect of stacking each line on top of the other.
- Before, it dropped all text into a
Gradle
- Tweaked Kobweb application plugin error logging so that they are highlighted better by the Kobweb CLI.
- Fixed some Kobweb tasks that weren't being shown in the "kobweb" Gradle category.
v0.10.5
Just a minor release, with some simple bugs I fixed while most of my attention is on a much larger Gradle plugin refactoring that will be landing soon (TM).
Frontend
- Added
Modifier.borderStyle
modifier. Modifier.content
will now auto-surround your string with quotes if they are missing.- So if you forget to write
Modifier.content("\" • \"")
Kobweb has your back my friend.
- So if you forget to write
- The Kobweb
Color
class now inherits from theCSSColorValue
interface.- This means it now plays nice with all existing CfW color APIs, no
toCssColor
necessary. - Removed all modifiers that took
Color
as an argument; instead, users should use theCSSColorValue
ones.
- This means it now plays nice with all existing CfW color APIs, no
- Added Silk-aware
main.kt
code generation for apps using Silk that don't use the@App
annotation.
v0.10.4
No code changes, but Kobweb is now built against Compose 1.2.1 / Kotlin 1.7.20.
v0.10.3
Misc. fixes, which I'm snapshotting into a release so that I can follow up shortly with another release that depends on Compose v1.2.1, which was just released recently.
Frontend
- Refactor alignment modifiers
- Introduce Kobweb's version of
AlignItems
,JustifyItems
, etc. classes, since the Compose for Web versions don't handle baseline and overflow settings. - Add missing modifier for
placeItems
- Introduce Kobweb's version of
- Rename
kobweb.core.navigation.Link
tokobweb.core.navigation.Anchor
, to avoid confusion caused with Silk's ownkobweb.silk.navigation.Link
widget.- Technically, an
Anchor
is a more robustA
tag, while aLink
is a specific anchor that renders the underlined link text we all know and love when using the web. - In most cases, users will want to use
Link
and notAnchor
.
- Technically, an
- (Possible backwards incompatibility) Refactor the
elementScope
parameter in all Silk widgets, changing them into a version that takes aref
listener (with a callback that receives anElementRefScope
)- This makes it safer to get access to the underlying raw element for a widget without exposing an unnecessary composable block.
- Before, to get a raw element that backs a widget:
After:
Widget(elementScope = { DisposableSideEffect { // use scopeElement here onDispose {} })
Widget(ref = ref { element -> ... }) // or, if you need dispose handling: // Widget(ref = disposableRef { element -> ...; onDispose { ... }})
v0.10.2
I'm planning to experiment with migrating the Kobweb Gradle plugin over to KSP shortly, so right before getting lost in that seems like a good time to slice off a release.
Frontend
- Fixed a bug with the various transition modifiers not working when specifying multiple parameters
- For example,
Modifier.transitionProperty("color", "font-size").transitionDuration(100.ms, 300.ms)
would silently break before.
- For example,
- Add a slew of transform modifiers
- For example,
Modifier.rotate
,Modifier.scale
, etc., with various input parameter configurations.
- For example,
- Add
boxSizing
andboxDecorationBreak
box modifiers.- Potential backwards incompatible change The old
Modifier.boxSizing(String)
API has been removed.- Instead, use the one that takes in multiple arguments instead.
- You can also use
styleModifier { boxSizing(String) }
in a pinch.
- Potential backwards incompatible change The old
Markdown
- There are no longer any unsupported markdown features. Everything should work now. Specifically...
<html>
blocks now generate the correct Compose code for creating simple elements.>
can now be used to create block quotes (although sites must still define their own blockquote style using css rules; the default is very bland).- Link referencing (read more about what this is here) now works.
v0.10.1
This release is essentially the same as v0.10.0, except that, when you run an export, it now produces final output that has dead code elimination applied to it. You may expect to see anywhere from a 50-75% reduction in your final site's javascript file.
Note that if you have an existing project, you must do the following steps to take advantage of this:
- Open your
.kobweb/conf.yaml
file - Under the
prod:
section, add ascript:
field set to"build/distributions/(yourproject.js)"
For example, if your project was called example
, then your final conf file might look like:
# example/.kobweb/conf.yaml
site:
title: "Example Project"
server:
files:
dev:
contentRoot: "build/processedResources/js/main/public"
script: "build/js/packages/helloworld/kotlin/example.js"
prod:
script: "build/distributions/example.js" # <--- This line is new!
siteRoot: ".kobweb/site"
port: 8080
If you create a new project, e.g. kobweb create site
, then this will already be done for you.
v0.10.0
🎉 Update Kobweb to compile against Compose for Web 1.2.0 🎉
Feature-wise, this release is identical to 0.9.15. However, it now depends on the latest stable Compose version. This also means you must use Kotlin 1.7.10 to build projects using this version of Kobweb.
v0.9.15
Frontend
- Fixed
ComponentVariant
always causing methods to recompose when passed in as an argument to one - Added a handful of missing
Modifier.background
methods, e.g.Modifier.backgroundImage
Markdown
- Fix issues with nested Markdown files not exporting correctly on Windows
- Fix issue with dollar signs in Markdown generating Kotlin code that didn't compile
v0.9.14
Frontend
- Fixed unnecessary recompositions by adding
equals
andhashcode
logic to KobwebModifier
implementations - Added an additional, more idiomatic Kotlin API for
Modifier.boxShadow
Silk
- Re-added
Text
andTextStyle
back in but with@Deprecation
annotations, after previously deleting them in 0.9.13. This means if projects upgrade from v0.9.12 (or earlier) to v0.9.14 (or later), they'll get helpful warnings instead of hard errors.- All Kobweb
Text
references should be renamed toSpanText
. This was done in v0.9.13 becauseText
kept running against the very commonText
function in the Compose Web API.
- All Kobweb
Markdown
- Fixed a bug with the Markdown plugin on Windows (caused by platform dependent slash logic), where before it didn't generate export paths correctly for nested markdown files.
- e.g.
src\jsMain\resources\markdown\a\b\c\test.md
will now export toa\b\c\test.html
, nottest.html
- Linux and Mac were fine.
- e.g.