diff --git a/src/lang/std/sketch.ts b/src/lang/std/sketch.ts index f318d0648..34797f983 100644 --- a/src/lang/std/sketch.ts +++ b/src/lang/std/sketch.ts @@ -45,7 +45,7 @@ export function getCoordsFromPaths(skGroup: SketchGroup, index = 0): Coords2d { } else if (!currentPath) { return [0, 0] } - if (currentPath.type === 'toPoint') { + if (currentPath.type === 'topoint') { return [currentPath.to[0], currentPath.to[1]] } return [0, 0] diff --git a/src/wasm-lib/Cargo.lock b/src/wasm-lib/Cargo.lock index d0939d753..f42e6f24e 100644 --- a/src/wasm-lib/Cargo.lock +++ b/src/wasm-lib/Cargo.lock @@ -1883,7 +1883,7 @@ dependencies = [ "tokio", "tokio-tungstenite 0.20.1", "tower-lsp", - "ts-rs-json-value", + "ts-rs", "uuid", "wasm-bindgen", "wasm-bindgen-futures", @@ -4364,13 +4364,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] -name = "ts-rs-json-value" -version = "7.0.1" +name = "ts-rs" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7a6c8eccea9e885ef26336d58ef9ae48b22d7ae3e503422af1902240616d1f6" +checksum = "ee928abbcfd4d13e0a65a30c5e9904aad823d3053cbdc4327e4c7fa053140c6e" dependencies = [ - "schemars", - "serde_json", "thiserror", "ts-rs-macros", "uuid", @@ -4378,9 +4376,9 @@ dependencies = [ [[package]] name = "ts-rs-macros" -version = "7.0.0" +version = "7.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f41cc0aeb7a4a55730188e147d3795a7349b501f8334697fd37629b896cdc2" +checksum = "89d1f9819299b55836a08a7a6f7cfe3a6f405c03831c81b2e45f8a38b1b1531c" dependencies = [ "Inflector", "proc-macro2", diff --git a/src/wasm-lib/kcl/Cargo.toml b/src/wasm-lib/kcl/Cargo.toml index f9eaa002b..a63e3e421 100644 --- a/src/wasm-lib/kcl/Cargo.toml +++ b/src/wasm-lib/kcl/Cargo.toml @@ -29,7 +29,7 @@ schemars = { version = "0.8.16", features = ["impl_json_schema", "url", "uuid1"] serde = { version = "1.0.193", features = ["derive"] } serde_json = "1.0.108" thiserror = "1.0.50" -ts-rs = { version = "7", package = "ts-rs-json-value", features = ["serde-json-impl", "schemars-impl", "uuid-impl"] } +ts-rs = { version = "7", features = ["uuid-impl"] } uuid = { version = "1.6.1", features = ["v4", "js", "serde"] } winnow = "0.5.18" diff --git a/src/wasm-lib/kcl/src/docs.rs b/src/wasm-lib/kcl/src/docs.rs index cde2b860b..7cf6b1434 100644 --- a/src/wasm-lib/kcl/src/docs.rs +++ b/src/wasm-lib/kcl/src/docs.rs @@ -42,6 +42,7 @@ pub struct StdLibFnArg { /// The type of the argument. pub type_: String, /// The schema of the argument. + #[ts(type = "any")] pub schema: schemars::schema::Schema, /// If the argument is required. pub required: bool, diff --git a/src/wasm-lib/kcl/src/executor.rs b/src/wasm-lib/kcl/src/executor.rs index 27e071c67..2b3b976c8 100644 --- a/src/wasm-lib/kcl/src/executor.rs +++ b/src/wasm-lib/kcl/src/executor.rs @@ -287,6 +287,7 @@ impl DefaultPlanes { #[ts(export)] #[serde(tag = "type", rename_all = "camelCase")] pub struct UserVal { + #[ts(type = "any")] pub value: serde_json::Value, #[serde(rename = "__meta")] pub meta: Vec,