Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ kotlin-io = "org.jetbrains.kotlinx:kotlinx-io-core:0.8.2"
kotlinx-browser = "org.jetbrains.kotlinx:kotlinx-browser:0.5.0"
# Support Kotlin 2.2.20 https://github.com/Kotlin/kotlinx.serialization/releases/tag/v1.9.0
kotlinx-serialization-json = "org.jetbrains.kotlinx:kotlinx-serialization-json:1.9.0"
snakeyaml-engine-kmp = "it.krzeminski:snakeyaml-engine-kmp:4.0.1"
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-client-content-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
Expand Down
4 changes: 4 additions & 0 deletions sdk/compose/icons/api/icons.api
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ public final class io/github/composegears/valkyrie/sdk/compose/icons/colored/Box
public static final fun getBoxLogo (Lio/github/composegears/valkyrie/sdk/compose/icons/ValkyrieIcons$Colored;)Landroidx/compose/ui/graphics/vector/ImageVector;
}

public final class io/github/composegears/valkyrie/sdk/compose/icons/colored/FontAwesomeLogoKt {
public static final fun getFontAwesomeLogo (Lio/github/composegears/valkyrie/sdk/compose/icons/ValkyrieIcons$Colored;)Landroidx/compose/ui/graphics/vector/ImageVector;
}

public final class io/github/composegears/valkyrie/sdk/compose/icons/colored/GoogleMaterialLogoKt {
public static final fun getGoogleMaterialLogo (Lio/github/composegears/valkyrie/sdk/compose/icons/ValkyrieIcons$Colored;)Landroidx/compose/ui/graphics/vector/ImageVector;
}
Expand Down
2 changes: 2 additions & 0 deletions sdk/compose/icons/api/icons.klib.api
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ final val io.github.composegears.valkyrie.sdk.compose.icons.colored/BootstrapLog
final fun (io.github.composegears.valkyrie.sdk.compose.icons/ValkyrieIcons.Colored).<get-BootstrapLogo>(): androidx.compose.ui.graphics.vector/ImageVector // io.github.composegears.valkyrie.sdk.compose.icons.colored/BootstrapLogo.<get-BootstrapLogo>|<get-BootstrapLogo>@io.github.composegears.valkyrie.sdk.compose.icons.ValkyrieIcons.Colored(){}[0]
final val io.github.composegears.valkyrie.sdk.compose.icons.colored/BoxLogo // io.github.composegears.valkyrie.sdk.compose.icons.colored/BoxLogo|@io.github.composegears.valkyrie.sdk.compose.icons.ValkyrieIcons.Colored{}BoxLogo[0]
final fun (io.github.composegears.valkyrie.sdk.compose.icons/ValkyrieIcons.Colored).<get-BoxLogo>(): androidx.compose.ui.graphics.vector/ImageVector // io.github.composegears.valkyrie.sdk.compose.icons.colored/BoxLogo.<get-BoxLogo>|<get-BoxLogo>@io.github.composegears.valkyrie.sdk.compose.icons.ValkyrieIcons.Colored(){}[0]
final val io.github.composegears.valkyrie.sdk.compose.icons.colored/FontAwesomeLogo // io.github.composegears.valkyrie.sdk.compose.icons.colored/FontAwesomeLogo|@io.github.composegears.valkyrie.sdk.compose.icons.ValkyrieIcons.Colored{}FontAwesomeLogo[0]
final fun (io.github.composegears.valkyrie.sdk.compose.icons/ValkyrieIcons.Colored).<get-FontAwesomeLogo>(): androidx.compose.ui.graphics.vector/ImageVector // io.github.composegears.valkyrie.sdk.compose.icons.colored/FontAwesomeLogo.<get-FontAwesomeLogo>|<get-FontAwesomeLogo>@io.github.composegears.valkyrie.sdk.compose.icons.ValkyrieIcons.Colored(){}[0]
final val io.github.composegears.valkyrie.sdk.compose.icons.colored/GoogleMaterialLogo // io.github.composegears.valkyrie.sdk.compose.icons.colored/GoogleMaterialLogo|@io.github.composegears.valkyrie.sdk.compose.icons.ValkyrieIcons.Colored{}GoogleMaterialLogo[0]
final fun (io.github.composegears.valkyrie.sdk.compose.icons/ValkyrieIcons.Colored).<get-GoogleMaterialLogo>(): androidx.compose.ui.graphics.vector/ImageVector // io.github.composegears.valkyrie.sdk.compose.icons.colored/GoogleMaterialLogo.<get-GoogleMaterialLogo>|<get-GoogleMaterialLogo>@io.github.composegears.valkyrie.sdk.compose.icons.ValkyrieIcons.Colored(){}[0]
final val io.github.composegears.valkyrie.sdk.compose.icons.colored/LucideLogo // io.github.composegears.valkyrie.sdk.compose.icons.colored/LucideLogo|@io.github.composegears.valkyrie.sdk.compose.icons.ValkyrieIcons.Colored{}LucideLogo[0]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package io.github.composegears.valkyrie.sdk.compose.icons.colored

