Skip to content

Commit 7069141

Browse files
committed
fix(web): unblock compileWebMainKotlinMetadata for publishing
- Add kotlinx-browser to webMain so org.khronos.webgl.* typed arrays resolve in the shared metadata compilation (not just in the per-target jsMain/wasmJsMain compilations). - Move ClipEntryText.actual back to jsMain + wasmJsMain — Compose UI's ClipEntry.withPlainText is exposed only by the per-target Compose klibs, not by the common-web view that webMain metadata sees.
1 parent a4d21bc commit 7069141

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

pdfium/build.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ kotlin {
143143
}
144144
androidMain.dependencies { implementation(libs.kotlinx.coroutinesAndroid) }
145145
jvmMain.dependencies { implementation(libs.kotlinx.coroutinesSwing) }
146+
// kotlinx-browser exposes the org.khronos.webgl.* typed arrays as a shared API
147+
// across js + wasmJs, so they resolve in the webMain metadata compilation.
148+
webMain.dependencies { implementation(libs.kotlinx.browser) }
146149
}
147150
}
148151

pdfium/src/webMain/kotlin/dev/nucleusframework/pdfium/ClipEntryText.kt renamed to pdfium/src/jsMain/kotlin/dev/nucleusframework/pdfium/ClipEntryText.js.kt

File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package dev.nucleusframework.pdfium
2+
3+
import androidx.compose.ui.platform.ClipEntry
4+
5+
actual fun textClipEntry(text: String): ClipEntry =
6+
ClipEntry.withPlainText(text)

0 commit comments

Comments
 (0)