From da43d5a9e9a48b6eee1d5520d5b79659f260cbf3 Mon Sep 17 00:00:00 2001 From: Sebastiano Poggi Date: Sat, 21 Oct 2023 16:03:11 +0200 Subject: [PATCH] Move state to core.state package --- .../main/kotlin/org/jetbrains/jewel/Outline.kt | 1 + .../jetbrains/jewel/core/component/Button.kt | 12 ++++++------ .../jetbrains/jewel/core/component/Checkbox.kt | 18 +++++++++--------- .../org/jetbrains/jewel/core/component/Chip.kt | 16 ++++++++-------- .../jetbrains/jewel/core/component/Dropdown.kt | 12 ++++++------ .../jewel/core/component/InputField.kt | 12 ++++++------ .../org/jetbrains/jewel/core/component/Link.kt | 14 +++++++------- .../org/jetbrains/jewel/core/component/Menu.kt | 14 +++++++------- .../jewel/core/component/RadioButton.kt | 14 +++++++------- .../jetbrains/jewel/core/component/TabStrip.kt | 4 ++-- .../org/jetbrains/jewel/core/component/Tabs.kt | 14 +++++++------- .../{ => core/state}/CommonStateBitMask.kt | 2 +- .../state}/FocusableComponentState.kt | 3 ++- .../state}/InteractiveComponentState.kt | 2 +- .../state}/SelectableComponentState.kt | 2 +- .../state}/ToggleableComponentState.kt | 6 +++--- .../jewel/foundation/tree/BasicLazyTree.kt | 18 +++++++++--------- .../jetbrains/jewel/painter/hints/Selected.kt | 2 +- .../jetbrains/jewel/painter/hints/Stateful.kt | 4 ++-- 19 files changed, 86 insertions(+), 84 deletions(-) rename core/src/main/kotlin/org/jetbrains/jewel/{ => core/state}/CommonStateBitMask.kt (87%) rename core/src/main/kotlin/org/jetbrains/jewel/{ => core/state}/FocusableComponentState.kt (89%) rename core/src/main/kotlin/org/jetbrains/jewel/{ => core/state}/InteractiveComponentState.kt (86%) rename core/src/main/kotlin/org/jetbrains/jewel/{ => core/state}/SelectableComponentState.kt (79%) rename core/src/main/kotlin/org/jetbrains/jewel/{ => core/state}/ToggleableComponentState.kt (77%) diff --git a/core/src/main/kotlin/org/jetbrains/jewel/Outline.kt b/core/src/main/kotlin/org/jetbrains/jewel/Outline.kt index 96abd47a9..71f096ea8 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/Outline.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/Outline.kt @@ -4,6 +4,7 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Shape import androidx.compose.ui.unit.Dp +import org.jetbrains.jewel.core.state.FocusableComponentState import org.jetbrains.jewel.foundation.Stroke import org.jetbrains.jewel.foundation.border import org.jetbrains.jewel.util.thenIf diff --git a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Button.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Button.kt index e8e4620bf..6559b85b9 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Button.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Button.kt @@ -27,14 +27,14 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.takeOrElse import androidx.compose.ui.semantics.Role import androidx.compose.ui.text.TextStyle -import org.jetbrains.jewel.CommonStateBitMask.Active -import org.jetbrains.jewel.CommonStateBitMask.Enabled -import org.jetbrains.jewel.CommonStateBitMask.Focused -import org.jetbrains.jewel.CommonStateBitMask.Hovered -import org.jetbrains.jewel.CommonStateBitMask.Pressed -import org.jetbrains.jewel.FocusableComponentState import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.core.component.styling.ButtonStyle +import org.jetbrains.jewel.core.state.CommonStateBitMask.Active +import org.jetbrains.jewel.core.state.CommonStateBitMask.Enabled +import org.jetbrains.jewel.core.state.CommonStateBitMask.Focused +import org.jetbrains.jewel.core.state.CommonStateBitMask.Hovered +import org.jetbrains.jewel.core.state.CommonStateBitMask.Pressed +import org.jetbrains.jewel.core.state.FocusableComponentState import org.jetbrains.jewel.focusOutline import org.jetbrains.jewel.foundation.Stroke import org.jetbrains.jewel.foundation.border diff --git a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Checkbox.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Checkbox.kt index 623581d3f..b03a6739d 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Checkbox.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Checkbox.kt @@ -29,22 +29,22 @@ import androidx.compose.ui.graphics.takeOrElse import androidx.compose.ui.semantics.Role import androidx.compose.ui.state.ToggleableState import androidx.compose.ui.text.TextStyle -import org.jetbrains.jewel.CommonStateBitMask.Active -import org.jetbrains.jewel.CommonStateBitMask.Enabled -import org.jetbrains.jewel.CommonStateBitMask.Focused -import org.jetbrains.jewel.CommonStateBitMask.Hovered -import org.jetbrains.jewel.CommonStateBitMask.Indeterminate -import org.jetbrains.jewel.CommonStateBitMask.Pressed -import org.jetbrains.jewel.CommonStateBitMask.Selected import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.LocalSwingCompatMode import org.jetbrains.jewel.Outline -import org.jetbrains.jewel.ToggleableComponentState -import org.jetbrains.jewel.ToggleableComponentState.Companion.readToggleableState import org.jetbrains.jewel.core.component.styling.CheckboxColors import org.jetbrains.jewel.core.component.styling.CheckboxIcons import org.jetbrains.jewel.core.component.styling.CheckboxMetrics import org.jetbrains.jewel.core.component.styling.LocalCheckboxStyle +import org.jetbrains.jewel.core.state.CommonStateBitMask.Active +import org.jetbrains.jewel.core.state.CommonStateBitMask.Enabled +import org.jetbrains.jewel.core.state.CommonStateBitMask.Focused +import org.jetbrains.jewel.core.state.CommonStateBitMask.Hovered +import org.jetbrains.jewel.core.state.CommonStateBitMask.Indeterminate +import org.jetbrains.jewel.core.state.CommonStateBitMask.Pressed +import org.jetbrains.jewel.core.state.CommonStateBitMask.Selected +import org.jetbrains.jewel.core.state.ToggleableComponentState +import org.jetbrains.jewel.core.state.ToggleableComponentState.Companion.readToggleableState import org.jetbrains.jewel.foundation.Stroke import org.jetbrains.jewel.outline import org.jetbrains.jewel.painter.PainterHint diff --git a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Chip.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Chip.kt index 7be566744..45c164935 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Chip.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Chip.kt @@ -25,16 +25,16 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.isUnspecified import androidx.compose.ui.semantics.Role -import org.jetbrains.jewel.CommonStateBitMask.Active -import org.jetbrains.jewel.CommonStateBitMask.Enabled -import org.jetbrains.jewel.CommonStateBitMask.Focused -import org.jetbrains.jewel.CommonStateBitMask.Hovered -import org.jetbrains.jewel.CommonStateBitMask.Pressed -import org.jetbrains.jewel.CommonStateBitMask.Selected -import org.jetbrains.jewel.FocusableComponentState import org.jetbrains.jewel.JewelTheme -import org.jetbrains.jewel.SelectableComponentState import org.jetbrains.jewel.core.component.styling.ChipStyle +import org.jetbrains.jewel.core.state.CommonStateBitMask.Active +import org.jetbrains.jewel.core.state.CommonStateBitMask.Enabled +import org.jetbrains.jewel.core.state.CommonStateBitMask.Focused +import org.jetbrains.jewel.core.state.CommonStateBitMask.Hovered +import org.jetbrains.jewel.core.state.CommonStateBitMask.Pressed +import org.jetbrains.jewel.core.state.CommonStateBitMask.Selected +import org.jetbrains.jewel.core.state.FocusableComponentState +import org.jetbrains.jewel.core.state.SelectableComponentState import org.jetbrains.jewel.focusOutline import org.jetbrains.jewel.foundation.Stroke import org.jetbrains.jewel.foundation.border diff --git a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Dropdown.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Dropdown.kt index c6412f9c3..17c05dbed 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Dropdown.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Dropdown.kt @@ -36,12 +36,6 @@ import androidx.compose.ui.platform.LocalInputModeManager import androidx.compose.ui.semantics.Role import androidx.compose.ui.window.Popup import androidx.compose.ui.window.PopupProperties -import org.jetbrains.jewel.CommonStateBitMask.Active -import org.jetbrains.jewel.CommonStateBitMask.Enabled -import org.jetbrains.jewel.CommonStateBitMask.Focused -import org.jetbrains.jewel.CommonStateBitMask.Hovered -import org.jetbrains.jewel.CommonStateBitMask.Pressed -import org.jetbrains.jewel.FocusableComponentState import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.LocalMenuManager import org.jetbrains.jewel.MenuManager @@ -49,6 +43,12 @@ import org.jetbrains.jewel.Outline import org.jetbrains.jewel.core.component.styling.DropdownStyle import org.jetbrains.jewel.core.component.styling.LocalMenuStyle import org.jetbrains.jewel.core.component.styling.MenuStyle +import org.jetbrains.jewel.core.state.CommonStateBitMask.Active +import org.jetbrains.jewel.core.state.CommonStateBitMask.Enabled +import org.jetbrains.jewel.core.state.CommonStateBitMask.Focused +import org.jetbrains.jewel.core.state.CommonStateBitMask.Hovered +import org.jetbrains.jewel.core.state.CommonStateBitMask.Pressed +import org.jetbrains.jewel.core.state.FocusableComponentState import org.jetbrains.jewel.focusOutline import org.jetbrains.jewel.foundation.Stroke import org.jetbrains.jewel.foundation.border diff --git a/core/src/main/kotlin/org/jetbrains/jewel/core/component/InputField.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/component/InputField.kt index 9d5e29900..c8920f669 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/core/component/InputField.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/component/InputField.kt @@ -22,14 +22,14 @@ import androidx.compose.ui.text.TextLayoutResult import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.input.TextFieldValue import androidx.compose.ui.text.input.VisualTransformation -import org.jetbrains.jewel.CommonStateBitMask.Active -import org.jetbrains.jewel.CommonStateBitMask.Enabled -import org.jetbrains.jewel.CommonStateBitMask.Focused -import org.jetbrains.jewel.CommonStateBitMask.Hovered -import org.jetbrains.jewel.CommonStateBitMask.Pressed -import org.jetbrains.jewel.FocusableComponentState import org.jetbrains.jewel.Outline import org.jetbrains.jewel.core.component.styling.InputFieldStyle +import org.jetbrains.jewel.core.state.CommonStateBitMask.Active +import org.jetbrains.jewel.core.state.CommonStateBitMask.Enabled +import org.jetbrains.jewel.core.state.CommonStateBitMask.Focused +import org.jetbrains.jewel.core.state.CommonStateBitMask.Hovered +import org.jetbrains.jewel.core.state.CommonStateBitMask.Pressed +import org.jetbrains.jewel.core.state.FocusableComponentState import org.jetbrains.jewel.focusOutline import org.jetbrains.jewel.foundation.Stroke import org.jetbrains.jewel.foundation.border diff --git a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Link.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Link.kt index babe8fdf6..2371bb42d 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Link.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Link.kt @@ -34,18 +34,18 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.unit.TextUnit -import org.jetbrains.jewel.CommonStateBitMask -import org.jetbrains.jewel.CommonStateBitMask.Active -import org.jetbrains.jewel.CommonStateBitMask.Enabled -import org.jetbrains.jewel.CommonStateBitMask.Focused -import org.jetbrains.jewel.CommonStateBitMask.Hovered -import org.jetbrains.jewel.CommonStateBitMask.Pressed -import org.jetbrains.jewel.FocusableComponentState import org.jetbrains.jewel.JewelTheme.Companion.isSwingCompatMode import org.jetbrains.jewel.core.component.styling.LinkStyle import org.jetbrains.jewel.core.component.styling.LocalLinkStyle import org.jetbrains.jewel.core.component.styling.LocalMenuStyle import org.jetbrains.jewel.core.component.styling.MenuStyle +import org.jetbrains.jewel.core.state.CommonStateBitMask +import org.jetbrains.jewel.core.state.CommonStateBitMask.Active +import org.jetbrains.jewel.core.state.CommonStateBitMask.Enabled +import org.jetbrains.jewel.core.state.CommonStateBitMask.Focused +import org.jetbrains.jewel.core.state.CommonStateBitMask.Hovered +import org.jetbrains.jewel.core.state.CommonStateBitMask.Pressed +import org.jetbrains.jewel.core.state.FocusableComponentState import org.jetbrains.jewel.disabled import org.jetbrains.jewel.focusOutline import org.jetbrains.jewel.foundation.onHover diff --git a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Menu.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Menu.kt index 6c077ce06..e6776cba3 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Menu.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Menu.kt @@ -60,21 +60,21 @@ import androidx.compose.ui.unit.LayoutDirection import androidx.compose.ui.unit.dp import androidx.compose.ui.window.Popup import androidx.compose.ui.window.PopupProperties -import org.jetbrains.jewel.CommonStateBitMask.Active -import org.jetbrains.jewel.CommonStateBitMask.Enabled -import org.jetbrains.jewel.CommonStateBitMask.Focused -import org.jetbrains.jewel.CommonStateBitMask.Hovered -import org.jetbrains.jewel.CommonStateBitMask.Pressed -import org.jetbrains.jewel.CommonStateBitMask.Selected import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.LocalMenuManager import org.jetbrains.jewel.MenuManager import org.jetbrains.jewel.Orientation -import org.jetbrains.jewel.SelectableComponentState import org.jetbrains.jewel.core.component.styling.LocalMenuStyle import org.jetbrains.jewel.core.component.styling.MenuItemColors import org.jetbrains.jewel.core.component.styling.MenuItemMetrics import org.jetbrains.jewel.core.component.styling.MenuStyle +import org.jetbrains.jewel.core.state.CommonStateBitMask.Active +import org.jetbrains.jewel.core.state.CommonStateBitMask.Enabled +import org.jetbrains.jewel.core.state.CommonStateBitMask.Focused +import org.jetbrains.jewel.core.state.CommonStateBitMask.Hovered +import org.jetbrains.jewel.core.state.CommonStateBitMask.Pressed +import org.jetbrains.jewel.core.state.CommonStateBitMask.Selected +import org.jetbrains.jewel.core.state.SelectableComponentState import org.jetbrains.jewel.foundation.Stroke import org.jetbrains.jewel.foundation.border import org.jetbrains.jewel.foundation.onHover diff --git a/core/src/main/kotlin/org/jetbrains/jewel/core/component/RadioButton.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/component/RadioButton.kt index 354c5907b..55d42346b 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/core/component/RadioButton.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/component/RadioButton.kt @@ -27,17 +27,17 @@ import androidx.compose.ui.graphics.painter.Painter import androidx.compose.ui.graphics.takeOrElse import androidx.compose.ui.semantics.Role import androidx.compose.ui.text.TextStyle -import org.jetbrains.jewel.CommonStateBitMask.Active -import org.jetbrains.jewel.CommonStateBitMask.Enabled -import org.jetbrains.jewel.CommonStateBitMask.Focused -import org.jetbrains.jewel.CommonStateBitMask.Hovered -import org.jetbrains.jewel.CommonStateBitMask.Pressed -import org.jetbrains.jewel.CommonStateBitMask.Selected import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.LocalSwingCompatMode import org.jetbrains.jewel.Outline -import org.jetbrains.jewel.SelectableComponentState import org.jetbrains.jewel.core.component.styling.RadioButtonStyle +import org.jetbrains.jewel.core.state.CommonStateBitMask.Active +import org.jetbrains.jewel.core.state.CommonStateBitMask.Enabled +import org.jetbrains.jewel.core.state.CommonStateBitMask.Focused +import org.jetbrains.jewel.core.state.CommonStateBitMask.Hovered +import org.jetbrains.jewel.core.state.CommonStateBitMask.Pressed +import org.jetbrains.jewel.core.state.CommonStateBitMask.Selected +import org.jetbrains.jewel.core.state.SelectableComponentState import org.jetbrains.jewel.foundation.Stroke import org.jetbrains.jewel.outline import org.jetbrains.jewel.painter.hints.Selected diff --git a/core/src/main/kotlin/org/jetbrains/jewel/core/component/TabStrip.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/component/TabStrip.kt index ab96248e7..f3cc78078 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/core/component/TabStrip.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/component/TabStrip.kt @@ -27,8 +27,8 @@ import androidx.compose.runtime.setValue import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.painter.Painter import androidx.compose.ui.platform.LocalLayoutDirection -import org.jetbrains.jewel.CommonStateBitMask -import org.jetbrains.jewel.FocusableComponentState +import org.jetbrains.jewel.core.state.CommonStateBitMask +import org.jetbrains.jewel.core.state.FocusableComponentState import org.jetbrains.jewel.foundation.onHover @Composable diff --git a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Tabs.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Tabs.kt index 3689a4a27..2b20b8aed 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/core/component/Tabs.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/component/Tabs.kt @@ -36,15 +36,15 @@ import androidx.compose.ui.input.pointer.isTertiary import androidx.compose.ui.input.pointer.onPointerEvent import androidx.compose.ui.semantics.Role import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.CommonStateBitMask.Active -import org.jetbrains.jewel.CommonStateBitMask.Enabled -import org.jetbrains.jewel.CommonStateBitMask.Focused -import org.jetbrains.jewel.CommonStateBitMask.Hovered -import org.jetbrains.jewel.CommonStateBitMask.Pressed -import org.jetbrains.jewel.CommonStateBitMask.Selected import org.jetbrains.jewel.JewelTheme import org.jetbrains.jewel.NoIndication -import org.jetbrains.jewel.SelectableComponentState +import org.jetbrains.jewel.core.state.CommonStateBitMask.Active +import org.jetbrains.jewel.core.state.CommonStateBitMask.Enabled +import org.jetbrains.jewel.core.state.CommonStateBitMask.Focused +import org.jetbrains.jewel.core.state.CommonStateBitMask.Hovered +import org.jetbrains.jewel.core.state.CommonStateBitMask.Pressed +import org.jetbrains.jewel.core.state.CommonStateBitMask.Selected +import org.jetbrains.jewel.core.state.SelectableComponentState import org.jetbrains.jewel.painter.hints.Stateful @Composable diff --git a/core/src/main/kotlin/org/jetbrains/jewel/CommonStateBitMask.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/state/CommonStateBitMask.kt similarity index 87% rename from core/src/main/kotlin/org/jetbrains/jewel/CommonStateBitMask.kt rename to core/src/main/kotlin/org/jetbrains/jewel/core/state/CommonStateBitMask.kt index 36a22f997..f3ecba7d3 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/CommonStateBitMask.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/state/CommonStateBitMask.kt @@ -1,4 +1,4 @@ -package org.jetbrains.jewel +package org.jetbrains.jewel.core.state internal object CommonStateBitMask { diff --git a/core/src/main/kotlin/org/jetbrains/jewel/FocusableComponentState.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/state/FocusableComponentState.kt similarity index 89% rename from core/src/main/kotlin/org/jetbrains/jewel/FocusableComponentState.kt rename to core/src/main/kotlin/org/jetbrains/jewel/core/state/FocusableComponentState.kt index 7b08a2622..e432688d9 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/FocusableComponentState.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/state/FocusableComponentState.kt @@ -1,7 +1,8 @@ -package org.jetbrains.jewel +package org.jetbrains.jewel.core.state import androidx.compose.runtime.Composable import androidx.compose.runtime.Stable +import org.jetbrains.jewel.JewelTheme interface FocusableComponentState : InteractiveComponentState { diff --git a/core/src/main/kotlin/org/jetbrains/jewel/InteractiveComponentState.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/state/InteractiveComponentState.kt similarity index 86% rename from core/src/main/kotlin/org/jetbrains/jewel/InteractiveComponentState.kt rename to core/src/main/kotlin/org/jetbrains/jewel/core/state/InteractiveComponentState.kt index bd9104847..36eb887c7 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/InteractiveComponentState.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/state/InteractiveComponentState.kt @@ -1,4 +1,4 @@ -package org.jetbrains.jewel +package org.jetbrains.jewel.core.state import androidx.compose.runtime.Stable diff --git a/core/src/main/kotlin/org/jetbrains/jewel/SelectableComponentState.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/state/SelectableComponentState.kt similarity index 79% rename from core/src/main/kotlin/org/jetbrains/jewel/SelectableComponentState.kt rename to core/src/main/kotlin/org/jetbrains/jewel/core/state/SelectableComponentState.kt index 0908d9d30..d9531918c 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/SelectableComponentState.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/state/SelectableComponentState.kt @@ -1,4 +1,4 @@ -package org.jetbrains.jewel +package org.jetbrains.jewel.core.state import androidx.compose.runtime.Stable diff --git a/core/src/main/kotlin/org/jetbrains/jewel/ToggleableComponentState.kt b/core/src/main/kotlin/org/jetbrains/jewel/core/state/ToggleableComponentState.kt similarity index 77% rename from core/src/main/kotlin/org/jetbrains/jewel/ToggleableComponentState.kt rename to core/src/main/kotlin/org/jetbrains/jewel/core/state/ToggleableComponentState.kt index e44bebfd6..040e890ca 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/ToggleableComponentState.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/core/state/ToggleableComponentState.kt @@ -1,9 +1,9 @@ -package org.jetbrains.jewel +package org.jetbrains.jewel.core.state import androidx.compose.runtime.Stable import androidx.compose.ui.state.ToggleableState -import org.jetbrains.jewel.CommonStateBitMask.Indeterminate -import org.jetbrains.jewel.CommonStateBitMask.Selected +import org.jetbrains.jewel.core.state.CommonStateBitMask.Indeterminate +import org.jetbrains.jewel.core.state.CommonStateBitMask.Selected interface ToggleableComponentState : SelectableComponentState { diff --git a/core/src/main/kotlin/org/jetbrains/jewel/foundation/tree/BasicLazyTree.kt b/core/src/main/kotlin/org/jetbrains/jewel/foundation/tree/BasicLazyTree.kt index 148972856..3dcc324f7 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/foundation/tree/BasicLazyTree.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/foundation/tree/BasicLazyTree.kt @@ -24,15 +24,15 @@ import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import org.jetbrains.jewel.CommonStateBitMask -import org.jetbrains.jewel.CommonStateBitMask.Active -import org.jetbrains.jewel.CommonStateBitMask.Enabled -import org.jetbrains.jewel.CommonStateBitMask.Focused -import org.jetbrains.jewel.CommonStateBitMask.Hovered -import org.jetbrains.jewel.CommonStateBitMask.Pressed -import org.jetbrains.jewel.CommonStateBitMask.Selected -import org.jetbrains.jewel.InteractiveComponentState -import org.jetbrains.jewel.SelectableComponentState +import org.jetbrains.jewel.core.state.CommonStateBitMask +import org.jetbrains.jewel.core.state.CommonStateBitMask.Active +import org.jetbrains.jewel.core.state.CommonStateBitMask.Enabled +import org.jetbrains.jewel.core.state.CommonStateBitMask.Focused +import org.jetbrains.jewel.core.state.CommonStateBitMask.Hovered +import org.jetbrains.jewel.core.state.CommonStateBitMask.Pressed +import org.jetbrains.jewel.core.state.CommonStateBitMask.Selected +import org.jetbrains.jewel.core.state.InteractiveComponentState +import org.jetbrains.jewel.core.state.SelectableComponentState import org.jetbrains.jewel.foundation.lazy.SelectableLazyColumn import org.jetbrains.jewel.foundation.lazy.SelectableLazyItemScope import org.jetbrains.jewel.foundation.lazy.SelectionMode diff --git a/core/src/main/kotlin/org/jetbrains/jewel/painter/hints/Selected.kt b/core/src/main/kotlin/org/jetbrains/jewel/painter/hints/Selected.kt index a2239aaeb..14c5ee059 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/painter/hints/Selected.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/painter/hints/Selected.kt @@ -1,7 +1,7 @@ package org.jetbrains.jewel.painter.hints import androidx.compose.runtime.Immutable -import org.jetbrains.jewel.SelectableComponentState +import org.jetbrains.jewel.core.state.SelectableComponentState import org.jetbrains.jewel.painter.PainterHint import org.jetbrains.jewel.painter.PainterSuffixHint diff --git a/core/src/main/kotlin/org/jetbrains/jewel/painter/hints/Stateful.kt b/core/src/main/kotlin/org/jetbrains/jewel/painter/hints/Stateful.kt index 2d6763b6e..e850834eb 100644 --- a/core/src/main/kotlin/org/jetbrains/jewel/painter/hints/Stateful.kt +++ b/core/src/main/kotlin/org/jetbrains/jewel/painter/hints/Stateful.kt @@ -1,8 +1,8 @@ package org.jetbrains.jewel.painter.hints import androidx.compose.runtime.Immutable -import org.jetbrains.jewel.FocusableComponentState -import org.jetbrains.jewel.InteractiveComponentState +import org.jetbrains.jewel.core.state.FocusableComponentState +import org.jetbrains.jewel.core.state.InteractiveComponentState import org.jetbrains.jewel.painter.PainterHint import org.jetbrains.jewel.painter.PainterSuffixHint