import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.PathFillType
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.path
import androidx.compose.ui.unit.dp
import io.github.composegears.valkyrie.sdk.compose.icons.ValkyrieIcons

val ValkyrieIcons.Colored.FontAwesomeLogo: ImageVector
get() {
if (_FontAwesomeLogo != null) {
return _FontAwesomeLogo!!
}
_FontAwesomeLogo = ImageVector.Builder(
name = "FontAwesomeLogo",
defaultWidth = 512.dp,
defaultHeight = 512.dp,
viewportWidth = 512f,
viewportHeight = 512f,
).apply {
path(
fill = SolidColor(Color(0xFF418FDE)),
pathFillType = PathFillType.EvenOdd,
) {
moveTo(153.33f, 156f)
curveTo(162.45f, 150.24f, 168.5f, 140.08f, 168.5f, 128.5f)
curveTo(168.5f, 110.55f, 153.95f, 96f, 136f, 96f)
curveTo(118.05f, 96f, 103.5f, 110.55f, 103.5f, 128.5f)
curveTo(103.5f, 138.91f, 108.39f, 148.17f, 116f, 154.12f)
verticalLineTo(156f)
verticalLineTo(376f)
verticalLineTo(416f)
horizontalLineTo(156f)
verticalLineTo(376f)
horizontalLineTo(389.5f)
curveTo(398.61f, 376f, 406f, 368.61f, 406f, 359.5f)
curveTo(406f, 357.19f, 405.52f, 354.91f, 404.58f, 352.8f)
lineTo(366f, 266f)
lineTo(404.58f, 179.2f)
curveTo(405.52f, 177.09f, 406f, 174.81f, 406f, 172.5f)
curveTo(406f, 163.39f, 398.61f, 156f, 389.5f, 156f)
horizontalLineTo(153.33f)
close()
}
}.build()

return _FontAwesomeLogo!!
}

@Suppress("ObjectPropertyName")
private var _FontAwesomeLogo: ImageVector? = null
4 changes: 4 additions & 0 deletions tools/idea-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Added

- [Web Import] Add `Font Awesome` icons provider
Comment thread
egorikftp marked this conversation as resolved.

## 1.4.0 - 2026-03-15

