wip Kotlin 2.0
This commit is contained in:
parent
6ce1e68b86
commit
c499c3fc47
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ out/
|
||||
.gradle
|
||||
build/
|
||||
data/
|
||||
.kotlin/
|
||||
|
||||
!gradle-wrapper.jar
|
||||
|
||||
|
@ -8,6 +8,6 @@ org.gradle.jvmargs=-Xmx4G
|
||||
|
||||
org.jetbrains.compose.experimental.jscanvas.enabled=true
|
||||
|
||||
toolsVersion=0.15.2-kotlin-2.0.0-Beta2
|
||||
toolsVersion=0.15.2-kotlin-2.0.0-Beta3
|
||||
#kotlin.experimental.tryK2=true
|
||||
#kscience.wasm.disabled=true
|
||||
|
@ -373,7 +373,7 @@ private class GdmlLoader(val settings: GdmlLoaderOptions) {
|
||||
rootSolid.prototypes {
|
||||
templates.items.forEach { (token, item) ->
|
||||
item.parent = null
|
||||
setChild(token.asName(), item as? Solid)
|
||||
setChild(token.asName(), item)
|
||||
}
|
||||
}
|
||||
settings.styleCache.forEach {
|
||||
|
@ -19,8 +19,8 @@ import space.kscience.visionforge.markup.VisionOfMarkup.Companion.GFM_FORMAT
|
||||
|
||||
public actual class MarkupPlugin : VisionPlugin(), ElementVisionRenderer {
|
||||
public val visionClient: JsVisionClient by require(JsVisionClient)
|
||||
override val tag: PluginTag get() = Companion.tag
|
||||
override val visionSerializersModule: SerializersModule get() = markupSerializersModule
|
||||
actual override val tag: PluginTag get() = Companion.tag
|
||||
actual override val visionSerializersModule: SerializersModule get() = markupSerializersModule
|
||||
|
||||
override fun rateVision(vision: Vision): Int = when (vision) {
|
||||
is VisionOfMarkup -> ElementVisionRenderer.DEFAULT_RATING
|
||||
@ -51,9 +51,9 @@ public actual class MarkupPlugin : VisionPlugin(), ElementVisionRenderer {
|
||||
}
|
||||
|
||||
public actual companion object : PluginFactory<MarkupPlugin> {
|
||||
override val tag: PluginTag = PluginTag("vision.markup.js", PluginTag.DATAFORGE_GROUP)
|
||||
actual override val tag: PluginTag = PluginTag("vision.markup.js", PluginTag.DATAFORGE_GROUP)
|
||||
|
||||
override fun build(context: Context, meta: Meta): MarkupPlugin = MarkupPlugin()
|
||||
actual override fun build(context: Context, meta: Meta): MarkupPlugin = MarkupPlugin()
|
||||
|
||||
}
|
||||
}
|
@ -9,14 +9,14 @@ import space.kscience.dataforge.meta.Meta
|
||||
import space.kscience.visionforge.VisionPlugin
|
||||
|
||||
public actual class MarkupPlugin : VisionPlugin() {
|
||||
override val visionSerializersModule: SerializersModule get() = markupSerializersModule
|
||||
actual override val visionSerializersModule: SerializersModule get() = markupSerializersModule
|
||||
|
||||
override val tag: PluginTag get() = Companion.tag
|
||||
actual override val tag: PluginTag get() = Companion.tag
|
||||
|
||||
public actual companion object : PluginFactory<MarkupPlugin> {
|
||||
override val tag: PluginTag = PluginTag("vision.markup.jvm", PluginTag.DATAFORGE_GROUP)
|
||||
actual override val tag: PluginTag = PluginTag("vision.markup.jvm", PluginTag.DATAFORGE_GROUP)
|
||||
|
||||
override fun build(context: Context, meta: Meta): MarkupPlugin = MarkupPlugin()
|
||||
actual override fun build(context: Context, meta: Meta): MarkupPlugin = MarkupPlugin()
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -3,12 +3,23 @@ package space.kscience.visionforge.plotly
|
||||
import kotlinx.serialization.modules.SerializersModule
|
||||
import kotlinx.serialization.modules.polymorphic
|
||||
import kotlinx.serialization.modules.subclass
|
||||
import space.kscience.dataforge.context.Context
|
||||
import space.kscience.dataforge.context.PluginFactory
|
||||
import space.kscience.dataforge.context.PluginTag
|
||||
import space.kscience.dataforge.meta.Meta
|
||||
import space.kscience.visionforge.Vision
|
||||
import space.kscience.visionforge.VisionPlugin
|
||||
|
||||
public expect class PlotlyPlugin : VisionPlugin {
|
||||
public companion object : PluginFactory<PlotlyPlugin>
|
||||
|
||||
override val tag: PluginTag
|
||||
override val visionSerializersModule: SerializersModule
|
||||
|
||||
public companion object : PluginFactory<PlotlyPlugin>{
|
||||
override fun build(context: Context, meta: Meta): PlotlyPlugin
|
||||
|
||||
override val tag: PluginTag
|
||||
}
|
||||
}
|
||||
|
||||
internal val plotlySerializersModule = SerializersModule {
|
||||
|
@ -18,9 +18,9 @@ import space.kscience.visionforge.VisionPlugin
|
||||
public actual class PlotlyPlugin : VisionPlugin(), ElementVisionRenderer {
|
||||
public val visionClient: JsVisionClient by require(JsVisionClient)
|
||||
|
||||
override val tag: PluginTag get() = Companion.tag
|
||||
actual override val tag: PluginTag get() = Companion.tag
|
||||
|
||||
override val visionSerializersModule: SerializersModule get() = plotlySerializersModule
|
||||
actual override val visionSerializersModule: SerializersModule get() = plotlySerializersModule
|
||||
|
||||
override fun rateVision(vision: Vision): Int = when (vision) {
|
||||
is VisionOfPlotly -> ElementVisionRenderer.DEFAULT_RATING
|
||||
@ -39,9 +39,9 @@ public actual class PlotlyPlugin : VisionPlugin(), ElementVisionRenderer {
|
||||
}
|
||||
|
||||
public actual companion object : PluginFactory<PlotlyPlugin> {
|
||||
override val tag: PluginTag = PluginTag("vision.plotly.js", PluginTag.DATAFORGE_GROUP)
|
||||
actual override val tag: PluginTag = PluginTag("vision.plotly.js", PluginTag.DATAFORGE_GROUP)
|
||||
|
||||
override fun build(context: Context, meta: Meta): PlotlyPlugin = PlotlyPlugin()
|
||||
actual override fun build(context: Context, meta: Meta): PlotlyPlugin = PlotlyPlugin()
|
||||
|
||||
}
|
||||
}
|
@ -9,14 +9,14 @@ import space.kscience.visionforge.VisionPlugin
|
||||
|
||||
public actual class PlotlyPlugin : VisionPlugin() {
|
||||
|
||||
override val tag: PluginTag get() = Companion.tag
|
||||
actual override val tag: PluginTag get() = Companion.tag
|
||||
|
||||
override val visionSerializersModule: SerializersModule get() = plotlySerializersModule
|
||||
actual override val visionSerializersModule: SerializersModule get() = plotlySerializersModule
|
||||
|
||||
public actual companion object : PluginFactory<PlotlyPlugin> {
|
||||
override val tag: PluginTag = PluginTag("vision.plotly", PluginTag.DATAFORGE_GROUP)
|
||||
actual override val tag: PluginTag = PluginTag("vision.plotly", PluginTag.DATAFORGE_GROUP)
|
||||
|
||||
override fun build(context: Context, meta: Meta): PlotlyPlugin = PlotlyPlugin()
|
||||
actual override fun build(context: Context, meta: Meta): PlotlyPlugin = PlotlyPlugin()
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user