diff --git a/build.gradle.kts b/build.gradle.kts index 4ad95112..5c776dad 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ plugins { // kotlin("js") version "1.5.30" apply false } -val dataforgeVersion by extra("0.5.1") +val dataforgeVersion by extra("0.5.2-dev-2") val fxVersion by extra("11") allprojects { @@ -16,7 +16,7 @@ allprojects { } group = "space.kscience" - version = "0.2.0-dev-24" + version = "0.2.0-dev-25" } subprojects { diff --git a/demo/playground/src/jvmMain/kotlin/rootParser.kt b/demo/playground/src/jvmMain/kotlin/rootParser.kt index 80555bc5..afe8528f 100644 --- a/demo/playground/src/jvmMain/kotlin/rootParser.kt +++ b/demo/playground/src/jvmMain/kotlin/rootParser.kt @@ -40,7 +40,6 @@ fun main() { println(it) } - val solid = geo.toSolid() Paths.get("BM@N.vf.json").writeText(Solids.encodeToString(solid)) diff --git a/settings.gradle.kts b/settings.gradle.kts index a6f4db0d..4cdc6b82 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,6 +1,6 @@ pluginManagement { - val toolsVersion = "0.10.3" + val toolsVersion = "0.10.7" repositories { //mavenLocal() diff --git a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt b/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt index 7df93784..b20e2b0e 100644 --- a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt +++ b/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/outputConfig.kt @@ -10,8 +10,8 @@ import org.w3c.dom.events.Event import org.w3c.files.Blob import org.w3c.files.BlobPropertyBag import react.FunctionComponent +import react.Props import react.RBuilder -import react.RProps import react.dom.attrs import react.dom.button import react.functionComponent @@ -42,7 +42,7 @@ public fun RBuilder.canvasControls(canvasOptions: Canvas3DOptions, vision: Visio } } -public external interface CanvasControlsProps : RProps { +public external interface CanvasControlsProps : Props { public var canvasOptions: Canvas3DOptions public var vision: Vision? } @@ -54,7 +54,7 @@ public val CanvasControls: FunctionComponent = functionComp border(1.px, BorderStyle.solid, Color.blue) padding(4.px) } - props.vision?.let{ vision -> + props.vision?.let { vision -> button { +"Export" attrs { diff --git a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt b/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt index deacc025..deda16d7 100644 --- a/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt +++ b/ui/bootstrap/src/main/kotlin/space/kscience/visionforge/bootstrap/threeControls.kt @@ -3,8 +3,8 @@ package space.kscience.visionforge.bootstrap import kotlinx.css.* import kotlinx.css.properties.border import react.FunctionComponent +import react.PropsWithChildren import react.RBuilder -import react.RProps import react.dom.h2 import react.functionComponent import space.kscience.dataforge.names.Name @@ -16,7 +16,7 @@ import space.kscience.visionforge.solid.specifications.Canvas3DOptions import styled.css import styled.styledDiv -public external interface ThreeControlsProps : RProps { +public external interface ThreeControlsProps : PropsWithChildren { public var canvasOptions: Canvas3DOptions public var vision: Vision? public var selected: Name? diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/MetaViewer.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/MetaViewer.kt index ed51f566..7d41bde9 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/MetaViewer.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/MetaViewer.kt @@ -20,7 +20,7 @@ import styled.css import styled.styledDiv import styled.styledSpan -public external interface MetaViewerProps : RProps { +public external interface MetaViewerProps : Props { /** * Root meta */ diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/PropertyEditor.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/PropertyEditor.kt index ea643813..4264b77f 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/PropertyEditor.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/PropertyEditor.kt @@ -19,7 +19,7 @@ import styled.styledButton import styled.styledDiv import styled.styledSpan -public external interface PropertyEditorProps : RProps { +public external interface PropertyEditorProps : Props { /** * Root config object - always non-null diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt index b78ec7d9..319a867c 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/ThreeCanvasComponent.kt @@ -14,7 +14,7 @@ import space.kscience.visionforge.solid.three.ThreePlugin import styled.css import styled.styledDiv -public external interface ThreeCanvasProps : RProps { +public external interface ThreeCanvasProps : Props { public var context: Context public var options: Canvas3DOptions? public var solid: Solid? diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/VisionTree.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/VisionTree.kt index 5fa44bfd..539fa2ee 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/VisionTree.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/VisionTree.kt @@ -21,7 +21,7 @@ import styled.css import styled.styledDiv import styled.styledSpan -public external interface ObjectTreeProps : RProps { +public external interface ObjectTreeProps : Props { public var name: Name public var selected: Name? public var obj: Vision diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt index cd686498..1296d777 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt @@ -11,7 +11,7 @@ import org.w3c.dom.HTMLInputElement import org.w3c.dom.HTMLSelectElement import org.w3c.dom.events.Event import react.FunctionComponent -import react.RProps +import react.Props import react.dom.attrs import react.dom.option import react.functionComponent @@ -29,7 +29,7 @@ import styled.css import styled.styledInput import styled.styledSelect -public external interface ValueChooserProps : RProps { +public external interface ValueChooserProps : Props { public var descriptor: MetaDescriptor? public var meta: ObservableMutableMeta public var actual: Meta diff --git a/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt b/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt index 03420cba..5dd44099 100644 --- a/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt +++ b/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ThreeViewWithControls.kt @@ -24,7 +24,7 @@ import space.kscience.visionforge.solid.specifications.Canvas3DOptions import styled.css import styled.styledDiv -public external interface ThreeCanvasWithControlsProps : RProps { +public external interface ThreeCanvasWithControlsProps : Props { public var context: Context public var builderOfSolid: Deferred public var selected: Name? diff --git a/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt b/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt index 46543106..eed656e6 100644 --- a/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt +++ b/ui/ring/src/main/kotlin/space.kscience.visionforge.ring/ringThreeControls.kt @@ -10,8 +10,8 @@ import org.w3c.dom.events.Event import org.w3c.files.Blob import org.w3c.files.BlobPropertyBag import react.FunctionComponent +import react.Props import react.RBuilder -import react.RProps import react.dom.attrs import react.dom.button import react.functionComponent @@ -47,7 +47,7 @@ internal fun RBuilder.canvasControls(options: Canvas3DOptions, vision: Vision?): } } -internal external interface CanvasControlsProps : RProps { +internal external interface CanvasControlsProps : Props { public var options: Canvas3DOptions public var vision: Vision? } @@ -85,7 +85,7 @@ internal val CanvasControls: FunctionComponent = functionCo } -public external interface ThreeControlsProps : RProps { +public external interface ThreeControlsProps : Props { public var canvasOptions: Canvas3DOptions public var vision: Vision? public var selected: Name? diff --git a/visionforge-gdml/src/commonMain/kotlin/space/kscience/visionforge/gdml/gdmlLoader.kt b/visionforge-gdml/src/commonMain/kotlin/space/kscience/visionforge/gdml/gdmlLoader.kt index 2d3da074..d1b89c9e 100644 --- a/visionforge-gdml/src/commonMain/kotlin/space/kscience/visionforge/gdml/gdmlLoader.kt +++ b/visionforge-gdml/src/commonMain/kotlin/space/kscience/visionforge/gdml/gdmlLoader.kt @@ -339,6 +339,7 @@ private class GdmlLoader(val settings: GdmlLoaderOptions) { when (val vol: GdmlPlacement? = group.placement) { is GdmlPhysVolume -> addPhysicalVolume(root, vol) is GdmlDivisionVolume -> addDivisionVolume(root, vol) + else -> {} } } diff --git a/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/Composite.kt b/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/Composite.kt index ecbb4177..3c7773bc 100644 --- a/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/Composite.kt +++ b/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/Composite.kt @@ -65,7 +65,7 @@ public fun SolidGroup.smartComposite( val group = SolidGroup(builder) if (name == null && group.meta.isEmpty()) { //append directly to group if no properties are defined - group.children.forEach { (key, value) -> + group.children.forEach { (_, value) -> value.parent = null set(null, value) }