### Changed
Expand Down
1 change: 1 addition & 0 deletions tools/idea-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ dependencies {
implementation(libs.ktor.client.okhttp)
implementation(libs.ktor.serialization.json)
implementation(libs.kotlinx.serialization.json)
implementation(libs.snakeyaml.engine.kmp)
implementation(libs.fuzzysearch)
implementation(libs.leviathan)
implementation(libs.leviathan.compose)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ class PersistentSettings : SimplePersistentStateComponent<ValkyrieState>(Valkyri

// BoxIcons
var boxiconsSize: Int by property(DEFAULT_SIZE)

// Font Awesome
var fontAwesomeSize: Int by property(DEFAULT_SIZE)
}

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class InMemorySettings(project: Project) {
bootstrapSize = DEFAULT_SIZE
remixSize = DEFAULT_SIZE
boxiconsSize = DEFAULT_SIZE
fontAwesomeSize = DEFAULT_SIZE
}

fun updateUIState(uiState: SavedState) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import com.composegears.tiamat.compose.rememberNavController
import io.github.composegears.valkyrie.ui.screen.webimport.material.MaterialSymbolsImportScreen
import io.github.composegears.valkyrie.ui.screen.webimport.standard.bootstrap.BootstrapImportScreen
import io.github.composegears.valkyrie.ui.screen.webimport.standard.boxicons.BoxIconsImportScreen
import io.github.composegears.valkyrie.ui.screen.webimport.standard.fontawesome.FontAwesomeImportScreen
import io.github.composegears.valkyrie.ui.screen.webimport.standard.lucide.LucideImportScreen
import io.github.composegears.valkyrie.ui.screen.webimport.standard.remix.RemixImportScreen

Expand All @@ -25,6 +26,7 @@ val WebImportFlow by navDestination {
BootstrapImportScreen,
RemixImportScreen,
BoxIconsImportScreen,
FontAwesomeImportScreen,
),
contentTransformProvider = { isForward -> navigationSlideInOut(isForward) },
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@ import io.github.composegears.valkyrie.jewel.tooling.PreviewTheme
import io.github.composegears.valkyrie.sdk.compose.icons.ValkyrieIcons
import io.github.composegears.valkyrie.sdk.compose.icons.colored.BootstrapLogo
import io.github.composegears.valkyrie.sdk.compose.icons.colored.BoxLogo
import io.github.composegears.valkyrie.sdk.compose.icons.colored.FontAwesomeLogo
import io.github.composegears.valkyrie.sdk.compose.icons.colored.GoogleMaterialLogo
import io.github.composegears.valkyrie.sdk.compose.icons.colored.LucideLogo
import io.github.composegears.valkyrie.sdk.compose.icons.colored.RemixLogo
import io.github.composegears.valkyrie.ui.screen.webimport.IconProviders.Bootstrap
import io.github.composegears.valkyrie.ui.screen.webimport.IconProviders.BoxIcons
import io.github.composegears.valkyrie.ui.screen.webimport.IconProviders.FontAwesome
import io.github.composegears.valkyrie.ui.screen.webimport.IconProviders.GoogleMaterialSymbols
import io.github.composegears.valkyrie.ui.screen.webimport.IconProviders.Lucide
import io.github.composegears.valkyrie.ui.screen.webimport.IconProviders.Remix
import io.github.composegears.valkyrie.ui.screen.webimport.material.MaterialSymbolsImportScreen
import io.github.composegears.valkyrie.ui.screen.webimport.standard.bootstrap.BootstrapImportScreen
import io.github.composegears.valkyrie.ui.screen.webimport.standard.boxicons.BoxIconsImportScreen
import io.github.composegears.valkyrie.ui.screen.webimport.standard.fontawesome.FontAwesomeImportScreen
import io.github.composegears.valkyrie.ui.screen.webimport.standard.lucide.LucideImportScreen
import io.github.composegears.valkyrie.ui.screen.webimport.standard.remix.RemixImportScreen
import io.github.composegears.valkyrie.util.stringResource
Expand All @@ -52,6 +55,7 @@ val WebImportSelectorScreen by navDestination {
Bootstrap -> BootstrapImportScreen
Remix -> RemixImportScreen
BoxIcons -> BoxIconsImportScreen
FontAwesome -> FontAwesomeImportScreen
}

navController.navigate(dest = screen)
Expand Down Expand Up @@ -113,6 +117,13 @@ private fun WebImportSelectorScreenUI(
title = stringResource("web.import.selector.boxicons.title"),
description = stringResource("web.import.selector.boxicons.description"),
)
InfoCard(
onClick = { onClick(FontAwesome) },
icon = ValkyrieIcons.Colored.FontAwesomeLogo,
tint = Color.Unspecified,
title = stringResource("web.import.selector.fontawesome.title"),
description = stringResource("web.import.selector.fontawesome.description"),
)
InfoText(
text = stringResource("web.import.selector.coming.soon"),
maxLines = 2,
Expand All @@ -128,6 +139,7 @@ enum class IconProviders {
Bootstrap,
Remix,
BoxIcons,
FontAwesome,
}

@Preview
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import io.github.composegears.valkyrie.ui.screen.webimport.standard.common.domai
import io.github.composegears.valkyrie.ui.screen.webimport.standard.common.domain.SvgSizeCustomizer
import io.github.composegears.valkyrie.ui.screen.webimport.standard.common.domain.inferCategoryFromTags
import io.github.composegears.valkyrie.ui.screen.webimport.standard.common.domain.toDisplayName
import io.github.composegears.valkyrie.ui.screen.webimport.standard.common.model.IconStyle
import io.github.composegears.valkyrie.ui.screen.webimport.standard.common.model.SizeSettings
import io.github.composegears.valkyrie.ui.screen.webimport.standard.common.model.StandardIcon
import io.github.composegears.valkyrie.ui.screen.webimport.standard.common.model.StandardIconConfig
Expand Down Expand Up @@ -44,12 +45,12 @@ class BootstrapUseCase(
return icons.toStandardIconConfig()
}

override suspend fun loadFontBytes(): FontByteArray {
override suspend fun loadFontBytes(style: IconStyle?): FontByteArray {
return FontByteArray(repository.loadFontBytes())
}

override suspend fun downloadSvg(iconName: String, settings: SizeSettings): String {
val rawSvg = repository.downloadSvg(iconName)
override suspend fun downloadSvg(icon: StandardIcon, settings: SizeSettings): String {
val rawSvg = repository.downloadSvg(icon.name)
return SvgSizeCustomizer.applySettings(rawSvg, settings)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ class BoxIconsUseCase(
return icons.toStandardIconConfig()
}

override suspend fun loadFontBytes(): FontByteArray {
override suspend fun loadFontBytes(style: IconStyle?): FontByteArray {
return FontByteArray(repository.loadFontBytes())
}

override suspend fun downloadSvg(iconName: String, settings: SizeSettings): String {
val rawSvg = repository.downloadSvg(iconName)
override suspend fun downloadSvg(icon: StandardIcon, settings: SizeSettings): String {
val rawSvg = repository.downloadSvg(icon.name)
return SvgSizeCustomizer.applySettings(rawSvg, settings)
}
}
Expand Down
Loading
Loading