diff --git a/src/main/kotlin/org/jetbrains/plugins/template/components/SearchBarWithAutoCompletion.kt b/src/main/kotlin/org/jetbrains/plugins/template/components/SearchBarWithAutoCompletion.kt index 6a52110..29c5e7c 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/components/SearchBarWithAutoCompletion.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/components/SearchBarWithAutoCompletion.kt @@ -36,7 +36,7 @@ import org.jetbrains.plugins.template.weatherApp.services.SearchAutoCompletionIt @OptIn(ExperimentalJewelApi::class) @Composable -internal fun SearchBarWithAutoCompletion( +fun SearchBarWithAutoCompletion( modifier: Modifier = Modifier, searchAutoCompletionItemProvider: SearchAutoCompletionItemProvider, textFieldState: TextFieldState, @@ -120,7 +120,7 @@ internal fun SearchBarWithAutoCompletion( } @Composable -internal fun CloseIconButton(onClick: () -> Unit) { +fun CloseIconButton(onClick: () -> Unit) { val interactionSource = remember { MutableInteractionSource() } var hovered by remember { mutableStateOf(false) } diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/Location.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/Location.kt index a3f822c..d347bce 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/Location.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/Location.kt @@ -10,7 +10,7 @@ import androidx.compose.runtime.Immutable * @property id A derived unique identifier for the location in the format `name, country`. */ @Immutable -internal data class Location(val name: String, val country: String) : PreviewableItem, Searchable { +data class Location(val name: String, val country: String) : PreviewableItem, Searchable { val id: String = "$name, $country" override fun isSearchApplicable(query: String): Boolean { @@ -31,4 +31,4 @@ internal data class Location(val name: String, val country: String) : Previewabl } @Immutable -internal data class SelectableLocation(val location: Location, val isSelected: Boolean) \ No newline at end of file +data class SelectableLocation(val location: Location, val isSelected: Boolean) \ No newline at end of file diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/Searchable.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/Searchable.kt index 5bafa75..063f563 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/Searchable.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/Searchable.kt @@ -3,6 +3,6 @@ package org.jetbrains.plugins.template.weatherApp.model /** * Represents an entity that can be filtered by a search query. */ -internal interface Searchable { +interface Searchable { fun isSearchApplicable(query: String): Boolean } \ No newline at end of file diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/WeatherForecastData.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/WeatherForecastData.kt index 980a8b7..e40ac5a 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/WeatherForecastData.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/model/WeatherForecastData.kt @@ -7,7 +7,7 @@ import java.time.LocalDateTime /** * Data class representing a daily weather forecast. */ -internal data class DailyForecast( +data class DailyForecast( val date: LocalDateTime, val temperature: Float, val weatherType: WeatherType, @@ -19,7 +19,7 @@ internal data class DailyForecast( /** * Data class representing weather information to be displayed in the Weather Card. */ -internal data class WeatherForecastData( +data class WeatherForecastData( val location: Location, val currentWeatherForecast: DailyForecast, val dailyForecasts: List = emptyList() diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/LocationsProvider.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/LocationsProvider.kt index 6b192ef..a73212d 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/LocationsProvider.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/LocationsProvider.kt @@ -7,7 +7,7 @@ import kotlinx.coroutines.flow.asStateFlow import org.jetbrains.plugins.template.weatherApp.model.Location @Service -internal class LocationsProvider : SearchAutoCompletionItemProvider { +class LocationsProvider : SearchAutoCompletionItemProvider { private val locationStateFlow = MutableStateFlow( listOf( Location("Munich", "Germany"), diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/MyLocationsViewModel.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/MyLocationsViewModel.kt index 9297b27..cf72db7 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/MyLocationsViewModel.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/MyLocationsViewModel.kt @@ -16,7 +16,7 @@ import org.jetbrains.plugins.template.weatherApp.model.WeatherForecastData * a flow to observe the list of selectable locations. Implementations are expected to handle * location-related logic and state management. */ -internal interface MyLocationsViewModelApi { +interface MyLocationsViewModelApi { fun onAddLocation(locationToAdd: Location) fun onDeleteLocation(locationToDelete: Location) @@ -30,7 +30,7 @@ internal interface MyLocationsViewModelApi { * Interface representing a ViewModel for managing weather-related data * and user interactions. */ -internal interface WeatherViewModelApi { +interface WeatherViewModelApi { val weatherForecast: Flow fun onLoadWeatherForecast(location: Location) @@ -39,7 +39,7 @@ internal interface WeatherViewModelApi { } @Service -internal class MyLocationsViewModel(cs: CoroutineScope) : MyLocationsViewModelApi, WeatherViewModelApi { +class MyLocationsViewModel(cs: CoroutineScope) : MyLocationsViewModelApi, WeatherViewModelApi { private val weatherService = service() diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/SearchAutoCompletionItemProvider.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/SearchAutoCompletionItemProvider.kt index 521e6e2..2f47622 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/SearchAutoCompletionItemProvider.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/SearchAutoCompletionItemProvider.kt @@ -11,6 +11,6 @@ import org.jetbrains.plugins.template.weatherApp.model.Searchable * * @param T The type of items provided by this interface, which must extend [Searchable]. */ -internal interface SearchAutoCompletionItemProvider { +interface SearchAutoCompletionItemProvider { fun provideSearchableItems(searchTerm: String): List } \ No newline at end of file diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/WeatherForecastService.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/WeatherForecastService.kt index 80786a7..d926f84 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/WeatherForecastService.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/services/WeatherForecastService.kt @@ -15,7 +15,7 @@ import java.time.LocalTime import kotlin.random.Random @Service -internal class WeatherForecastService(private val cs: CoroutineScope) { +class WeatherForecastService(private val cs: CoroutineScope) { private val _weatherForecast: MutableStateFlow = MutableStateFlow(WeatherForecastData.EMPTY) val weatherForecast: StateFlow = _weatherForecast.asStateFlow() diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/WeatherAppSample.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/WeatherAppSample.kt index 2f69f7a..231c8c5 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/WeatherAppSample.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/WeatherAppSample.kt @@ -32,7 +32,7 @@ import org.jetbrains.plugins.template.weatherApp.ui.components.SearchToolbarMenu import org.jetbrains.plugins.template.weatherApp.ui.components.WeatherDetailsCard @Composable -internal fun WeatherAppSample( +fun WeatherAppSample( myLocationViewModel: MyLocationsViewModelApi, weatherViewModelApi: WeatherViewModelApi, searchAutoCompletionItemProvider: SearchAutoCompletionItemProvider @@ -85,7 +85,7 @@ private fun LeftColumn( } @Composable -internal fun MyLocationsListWithEmptyListPlaceholder( +fun MyLocationsListWithEmptyListPlaceholder( modifier: Modifier = Modifier, myLocationsViewModelApi: MyLocationsViewModelApi ) { diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/EmbeddedToInlineCssSvgTransformerHint.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/EmbeddedToInlineCssSvgTransformerHint.kt index bf5bbd4..c6015e1 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/EmbeddedToInlineCssSvgTransformerHint.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/EmbeddedToInlineCssSvgTransformerHint.kt @@ -17,7 +17,7 @@ import javax.xml.transform.stream.StreamResult import javax.xml.xpath.XPathConstants import javax.xml.xpath.XPathFactory -internal object EmbeddedToInlineCssSvgTransformerHint : PainterSvgPatchHint { +object EmbeddedToInlineCssSvgTransformerHint : PainterSvgPatchHint { private val CSS_STYLEABLE_TAGS = listOf( "linearGradient", "radialGradient", "pattern", "filter", "clipPath", "mask", "symbol", diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/SearchToolbarMenu.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/SearchToolbarMenu.kt index 1cfac4b..0316221 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/SearchToolbarMenu.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/SearchToolbarMenu.kt @@ -20,7 +20,7 @@ import org.jetbrains.plugins.template.weatherApp.model.Searchable import org.jetbrains.plugins.template.weatherApp.services.SearchAutoCompletionItemProvider @Composable -internal fun SearchToolbarMenu( +fun SearchToolbarMenu( searchAutoCompletionItemProvider: SearchAutoCompletionItemProvider, confirmButtonText: String = "Confirm", onSearchPerformed: (T) -> Unit = {}, diff --git a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/WeatherDetailsCard.kt b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/WeatherDetailsCard.kt index c1fac51..267b9ee 100644 --- a/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/WeatherDetailsCard.kt +++ b/src/main/kotlin/org/jetbrains/plugins/template/weatherApp/ui/components/WeatherDetailsCard.kt @@ -44,7 +44,7 @@ import java.util.* */ @OptIn(ExperimentalFoundationApi::class) @Composable -internal fun WeatherDetailsCard( +fun WeatherDetailsCard( modifier: Modifier = Modifier, weatherForecastData: WeatherForecastData, onReloadWeatherData: (Location) -> Unit