diff --git a/controls-vision/build.gradle.kts b/controls-vision/build.gradle.kts index 335bde2..3659986 100644 --- a/controls-vision/build.gradle.kts +++ b/controls-vision/build.gradle.kts @@ -10,8 +10,7 @@ description = """ val visionforgeVersion = "0.3.0-dev-10" kscience { - jvm() - js() + fullStack("js/controls-vision.js", development = true) useKtor() useContextReceivers() dependencies { @@ -19,6 +18,7 @@ kscience { api(projects.controlsConstructor) api("space.kscience:visionforge-plotly:$visionforgeVersion") api("space.kscience:visionforge-markdown:$visionforgeVersion") + api("space.kscience:visionforge-tables:$visionforgeVersion") } jvmMain{ diff --git a/controls-vision/src/commonMain/kotlin/space/kscience/controls/vision/plotExtensions.kt b/controls-vision/src/commonMain/kotlin/plotExtensions.kt similarity index 100% rename from controls-vision/src/commonMain/kotlin/space/kscience/controls/vision/plotExtensions.kt rename to controls-vision/src/commonMain/kotlin/plotExtensions.kt diff --git a/demo/constructor/src/jsMain/kotlin/constructorJs.kt b/controls-vision/src/jsMain/kotlin/client.kt similarity index 53% rename from demo/constructor/src/jsMain/kotlin/constructorJs.kt rename to controls-vision/src/jsMain/kotlin/client.kt index 27bbc28..a835f9a 100644 --- a/demo/constructor/src/jsMain/kotlin/constructorJs.kt +++ b/controls-vision/src/jsMain/kotlin/client.kt @@ -1,6 +1,11 @@ +package space.kscience.controls.vision + +import space.kscience.visionforge.markup.MarkupPlugin import space.kscience.visionforge.plotly.PlotlyPlugin import space.kscience.visionforge.runVisionClient public fun main(): Unit = runVisionClient { plugin(PlotlyPlugin) + plugin(MarkupPlugin) +// plugin(TableVisionJsPlugin) } \ No newline at end of file diff --git a/controls-vision/src/jvmMain/kotlin/space/kscience/controls/vision/dashboard.kt b/controls-vision/src/jvmMain/kotlin/dashboard.kt similarity index 96% rename from controls-vision/src/jvmMain/kotlin/space/kscience/controls/vision/dashboard.kt rename to controls-vision/src/jvmMain/kotlin/dashboard.kt index 2597e48..29c4740 100644 --- a/controls-vision/src/jvmMain/kotlin/space/kscience/controls/vision/dashboard.kt +++ b/controls-vision/src/jvmMain/kotlin/dashboard.kt @@ -33,7 +33,7 @@ public fun Context.showDashboard( visionPage( visionManager, - VisionPage.scriptHeader("js/constructor.js"), + VisionPage.scriptHeader("js/controls-vision.js"), configurationBuilder = configurationBuilder, visionFragment = visionFragment ) diff --git a/demo/constructor/build.gradle.kts b/demo/constructor/build.gradle.kts index daa4381..dec09b7 100644 --- a/demo/constructor/build.gradle.kts +++ b/demo/constructor/build.gradle.kts @@ -4,7 +4,9 @@ plugins { } kscience { - fullStack("js/constructor.js", jvmConfig = {withJava()}) + jvm{ + withJava() + } useKtor() useContextReceivers() dependencies { diff --git a/demo/constructor/src/jvmMain/kotlin/main.kt b/demo/constructor/src/jvmMain/kotlin/main.kt index 8fc1dac..7a88b7f 100644 --- a/demo/constructor/src/jvmMain/kotlin/main.kt +++ b/demo/constructor/src/jvmMain/kotlin/main.kt @@ -21,7 +21,6 @@ import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds import kotlin.time.DurationUnit -@Suppress("ExtractKtorModule") public fun main() { val context = Context { plugin(DeviceManager) @@ -73,12 +72,6 @@ public fun main() { } plot { -// plotBooleanState(context, state.atStartState) { -// name = "start" -// } -// plotBooleanState(context, state.atEndState) { -// name = "end" -// } plotDeviceProperty(device["start"], LimitSwitch.locked.name) { name = "start measured" mode = ScatterMode.markers