-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/origin/main' into k2
# Conflicts: # build.gradle.kts # gradle/libs.versions.toml # kotlin-js-store/yarn.lock # sample/common/build.gradle.kts
- Loading branch information
Showing
58 changed files
with
2,963 additions
and
629 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
6 changes: 6 additions & 0 deletions
6
richeditor-compose-coil3/api/android/richeditor-compose-coil3.api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
public final class com/mohamedrejeb/richeditor/coil3/Coil3ImageLoader : com/mohamedrejeb/richeditor/model/ImageLoader { | ||
public static final field $stable I | ||
public static final field INSTANCE Lcom/mohamedrejeb/richeditor/coil3/Coil3ImageLoader; | ||
public fun load (Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Lcom/mohamedrejeb/richeditor/model/ImageData; | ||
} | ||
|
6 changes: 6 additions & 0 deletions
6
richeditor-compose-coil3/api/desktop/richeditor-compose-coil3.api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
public final class com/mohamedrejeb/richeditor/coil3/Coil3ImageLoader : com/mohamedrejeb/richeditor/model/ImageLoader { | ||
public static final field $stable I | ||
public static final field INSTANCE Lcom/mohamedrejeb/richeditor/coil3/Coil3ImageLoader; | ||
public fun load (Ljava/lang/Object;Landroidx/compose/runtime/Composer;I)Lcom/mohamedrejeb/richeditor/model/ImageData; | ||
} | ||
|
13 changes: 13 additions & 0 deletions
13
richeditor-compose-coil3/api/richeditor-compose-coil3.klib.api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Klib ABI Dump | ||
// Targets: [iosArm64, iosSimulatorArm64, iosX64, js, wasmJs] | ||
// Rendering settings: | ||
// - Signature version: 2 | ||
// - Show manifest properties: true | ||
// - Show declarations: true | ||
|
||
// Library unique name: <com.mohamedrejeb.richeditor:richeditor-compose-coil3> | ||
final object com.mohamedrejeb.richeditor.coil3/Coil3ImageLoader : com.mohamedrejeb.richeditor.model/ImageLoader { // com.mohamedrejeb.richeditor.coil3/Coil3ImageLoader|null[0] | ||
final fun load(kotlin/Any, androidx.compose.runtime/Composer?, kotlin/Int): com.mohamedrejeb.richeditor.model/ImageData // com.mohamedrejeb.richeditor.coil3/Coil3ImageLoader.load|load(kotlin.Any;androidx.compose.runtime.Composer?;kotlin.Int){}[0] | ||
} | ||
|
||
final const val com.mohamedrejeb.richeditor.coil3/com_mohamedrejeb_richeditor_coil3_Coil3ImageLoader$stableprop // com.mohamedrejeb.richeditor.coil3/com_mohamedrejeb_richeditor_coil3_Coil3ImageLoader$stableprop|#static{}com_mohamedrejeb_richeditor_coil3_Coil3ImageLoader$stableprop[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl | ||
|
||
plugins { | ||
alias(libs.plugins.kotlinMultiplatform) | ||
alias(libs.plugins.composeMultiplatform) | ||
alias(libs.plugins.androidLibrary) | ||
alias(libs.plugins.bcv) | ||
id("module.publication") | ||
} | ||
|
||
kotlin { | ||
explicitApi() | ||
applyDefaultHierarchyTemplate() | ||
androidTarget { | ||
publishLibraryVariants("release") | ||
compilations.all { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
} | ||
} | ||
jvm("desktop") { | ||
jvmToolchain(11) | ||
} | ||
js(IR) { | ||
browser() | ||
} | ||
@OptIn(ExperimentalWasmDsl::class) | ||
wasmJs { | ||
browser { | ||
testTask { | ||
enabled = false | ||
} | ||
} | ||
} | ||
iosX64() | ||
iosArm64() | ||
iosSimulatorArm64() | ||
|
||
sourceSets.commonMain.dependencies { | ||
implementation(projects.richeditorCompose) | ||
|
||
implementation(compose.ui) | ||
implementation(compose.foundation) | ||
|
||
implementation(libs.coil.compose) | ||
} | ||
|
||
sourceSets.commonTest.dependencies { | ||
implementation(kotlin("test")) | ||
} | ||
} | ||
|
||
android { | ||
namespace = "com.mohamedrejeb.richeditor.compose.coil" | ||
compileSdk = libs.versions.android.compileSdk.get().toInt() | ||
|
||
defaultConfig { | ||
minSdk = libs.versions.android.minSdk.get().toInt() | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlin { | ||
jvmToolchain(8) | ||
} | ||
} | ||
|
||
apiValidation { | ||
@OptIn(kotlinx.validation.ExperimentalBCVApi::class) | ||
klib { | ||
enabled = true | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...compose-coil3/src/commonMain/kotlin/com/mohamedrejeb/richeditor/coil3/Coil3ImageLoader.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.mohamedrejeb.richeditor.coil3 | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.LaunchedEffect | ||
import coil3.compose.AsyncImagePainter | ||
import coil3.compose.rememberAsyncImagePainter | ||
import com.mohamedrejeb.richeditor.annotation.ExperimentalRichTextApi | ||
import com.mohamedrejeb.richeditor.model.ImageData | ||
import com.mohamedrejeb.richeditor.model.ImageLoader | ||
|
||
@OptIn(ExperimentalRichTextApi::class) | ||
public object Coil3ImageLoader: ImageLoader { | ||
|
||
@Composable | ||
override fun load(model: Any): ImageData { | ||
val painter = rememberAsyncImagePainter(model = model) | ||
|
||
return ImageData( | ||
painter = painter | ||
) | ||
} | ||
|
||
} |
Oops, something went wrong.