1.9.20-Beta

This commit is contained in:
Alexander Nozik 2023-09-16 14:05:19 +03:00
parent 20fc81305c
commit ba70af3a24
19 changed files with 42 additions and 51 deletions

View File

@ -1,5 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile
import space.kscience.gradle.isInDevelopment
import space.kscience.gradle.useApache2Licence import space.kscience.gradle.useApache2Licence
import space.kscience.gradle.useSPCTeam import space.kscience.gradle.useSPCTeam
@ -45,14 +44,7 @@ ksciencePublish {
useApache2Licence() useApache2Licence()
useSPCTeam() useSPCTeam()
} }
github(githubProject = "visionforge", githubOrg = "SciProgCentre") repository("spc","https://maven.sciprog.center/kscience")
space(
if (isInDevelopment) {
"https://maven.pkg.jetbrains.space/spc/p/sci/dev"
} else {
"https://maven.pkg.jetbrains.space/spc/p/sci/maven"
}
)
sonatype() sonatype()
} }

View File

@ -1,5 +1,5 @@
plugins { plugins {
id("space.kscience.gradle.js") id("space.kscience.gradle.mpp")
} }
kscience { kscience {
@ -21,11 +21,15 @@ kotlin{
} }
} }
kscience {
dependencies { dependencies {
implementation(projects.visionforge.visionforgeGdml) implementation(projects.visionforge.visionforgeGdml)
implementation(projects.visionforge.visionforgePlotly) implementation(projects.visionforge.visionforgePlotly)
implementation(projects.visionforge.visionforgeMarkdown) implementation(projects.visionforge.visionforgeMarkdown)
implementation(projects.visionforge.visionforgeThreejs) implementation(projects.visionforge.visionforgeThreejs)
}
jsMain {
implementation(projects.ui.ring) implementation(projects.ui.ring)
} }
}

View File

@ -8,6 +8,6 @@ org.gradle.jvmargs=-Xmx4G
org.jetbrains.compose.experimental.jscanvas.enabled=true org.jetbrains.compose.experimental.jscanvas.enabled=true
toolsVersion=0.14.9-kotlin-1.9.0 toolsVersion=0.15.0-kotlin-1.9.20-Beta
kotlin.experimental.tryK2=true #kotlin.experimental.tryK2=true
#kscience.wasm.disabled=true #kscience.wasm.disabled=true

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

View File

@ -8,7 +8,7 @@ import kotlinx.css.padding
import kotlinx.css.properties.border import kotlinx.css.properties.border
import kotlinx.css.px import kotlinx.css.px
import kotlinx.html.js.onClickFunction import kotlinx.html.js.onClickFunction
import kotlinx.html.org.w3c.dom.events.Event import org.w3c.dom.events.Event
import org.w3c.files.Blob import org.w3c.files.Blob
import org.w3c.files.BlobPropertyBag import org.w3c.files.BlobPropertyBag
import react.FC import react.FC

View File

@ -3,7 +3,7 @@ package space.kscience.visionforge.react
import kotlinx.css.Align import kotlinx.css.Align
import kotlinx.css.alignItems import kotlinx.css.alignItems
import kotlinx.html.js.onClickFunction import kotlinx.html.js.onClickFunction
import kotlinx.html.org.w3c.dom.events.Event import org.w3c.dom.events.Event
import react.* import react.*
import react.dom.a import react.dom.a
import react.dom.attrs import react.dom.attrs

View File

@ -1,10 +1,10 @@
package space.kscience.visionforge.react package space.kscience.visionforge.react
import kotlinx.html.js.onChangeFunction import kotlinx.html.js.onChangeFunction
import kotlinx.html.org.w3c.dom.events.Event
import org.w3c.dom.HTMLOptionElement import org.w3c.dom.HTMLOptionElement
import org.w3c.dom.HTMLSelectElement import org.w3c.dom.HTMLSelectElement
import org.w3c.dom.asList import org.w3c.dom.asList
import org.w3c.dom.events.Event
import react.FC import react.FC
import react.dom.attrs import react.dom.attrs
import react.dom.option import react.dom.option

View File

