v. 1.0.7 upgrade to Kotlin 1.7.20
This commit is contained in:
@@ -1,12 +1,12 @@
|
|||||||
plugins {
|
plugins {
|
||||||
kotlin("multiplatform") version "1.6.10"
|
kotlin("multiplatform") version "1.7.20"
|
||||||
`maven-publish`
|
`maven-publish`
|
||||||
signing
|
signing
|
||||||
id("org.jetbrains.dokka") version "1.5.31"
|
id("org.jetbrains.dokka") version "1.5.31"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "nl.astraeus"
|
group = "nl.astraeus"
|
||||||
version = "1.0.7-SNAPSHOT"
|
version = "1.0.7"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
#Wed Mar 04 13:29:12 CET 2020
|
#Wed Mar 04 13:29:12 CET 2020
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -74,7 +74,10 @@ private fun ArrayList<ElementIndex>.push(element: Node) {
|
|||||||
|
|
||||||
private fun ArrayList<ElementIndex>.replace(new: Node) {
|
private fun ArrayList<ElementIndex>.replace(new: Node) {
|
||||||
if (this.currentElement() != null) {
|
if (this.currentElement() != null) {
|
||||||
this.currentElement()?.parentElement?.replaceChild(new, this.currentElement()!!)
|
this.currentElement()?.parentElement?.replaceChild(
|
||||||
|
new,
|
||||||
|
this.currentElement()!!
|
||||||
|
)
|
||||||
} else {
|
} else {
|
||||||
this.last().parent.appendChild(new)
|
this.last().parent.appendChild(new)
|
||||||
}
|
}
|
||||||
@@ -104,7 +107,9 @@ class HtmlBuilder(
|
|||||||
) {
|
) {
|
||||||
currentPosition.replace(komponent.element!!)
|
currentPosition.replace(komponent.element!!)
|
||||||
if (Komponent.logRenderEvent) {
|
if (Komponent.logRenderEvent) {
|
||||||
console.log("Skipped include $komponent, memoize hasn't changed")
|
console.log(
|
||||||
|
"Skipped include $komponent, memoize hasn't changed"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
komponent.create(
|
komponent.create(
|
||||||
@@ -140,7 +145,9 @@ class HtmlBuilder(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun onTagStart(tag: Tag) {
|
override fun onTagStart(tag: Tag) {
|
||||||
logReplace { "onTagStart, [${tag.tagName}, ${tag.namespace}], currentPosition: $currentPosition" }
|
logReplace {
|
||||||
|
"onTagStart, [${tag.tagName}, ${tag.namespace}], currentPosition: $currentPosition"
|
||||||
|
}
|
||||||
|
|
||||||
currentNode = currentPosition.currentElement()
|
currentNode = currentPosition.currentElement()
|
||||||
|
|
||||||
@@ -161,8 +168,12 @@ class HtmlBuilder(
|
|||||||
!currentNode?.asElement()?.namespaceURI.equals(tag.namespace, true)
|
!currentNode?.asElement()?.namespaceURI.equals(tag.namespace, true)
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
logReplace { "onTagStart, currentElement, namespace: ${currentNode?.asElement()?.namespaceURI} -> ${tag.namespace}" }
|
logReplace {
|
||||||
logReplace { "onTagStart, currentElement, replace: ${currentNode?.asElement()?.tagName} -> ${tag.tagName}" }
|
"onTagStart, currentElement, namespace: ${currentNode?.asElement()?.namespaceURI} -> ${tag.namespace}"
|
||||||
|
}
|
||||||
|
logReplace {
|
||||||
|
"onTagStart, currentElement, replace: ${currentNode?.asElement()?.tagName} -> ${tag.tagName}"
|
||||||
|
}
|
||||||
|
|
||||||
currentNode = if (tag.namespace != null) {
|
currentNode = if (tag.namespace != null) {
|
||||||
document.createElementNS(tag.namespace, tag.tagName)
|
document.createElementNS(tag.namespace, tag.tagName)
|
||||||
@@ -207,7 +218,11 @@ class HtmlBuilder(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onTagAttributeChange(tag: Tag, attribute: String, value: String?) {
|
override fun onTagAttributeChange(
|
||||||
|
tag: Tag,
|
||||||
|
attribute: String,
|
||||||
|
value: String?
|
||||||
|
) {
|
||||||
logReplace { "onTagAttributeChange, ${tag.tagName} [$attribute, $value]" }
|
logReplace { "onTagAttributeChange, ${tag.tagName} [$attribute, $value]" }
|
||||||
|
|
||||||
if (Komponent.enableAssertions) {
|
if (Komponent.enableAssertions) {
|
||||||
@@ -222,14 +237,18 @@ class HtmlBuilder(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onTagEvent(tag: Tag, event: String, value: (Event) -> Unit) {
|
override fun onTagEvent(
|
||||||
|
tag: Tag,
|
||||||
|
event: String,
|
||||||
|
value: (Event) -> Unit
|
||||||
|
) {
|
||||||
logReplace { "onTagEvent, ${tag.tagName} [$event, $value]" }
|
logReplace { "onTagEvent, ${tag.tagName} [$event, $value]" }
|
||||||
|
|
||||||
if (Komponent.enableAssertions) {
|
if (Komponent.enableAssertions) {
|
||||||
checkTag(tag)
|
checkTag(tag)
|
||||||
}
|
}
|
||||||
|
|
||||||
currentElement?.setKompEvent(event.lowercase(), value)
|
currentElement?.setKompEvent(event.toLowerCase(), value)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onTagEnd(tag: Tag) {
|
override fun onTagEnd(tag: Tag) {
|
||||||
@@ -347,7 +366,10 @@ class HtmlBuilder(
|
|||||||
//logReplace"onTagContentUnsafe, namespace: [$namespace]")
|
//logReplace"onTagContentUnsafe, namespace: [$namespace]")
|
||||||
|
|
||||||
if (Komponent.unsafeMode == UnsafeMode.UNSAFE_ALLOWED ||
|
if (Komponent.unsafeMode == UnsafeMode.UNSAFE_ALLOWED ||
|
||||||
(Komponent.unsafeMode == UnsafeMode.UNSAFE_SVG_ONLY && namespace == "http://www.w3.org/2000/svg")
|
(
|
||||||
|
Komponent.unsafeMode == UnsafeMode.UNSAFE_SVG_ONLY &&
|
||||||
|
namespace == "http://www.w3.org/2000/svg"
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
if (currentElement?.innerHTML != textContent) {
|
if (currentElement?.innerHTML != textContent) {
|
||||||
currentElement?.innerHTML += textContent
|
currentElement?.innerHTML += textContent
|
||||||
@@ -413,7 +435,9 @@ class HtmlBuilder(
|
|||||||
|
|
||||||
override fun finalize(): Element {
|
override fun finalize(): Element {
|
||||||
//logReplace"finalize, currentPosition: $currentPosition")
|
//logReplace"finalize, currentPosition: $currentPosition")
|
||||||
return root ?: throw IllegalStateException("We can't finalize as there was no tags")
|
return root ?: throw IllegalStateException(
|
||||||
|
"We can't finalize as there was no tags"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|||||||
Reference in New Issue
Block a user