From 1a817574f3790b46258604372fa4fc3852fe6510 Mon Sep 17 00:00:00 2001 From: Shagen Ogandzhanian Date: Thu, 25 Nov 2021 11:25:34 +0100 Subject: [PATCH] Introduce webWidgetsDeprecationMessage which is used in Deprecated annotation (#1459) --- .../src/commonMain/kotlin/Alignment.kt | 8 +++--- .../src/commonMain/kotlin/Arrangement.kt | 7 +++--- web/widgets/src/commonMain/kotlin/Color.kt | 25 ++++++++++--------- web/widgets/src/commonMain/kotlin/Modifier.kt | 9 ++++--- .../webWidgetsDeprecationMessage.kt | 8 ++++++ .../src/commonMain/kotlin/layouts/box.kt | 3 ++- .../src/commonMain/kotlin/layouts/button.kt | 3 ++- .../src/commonMain/kotlin/layouts/column.kt | 3 ++- .../kotlin/layouts/defaults/BoxDefault.kt | 3 ++- .../kotlin/layouts/defaults/ButtonDefault.kt | 3 ++- .../kotlin/layouts/defaults/ColumnDefault.kt | 3 ++- .../layouts/defaults/ModifierDefault.kt | 3 ++- .../kotlin/layouts/defaults/RowDefault.kt | 3 ++- .../kotlin/layouts/defaults/SliderDefault.kt | 3 ++- .../kotlin/layouts/defaults/TextDefault.kt | 3 ++- .../src/commonMain/kotlin/layouts/row.kt | 3 ++- .../kotlin/layouts/shapes/shapes.kt | 5 ++-- .../src/commonMain/kotlin/layouts/slider.kt | 3 ++- .../src/commonMain/kotlin/layouts/text.kt | 3 ++- .../src/commonMain/kotlin/modifiers/border.kt | 3 ++- .../commonMain/kotlin/modifiers/clickable.kt | 3 ++- .../src/commonMain/kotlin/modifiers/clip.kt | 3 ++- .../kotlin/modifiers/fillMaxHeight.kt | 3 ++- .../kotlin/modifiers/fillMaxWidth.kt | 3 ++- .../src/commonMain/kotlin/modifiers/offset.kt | 3 ++- .../kotlin/modifiers/onSizeChanged.kt | 3 ++- .../src/commonMain/kotlin/modifiers/size.kt | 3 ++- .../src/commonMain/kotlin/modifiers/width.kt | 3 ++- web/widgets/src/commonMain/kotlin/units/Dp.kt | 3 ++- .../src/commonMain/kotlin/units/IntSize.kt | 3 ++- .../src/commonMain/kotlin/units/TextUnit.kt | 7 +++--- .../commonMain/kotlin/units/unitConversion.kt | 11 ++++---- web/widgets/src/jsMain/kotlin/Modifier.kt | 7 +++--- web/widgets/src/jsMain/kotlin/Styles.kt | 3 ++- .../jsMain/kotlin/internal/ActualModifier.kt | 5 ++-- web/widgets/src/jsMain/kotlin/layouts/box.kt | 3 ++- .../src/jsMain/kotlin/layouts/button.kt | 3 ++- .../src/jsMain/kotlin/layouts/column.kt | 3 ++- web/widgets/src/jsMain/kotlin/layouts/row.kt | 3 ++- .../src/jsMain/kotlin/layouts/slider.kt | 4 +-- web/widgets/src/jsMain/kotlin/layouts/text.kt | 3 ++- .../src/jsMain/kotlin/modifiers/border.kt | 3 ++- .../src/jsMain/kotlin/modifiers/clickable.kt | 3 ++- .../src/jsMain/kotlin/modifiers/clip.kt | 3 ++- .../jsMain/kotlin/modifiers/fillMaxHeight.kt | 3 ++- .../jsMain/kotlin/modifiers/fillMaxWidth.kt | 3 ++- .../src/jsMain/kotlin/modifiers/offset.kt | 3 ++- .../jsMain/kotlin/modifiers/onSizeChanged.kt | 3 ++- .../src/jsMain/kotlin/modifiers/size.kt | 3 ++- .../src/jsMain/kotlin/modifiers/width.kt | 3 ++- web/widgets/src/jvmMain/kotlin/Alignment.kt | 3 ++- web/widgets/src/jvmMain/kotlin/Arrangement.kt | 3 ++- web/widgets/src/jvmMain/kotlin/Color.kt | 3 ++- web/widgets/src/jvmMain/kotlin/Modifier.kt | 7 +++--- .../jvmMain/kotlin/internal/ActualModifier.kt | 7 +++--- web/widgets/src/jvmMain/kotlin/layouts/box.kt | 3 ++- .../src/jvmMain/kotlin/layouts/button.kt | 3 ++- .../src/jvmMain/kotlin/layouts/column.kt | 3 ++- web/widgets/src/jvmMain/kotlin/layouts/row.kt | 3 ++- .../jvmMain/kotlin/layouts/shapes/shapes.kt | 3 ++- .../src/jvmMain/kotlin/layouts/slider.kt | 3 ++- .../src/jvmMain/kotlin/layouts/text.kt | 3 ++- .../src/jvmMain/kotlin/modifiers/border.kt | 3 ++- .../src/jvmMain/kotlin/modifiers/clickable.kt | 3 ++- .../src/jvmMain/kotlin/modifiers/clip.kt | 3 ++- .../jvmMain/kotlin/modifiers/fillMaxHeight.kt | 3 ++- .../jvmMain/kotlin/modifiers/fillMaxWidth.kt | 3 ++- .../src/jvmMain/kotlin/modifiers/offset.kt | 3 ++- .../jvmMain/kotlin/modifiers/onSizeChanged.kt | 3 ++- .../src/jvmMain/kotlin/modifiers/size.kt | 3 ++- .../src/jvmMain/kotlin/modifiers/width.kt | 3 ++- web/widgets/src/jvmMain/kotlin/units/Dp.kt | 3 ++- .../src/jvmMain/kotlin/units/TextUnit.kt | 3 ++- 73 files changed, 185 insertions(+), 105 deletions(-) create mode 100644 web/widgets/src/commonMain/kotlin/annotations/webWidgetsDeprecationMessage.kt diff --git a/web/widgets/src/commonMain/kotlin/Alignment.kt b/web/widgets/src/commonMain/kotlin/Alignment.kt index c0676a2b69..6f01babcae 100644 --- a/web/widgets/src/commonMain/kotlin/Alignment.kt +++ b/web/widgets/src/commonMain/kotlin/Alignment.kt @@ -1,11 +1,13 @@ package org.jetbrains.compose.common.ui +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage + @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) interface Alignment { - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) interface Vertical : Alignment - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) interface Horizontal : Alignment companion object { diff --git a/web/widgets/src/commonMain/kotlin/Arrangement.kt b/web/widgets/src/commonMain/kotlin/Arrangement.kt index 7ae2c9351b..86e51696b7 100644 --- a/web/widgets/src/commonMain/kotlin/Arrangement.kt +++ b/web/widgets/src/commonMain/kotlin/Arrangement.kt @@ -1,16 +1,17 @@ package org.jetbrains.compose.common.foundation.layout +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) object Arrangement { @ExperimentalComposeWebWidgetsApi - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) interface Horizontal @ExperimentalComposeWebWidgetsApi - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) interface Vertical val End = object : Horizontal {} diff --git a/web/widgets/src/commonMain/kotlin/Color.kt b/web/widgets/src/commonMain/kotlin/Color.kt index 3541f35be9..4c02ea03bb 100644 --- a/web/widgets/src/commonMain/kotlin/Color.kt +++ b/web/widgets/src/commonMain/kotlin/Color.kt @@ -1,33 +1,34 @@ package org.jetbrains.compose.common.core.graphics +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) public data class Color(val red: Int, val green: Int, val blue: Int) { companion object { - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) val Black = Color(0, 0, 0) - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) val DarkGray = Color(0x44, 0x44, 0x44) - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) val Gray = Color(0x88, 0x88, 0x88) - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) val LightGray = Color(0xCC, 0xCC, 0xCC) - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) val White = Color(0xFF, 0xFF, 0xFF) - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) val Red = Color(0xFF, 0, 0) - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) val Green = Color(0, 0xFF, 0) - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) val Blue = Color(0, 0, 0xFF) - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) val Yellow = Color(0xFF, 0xFF, 0x00) - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) val Cyan = Color(0, 0xFF, 0xFF) - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) val Magenta = Color(0xFF, 0, 0xFF) } } diff --git a/web/widgets/src/commonMain/kotlin/Modifier.kt b/web/widgets/src/commonMain/kotlin/Modifier.kt index 857927c415..c7d01d661b 100644 --- a/web/widgets/src/commonMain/kotlin/Modifier.kt +++ b/web/widgets/src/commonMain/kotlin/Modifier.kt @@ -1,20 +1,21 @@ package org.jetbrains.compose.common.ui +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.core.graphics.Color @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) interface Modifier { open class Element : Modifier - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) companion object : Element() } @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) expect fun Modifier.background(color: Color): Modifier @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) expect fun Modifier.padding(all: Dp): Modifier diff --git a/web/widgets/src/commonMain/kotlin/annotations/webWidgetsDeprecationMessage.kt b/web/widgets/src/commonMain/kotlin/annotations/webWidgetsDeprecationMessage.kt new file mode 100644 index 0000000000..45beda0b1a --- /dev/null +++ b/web/widgets/src/commonMain/kotlin/annotations/webWidgetsDeprecationMessage.kt @@ -0,0 +1,8 @@ +/* + * Copyright 2020-2021 JetBrains s.r.o. and respective authors and developers. + * Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file. + */ + +package org.jetbrains.compose.annotations + +const val webWidgetsDeprecationMessage = "compose.web.web-widgets API is deprecated" \ No newline at end of file diff --git a/web/widgets/src/commonMain/kotlin/layouts/box.kt b/web/widgets/src/commonMain/kotlin/layouts/box.kt index d1d4f631a3..ed68dfcff3 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/box.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/box.kt @@ -2,9 +2,10 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal expect fun BoxActual(modifier: Modifier, content: @Composable () -> Unit) diff --git a/web/widgets/src/commonMain/kotlin/layouts/button.kt b/web/widgets/src/commonMain/kotlin/layouts/button.kt index ff9be56655..addc2fa785 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/button.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/button.kt @@ -2,11 +2,12 @@ package org.jetbrains.compose.common.material import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal expect fun ButtonActual( modifier: Modifier, onClick: () -> Unit, diff --git a/web/widgets/src/commonMain/kotlin/layouts/column.kt b/web/widgets/src/commonMain/kotlin/layouts/column.kt index 7783310ca6..c4902ef56d 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/column.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/column.kt @@ -2,9 +2,10 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal expect fun ColumnActual(modifier: Modifier, content: @Composable () -> Unit) diff --git a/web/widgets/src/commonMain/kotlin/layouts/defaults/BoxDefault.kt b/web/widgets/src/commonMain/kotlin/layouts/defaults/BoxDefault.kt index 0ae8802685..50e0ceedc7 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/defaults/BoxDefault.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/defaults/BoxDefault.kt @@ -2,11 +2,12 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) fun Box( modifier: Modifier = Modifier.Companion, content: @Composable () -> Unit diff --git a/web/widgets/src/commonMain/kotlin/layouts/defaults/ButtonDefault.kt b/web/widgets/src/commonMain/kotlin/layouts/defaults/ButtonDefault.kt index ad22ea1919..2a526a0a6e 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/defaults/ButtonDefault.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/defaults/ButtonDefault.kt @@ -2,11 +2,12 @@ package org.jetbrains.compose.common.material import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) fun Button( modifier: Modifier = Modifier.Companion, onClick: () -> Unit, diff --git a/web/widgets/src/commonMain/kotlin/layouts/defaults/ColumnDefault.kt b/web/widgets/src/commonMain/kotlin/layouts/defaults/ColumnDefault.kt index 10d0217ebd..7f7ba0021f 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/defaults/ColumnDefault.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/defaults/ColumnDefault.kt @@ -2,11 +2,12 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) fun Column( modifier: Modifier = Modifier.Companion, content: @Composable () -> Unit diff --git a/web/widgets/src/commonMain/kotlin/layouts/defaults/ModifierDefault.kt b/web/widgets/src/commonMain/kotlin/layouts/defaults/ModifierDefault.kt index edb5b584a4..c510932278 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/defaults/ModifierDefault.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/defaults/ModifierDefault.kt @@ -1,9 +1,10 @@ package org.jetbrains.compose.common.ui +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.unit.Dp @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) fun Modifier.size(size: Dp): Modifier { return size(size, size) } diff --git a/web/widgets/src/commonMain/kotlin/layouts/defaults/RowDefault.kt b/web/widgets/src/commonMain/kotlin/layouts/defaults/RowDefault.kt index 50e007b3f2..3207c757e7 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/defaults/RowDefault.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/defaults/RowDefault.kt @@ -2,12 +2,13 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.Alignment import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) fun Row( modifier: Modifier = Modifier.Companion, horizontalArrangement: Arrangement.Horizontal = Arrangement.Start, diff --git a/web/widgets/src/commonMain/kotlin/layouts/defaults/SliderDefault.kt b/web/widgets/src/commonMain/kotlin/layouts/defaults/SliderDefault.kt index 6659f3011e..723de98d83 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/defaults/SliderDefault.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/defaults/SliderDefault.kt @@ -1,12 +1,13 @@ package org.jetbrains.compose.common.material import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.Modifier @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) fun Slider( value: Float, onValueChange: (Float) -> Unit = {}, diff --git a/web/widgets/src/commonMain/kotlin/layouts/defaults/TextDefault.kt b/web/widgets/src/commonMain/kotlin/layouts/defaults/TextDefault.kt index 7e214257de..adce380d20 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/defaults/TextDefault.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/defaults/TextDefault.kt @@ -1,6 +1,7 @@ package org.jetbrains.compose.common.material import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.core.graphics.Color import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @@ -8,7 +9,7 @@ import org.jetbrains.compose.common.ui.unit.TextUnit @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) fun Text( text: String, modifier: Modifier = Modifier.Companion, diff --git a/web/widgets/src/commonMain/kotlin/layouts/row.kt b/web/widgets/src/commonMain/kotlin/layouts/row.kt index 2cedf4d081..75b7ed02ec 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/row.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/row.kt @@ -2,12 +2,13 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.Alignment import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal expect fun RowActual( modifier: Modifier, horizontalArrangement: Arrangement.Horizontal, diff --git a/web/widgets/src/commonMain/kotlin/layouts/shapes/shapes.kt b/web/widgets/src/commonMain/kotlin/layouts/shapes/shapes.kt index 7724d1576b..1baf1007b2 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/shapes/shapes.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/shapes/shapes.kt @@ -1,11 +1,12 @@ package jetbrains.compose.common.shapes +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) interface Shape @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) object CircleShape : Shape diff --git a/web/widgets/src/commonMain/kotlin/layouts/slider.kt b/web/widgets/src/commonMain/kotlin/layouts/slider.kt index 05d4e67b76..0a8c9236c5 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/slider.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/slider.kt @@ -1,12 +1,13 @@ package org.jetbrains.compose.common.material import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.Modifier @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal expect fun SliderActual( value: Float, onValueChange: (Float) -> Unit, diff --git a/web/widgets/src/commonMain/kotlin/layouts/text.kt b/web/widgets/src/commonMain/kotlin/layouts/text.kt index 6920e1eeb3..bfd910049a 100644 --- a/web/widgets/src/commonMain/kotlin/layouts/text.kt +++ b/web/widgets/src/commonMain/kotlin/layouts/text.kt @@ -1,6 +1,7 @@ package org.jetbrains.compose.common.material import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.core.graphics.Color import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @@ -8,7 +9,7 @@ import org.jetbrains.compose.common.ui.unit.TextUnit @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal expect fun TextActual( text: String, modifier: Modifier, diff --git a/web/widgets/src/commonMain/kotlin/modifiers/border.kt b/web/widgets/src/commonMain/kotlin/modifiers/border.kt index 92977cefcc..b806a4d804 100644 --- a/web/widgets/src/commonMain/kotlin/modifiers/border.kt +++ b/web/widgets/src/commonMain/kotlin/modifiers/border.kt @@ -1,10 +1,11 @@ package org.jetbrains.compose.common.foundation +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.core.graphics.Color import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.Modifier @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) expect fun Modifier.border(size: Dp, color: Color): Modifier diff --git a/web/widgets/src/commonMain/kotlin/modifiers/clickable.kt b/web/widgets/src/commonMain/kotlin/modifiers/clickable.kt index 7a80f77c9a..fe441e2502 100644 --- a/web/widgets/src/commonMain/kotlin/modifiers/clickable.kt +++ b/web/widgets/src/commonMain/kotlin/modifiers/clickable.kt @@ -1,8 +1,9 @@ package org.jetbrains.compose.common.foundation +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.Modifier @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) expect fun Modifier.clickable(onClick: () -> Unit): Modifier diff --git a/web/widgets/src/commonMain/kotlin/modifiers/clip.kt b/web/widgets/src/commonMain/kotlin/modifiers/clip.kt index 61746664b6..d7a7aa5ce1 100644 --- a/web/widgets/src/commonMain/kotlin/modifiers/clip.kt +++ b/web/widgets/src/commonMain/kotlin/modifiers/clip.kt @@ -2,8 +2,9 @@ package org.jetbrains.compose.common.ui.draw import org.jetbrains.compose.common.ui.Modifier import jetbrains.compose.common.shapes.Shape +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) expect fun Modifier.clip(shape: Shape): Modifier diff --git a/web/widgets/src/commonMain/kotlin/modifiers/fillMaxHeight.kt b/web/widgets/src/commonMain/kotlin/modifiers/fillMaxHeight.kt index 0c3976fa85..6f32760d19 100644 --- a/web/widgets/src/commonMain/kotlin/modifiers/fillMaxHeight.kt +++ b/web/widgets/src/commonMain/kotlin/modifiers/fillMaxHeight.kt @@ -1,8 +1,9 @@ package org.jetbrains.compose.common.foundation.layout +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.Modifier @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) expect fun Modifier.fillMaxHeight(fraction: Float): Modifier diff --git a/web/widgets/src/commonMain/kotlin/modifiers/fillMaxWidth.kt b/web/widgets/src/commonMain/kotlin/modifiers/fillMaxWidth.kt index fad6d7dbb1..fed2d1e1d9 100644 --- a/web/widgets/src/commonMain/kotlin/modifiers/fillMaxWidth.kt +++ b/web/widgets/src/commonMain/kotlin/modifiers/fillMaxWidth.kt @@ -1,8 +1,9 @@ package org.jetbrains.compose.common.foundation.layout +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.Modifier @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) expect fun Modifier.fillMaxWidth(): Modifier diff --git a/web/widgets/src/commonMain/kotlin/modifiers/offset.kt b/web/widgets/src/commonMain/kotlin/modifiers/offset.kt index e28a655072..841675f88b 100644 --- a/web/widgets/src/commonMain/kotlin/modifiers/offset.kt +++ b/web/widgets/src/commonMain/kotlin/modifiers/offset.kt @@ -1,9 +1,10 @@ package org.jetbrains.compose.common.foundation.layout +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.Modifier @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) expect fun Modifier.offset(x: Dp, y: Dp): Modifier diff --git a/web/widgets/src/commonMain/kotlin/modifiers/onSizeChanged.kt b/web/widgets/src/commonMain/kotlin/modifiers/onSizeChanged.kt index 6a1c1c766b..7ac50d248b 100644 --- a/web/widgets/src/commonMain/kotlin/modifiers/onSizeChanged.kt +++ b/web/widgets/src/commonMain/kotlin/modifiers/onSizeChanged.kt @@ -1,11 +1,12 @@ package org.jetbrains.compose.common.ui.layout +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.unit.IntSize @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) expect fun Modifier.onSizeChanged( onSizeChanged: (IntSize) -> Unit ): Modifier diff --git a/web/widgets/src/commonMain/kotlin/modifiers/size.kt b/web/widgets/src/commonMain/kotlin/modifiers/size.kt index 5cac3f1382..c32541baf3 100644 --- a/web/widgets/src/commonMain/kotlin/modifiers/size.kt +++ b/web/widgets/src/commonMain/kotlin/modifiers/size.kt @@ -1,7 +1,8 @@ package org.jetbrains.compose.common.ui +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.unit.Dp @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) expect fun Modifier.size(width: Dp, height: Dp): Modifier diff --git a/web/widgets/src/commonMain/kotlin/modifiers/width.kt b/web/widgets/src/commonMain/kotlin/modifiers/width.kt index 56a85a280c..ee33fa79b1 100644 --- a/web/widgets/src/commonMain/kotlin/modifiers/width.kt +++ b/web/widgets/src/commonMain/kotlin/modifiers/width.kt @@ -1,9 +1,10 @@ package org.jetbrains.compose.common.foundation.layout +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.Modifier @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) expect fun Modifier.width(size: Dp): Modifier diff --git a/web/widgets/src/commonMain/kotlin/units/Dp.kt b/web/widgets/src/commonMain/kotlin/units/Dp.kt index ccaf1115a4..e0898cee4c 100644 --- a/web/widgets/src/commonMain/kotlin/units/Dp.kt +++ b/web/widgets/src/commonMain/kotlin/units/Dp.kt @@ -1,7 +1,8 @@ package org.jetbrains.compose.common.ui.unit +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) data class Dp(val value: Float) diff --git a/web/widgets/src/commonMain/kotlin/units/IntSize.kt b/web/widgets/src/commonMain/kotlin/units/IntSize.kt index 15a2c8e1c4..caaf90e8fc 100644 --- a/web/widgets/src/commonMain/kotlin/units/IntSize.kt +++ b/web/widgets/src/commonMain/kotlin/units/IntSize.kt @@ -1,7 +1,8 @@ package org.jetbrains.compose.common.ui.unit +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) data class IntSize(val width: Int, val height: Int) diff --git a/web/widgets/src/commonMain/kotlin/units/TextUnit.kt b/web/widgets/src/commonMain/kotlin/units/TextUnit.kt index 9e8309809f..6551305d65 100644 --- a/web/widgets/src/commonMain/kotlin/units/TextUnit.kt +++ b/web/widgets/src/commonMain/kotlin/units/TextUnit.kt @@ -1,9 +1,10 @@ package org.jetbrains.compose.common.ui.unit +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) enum class TextUnitType { Unspecified, Em, @@ -11,10 +12,10 @@ enum class TextUnitType { } @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) data class TextUnit(val value: Float, val unitType: TextUnitType) { companion object { - @Deprecated(message = "compose.web.web-widgets API is deprecated") + @Deprecated(message = webWidgetsDeprecationMessage) val Unspecified = TextUnit(Float.NaN, TextUnitType.Unspecified) } } diff --git a/web/widgets/src/commonMain/kotlin/units/unitConversion.kt b/web/widgets/src/commonMain/kotlin/units/unitConversion.kt index 7bc166c5b8..6c02fe8851 100644 --- a/web/widgets/src/commonMain/kotlin/units/unitConversion.kt +++ b/web/widgets/src/commonMain/kotlin/units/unitConversion.kt @@ -1,29 +1,30 @@ package org.jetbrains.compose.common.ui.unit +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi // TODO: this have to be in a separate package otherwise there's an error for in cross-module usage (for JVM target) @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) val Int.dp: Dp get() = Dp(this.toFloat()) @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) val Int.em: TextUnit get() = TextUnit(toFloat(), TextUnitType.Em) @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) val Float.em: TextUnit get() = TextUnit(this, TextUnitType.Em) @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) val Int.sp: TextUnit get() = TextUnit(toFloat(), TextUnitType.Sp) @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) val Float.sp: TextUnit get() = TextUnit(this, TextUnitType.Sp) diff --git a/web/widgets/src/jsMain/kotlin/Modifier.kt b/web/widgets/src/jsMain/kotlin/Modifier.kt index 47600bad1d..2f6d4bc02d 100644 --- a/web/widgets/src/jsMain/kotlin/Modifier.kt +++ b/web/widgets/src/jsMain/kotlin/Modifier.kt @@ -1,5 +1,6 @@ package org.jetbrains.compose.common.ui +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.core.graphics.Color import org.jetbrains.compose.web.css.backgroundColor @@ -10,7 +11,7 @@ import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.web.attributes.AttrsBuilder @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.background(color: Color): Modifier = castOrCreate().apply { add { backgroundColor(RGB(color.red, color.green, color.blue)) @@ -18,7 +19,7 @@ actual fun Modifier.background(color: Color): Modifier = castOrCreate().apply { } @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) fun Modifier.asAttributeBuilderApplier( passThroughHandler: (AttrsBuilder<*>.() -> Unit)? = null ): AttrsBuilder<*>.() -> Unit = @@ -37,7 +38,7 @@ fun Modifier.asAttributeBuilderApplier( } @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.padding(all: Dp): Modifier = castOrCreate().apply { // yes, it's not a typo, what Modifier.padding does is actually adding margin add { diff --git a/web/widgets/src/jsMain/kotlin/Styles.kt b/web/widgets/src/jsMain/kotlin/Styles.kt index f7a629ae1f..c55aefa5c4 100644 --- a/web/widgets/src/jsMain/kotlin/Styles.kt +++ b/web/widgets/src/jsMain/kotlin/Styles.kt @@ -1,5 +1,6 @@ package org.jetbrains.compose.web.ui +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.web.css.justifyContent import org.jetbrains.compose.web.css.JustifyContent import org.jetbrains.compose.web.css.alignItems @@ -13,7 +14,7 @@ import org.jetbrains.compose.web.css.px import org.jetbrains.compose.web.css.StyleSheet -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) object Styles : StyleSheet() { val columnClass = "compose-web-column" diff --git a/web/widgets/src/jsMain/kotlin/internal/ActualModifier.kt b/web/widgets/src/jsMain/kotlin/internal/ActualModifier.kt index 8ab4a1ff3b..59a9c30bbe 100644 --- a/web/widgets/src/jsMain/kotlin/internal/ActualModifier.kt +++ b/web/widgets/src/jsMain/kotlin/internal/ActualModifier.kt @@ -1,12 +1,13 @@ package org.jetbrains.compose.common.internal +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.web.css.StyleBuilder import org.jetbrains.compose.web.attributes.AttrsBuilder @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) class ActualModifier : Modifier { val styleHandlers = mutableListOf Unit>() val attrHandlers = mutableListOf.() -> Unit>() @@ -21,5 +22,5 @@ class ActualModifier : Modifier { } @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) fun Modifier.castOrCreate(): ActualModifier = (this as? ActualModifier) ?: ActualModifier() diff --git a/web/widgets/src/jsMain/kotlin/layouts/box.kt b/web/widgets/src/jsMain/kotlin/layouts/box.kt index f778d5c85d..972729bc96 100644 --- a/web/widgets/src/jsMain/kotlin/layouts/box.kt +++ b/web/widgets/src/jsMain/kotlin/layouts/box.kt @@ -2,13 +2,14 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.web.dom.Div import org.jetbrains.compose.common.ui.asAttributeBuilderApplier @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal actual fun BoxActual(modifier: Modifier, content: @Composable () -> Unit) { Div( attrs = modifier.asAttributeBuilderApplier() diff --git a/web/widgets/src/jsMain/kotlin/layouts/button.kt b/web/widgets/src/jsMain/kotlin/layouts/button.kt index a0da9a5a34..b526f55748 100644 --- a/web/widgets/src/jsMain/kotlin/layouts/button.kt +++ b/web/widgets/src/jsMain/kotlin/layouts/button.kt @@ -2,12 +2,13 @@ package org.jetbrains.compose.common.material import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.web.dom.Button @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun ButtonActual( modifier: Modifier, onClick: () -> Unit, diff --git a/web/widgets/src/jsMain/kotlin/layouts/column.kt b/web/widgets/src/jsMain/kotlin/layouts/column.kt index c8147ab8b0..7724de0458 100644 --- a/web/widgets/src/jsMain/kotlin/layouts/column.kt +++ b/web/widgets/src/jsMain/kotlin/layouts/column.kt @@ -2,13 +2,14 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.web.dom.Div import org.jetbrains.compose.web.ui.Styles @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal actual fun ColumnActual(modifier: Modifier, content: @Composable () -> Unit) { Div( attrs = { diff --git a/web/widgets/src/jsMain/kotlin/layouts/row.kt b/web/widgets/src/jsMain/kotlin/layouts/row.kt index 4bd8ebd054..83926881bc 100644 --- a/web/widgets/src/jsMain/kotlin/layouts/row.kt +++ b/web/widgets/src/jsMain/kotlin/layouts/row.kt @@ -2,6 +2,7 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.web.dom.Div import org.jetbrains.compose.common.ui.Alignment import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @@ -22,7 +23,7 @@ private fun Alignment.Vertical.asClassName() = when (this) { @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal actual fun RowActual( modifier: Modifier, horizontalArrangement: Arrangement.Horizontal, diff --git a/web/widgets/src/jsMain/kotlin/layouts/slider.kt b/web/widgets/src/jsMain/kotlin/layouts/slider.kt index 17e2b37239..e807d9d73e 100644 --- a/web/widgets/src/jsMain/kotlin/layouts/slider.kt +++ b/web/widgets/src/jsMain/kotlin/layouts/slider.kt @@ -1,15 +1,15 @@ package org.jetbrains.compose.common.material import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.web.dom.Input import org.jetbrains.compose.web.attributes.InputType -import org.jetbrains.compose.web.attributes.value @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun SliderActual( value: Float, onValueChange: (Float) -> Unit, diff --git a/web/widgets/src/jsMain/kotlin/layouts/text.kt b/web/widgets/src/jsMain/kotlin/layouts/text.kt index 50f7828ff8..c76fefae22 100644 --- a/web/widgets/src/jsMain/kotlin/layouts/text.kt +++ b/web/widgets/src/jsMain/kotlin/layouts/text.kt @@ -1,6 +1,7 @@ package org.jetbrains.compose.common.material import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.web.dom.Text as TextNode import org.jetbrains.compose.web.dom.Span import org.jetbrains.compose.web.ui.Styles @@ -18,7 +19,7 @@ import org.jetbrains.compose.web.css.px @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal actual fun TextActual( text: String, modifier: Modifier, diff --git a/web/widgets/src/jsMain/kotlin/modifiers/border.kt b/web/widgets/src/jsMain/kotlin/modifiers/border.kt index 0863604401..0f8d1bdfd8 100644 --- a/web/widgets/src/jsMain/kotlin/modifiers/border.kt +++ b/web/widgets/src/jsMain/kotlin/modifiers/border.kt @@ -1,5 +1,6 @@ package org.jetbrains.compose.common.foundation +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.core.graphics.Color import org.jetbrains.compose.common.ui.Modifier @@ -11,7 +12,7 @@ import org.jetbrains.compose.web.css.border import org.jetbrains.compose.web.css.Color.RGB @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.border(size: Dp, color: Color): Modifier = castOrCreate().apply { add { border(size.value.px, LineStyle.Solid, RGB(color.red, color.green, color.blue)) diff --git a/web/widgets/src/jsMain/kotlin/modifiers/clickable.kt b/web/widgets/src/jsMain/kotlin/modifiers/clickable.kt index e74738e1b5..f7e219c8e9 100644 --- a/web/widgets/src/jsMain/kotlin/modifiers/clickable.kt +++ b/web/widgets/src/jsMain/kotlin/modifiers/clickable.kt @@ -1,11 +1,12 @@ package org.jetbrains.compose.common.foundation +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.clickable(onClick: () -> Unit): Modifier = castOrCreate().apply { addAttributeBuilder { onClick { onClick() } diff --git a/web/widgets/src/jsMain/kotlin/modifiers/clip.kt b/web/widgets/src/jsMain/kotlin/modifiers/clip.kt index d796deec19..6c11301bcc 100644 --- a/web/widgets/src/jsMain/kotlin/modifiers/clip.kt +++ b/web/widgets/src/jsMain/kotlin/modifiers/clip.kt @@ -3,13 +3,14 @@ package org.jetbrains.compose.common.ui.draw import org.jetbrains.compose.common.ui.Modifier import jetbrains.compose.common.shapes.Shape import jetbrains.compose.common.shapes.CircleShape +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.web.css.borderRadius import org.jetbrains.compose.web.css.percent @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.clip(shape: Shape): Modifier = castOrCreate().apply { when (shape) { CircleShape -> add { diff --git a/web/widgets/src/jsMain/kotlin/modifiers/fillMaxHeight.kt b/web/widgets/src/jsMain/kotlin/modifiers/fillMaxHeight.kt index 163baf9dd9..78cdee1fbf 100644 --- a/web/widgets/src/jsMain/kotlin/modifiers/fillMaxHeight.kt +++ b/web/widgets/src/jsMain/kotlin/modifiers/fillMaxHeight.kt @@ -1,5 +1,6 @@ package org.jetbrains.compose.common.foundation.layout +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @@ -7,7 +8,7 @@ import org.jetbrains.compose.web.css.height import org.jetbrains.compose.web.css.percent @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.fillMaxHeight(fraction: Float): Modifier = castOrCreate().apply { add { height((100 * fraction).percent) diff --git a/web/widgets/src/jsMain/kotlin/modifiers/fillMaxWidth.kt b/web/widgets/src/jsMain/kotlin/modifiers/fillMaxWidth.kt index 5e5a8ed658..771eab7696 100644 --- a/web/widgets/src/jsMain/kotlin/modifiers/fillMaxWidth.kt +++ b/web/widgets/src/jsMain/kotlin/modifiers/fillMaxWidth.kt @@ -1,5 +1,6 @@ package org.jetbrains.compose.common.foundation.layout +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @@ -7,7 +8,7 @@ import org.jetbrains.compose.web.css.width import org.jetbrains.compose.web.css.percent @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.fillMaxWidth(): Modifier = castOrCreate().apply { add { width(100.percent) diff --git a/web/widgets/src/jsMain/kotlin/modifiers/offset.kt b/web/widgets/src/jsMain/kotlin/modifiers/offset.kt index 64b0b4e490..e06fadcd53 100644 --- a/web/widgets/src/jsMain/kotlin/modifiers/offset.kt +++ b/web/widgets/src/jsMain/kotlin/modifiers/offset.kt @@ -1,5 +1,6 @@ package org.jetbrains.compose.common.foundation.layout +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.internal.castOrCreate @@ -9,7 +10,7 @@ import org.jetbrains.compose.web.css.marginLeft import org.jetbrains.compose.web.css.px @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.offset(x: Dp, y: Dp): Modifier = castOrCreate().apply { add { marginLeft(x.value.px) diff --git a/web/widgets/src/jsMain/kotlin/modifiers/onSizeChanged.kt b/web/widgets/src/jsMain/kotlin/modifiers/onSizeChanged.kt index 210e6e9227..b0f0043b14 100644 --- a/web/widgets/src/jsMain/kotlin/modifiers/onSizeChanged.kt +++ b/web/widgets/src/jsMain/kotlin/modifiers/onSizeChanged.kt @@ -1,11 +1,12 @@ package org.jetbrains.compose.common.ui.layout +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.unit.IntSize @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.onSizeChanged( onSizeChanged: (IntSize) -> Unit ): Modifier { diff --git a/web/widgets/src/jsMain/kotlin/modifiers/size.kt b/web/widgets/src/jsMain/kotlin/modifiers/size.kt index 6a6f342d88..26b67300ad 100644 --- a/web/widgets/src/jsMain/kotlin/modifiers/size.kt +++ b/web/widgets/src/jsMain/kotlin/modifiers/size.kt @@ -1,5 +1,6 @@ package org.jetbrains.compose.common.ui +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.web.css.width import org.jetbrains.compose.web.css.height @@ -7,7 +8,7 @@ import org.jetbrains.compose.web.css.px import org.jetbrains.compose.common.internal.castOrCreate @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.size(width: Dp, height: Dp): Modifier = castOrCreate().apply { add { width(width.value.px) diff --git a/web/widgets/src/jsMain/kotlin/modifiers/width.kt b/web/widgets/src/jsMain/kotlin/modifiers/width.kt index 2e38d55b2f..6fedfc59ae 100644 --- a/web/widgets/src/jsMain/kotlin/modifiers/width.kt +++ b/web/widgets/src/jsMain/kotlin/modifiers/width.kt @@ -1,5 +1,6 @@ package org.jetbrains.compose.common.foundation.layout +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.internal.castOrCreate @@ -8,7 +9,7 @@ import org.jetbrains.compose.web.css.px import org.jetbrains.compose.web.css.width @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.width(size: Dp): Modifier = castOrCreate().apply { add { width(size.value.px) diff --git a/web/widgets/src/jvmMain/kotlin/Alignment.kt b/web/widgets/src/jvmMain/kotlin/Alignment.kt index 37afad554a..a62ced7b6d 100644 --- a/web/widgets/src/jvmMain/kotlin/Alignment.kt +++ b/web/widgets/src/jvmMain/kotlin/Alignment.kt @@ -1,9 +1,10 @@ package org.jetbrains.compose.common.ui +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import androidx.compose.ui.Alignment as JAlignment @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) val Alignment.Vertical.implementation: JAlignment.Vertical get() = when (this) { Alignment.Top -> JAlignment.Top diff --git a/web/widgets/src/jvmMain/kotlin/Arrangement.kt b/web/widgets/src/jvmMain/kotlin/Arrangement.kt index f09cf5d8e1..67b1be1421 100644 --- a/web/widgets/src/jvmMain/kotlin/Arrangement.kt +++ b/web/widgets/src/jvmMain/kotlin/Arrangement.kt @@ -1,10 +1,11 @@ package org.jetbrains.compose.common.foundation.layout +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import androidx.compose.foundation.layout.Arrangement as JArrangement @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) val Arrangement.Horizontal.implementation: JArrangement.Horizontal get() = when (this) { Arrangement.End -> JArrangement.End diff --git a/web/widgets/src/jvmMain/kotlin/Color.kt b/web/widgets/src/jvmMain/kotlin/Color.kt index 760a5353ad..e77f8a0903 100644 --- a/web/widgets/src/jvmMain/kotlin/Color.kt +++ b/web/widgets/src/jvmMain/kotlin/Color.kt @@ -1,9 +1,10 @@ package org.jetbrains.compose.common.core.graphics +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import androidx.compose.ui.graphics.Color as JColor @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) val Color.implementation get() = JColor(red, green, blue) diff --git a/web/widgets/src/jvmMain/kotlin/Modifier.kt b/web/widgets/src/jvmMain/kotlin/Modifier.kt index 8e9716d01d..ec8201a903 100644 --- a/web/widgets/src/jvmMain/kotlin/Modifier.kt +++ b/web/widgets/src/jvmMain/kotlin/Modifier.kt @@ -7,20 +7,21 @@ import org.jetbrains.compose.common.core.graphics.Color import org.jetbrains.compose.common.core.graphics.implementation import org.jetbrains.compose.common.internal.castOrCreate import androidx.compose.foundation.layout.padding +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.background(color: Color): Modifier = castOrCreate().apply { modifier = modifier.background(color.implementation) } @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.padding(all: Dp): Modifier = castOrCreate().apply { modifier = modifier.padding(all.implementation) } @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) val Modifier.implementation get() = castOrCreate().modifier diff --git a/web/widgets/src/jvmMain/kotlin/internal/ActualModifier.kt b/web/widgets/src/jvmMain/kotlin/internal/ActualModifier.kt index d51cc85cc6..5b5e55b54f 100644 --- a/web/widgets/src/jvmMain/kotlin/internal/ActualModifier.kt +++ b/web/widgets/src/jvmMain/kotlin/internal/ActualModifier.kt @@ -1,18 +1,19 @@ package org.jetbrains.compose.common.internal +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import androidx.compose.ui.Modifier as JModifier import org.jetbrains.compose.common.ui.Modifier -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) private class ModifierElement : JModifier.Element @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) class ActualModifier : Modifier { var modifier: JModifier = ModifierElement() } @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) fun Modifier.castOrCreate(): ActualModifier = (this as? ActualModifier) ?: ActualModifier() diff --git a/web/widgets/src/jvmMain/kotlin/layouts/box.kt b/web/widgets/src/jvmMain/kotlin/layouts/box.kt index fc904e7115..f3a73ac60a 100644 --- a/web/widgets/src/jvmMain/kotlin/layouts/box.kt +++ b/web/widgets/src/jvmMain/kotlin/layouts/box.kt @@ -3,12 +3,13 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.implementation import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import androidx.compose.foundation.layout.Box as JBox @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal actual fun BoxActual(modifier: Modifier, content: @Composable () -> Unit) { JBox(modifier.implementation) { content.invoke() diff --git a/web/widgets/src/jvmMain/kotlin/layouts/button.kt b/web/widgets/src/jvmMain/kotlin/layouts/button.kt index 07b78e933d..c4fdd847bd 100644 --- a/web/widgets/src/jvmMain/kotlin/layouts/button.kt +++ b/web/widgets/src/jvmMain/kotlin/layouts/button.kt @@ -2,13 +2,14 @@ package org.jetbrains.compose.common.material import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.implementation import androidx.compose.material.Button as JButton @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal actual fun ButtonActual( modifier: Modifier, onClick: () -> Unit, diff --git a/web/widgets/src/jvmMain/kotlin/layouts/column.kt b/web/widgets/src/jvmMain/kotlin/layouts/column.kt index 6768710fb6..44e15bcb2e 100644 --- a/web/widgets/src/jvmMain/kotlin/layouts/column.kt +++ b/web/widgets/src/jvmMain/kotlin/layouts/column.kt @@ -2,13 +2,14 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import androidx.compose.foundation.layout.Column as JColumn import org.jetbrains.compose.common.ui.implementation @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal actual fun ColumnActual(modifier: Modifier, content: @Composable () -> Unit) { JColumn(modifier = modifier.implementation) { content.invoke() diff --git a/web/widgets/src/jvmMain/kotlin/layouts/row.kt b/web/widgets/src/jvmMain/kotlin/layouts/row.kt index 9551c2fa3e..ed7e492e1f 100644 --- a/web/widgets/src/jvmMain/kotlin/layouts/row.kt +++ b/web/widgets/src/jvmMain/kotlin/layouts/row.kt @@ -1,12 +1,13 @@ package org.jetbrains.compose.common.foundation.layout import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.* import androidx.compose.foundation.layout.Row as JRow @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal actual fun RowActual( modifier: Modifier, horizontalArrangement: Arrangement.Horizontal, diff --git a/web/widgets/src/jvmMain/kotlin/layouts/shapes/shapes.kt b/web/widgets/src/jvmMain/kotlin/layouts/shapes/shapes.kt index ffc6b2e253..3632a3eb88 100644 --- a/web/widgets/src/jvmMain/kotlin/layouts/shapes/shapes.kt +++ b/web/widgets/src/jvmMain/kotlin/layouts/shapes/shapes.kt @@ -1,11 +1,12 @@ package jetbrains.compose.common.shapes +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import androidx.compose.ui.graphics.Shape as JShape import androidx.compose.foundation.shape.CircleShape as JCircleShape @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) val Shape.implementation: JShape get() = when (this) { CircleShape -> JCircleShape diff --git a/web/widgets/src/jvmMain/kotlin/layouts/slider.kt b/web/widgets/src/jvmMain/kotlin/layouts/slider.kt index cb3fd7a7e7..6e0069c804 100644 --- a/web/widgets/src/jvmMain/kotlin/layouts/slider.kt +++ b/web/widgets/src/jvmMain/kotlin/layouts/slider.kt @@ -1,6 +1,7 @@ package org.jetbrains.compose.common.material import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.Modifier import androidx.compose.material.Slider as JSlider @@ -8,7 +9,7 @@ import org.jetbrains.compose.common.ui.implementation @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal actual fun SliderActual( value: Float, onValueChange: (Float) -> Unit, diff --git a/web/widgets/src/jvmMain/kotlin/layouts/text.kt b/web/widgets/src/jvmMain/kotlin/layouts/text.kt index 5c148c1b45..c065784ca6 100644 --- a/web/widgets/src/jvmMain/kotlin/layouts/text.kt +++ b/web/widgets/src/jvmMain/kotlin/layouts/text.kt @@ -1,6 +1,7 @@ package org.jetbrains.compose.common.material import androidx.compose.runtime.Composable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import androidx.compose.material.Text as JText import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.implementation @@ -12,7 +13,7 @@ import org.jetbrains.compose.common.ui.unit.implementation @Composable @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) internal actual fun TextActual( text: String, modifier: Modifier, diff --git a/web/widgets/src/jvmMain/kotlin/modifiers/border.kt b/web/widgets/src/jvmMain/kotlin/modifiers/border.kt index c7b2c31187..3a34fd2e99 100644 --- a/web/widgets/src/jvmMain/kotlin/modifiers/border.kt +++ b/web/widgets/src/jvmMain/kotlin/modifiers/border.kt @@ -7,10 +7,11 @@ import org.jetbrains.compose.common.internal.castOrCreate import org.jetbrains.compose.common.core.graphics.implementation import org.jetbrains.compose.common.ui.unit.implementation import androidx.compose.foundation.border +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.border(size: Dp, color: Color): Modifier = castOrCreate().apply { modifier = modifier.border(size.implementation, color.implementation) } diff --git a/web/widgets/src/jvmMain/kotlin/modifiers/clickable.kt b/web/widgets/src/jvmMain/kotlin/modifiers/clickable.kt index 57c11b7b85..1cfbfa6411 100644 --- a/web/widgets/src/jvmMain/kotlin/modifiers/clickable.kt +++ b/web/widgets/src/jvmMain/kotlin/modifiers/clickable.kt @@ -3,10 +3,11 @@ package org.jetbrains.compose.common.foundation import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.internal.castOrCreate import androidx.compose.foundation.clickable +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.clickable(onClick: () -> Unit): Modifier = castOrCreate().apply { modifier = modifier.clickable(onClick = onClick) } diff --git a/web/widgets/src/jvmMain/kotlin/modifiers/clip.kt b/web/widgets/src/jvmMain/kotlin/modifiers/clip.kt index 97e9639e94..c409353911 100644 --- a/web/widgets/src/jvmMain/kotlin/modifiers/clip.kt +++ b/web/widgets/src/jvmMain/kotlin/modifiers/clip.kt @@ -5,10 +5,11 @@ import jetbrains.compose.common.shapes.Shape import jetbrains.compose.common.shapes.implementation import org.jetbrains.compose.common.internal.castOrCreate import androidx.compose.ui.draw.clip +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.clip(shape: Shape): Modifier = castOrCreate().apply { modifier = modifier.clip(shape.implementation) } diff --git a/web/widgets/src/jvmMain/kotlin/modifiers/fillMaxHeight.kt b/web/widgets/src/jvmMain/kotlin/modifiers/fillMaxHeight.kt index 20d9da48c2..2e1352dc1e 100644 --- a/web/widgets/src/jvmMain/kotlin/modifiers/fillMaxHeight.kt +++ b/web/widgets/src/jvmMain/kotlin/modifiers/fillMaxHeight.kt @@ -3,10 +3,11 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.internal.castOrCreate import androidx.compose.foundation.layout.fillMaxHeight +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.fillMaxHeight(fraction: Float): Modifier = castOrCreate().apply { modifier = modifier.fillMaxHeight(fraction) } diff --git a/web/widgets/src/jvmMain/kotlin/modifiers/fillMaxWidth.kt b/web/widgets/src/jvmMain/kotlin/modifiers/fillMaxWidth.kt index 792fea1ade..ad49fd7791 100644 --- a/web/widgets/src/jvmMain/kotlin/modifiers/fillMaxWidth.kt +++ b/web/widgets/src/jvmMain/kotlin/modifiers/fillMaxWidth.kt @@ -3,10 +3,11 @@ package org.jetbrains.compose.common.foundation.layout import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.internal.castOrCreate import androidx.compose.foundation.layout.fillMaxWidth +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.fillMaxWidth(): Modifier = castOrCreate().apply { modifier = modifier.fillMaxWidth() } diff --git a/web/widgets/src/jvmMain/kotlin/modifiers/offset.kt b/web/widgets/src/jvmMain/kotlin/modifiers/offset.kt index 52b0665ca7..6e02638829 100644 --- a/web/widgets/src/jvmMain/kotlin/modifiers/offset.kt +++ b/web/widgets/src/jvmMain/kotlin/modifiers/offset.kt @@ -4,11 +4,12 @@ import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.internal.castOrCreate import androidx.compose.foundation.layout.offset +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.unit.implementation @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.offset(x: Dp, y: Dp): Modifier = castOrCreate().apply { modifier = modifier.offset(x.implementation, y.implementation) } diff --git a/web/widgets/src/jvmMain/kotlin/modifiers/onSizeChanged.kt b/web/widgets/src/jvmMain/kotlin/modifiers/onSizeChanged.kt index 7a54e4534a..ae59d947e2 100644 --- a/web/widgets/src/jvmMain/kotlin/modifiers/onSizeChanged.kt +++ b/web/widgets/src/jvmMain/kotlin/modifiers/onSizeChanged.kt @@ -4,10 +4,11 @@ import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.ui.unit.IntSize import org.jetbrains.compose.common.internal.castOrCreate import androidx.compose.ui.layout.onSizeChanged +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.onSizeChanged( onSizeChanged: (IntSize) -> Unit ): Modifier = castOrCreate().apply { diff --git a/web/widgets/src/jvmMain/kotlin/modifiers/size.kt b/web/widgets/src/jvmMain/kotlin/modifiers/size.kt index f853b0f55c..84dab6c3cb 100644 --- a/web/widgets/src/jvmMain/kotlin/modifiers/size.kt +++ b/web/widgets/src/jvmMain/kotlin/modifiers/size.kt @@ -3,10 +3,11 @@ package org.jetbrains.compose.common.ui import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.unit.implementation import androidx.compose.foundation.layout.size +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.internal.castOrCreate @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.size(width: Dp, height: Dp): Modifier = castOrCreate().apply { modifier = modifier.size(width.implementation, height.implementation) } diff --git a/web/widgets/src/jvmMain/kotlin/modifiers/width.kt b/web/widgets/src/jvmMain/kotlin/modifiers/width.kt index e536a1c039..94bbedf822 100644 --- a/web/widgets/src/jvmMain/kotlin/modifiers/width.kt +++ b/web/widgets/src/jvmMain/kotlin/modifiers/width.kt @@ -4,11 +4,12 @@ import org.jetbrains.compose.common.ui.unit.Dp import org.jetbrains.compose.common.ui.Modifier import org.jetbrains.compose.common.internal.castOrCreate import androidx.compose.foundation.layout.width +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import org.jetbrains.compose.common.ui.unit.implementation @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) actual fun Modifier.width(size: Dp): Modifier = castOrCreate().apply { modifier = modifier.width(size.implementation) } diff --git a/web/widgets/src/jvmMain/kotlin/units/Dp.kt b/web/widgets/src/jvmMain/kotlin/units/Dp.kt index 9da9816279..44149a80f2 100644 --- a/web/widgets/src/jvmMain/kotlin/units/Dp.kt +++ b/web/widgets/src/jvmMain/kotlin/units/Dp.kt @@ -1,9 +1,10 @@ package org.jetbrains.compose.common.ui.unit +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi import androidx.compose.ui.unit.Dp as JDp @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) val Dp.implementation: JDp get() = JDp(value) diff --git a/web/widgets/src/jvmMain/kotlin/units/TextUnit.kt b/web/widgets/src/jvmMain/kotlin/units/TextUnit.kt index f41ac99f11..675ab973a5 100644 --- a/web/widgets/src/jvmMain/kotlin/units/TextUnit.kt +++ b/web/widgets/src/jvmMain/kotlin/units/TextUnit.kt @@ -3,10 +3,11 @@ package org.jetbrains.compose.common.ui.unit import androidx.compose.ui.unit.TextUnit as JTextUnit import androidx.compose.ui.unit.em import androidx.compose.ui.unit.sp +import org.jetbrains.compose.annotations.webWidgetsDeprecationMessage import org.jetbrains.compose.common.ui.ExperimentalComposeWebWidgetsApi @ExperimentalComposeWebWidgetsApi -@Deprecated(message = "compose.web.web-widgets API is deprecated") +@Deprecated(message = webWidgetsDeprecationMessage) val TextUnit.implementation: JTextUnit get() = when (unitType) { TextUnitType.Em -> (value).em