@ -10,7 +10,7 @@ import kotlinx.coroutines.launch
import kotlinx.css.* import kotlinx.css.*
import kotlinx.css.properties.TextDecoration import kotlinx.css.properties.TextDecoration
import kotlinx.html.js.onClickFunction import kotlinx.html.js.onClickFunction
import kotlinx.html.org.w3c.dom.events.Event import org.w3c.dom.events.Event
import react.* import react.*
import react.dom.attrs import react.dom.attrs
import space.kscience.dataforge.meta.MutableMeta import space.kscience.dataforge.meta.MutableMeta
@ -151,7 +151,7 @@ private fun RBuilder.propertyEditorItem(props: PropertyEditorProps) {
css { css {
//+TreeStyles.resizeableInput //+TreeStyles.resizeableInput
width = 160.px width = 160.px
margin(1.px, 5.px) margin = Margin(1.px, 5.px)
} }
ValueChooser { ValueChooser {
attrs { attrs {
@ -170,7 +170,7 @@ private fun RBuilder.propertyEditorItem(props: PropertyEditorProps) {
css { css {
width = 24.px width = 24.px
alignSelf = Align.stretch alignSelf = Align.stretch
margin(1.px, 5.px) margin = Margin(1.px, 5.px)
backgroundColor = Color.white backgroundColor = Color.white
borderStyle = BorderStyle.solid borderStyle = BorderStyle.solid
borderRadius = 2.px borderRadius = 2.px

View File

@ -4,8 +4,9 @@ import kotlinx.css.pct
import kotlinx.css.width import kotlinx.css.width
import kotlinx.html.InputType import kotlinx.html.InputType
import kotlinx.html.js.onChangeFunction import kotlinx.html.js.onChangeFunction
import kotlinx.html.org.w3c.dom.events.Event import kotlinx.html.js.onInputFunction
import org.w3c.dom.HTMLInputElement import org.w3c.dom.HTMLInputElement
import org.w3c.dom.events.Event
import react.FC import react.FC
import react.dom.attrs import react.dom.attrs
import react.fc import react.fc
@ -58,8 +59,8 @@ public val RangeValueChooser: FC<ValueChooserProps> = fc("RangeValueChooser") {
attrs { attrs {
disabled = rangeDisabled disabled = rangeDisabled
value = innerValue?.toString() ?: "" value = innerValue?.toString() ?: ""
onChangeFunction = handleChange // onChangeFunction = handleChange
consumer.onTagEvent(this, "input", handleChange) onInputFunction = handleChange
val minValue = props.descriptor?.attributes?.get("min").string val minValue = props.descriptor?.attributes?.get("min").string
minValue?.let { minValue?.let {
min = it min = it

View File

@ -52,10 +52,10 @@ public object TreeStyles : StyleSheet("treeStyles", true) {
} }
public val treeLabel:RuleSet by css { public val treeLabel:RuleSet by css {
border = "none" border = Border.none
padding(left = 4.pt, right = 4.pt, top = 0.pt, bottom = 0.pt) padding = Padding(left = 4.pt, right = 4.pt, top = 0.pt, bottom = 0.pt)
textAlign = TextAlign.left textAlign = TextAlign.left
flex(1.0) flex = Flex(1.0)
} }
public val treeLabelInactive: RuleSet by css { public val treeLabelInactive: RuleSet by css {

View File

@ -1,13 +1,10 @@
package space.kscience.visionforge.react package space.kscience.visionforge.react
import kotlinx.css.Color import kotlinx.css.*
import kotlinx.css.Cursor import kotlinx.css.properties.TextDecoration
import kotlinx.css.color
import kotlinx.css.cursor
import kotlinx.css.properties.TextDecorationLine import kotlinx.css.properties.TextDecorationLine
import kotlinx.css.properties.textDecoration
import kotlinx.html.js.onClickFunction import kotlinx.html.js.onClickFunction
import kotlinx.html.org.w3c.dom.events.Event import org.w3c.dom.events.Event
import react.* import react.*
import react.dom.attrs import react.dom.attrs
import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.Name
@ -37,7 +34,7 @@ private val TreeLabel = fc<ObjectTreeProps> { props ->
color = Color("#069") color = Color("#069")
cursor = Cursor.pointer cursor = Cursor.pointer
hover { hover {
textDecoration(TextDecorationLine.underline) textDecoration = TextDecoration(setOf(TextDecorationLine.underline))
} }
if (props.name == props.selected) { if (props.name == props.selected) {
+TreeStyles.treeLabelSelected +TreeStyles.treeLabelSelected

View File

@ -1,15 +1,12 @@
package space.kscience.visionforge.react package space.kscience.visionforge.react
import kotlinx.css.margin import kotlinx.css.*
import kotlinx.css.pct
import kotlinx.css.px
import kotlinx.css.width
import kotlinx.html.InputType import kotlinx.html.InputType
import kotlinx.html.js.onChangeFunction import kotlinx.html.js.onChangeFunction
import kotlinx.html.js.onKeyDownFunction import kotlinx.html.js.onKeyDownFunction
import kotlinx.html.org.w3c.dom.events.Event
import org.w3c.dom.HTMLInputElement import org.w3c.dom.HTMLInputElement
import org.w3c.dom.HTMLSelectElement import org.w3c.dom.HTMLSelectElement
import org.w3c.dom.events.Event
import react.FC import react.FC
import react.Props import react.Props
import react.dom.attrs import react.dom.attrs
@ -145,7 +142,7 @@ public val ColorValueChooser: FC<ValueChooserProps> = fc("ColorValueChooser") {
styledInput(type = InputType.color) { styledInput(type = InputType.color) {
css { css {
width = 100.pct width = 100.pct
margin(0.px) margin = Margin(0.px)
} }
attrs { attrs {
this.value = props.value?.let { value -> this.value = props.value?.let { value ->

View File

@ -8,7 +8,7 @@ import kotlinx.css.padding
import kotlinx.css.properties.border import kotlinx.css.properties.border
import kotlinx.css.px import kotlinx.css.px
import kotlinx.html.js.onClickFunction import kotlinx.html.js.onClickFunction
import kotlinx.html.org.w3c.dom.events.Event import org.w3c.dom.events.Event
import org.w3c.files.Blob import org.w3c.files.Blob
import org.w3c.files.BlobPropertyBag import org.w3c.files.BlobPropertyBag
import react.FC import react.FC

View File

@ -25,8 +25,8 @@ public class TableVisionJsPlugin : AbstractPlugin(), ElementVisionRenderer {
override fun attach(context: Context) { override fun attach(context: Context) {
super.attach(context) super.attach(context)
kotlinext.js.require("tabulator-tables/dist/css/tabulator.min.css") kotlinext.js.require<Any>("tabulator-tables/dist/css/tabulator.min.css")
kotlinext.js.require("tabulator-tables/src/js/modules/ResizeColumns/ResizeColumns.js") kotlinext.js.require<Any>("tabulator-tables/src/js/modules/ResizeColumns/ResizeColumns.js")
} }
override fun rateVision(vision: Vision): Int = when (vision) { override fun rateVision(vision: Vision): Int = when (vision) {