Skip to content

Releases: varabyte/kobweb

cli-v0.9.10

24 Nov 02:28
Compare
Choose a tag to compare
cli-v0.9.10 Pre-release
Pre-release

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

22 Nov 00:23
Compare
Choose a tag to compare
v0.10.6 Pre-release
Pre-release

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, and SpaceEvenly Arrangements.
  • Added special Arrangement.FromStyle and Alignment.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, now toAttrs 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 the test parameter

Silk

  • Added support for disabling Button widgets.
  • Added replaceComponentVariant methods (before, we only had replaceComponentStyle 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.

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

12 Nov 04:25
Compare
Choose a tag to compare
v0.10.5 Pre-release
Pre-release

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.
  • The Kobweb Color class now inherits from the CSSColorValue 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 the CSSColorValue ones.
  • Added Silk-aware main.kt code generation for apps using Silk that don't use the @App annotation.

v0.10.4

07 Nov 23:17
Compare
Choose a tag to compare
v0.10.4 Pre-release
Pre-release

No code changes, but Kobweb is now built against Compose 1.2.1 / Kotlin 1.7.20.

v0.10.3

07 Nov 19:28
Compare
Choose a tag to compare
v0.10.3 Pre-release
Pre-release

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
  • Rename kobweb.core.navigation.Link to kobweb.core.navigation.Anchor, to avoid confusion caused with Silk's own kobweb.silk.navigation.Link widget.
    • Technically, an Anchor is a more robust A tag, while a Link 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 not Anchor.
  • (Possible backwards incompatibility) Refactor the elementScope parameter in all Silk widgets, changing them into a version that takes a ref listener (with a callback that receives an ElementRefScope)
    • 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:
      Widget(elementScope = { 
         DisposableSideEffect {
            // use scopeElement here
            onDispose {}
         })
      
      After:
      Widget(ref = ref { element -> ... })
      // or, if you need dispose handling:
      // Widget(ref = disposableRef { element -> ...; onDispose { ... }})
      

v0.10.2

30 Oct 05:11
Compare
Choose a tag to compare
v0.10.2 Pre-release
Pre-release

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.
  • Add a slew of transform modifiers
    • For example, Modifier.rotate, Modifier.scale, etc., with various input parameter configurations.
  • Add boxSizing and boxDecorationBreak 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.

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

22 Oct 00:11
Compare
Choose a tag to compare
v0.10.1 Pre-release
Pre-release

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:

  1. Open your .kobweb/conf.yaml file
  2. Under the prod: section, add a script: 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

15 Oct 19:54
Compare
Choose a tag to compare
v0.10.0 Pre-release
Pre-release

🎉 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

15 Oct 18:44
Compare
Choose a tag to compare
v0.9.15 Pre-release
Pre-release

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

29 Sep 00:02
Compare
Choose a tag to compare
v0.9.14 Pre-release
Pre-release

Frontend

  • Fixed unnecessary recompositions by adding equals and hashcode logic to Kobweb Modifier implementations
  • Added an additional, more idiomatic Kotlin API for Modifier.boxShadow

Silk

  • Re-added Text and TextStyle 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 to SpanText. This was done in v0.9.13 because Text kept running against the very common Text function in the Compose Web API.

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 to a\b\c\test.html, not test.html
    • Linux and Mac were fine.