diff --git a/buildSrc/src/main/kotlin/org/jetbrains/packagesearch/gradle/ConfigureGradleIntellijPlugin.kt b/buildSrc/src/main/kotlin/org/jetbrains/packagesearch/gradle/ConfigureGradleIntellijPlugin.kt index 4a36a13d..fdc682f1 100644 --- a/buildSrc/src/main/kotlin/org/jetbrains/packagesearch/gradle/ConfigureGradleIntellijPlugin.kt +++ b/buildSrc/src/main/kotlin/org/jetbrains/packagesearch/gradle/ConfigureGradleIntellijPlugin.kt @@ -24,9 +24,6 @@ fun Project.configureGradleIntellijPlugin(packageSearchExtension: PackageSearchE relocate("io.ktor", "shadow.io.ktor") relocate("kotlinx.serialization", "shadow.kotlinx.serialization") relocate("kotlinx.datetime", "shadow.kotlinx.datetime") - relocate("androidx", "shadow.androidx") - relocate("org.jetbrains.jewel", "shadow.org.jetbrains.jewel") - relocate("org.jetbrains.compose", "shadow.org.jetbrains.compose") exclude { it.name.containsAny(packageSearchExtension.librariesToDelete.get()) && !it.name.containsAny(packageSearchExtension.librariesToKeep.get()) @@ -43,4 +40,4 @@ fun Project.configureGradleIntellijPlugin(packageSearchExtension: PackageSearchE } } } -} \ No newline at end of file +} diff --git a/plugin/build.gradle.kts b/plugin/build.gradle.kts index e7765cd6..f7f0261b 100644 --- a/plugin/build.gradle.kts +++ b/plugin/build.gradle.kts @@ -49,11 +49,6 @@ val tooling: Configuration by configurations.creating { } dependencies { - implementation(compose.desktop.linux_arm64) - implementation(compose.desktop.linux_x64) - implementation(compose.desktop.macos_arm64) - implementation(compose.desktop.macos_x64) - implementation(compose.desktop.windows_x64) implementation(packageSearchCatalog.kotlinx.serialization.core) implementation(packageSearchCatalog.jewel.bridge.ij232) implementation(packageSearchCatalog.ktor.client.logging) diff --git a/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/packages/PackageSearchPackageList.kt b/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/packages/PackageSearchPackageList.kt index f445cbca..85be9f20 100644 --- a/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/packages/PackageSearchPackageList.kt +++ b/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/packages/PackageSearchPackageList.kt @@ -16,7 +16,6 @@ import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.widthIn import androidx.compose.foundation.onClick -import androidx.compose.material.Divider import androidx.compose.runtime.Composable import androidx.compose.runtime.getValue import androidx.compose.runtime.mutableStateOf @@ -52,7 +51,9 @@ import org.jetbrains.jewel.foundation.lazy.SelectableLazyItemScope import org.jetbrains.jewel.foundation.lazy.SelectableLazyListState import org.jetbrains.jewel.foundation.lazy.SelectionMode import org.jetbrains.jewel.foundation.theme.JewelTheme +import org.jetbrains.jewel.ui.Orientation import org.jetbrains.jewel.ui.component.CircularProgressIndicator +import org.jetbrains.jewel.ui.component.Divider import org.jetbrains.jewel.ui.component.Icon import org.jetbrains.jewel.ui.component.Link import org.jetbrains.jewel.ui.component.Text @@ -319,7 +320,7 @@ internal fun RemotePackageWithVariantsActionPopup( } if (!isInstalledInPrimaryVariant) { passiveItem { - Divider(modifier = Modifier.padding(vertical = 4.dp)) + Divider(Orientation.Horizontal,modifier = Modifier.padding(vertical = 4.dp)) } selectableItem( selected = false, @@ -331,7 +332,7 @@ internal fun RemotePackageWithVariantsActionPopup( if (additionalVariants.isNotEmpty()) { passiveItem { - Divider(modifier = Modifier.padding(vertical = 4.dp)) + Divider(Orientation.Horizontal,modifier = Modifier.padding(vertical = 4.dp)) } additionalVariants.forEach { selectableItem( @@ -375,7 +376,7 @@ internal fun DeclaredPackageActionPopup( } } passiveItem { - Divider(modifier = Modifier.padding(vertical = 4.dp)) + Divider(Orientation.Horizontal,modifier = Modifier.padding(vertical = 4.dp)) } selectableItem( selected = false, diff --git a/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/tree/PackageSearchModulesTree.kt b/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/tree/PackageSearchModulesTree.kt index 3e2aadfb..71e3e739 100644 --- a/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/tree/PackageSearchModulesTree.kt +++ b/plugin/src/main/kotlin/com/jetbrains/packagesearch/plugin/ui/panels/tree/PackageSearchModulesTree.kt @@ -1,7 +1,6 @@ package com.jetbrains.packagesearch.plugin.ui.panels.tree import androidx.compose.animation.Crossfade -import androidx.compose.desktop.ui.tooling.preview.Preview import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column @@ -34,6 +33,7 @@ import org.jetbrains.jewel.foundation.lazy.tree.Tree import org.jetbrains.jewel.foundation.lazy.tree.buildTree import org.jetbrains.jewel.foundation.lazy.tree.rememberTreeState import org.jetbrains.jewel.foundation.theme.JewelTheme +import org.jetbrains.jewel.foundation.theme.ThemeDefinition import org.jetbrains.jewel.ui.Orientation import org.jetbrains.jewel.ui.component.Divider import org.jetbrains.jewel.ui.component.Icon @@ -58,7 +58,7 @@ fun PackageSearchModulesTree( onExpandAll = viewModel::expandAll, onCollapseAll = { val rootIds = tree.roots.map { it.id }.toSet() - viewModel.treeState.selectedKeys = viewModel.treeState.selectedKeys intersect rootIds + viewModel.treeState.selectedKeys = (viewModel.treeState.selectedKeys intersect rootIds).toList() viewModel.collapseAll() }, ) @@ -77,7 +77,7 @@ fun PackageSearchModulesTree( viewModel.treeState.selectedKeys = tree.walkBreadthFirst() .take(1) .map { it.data.id } - .toSet() + .toList() } } Box { @@ -200,52 +200,52 @@ private fun TreeItem(element: Tree.Element) { } } } - -@Preview -@Composable -private fun TreeItemPreview() { - val items = listOf( - TreeItemModel( - id = PackageSearchModule.Identity("a", ":"), - text = "JetBrains", - hasUpdates = true, - icon = IconProvider.Icon("icons/npm.svg"), - ), - TreeItemModel( - id = PackageSearchModule.Identity("a", ":b"), - text = "Kotlin", - hasUpdates = false, - icon = IconProvider.Icon("icons/maven.svg"), - ), - TreeItemModel( - id = PackageSearchModule.Identity("a", ":c"), - text = "Ktor", - hasUpdates = false, - icon = IconProvider.Icon("icons/cocoapods.svg.svg"), - ), - TreeItemModel( - id = PackageSearchModule.Identity("a", ":c:d"), - text = "Compose", - hasUpdates = true, - icon = IconProvider.Icon("icons/npm.svg"), - ), - ) - val tree = buildTree { - addLeaf(items[0], items[0].id) - addNode(items[1], items[1].id) { - addLeaf(items[2], items[2].id) - } - addLeaf(items[3], items[3].id) - } - LazyTree( - modifier = Modifier.padding(top = 4.dp), - tree = tree, - treeState = rememberTreeState(), - onSelectionChange = {}, - ) { item -> - TreeItem(item) - } -} - - - +// +//@Preview +//@Composable +//private fun TreeItemPreview() { +// val items = listOf( +// TreeItemModel( +// id = PackageSearchModule.Identity("a", ":"), +// text = "JetBrains", +// hasUpdates = true, +// icon = IconProvider.Icon("icons/npm.svg"), +// ), +// TreeItemModel( +// id = PackageSearchModule.Identity("a", ":b"), +// text = "Kotlin", +// hasUpdates = false, +// icon = IconProvider.Icon("icons/maven.svg"), +// ), +// TreeItemModel( +// id = PackageSearchModule.Identity("a", ":c"), +// text = "Ktor", +// hasUpdates = false, +// icon = IconProvider.Icon("icons/cocoapods.svg.svg"), +// ), +// TreeItemModel( +// id = PackageSearchModule.Identity("a", ":c:d"), +// text = "Compose", +// hasUpdates = true, +// icon = IconProvider.Icon("icons/npm.svg"), +// ), +// ) +// val tree = buildTree { +// addLeaf(items[0], items[0].id) +// addNode(items[1], items[1].id) { +// addLeaf(items[2], items[2].id) +// } +// addLeaf(items[3], items[3].id) +// } +// LazyTree( +// modifier = Modifier.padding(top = 4.dp), +// tree = tree, +// treeState = rememberTreeState(), +// onSelectionChange = {}, +// ) { item -> +// TreeItem(item) +// } +//} +// +// +//