Skip to content

Releases: JetBrains/compose-multiplatform

1.0.0-alpha4-build310

06 Aug 16:42
a185320
Compare
Choose a tag to compare
1.0.0-alpha4-build310 Pre-release
Pre-release
v1.0.0-alpha4-build310

Document packaging resources (#1015)

1.0.0-alpha3

05 Aug 15:37
592714d
Compare
Choose a tag to compare
Fix compose web examples source code links (#1006)

* Fix web landing link

* Fix falling balls source code link

1.0.0-alpha2

04 Aug 12:11
4f1101b
Compare
Choose a tag to compare

Common

  • Desktop, Web, and Android artifacts publish at the same time with the same version

Desktop

Features

API changes

  • new Window API is no longer experimental
  • old Window API is deprecated
  • classes from android.compose.desktop.* moved to androidx.compose.ui.awt.* (ComposeWindow, ComposePanel, etc)
  • svgResource/vectorXmlResource/imageResource replaced by painterResource

API breaking changes:

  • Window level keyboard API for the old Window API removed
  • Window(icon: BufferedImage) replaced by Window(icon: Painter)
  • ContextMenu renamed to CursorDropdownMenu

Web

API changes

API breaking changes

1.0.0-alpha1

04 Aug 03:04
Compare
Choose a tag to compare
v1.0.0-alpha1

Templates. Fix MPP template

1.0.0-alpha1-rc5

03 Aug 18:26
Compare
Choose a tag to compare
1.0.0-alpha1-rc5 Pre-release
Pre-release
Updated imageviewer example to use CoroutineScope (loading and proces…

…sing images).

1.0.0-alpha1-rc4

03 Aug 15:03
Compare
Choose a tag to compare
1.0.0-alpha1-rc4 Pre-release
Pre-release
Templates. Use currentOs in common MPP module

Temporary (?) workaround for Preview

1.0.0-alpha1-rc3

02 Aug 21:53
Compare
Choose a tag to compare
1.0.0-alpha1-rc3 Pre-release
Pre-release
v1.0.0-alpha1-rc3

Update Compose

1.0.0-alpha1-rc2

02 Aug 12:22
Compare
Choose a tag to compare
1.0.0-alpha1-rc2 Pre-release
Pre-release
Templates. Update versions

Revert to 6.9 as 7.1.1 doesn't properly work with com.android.tools.build:gradle:4.0.1
com.android.tools.build:gradle:7.0.0 doesn't supported by IDEA yet

1.0.0-alpha1-rc1

30 Jul 21:22
Compare
Choose a tag to compare
1.0.0-alpha1-rc1 Pre-release
Pre-release
v1.0.0-alpha1-rc1

Add google()

0.5.0-build270

26 Jul 21:16
Compare
Choose a tag to compare
0.5.0-build270 Pre-release
Pre-release

Desktop

Changes

  • new Window API is no longer experimental
  • old Window API is deprecated
  • classes from android.compose.desktop.* moved to androidx.compose.ui.awt.* (ComposeWindow, ComposePanel, etc)
  • svgResource/vectorXmlResource/imageResource replaced by painterResource

Breaking changes

  • Window level keyboard API for the old Window API removed
  • Window(icon: BufferedImage) replaced by Window(icon: Painter)
  • ContextMenu renamed to CursorDropdownMenu

Web

Declare CSS Variables in wherever you want

We removed CSSVariables completely, so that one can declare CSS variables directly (we recommend to do it in Stylesheets)

Changes in CSS Color API

Any CSS API method that works with color does not accept strings as
arguments. Instead color("white") use color(Color.white). Instead
of color("#cefcef") write color(Color("#cefcef")).

This might seem like an overkill and too verbose for a frontend
development, but in fact, we are going to deprecate any String signature in CSS API in
favour of specialized "enums" (not necessarily technically enums, but
you got it) and helper builder/functions - and we want color-related
subset to be consistent with the rest of API. It seems to us (at least now)
that benefits of such approach overweight the verbosity concerns.

However one can alays use "raw" syntax for setting any property and
assigning arbitrary String value.

We also deprecated Color.RGBA, Color.RBG, Color.HSL, Color.HSLA in
favour of their less verbose counterparts, namely, rgba, rgb, hsl,
hsla. Please, move to them (IDE makes it possible to perform such refactoring
automatically), since we are going to remove this functions somewhere in
August.

Use mediaMaxWidth, mediaMinWidth, mediaMaxHeight, mediaMinHeight

maxWidth/Height, minWidth/Height in mediaQueries renamed to mediaMaxWidth/Height, mediaMinWidth/Height so they won't clash with "regular" maxWidth, minWidth etc. CSS API properties.

New Input functions

We have introduced a number of additional functions for creating inputs of different types:

TextInput(value = "text", attrs = {
   onInput { } // all these components have attrs same as HTMLInputElement
})
CheckboxInput(checked = false)
RadioInput(checked = false)
NumberInput(value = 0, min = 0, max = 10)
DateInput(value = "2021-10-10")
TelInput(value = "0123456")
EmailInput()
// and other input types

Unified onInput and onChange event listeners

In the previous versions it was important to carefully choose a proper input or change listener, so it matches the type of the input.
In the new version, onInput and onChange can be used regardless of the input type and the value of the input will have a proper type. Here is an example:

Input(type = InputType.Text, attrs = {
   onInput { event ->
       val inputValue: String = event.value
   }
})
 
Input(type = InputType.Checkbox, attrs = {
    onInput { event ->
        val isChecked: Boolean = event.value
    }
})

New SyntheticEvent exposes native event properties

That means there is no need to access nativeEvent or eventTarget.
Here is an example with SyntheticMouseEvent and its properties x and y.

Div(attrs = {
   onClick { event -> // SyntheticMouseEvent
       val x = event.x
       val y = event.y
       event.preventDefault() // The same goes for methods, like `preventDefault()`
   }
})