Migrate to com.vanniktech.maven.publish publish plugin, update gradle, publish to maven central.

This commit is contained in:
2025-04-06 15:13:38 +02:00
parent 9e08601bb7
commit ab5689133f
5 changed files with 44 additions and 30 deletions

View File

@@ -26,7 +26,7 @@ interface HtmlConsumer : TagConsumer<Element> {
fun FlowOrMetaDataOrPhrasingContent.currentElement(): Element =
currentElement ?: error("No current element defined!")
private fun Node.asElement() = this as? HTMLElement
private fun Node?.asElement() = this as? HTMLElement
class HtmlBuilder(
private val komponent: Komponent?,

View File

@@ -191,6 +191,7 @@ abstract class Komponent {
private var scheduledForUpdate = mutableSetOf<Komponent>()
private var interceptor: (Komponent, () -> Unit) -> Unit = { _, block -> block() }
var logUpdateEvent = false
var logRenderEvent = false
var logReplaceEvent = false
var enableAssertions = false
@@ -244,6 +245,9 @@ abstract class Komponent {
val memoizeHash = next.generateMemoizeHash()
if (next.memoizeChanged()) {
if (logUpdateEvent) {
console.log("Rendering", next)
}
next.onBeforeUpdate()
next.renderUpdate()
next.updateMemoizeHash()

View File

@@ -1,7 +1,6 @@
package nl.astraeus.komp
import kotlinx.browser.document
import kotlinx.html.DIV
import kotlinx.html.InputType
import kotlinx.html.classes
import kotlinx.html.div

View File

@@ -1,10 +1,8 @@
package nl.astraeus.komp
import org.w3c.dom.AddEventListenerOptions
import org.w3c.dom.events.Event
import org.w3c.dom.Element
import org.w3c.dom.HTMLInputElement
import org.w3c.dom.events.EventListener
import org.w3c.dom.events.Event
import org.w3c.dom.get
private fun Int.asSpaces(): String {