Merge branch 'beta/1.9.20' into dev
This commit is contained in:
commit
6144410d22
@ -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
|
||||||
|
|
||||||
@ -8,7 +7,7 @@ plugins {
|
|||||||
// id("org.jetbrains.kotlinx.kover") version "0.5.0"
|
// id("org.jetbrains.kotlinx.kover") version "0.5.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
val dataforgeVersion by extra("0.6.1")
|
val dataforgeVersion by extra("0.6.2")
|
||||||
val fxVersion by extra("11")
|
val fxVersion by extra("11")
|
||||||
|
|
||||||
allprojects {
|
allprojects {
|
||||||
@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@ plugins {
|
|||||||
id("space.kscience.gradle.mpp")
|
id("space.kscience.gradle.mpp")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
group = "demo"
|
||||||
|
|
||||||
kscience {
|
kscience {
|
||||||
jvm()
|
jvm()
|
||||||
js {
|
js {
|
||||||
|
@ -9,30 +9,38 @@ import react.Component
|
|||||||
import react.Props
|
import react.Props
|
||||||
import react.State
|
import react.State
|
||||||
|
|
||||||
external enum class DropEffects {
|
sealed external class DropEffects {
|
||||||
copy,
|
@JsName("copy")
|
||||||
move,
|
object Copy : DropEffects
|
||||||
link,
|
|
||||||
none
|
@JsName("move")
|
||||||
|
object Move : DropEffects
|
||||||
|
|
||||||
|
@JsName("link")
|
||||||
|
object Link : DropEffects
|
||||||
|
|
||||||
|
@JsName("none")
|
||||||
|
object None : DropEffects
|
||||||
}
|
}
|
||||||
|
|
||||||
external interface FileDropProps: Props {
|
external interface FileDropProps : Props {
|
||||||
var className: String?
|
var className: String?
|
||||||
var targetClassName: String?
|
var targetClassName: String?
|
||||||
var draggingOverFrameClassName: String?
|
var draggingOverFrameClassName: String?
|
||||||
var draggingOverTargetClassName: String?
|
var draggingOverTargetClassName: String?
|
||||||
|
|
||||||
// var frame?: Exclude<HTMLElementTagNameMap[keyof HTMLElementTagNameMap], HTMLElement> | HTMLDocument;
|
// var frame?: Exclude<HTMLElementTagNameMap[keyof HTMLElementTagNameMap], HTMLElement> | HTMLDocument;
|
||||||
var onFrameDragEnter: ((event: DragEvent) -> Unit)?
|
var onFrameDragEnter: ((event: DragEvent) -> Unit)?
|
||||||
var onFrameDragLeave: ((event: DragEvent) -> Unit)?
|
var onFrameDragLeave: ((event: DragEvent) -> Unit)?
|
||||||
var onFrameDrop: ((event: DragEvent) -> Unit)?
|
var onFrameDrop: ((event: DragEvent) -> Unit)?
|
||||||
// var onDragOver: ReactDragEventHandler<HTMLDivElement>?
|
|
||||||
|
// var onDragOver: ReactDragEventHandler<HTMLDivElement>?
|
||||||
// var onDragLeave: ReactDragEventHandler<HTMLDivElement>?
|
// var onDragLeave: ReactDragEventHandler<HTMLDivElement>?
|
||||||
var onDrop: ((files: FileList?, event: dynamic) -> Unit)?//event:DragEvent<HTMLDivElement>)
|
var onDrop: ((files: FileList?, event: dynamic) -> Unit)?//event:DragEvent<HTMLDivElement>)
|
||||||
var dropEffect: DropEffects?
|
var dropEffect: DropEffects?
|
||||||
}
|
}
|
||||||
|
|
||||||
external interface FileDropState: State {
|
external interface FileDropState : State {
|
||||||
var draggingOverFrame: Boolean
|
var draggingOverFrame: Boolean
|
||||||
var draggingOverTarget: Boolean
|
var draggingOverTarget: Boolean
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,6 @@ package space.kscience.visionforge.gdml.demo
|
|||||||
|
|
||||||
import drop.FileDrop
|
import drop.FileDrop
|
||||||
import kotlinx.css.*
|
import kotlinx.css.*
|
||||||
import kotlinx.css.properties.border
|
|
||||||
import org.w3c.files.FileList
|
import org.w3c.files.FileList
|
||||||
import react.RBuilder
|
import react.RBuilder
|
||||||
import styled.css
|
import styled.css
|
||||||
@ -13,7 +12,7 @@ import styled.styledDiv
|
|||||||
fun RBuilder.fileDrop(title: String, action: (files: FileList?) -> Unit) {
|
fun RBuilder.fileDrop(title: String, action: (files: FileList?) -> Unit) {
|
||||||
styledDiv {
|
styledDiv {
|
||||||
css {
|
css {
|
||||||
border(style = BorderStyle.dashed, width = 1.px, color = Color.orange)
|
border = Border(style = BorderStyle.dashed, width = 1.px, color = Color.orange)
|
||||||
flexGrow = 0.0
|
flexGrow = 0.0
|
||||||
alignContent = Align.center
|
alignContent = Align.center
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("space.kscience.gradle.js")
|
id("space.kscience.gradle.mpp")
|
||||||
}
|
}
|
||||||
|
|
||||||
kscience{
|
kscience {
|
||||||
useCoroutines()
|
useCoroutines()
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin{
|
kotlin {
|
||||||
explicitApi = null
|
explicitApi = null
|
||||||
js{
|
js {
|
||||||
useCommonJs()
|
useCommonJs()
|
||||||
browser {
|
browser {
|
||||||
binaries.executable()
|
binaries.executable()
|
||||||
commonWebpackConfig {
|
commonWebpackConfig {
|
||||||
cssSupport{
|
cssSupport {
|
||||||
enabled.set(false)
|
enabled.set(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -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)
|
||||||
implementation(projects.ui.ring)
|
}
|
||||||
|
jsMain {
|
||||||
|
implementation(projects.ui.ring)
|
||||||
|
}
|
||||||
}
|
}
|
@ -43,8 +43,8 @@ private class JsPlaygroundApp : Application {
|
|||||||
createRoot(element).render {
|
createRoot(element).render {
|
||||||
styledDiv {
|
styledDiv {
|
||||||
css {
|
css {
|
||||||
padding(0.pt)
|
padding = Padding(0.pt)
|
||||||
margin(0.pt)
|
margin = Margin(0.pt)
|
||||||
height = 100.vh
|
height = 100.vh
|
||||||
width = 100.vw
|
width = 100.vw
|
||||||
}
|
}
|
@ -1,5 +1,4 @@
|
|||||||
import kotlinx.css.*
|
import kotlinx.css.*
|
||||||
import kotlinx.css.properties.border
|
|
||||||
import kotlinx.dom.clear
|
import kotlinx.dom.clear
|
||||||
import kotlinx.html.dom.append
|
import kotlinx.html.dom.append
|
||||||
import org.intellij.markdown.flavours.commonmark.CommonMarkFlavourDescriptor
|
import org.intellij.markdown.flavours.commonmark.CommonMarkFlavourDescriptor
|
||||||
@ -45,10 +44,10 @@ val Markup = fc<MarkupProps>("Markup") { props ->
|
|||||||
css {
|
css {
|
||||||
width = 100.pct
|
width = 100.pct
|
||||||
height = 100.pct
|
height = 100.pct
|
||||||
border(2.pt, BorderStyle.solid, Color.blue)
|
border= Border(2.pt, BorderStyle.solid, Color.blue)
|
||||||
padding(left = 8.pt)
|
padding = Padding(left = 8.pt)
|
||||||
backgroundColor = Color.white
|
backgroundColor = Color.white
|
||||||
flex(1.0)
|
flex = Flex(1.0)
|
||||||
zIndex = 10000
|
zIndex = 10000
|
||||||
}
|
}
|
||||||
ref = elementRef
|
ref = elementRef
|
@ -1,5 +1,4 @@
|
|||||||
import kotlinx.css.*
|
import kotlinx.css.*
|
||||||
import kotlinx.css.properties.border
|
|
||||||
import org.w3c.dom.Element
|
import org.w3c.dom.Element
|
||||||
import org.w3c.dom.HTMLElement
|
import org.w3c.dom.HTMLElement
|
||||||
import react.*
|
import react.*
|
||||||
@ -30,8 +29,8 @@ val Plotly = fc<PlotlyProps>("Plotly") { props ->
|
|||||||
css {
|
css {
|
||||||
width = 100.pct
|
width = 100.pct
|
||||||
height = 100.pct
|
height = 100.pct
|
||||||
border(2.pt, BorderStyle.solid, Color.blue)
|
border = Border(2.pt, BorderStyle.solid, Color.blue)
|
||||||
flex(1.0)
|
flex = Flex(1.0)
|
||||||
}
|
}
|
||||||
ref = elementRef
|
ref = elementRef
|
||||||
}
|
}
|
@ -34,8 +34,8 @@ kscience {
|
|||||||
implementation("ch.qos.logback:logback-classic:1.2.11")
|
implementation("ch.qos.logback:logback-classic:1.2.11")
|
||||||
}
|
}
|
||||||
jsMain {
|
jsMain {
|
||||||
implementation(project(":ui:ring"))
|
implementation(projects.ui.ring)
|
||||||
implementation(project(":visionforge-threejs"))
|
implementation(projects.visionforgeThreejs)
|
||||||
//implementation(devNpm("webpack-bundle-analyzer", "4.4.0"))
|
//implementation(devNpm("webpack-bundle-analyzer", "4.4.0"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ kotlin {
|
|||||||
useCommonJs()
|
useCommonJs()
|
||||||
browser {
|
browser {
|
||||||
webpackTask {
|
webpackTask {
|
||||||
outputFileName = "js/visionforge-playground.js"
|
mainOutputFileName.set("js/visionforge-playground.js")
|
||||||
}
|
}
|
||||||
commonWebpackConfig {
|
commonWebpackConfig {
|
||||||
sourceMaps = true
|
sourceMaps = true
|
||||||
|
@ -14,6 +14,7 @@ import space.kscience.visionforge.html.ResourceLocation
|
|||||||
import space.kscience.visionforge.solid.*
|
import space.kscience.visionforge.solid.*
|
||||||
import java.util.zip.ZipInputStream
|
import java.util.zip.ZipInputStream
|
||||||
import kotlin.io.path.Path
|
import kotlin.io.path.Path
|
||||||
|
import kotlin.io.path.createDirectories
|
||||||
import kotlin.io.path.writeText
|
import kotlin.io.path.writeText
|
||||||
|
|
||||||
|
|
||||||
@ -25,6 +26,8 @@ private fun Meta.countTypes(): Sequence<String> = sequence {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
|
Path("data").createDirectories()
|
||||||
|
|
||||||
val string = ZipInputStream(TGeoManager::class.java.getResourceAsStream("/root/geometry_run_7-2076.zip")!!).use {
|
val string = ZipInputStream(TGeoManager::class.java.getResourceAsStream("/root/geometry_run_7-2076.zip")!!).use {
|
||||||
it.nextEntry
|
it.nextEntry
|
||||||
it.readAllBytes().decodeToString()
|
it.readAllBytes().decodeToString()
|
||||||
|
@ -6,5 +6,8 @@ kotlin.js.compiler=ir
|
|||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
org.gradle.jvmargs=-Xmx4G
|
org.gradle.jvmargs=-Xmx4G
|
||||||
|
|
||||||
toolsVersion=0.14.9-kotlin-1.8.20
|
org.jetbrains.compose.experimental.jscanvas.enabled=true
|
||||||
org.jetbrains.compose.experimental.jscanvas.enabled=true
|
|
||||||
|
toolsVersion=0.15.0-kotlin-1.9.20-RC
|
||||||
|
#kotlin.experimental.tryK2=true
|
||||||
|
#kscience.wasm.disabled=true
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -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.1.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
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
plugins {
|
plugins {
|
||||||
kotlin("js")
|
id("space.kscience.gradle.mpp")
|
||||||
id("space.kscience.gradle.js")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val dataforgeVersion: String by rootProject.extra
|
val dataforgeVersion: String by rootProject.extra
|
||||||
|
|
||||||
dependencies {
|
kscience{
|
||||||
api(project(":visionforge-solid"))
|
js()
|
||||||
api(project(":ui:react"))
|
jsMain{
|
||||||
implementation(npm("file-saver", "2.0.2"))
|
dependencies {
|
||||||
implementation(npm("bootstrap","4.6.0"))
|
api(project(":visionforge-solid"))
|
||||||
implementation(npm("jquery","3.5.1"))
|
api(project(":ui:react"))
|
||||||
implementation(npm("popper.js","1.16.1"))
|
implementation(npm("file-saver", "2.0.2"))
|
||||||
|
implementation(npm("bootstrap","4.6.0"))
|
||||||
|
implementation(npm("jquery","3.5.1"))
|
||||||
|
implementation(npm("popper.js","1.16.1"))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
package space.kscience.visionforge.bootstrap
|
package space.kscience.visionforge.bootstrap
|
||||||
|
|
||||||
public fun useBootstrap(){
|
public fun useBootstrap(){
|
||||||
kotlinext.js.require("bootstrap/dist/css/bootstrap.min.css")
|
kotlinext.js.require<dynamic>("bootstrap/dist/css/bootstrap.min.css")
|
||||||
kotlinext.js.require("bootstrap")
|
kotlinext.js.require<dynamic>("bootstrap")
|
||||||
}
|
}
|
||||||
|
|
||||||
//public inline fun TagConsumer<HTMLElement>.card(title: String, crossinline block: TagConsumer<HTMLElement>.() -> Unit) {
|
//public inline fun TagConsumer<HTMLElement>.card(title: String, crossinline block: TagConsumer<HTMLElement>.() -> Unit) {
|
@ -2,13 +2,9 @@ package space.kscience.visionforge.bootstrap
|
|||||||
|
|
||||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
import kotlinx.css.BorderStyle
|
import kotlinx.css.*
|
||||||
import kotlinx.css.Color
|
|
||||||
import kotlinx.css.padding
|
|
||||||
import kotlinx.css.properties.border
|
|
||||||
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
|
||||||
@ -29,7 +25,7 @@ private fun saveData(event: Event, fileName: String, mimeType: String = "text/pl
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
val fileSaver = kotlinext.js.require("file-saver")
|
val fileSaver = kotlinext.js.require<dynamic>("file-saver")
|
||||||
val blob = Blob(arrayOf(dataBuilder()), BlobPropertyBag("$mimeType;charset=utf-8"))
|
val blob = Blob(arrayOf(dataBuilder()), BlobPropertyBag("$mimeType;charset=utf-8"))
|
||||||
fileSaver.saveAs(blob, fileName)
|
fileSaver.saveAs(blob, fileName)
|
||||||
}
|
}
|
||||||
@ -53,8 +49,8 @@ public val CanvasControls: FC<CanvasControlsProps> = fc("CanvasControls") { prop
|
|||||||
flexColumn {
|
flexColumn {
|
||||||
flexRow {
|
flexRow {
|
||||||
css {
|
css {
|
||||||
border(1.px, BorderStyle.solid, Color.blue)
|
border = Border(1.px, BorderStyle.solid, Color.blue)
|
||||||
padding(4.px)
|
padding = Padding(4.px)
|
||||||
}
|
}
|
||||||
props.vision?.let { vision ->
|
props.vision?.let { vision ->
|
||||||
button {
|
button {
|
@ -1,7 +1,6 @@
|
|||||||
package space.kscience.visionforge.bootstrap
|
package space.kscience.visionforge.bootstrap
|
||||||
|
|
||||||
import kotlinx.css.*
|
import kotlinx.css.*
|
||||||
import kotlinx.css.properties.border
|
|
||||||
import react.FC
|
import react.FC
|
||||||
import react.PropsWithChildren
|
import react.PropsWithChildren
|
||||||
import react.RBuilder
|
import react.RBuilder
|
||||||
@ -33,13 +32,13 @@ public val ThreeControls: FC<ThreeControlsProps> = fc { props ->
|
|||||||
}
|
}
|
||||||
tab("Tree") {
|
tab("Tree") {
|
||||||
css {
|
css {
|
||||||
border(1.px, BorderStyle.solid, Color.lightGray)
|
border = Border(1.px, BorderStyle.solid, Color.lightGray)
|
||||||
padding(10.px)
|
padding = Padding(10.px)
|
||||||
}
|
}
|
||||||
h2 { +"Object tree" }
|
h2 { +"Object tree" }
|
||||||
styledDiv {
|
styledDiv {
|
||||||
css {
|
css {
|
||||||
flex(1.0, 1.0, FlexBasis.inherit)
|
flex = Flex(1.0, 1.0, FlexBasis.inherit)
|
||||||
}
|
}
|
||||||
props.vision?.let {
|
props.vision?.let {
|
||||||
visionTree(it, props.selected, props.onSelect)
|
visionTree(it, props.selected, props.onSelect)
|
@ -1,11 +1,16 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("space.kscience.gradle.js")
|
id("space.kscience.gradle.mpp")
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies{
|
kscience {
|
||||||
api(project(":visionforge-solid"))
|
js()
|
||||||
api("org.jetbrains.kotlin-wrappers:kotlin-styled")
|
jsMain {
|
||||||
api("org.jetbrains.kotlin-wrappers:kotlin-react-dom")
|
dependencies {
|
||||||
|
api(projects.visionforgeSolid)
|
||||||
|
api("org.jetbrains.kotlin-wrappers:kotlin-styled")
|
||||||
|
api("org.jetbrains.kotlin-wrappers:kotlin-react-dom")
|
||||||
// implementation(npm("react-select","4.3.0"))
|
// implementation(npm("react-select","4.3.0"))
|
||||||
implementation(project(":visionforge-threejs"))
|
api(projects.visionforgeThreejs)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -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
|
@ -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
|
@ -10,13 +10,16 @@ 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.*
|
import space.kscience.dataforge.meta.MutableMeta
|
||||||
|
import space.kscience.dataforge.meta.ObservableMutableMeta
|
||||||
import space.kscience.dataforge.meta.descriptors.MetaDescriptor
|
import space.kscience.dataforge.meta.descriptors.MetaDescriptor
|
||||||
import space.kscience.dataforge.meta.descriptors.ValueRequirement
|
import space.kscience.dataforge.meta.descriptors.ValueRequirement
|
||||||
import space.kscience.dataforge.meta.descriptors.get
|
import space.kscience.dataforge.meta.descriptors.get
|
||||||
|
import space.kscience.dataforge.meta.get
|
||||||
|
import space.kscience.dataforge.meta.remove
|
||||||
import space.kscience.dataforge.names.*
|
import space.kscience.dataforge.names.*
|
||||||
import space.kscience.visionforge.hidden
|
import space.kscience.visionforge.hidden
|
||||||
import styled.css
|
import styled.css
|
||||||
@ -148,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 {
|
||||||
@ -167,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
|
@ -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
|
@ -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 {
|
@ -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
|
@ -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 ->
|
@ -1,11 +1,11 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("space.kscience.gradle.js")
|
id("space.kscience.gradle.mpp")
|
||||||
}
|
}
|
||||||
|
|
||||||
val dataforgeVersion: String by rootProject.extra
|
val dataforgeVersion: String by rootProject.extra
|
||||||
|
|
||||||
kotlin{
|
kscience{
|
||||||
js(IR){
|
js{
|
||||||
useCommonJs()
|
useCommonJs()
|
||||||
browser {
|
browser {
|
||||||
commonWebpackConfig {
|
commonWebpackConfig {
|
||||||
@ -15,12 +15,11 @@ kotlin{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
jsMain{
|
||||||
|
api(projects.ui.react)
|
||||||
|
api("org.jetbrains.kotlin-wrappers:kotlin-ring-ui")
|
||||||
|
|
||||||
dependencies{
|
implementation(npm("core-js","3.12.1"))
|
||||||
api(project(":ui:react"))
|
implementation(npm("file-saver", "2.0.2"))
|
||||||
api("org.jetbrains.kotlin-wrappers:kotlin-ring-ui")
|
}
|
||||||
|
|
||||||
implementation(npm("core-js","3.12.1"))
|
|
||||||
implementation(npm("file-saver", "2.0.2"))
|
|
||||||
}
|
}
|
@ -130,7 +130,7 @@ public val ThreeCanvasWithControls: FC<ThreeCanvasWithControlsProps> = fc("Three
|
|||||||
css {
|
css {
|
||||||
height = 100.pct
|
height = 100.pct
|
||||||
minWidth = 600.px
|
minWidth = 600.px
|
||||||
flex(10.0, 1.0, FlexBasis("600px"))
|
flex = Flex(10.0, 1.0, FlexBasis("600px"))
|
||||||
position = Position.relative
|
position = Position.relative
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,11 +199,11 @@ public val ThreeCanvasWithControls: FC<ThreeCanvasWithControlsProps> = fc("Three
|
|||||||
}
|
}
|
||||||
flexColumn {
|
flexColumn {
|
||||||
css {
|
css {
|
||||||
padding(4.px)
|
padding = Padding(4.px)
|
||||||
minWidth = 400.px
|
minWidth = 400.px
|
||||||
height = 100.pct
|
height = 100.pct
|
||||||
overflowY = Overflow.auto
|
overflowY = Overflow.auto
|
||||||
flex(1.0, 10.0, FlexBasis("300px"))
|
flex = Flex(1.0, 10.0, FlexBasis("300px"))
|
||||||
}
|
}
|
||||||
ringThreeControls(options, solid, selected, onSelect, additionalTabs = props.additionalTabs)
|
ringThreeControls(options, solid, selected, onSelect, additionalTabs = props.additionalTabs)
|
||||||
}
|
}
|
@ -2,13 +2,9 @@ package space.kscience.visionforge.ring
|
|||||||
|
|
||||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||||
import kotlinx.coroutines.GlobalScope
|
import kotlinx.coroutines.GlobalScope
|
||||||
import kotlinx.css.BorderStyle
|
import kotlinx.css.*
|
||||||
import kotlinx.css.Color
|
|
||||||
import kotlinx.css.padding
|
|
||||||
import kotlinx.css.properties.border
|
|
||||||
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
|
||||||
@ -34,7 +30,7 @@ internal fun saveData(event: Event, fileName: String, mimeType: String = "text/p
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
val fileSaver = kotlinext.js.require("file-saver")
|
val fileSaver = kotlinext.js.require<dynamic>("file-saver")
|
||||||
val blob = Blob(arrayOf(dataBuilder()), BlobPropertyBag("$mimeType;charset=utf-8"))
|
val blob = Blob(arrayOf(dataBuilder()), BlobPropertyBag("$mimeType;charset=utf-8"))
|
||||||
fileSaver.saveAs(blob, fileName)
|
fileSaver.saveAs(blob, fileName)
|
||||||
}
|
}
|
||||||
@ -58,8 +54,8 @@ internal val CanvasControls: FC<CanvasControlsProps> = fc("CanvasControls") { pr
|
|||||||
flexColumn {
|
flexColumn {
|
||||||
flexRow {
|
flexRow {
|
||||||
css {
|
css {
|
||||||
border(1.px, BorderStyle.solid, Color.blue)
|
border = Border(1.px, BorderStyle.solid, Color.blue)
|
||||||
padding(4.px)
|
padding = Padding(4.px)
|
||||||
}
|
}
|
||||||
props.vision?.let { vision ->
|
props.vision?.let { vision ->
|
||||||
button {
|
button {
|
@ -9,7 +9,7 @@ kscience {
|
|||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
api(projects.visionforgeSolid)
|
api(projects.visionforgeSolid)
|
||||||
api("space.kscience:gdml:0.4.0")
|
api("space.kscience:gdml:0.5.0")
|
||||||
}
|
}
|
||||||
dependencies(jvmTest) {
|
dependencies(jvmTest) {
|
||||||
implementation(spclibs.logback.classic)
|
implementation(spclibs.logback.classic)
|
||||||
|
@ -2,7 +2,7 @@ plugins {
|
|||||||
id("space.kscience.gradle.mpp")
|
id("space.kscience.gradle.mpp")
|
||||||
}
|
}
|
||||||
|
|
||||||
val markdownVersion = "0.4.1"
|
val markdownVersion = "0.5.2"
|
||||||
|
|
||||||
kscience {
|
kscience {
|
||||||
jvm()
|
jvm()
|
||||||
|
@ -2,7 +2,7 @@ plugins {
|
|||||||
id("space.kscience.gradle.mpp")
|
id("space.kscience.gradle.mpp")
|
||||||
}
|
}
|
||||||
|
|
||||||
val plotlyVersion = "0.5.3"
|
val plotlyVersion = "0.6.0"
|
||||||
|
|
||||||
kscience {
|
kscience {
|
||||||
jvm()
|
jvm()
|
||||||
|
@ -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) {
|
||||||
|
@ -1,17 +1,23 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("space.kscience.gradle.js")
|
id("space.kscience.gradle.mpp")
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin{
|
kotlin{
|
||||||
explicitApi = org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode.Disabled
|
explicitApi = org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode.Disabled
|
||||||
|
}
|
||||||
|
|
||||||
|
kscience{
|
||||||
js{
|
js{
|
||||||
binaries.library()
|
binaries.library()
|
||||||
}
|
}
|
||||||
|
jsMain{
|
||||||
|
dependencies {
|
||||||
|
api(projects.visionforgeSolid)
|
||||||
|
implementation(npm("three", "0.143.0"))
|
||||||
|
implementation(npm("three-csg-ts", "3.1.10"))
|
||||||
|
implementation(npm("three.meshline","1.4.0"))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
|
||||||
api(projects.visionforgeSolid)
|
|
||||||
implementation(npm("three", "0.143.0"))
|
|
||||||
implementation(npm("three-csg-ts", "3.1.10"))
|
|
||||||
implementation(npm("three.meshline","1.4.0"))
|
|
||||||
}
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user