diff --git a/Cargo.lock b/Cargo.lock index e9471d9..daf336e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -101,7 +101,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -138,7 +138,7 @@ dependencies = [ "actix-utils", "futures-core", "futures-util", - "mio 0.8.11", + "mio", "socket2", "tokio", "tracing", @@ -233,7 +233,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -273,29 +273,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "alacritty_terminal" -version = "0.24.1-dev" -source = "git+https://github.com/alacritty/alacritty?rev=cacdb5bb3b72bad2c729227537979d95af75978f#cacdb5bb3b72bad2c729227537979d95af75978f" -dependencies = [ - "base64 0.22.1", - "bitflags 2.5.0", - "home", - "libc", - "log", - "miow", - "parking_lot 0.12.2", - "piper", - "polling", - "regex-automata", - "rustix-openpty", - "serde", - "signal-hook", - "unicode-width", - "vte", - "windows-sys 0.52.0", -] - [[package]] name = "alloc-no-stdlib" version = "2.0.4" @@ -352,22 +329,18 @@ checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110" [[package]] name = "ashpd" -version = "0.10.2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9c39d707614dbcc6bed00015539f488d8e3fe3e66ed60961efc0c90f4b380b3" +checksum = "dd884d7c72877a94102c3715f3b1cd09ff4fac28221add3e57cfbe25c236d093" dependencies = [ "enumflags2", "futures-channel", "futures-util", "rand 0.8.5", - "raw-window-handle", "serde", "serde_repr", "tokio", "url", - "wayland-backend", - "wayland-client", - "wayland-protocols", "zbus", ] @@ -389,12 +362,74 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-channel" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" +dependencies = [ + "concurrent-queue", + "event-listener-strategy", + "futures-core", + "pin-project-lite", +] + +[[package]] +name = "async-io" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6baa8f0178795da0e71bc42c9e5d13261aac7ee549853162e66a241ba17964" +dependencies = [ + "async-lock", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-lock" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" +dependencies = [ + "event-listener", + "event-listener-strategy", + "pin-project-lite", +] + [[package]] name = "async-once-cell" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9338790e78aa95a416786ec8389546c4b6a1dfc3dc36071ed9518a9413a542eb" +[[package]] +name = "async-process" +version = "2.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7eda79bbd84e29c2b308d1dc099d7de8dcc7035e48f4bf5dc4a531a44ff5e2a" +dependencies = [ + "async-channel", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener", + "futures-lite", + "rustix", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "async-recursion" version = "1.1.1" @@ -403,9 +438,33 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] +[[package]] +name = "async-signal" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "329972aa325176e89114919f2a80fdae4f4c040f66a370b1a1159c6c0f94e7aa" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix", + "signal-hook-registry", + "slab", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + [[package]] name = "async-trait" version = "0.1.80" @@ -414,7 +473,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -517,12 +576,16 @@ dependencies = [ ] [[package]] -name = "block2" -version = "0.5.1" +name = "blocking" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +checksum = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" dependencies = [ - "objc2", + "async-channel", + "async-task", + "futures-io", + "futures-lite", + "piper", ] [[package]] @@ -533,9 +596,9 @@ checksum = "df42cf395fb3d99add1640c6391e32ec2d89ff0201c80a35aaa5ca81dde5fdc0" [[package]] name = "brotli" -version = "7.0.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" +checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -544,9 +607,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.1" +version = "2.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" +checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -605,7 +668,7 @@ dependencies = [ "glib", "libc", "once_cell", - "thiserror 1.0.60", + "thiserror", ] [[package]] @@ -725,7 +788,7 @@ dependencies = [ "semver", "serde", "serde_json", - "thiserror 1.0.60", + "thiserror", ] [[package]] @@ -833,25 +896,9 @@ checksum = "f6140449f97a6e97f9511815c5632d84c8aacf8ac271ad77c559218161a1373c" dependencies = [ "bitflags 1.3.2", "block", - "cocoa-foundation 0.1.2", - "core-foundation 0.9.4", - "core-graphics 0.23.2", - "foreign-types 0.5.0", - "libc", - "objc", -] - -[[package]] -name = "cocoa" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2" -dependencies = [ - "bitflags 2.5.0", - "block", - "cocoa-foundation 0.2.0", - "core-foundation 0.10.0", - "core-graphics 0.24.0", + "cocoa-foundation", + "core-foundation", + "core-graphics", "foreign-types 0.5.0", "libc", "objc", @@ -865,22 +912,8 @@ checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" dependencies = [ "bitflags 1.3.2", "block", - "core-foundation 0.9.4", - "core-graphics-types 0.1.3", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d" -dependencies = [ - "bitflags 2.5.0", - "block", - "core-foundation 0.10.0", - "core-graphics-types 0.2.0", + "core-foundation", + "core-graphics-types", "libc", "objc", ] @@ -938,16 +971,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" -[[package]] -name = "cookie" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" -dependencies = [ - "time", - "version_check", -] - [[package]] name = "core-foundation" version = "0.9.4" @@ -958,21 +981,11 @@ dependencies = [ "libc", ] -[[package]] -name = "core-foundation" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "core-foundation-sys" -version = "0.8.7" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics" @@ -981,21 +994,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" dependencies = [ "bitflags 1.3.2", - "core-foundation 0.9.4", - "core-graphics-types 0.1.3", - "foreign-types 0.5.0", - "libc", -] - -[[package]] -name = "core-graphics" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa95a34622365fa5bbf40b20b75dba8dfa8c94c734aea8ac9a5ca38af14316f1" -dependencies = [ - "bitflags 2.5.0", - "core-foundation 0.10.0", - "core-graphics-types 0.2.0", + "core-foundation", + "core-graphics-types", "foreign-types 0.5.0", "libc", ] @@ -1007,18 +1007,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" dependencies = [ "bitflags 1.3.2", - "core-foundation 0.9.4", - "libc", -] - -[[package]] -name = "core-graphics-types" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" -dependencies = [ - "bitflags 2.5.0", - "core-foundation 0.10.0", + "core-foundation", "libc", ] @@ -1250,7 +1239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -1260,15 +1249,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edb49164822f3ee45b17acd4a208cfc1251410cf0cad9a833234c9890774dd9f" dependencies = [ "quote", - "syn 2.0.90", + "syn 2.0.61", ] -[[package]] -name = "cursor-icon" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" - [[package]] name = "darling" version = "0.20.8" @@ -1290,7 +1273,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -1301,7 +1284,7 @@ checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" dependencies = [ "darling_core", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -1323,6 +1306,17 @@ dependencies = [ "serde", ] +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -1374,6 +1368,16 @@ dependencies = [ "dirs-sys 0.4.1", ] +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + [[package]] name = "dirs-sys" version = "0.3.7" @@ -1449,7 +1453,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -1471,12 +1475,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "downcast-rs" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" - [[package]] name = "dpi" version = "0.1.1" @@ -1522,7 +1520,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -1595,7 +1593,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -1616,7 +1614,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -1646,16 +1644,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "erased-serde" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24e2389d65ab4fab27dc2a5de7b191e1f6617d1f1c8855c0dc569c94a4cbb18d" -dependencies = [ - "serde", - "typeid", -] - [[package]] name = "errno" version = "0.3.9" @@ -1703,7 +1691,6 @@ checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" name = "fastwave" version = "0.1.0" dependencies = [ - "alacritty_terminal", "futures", "once_cell", "reqwest", @@ -1714,7 +1701,6 @@ dependencies = [ "tauri-build", "tauri-plugin-dialog", "tauri-plugin-window-state", - "tokio", "wasmtime", "wasmtime-wasi", "wellen", @@ -1793,7 +1779,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -1823,7 +1809,6 @@ version = "0.1.0" dependencies = [ "gloo-file", "shared", - "unicode-segmentation", "wasm-bindgen-test", "web-sys", "wellen", @@ -1849,9 +1834,9 @@ checksum = "25dd6d296401ddf3c26e65a5543a1551b9e7e7f802c464444a1d7b9c0ccc4d9b" dependencies = [ "flate2", "lz4_flex", - "num_enum", + "num_enum 0.7.2", "tempfile", - "thiserror 1.0.60", + "thiserror", ] [[package]] @@ -1918,6 +1903,19 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +[[package]] +name = "futures-lite" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.30" @@ -1926,7 +1924,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -2115,6 +2113,19 @@ dependencies = [ "x11", ] +[[package]] +name = "generator" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" +dependencies = [ + "cc", + "libc", + "log", + "rustversion", + "windows 0.48.0", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -2133,7 +2144,7 @@ checksum = "913dce4c5f06c2ea40fc178c06f777ac89fc6b1383e90c254fafb1abe4ba3c82" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", "uuid", ] @@ -2168,7 +2179,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" dependencies = [ "fallible-iterator", - "indexmap 2.7.0", + "indexmap 2.2.6", "stable_deref_trait", ] @@ -2188,7 +2199,7 @@ dependencies = [ "once_cell", "pin-project-lite", "smallvec 1.13.2", - "thiserror 1.0.60", + "thiserror", ] [[package]] @@ -2224,7 +2235,7 @@ dependencies = [ "memchr", "once_cell", "smallvec 1.13.2", - "thiserror 1.0.60", + "thiserror", ] [[package]] @@ -2238,7 +2249,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -2350,7 +2361,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -2365,7 +2376,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.7.0", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -2384,7 +2395,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.7.0", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -2416,12 +2427,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hashbrown" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" - [[package]] name = "heck" version = "0.4.1" @@ -2440,27 +2445,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" -[[package]] -name = "hermit-abi" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" - [[package]] name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "home" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" -dependencies = [ - "windows-sys 0.59.0", -] - [[package]] name = "hsluv" version = "0.1.0" @@ -2709,20 +2699,20 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.7.0" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.15.2", + "hashbrown 0.14.5", "serde", ] [[package]] name = "infer" -version = "0.16.0" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc150e5ce2330295b8616ce0e3f53250e53af31759a9dbedad1621ba29151847" +checksum = "cb33622da908807a06f9513c19b3c1ad50fab3e4137d82a78107d502075aa199" dependencies = [ "cfb", ] @@ -2764,7 +2754,7 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi", "libc", "windows-sys 0.52.0", ] @@ -2844,7 +2834,7 @@ dependencies = [ "combine", "jni-sys", "log", - "thiserror 1.0.60", + "thiserror", "walkdir", "windows-sys 0.45.0", ] @@ -2875,24 +2865,13 @@ dependencies = [ [[package]] name = "json-patch" -version = "3.0.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08" -dependencies = [ - "jsonptr", - "serde", - "serde_json", - "thiserror 1.0.60", -] - -[[package]] -name = "jsonptr" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70" +checksum = "ec9ad60d674508f3ca8f380a928cfe7b096bc729c4e2dbfe3852bc45da3ab30b" dependencies = [ "serde", "serde_json", + "thiserror", ] [[package]] @@ -2971,9 +2950,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.167" +version = "0.2.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" +checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" [[package]] name = "libloading" @@ -2992,7 +2971,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -3042,7 +3021,7 @@ checksum = "612ed4ea9ce5acfb5d26339302528a5e1e59dfed95e9e11af3c083236ff1d15d" dependencies = [ "libc", "neli", - "thiserror 1.0.60", + "thiserror", "windows-sys 0.48.0", ] @@ -3071,6 +3050,21 @@ dependencies = [ "serde", ] +[[package]] +name = "loom" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "serde", + "serde_json", + "tracing", + "tracing-subscriber", +] + [[package]] name = "lz4_flex" version = "0.11.3" @@ -3118,6 +3112,15 @@ dependencies = [ "tendril", ] +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + [[package]] name = "matches" version = "0.1.10" @@ -3207,26 +3210,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "mio" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" -dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", -] - -[[package]] -name = "miow" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "359f76430b20a79f9e20e115b3428614e654f04fab314482fc0fda0ebd3c6044" -dependencies = [ - "windows-sys 0.48.0", -] - [[package]] name = "moon" version = "0.1.0" @@ -3292,22 +3275,21 @@ dependencies = [ [[package]] name = "muda" -version = "0.15.3" +version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdae9c00e61cc0579bcac625e8ad22104c60548a025bfc972dc83868a28e1484" +checksum = "86b959f97c97044e4c96e32e1db292a7d594449546a3c6b77ae613dc3a5b5145" dependencies = [ + "cocoa", "crossbeam-channel", "dpi", "gtk", "keyboard-types", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc", "once_cell", "png", "serde", - "thiserror 1.0.60", - "windows-sys 0.59.0", + "thiserror", + "windows-sys 0.52.0", ] [[package]] @@ -3329,17 +3311,16 @@ dependencies = [ [[package]] name = "ndk" -version = "0.9.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" dependencies = [ - "bitflags 2.5.0", + "bitflags 1.3.2", "jni-sys", - "log", "ndk-sys", - "num_enum", - "raw-window-handle", - "thiserror 1.0.60", + "num_enum 0.5.11", + "raw-window-handle 0.5.2", + "thiserror", ] [[package]] @@ -3350,9 +3331,9 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.6.0+11769913" +version = "0.4.1+23.1.7779620" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +checksum = "3cf2aae958bd232cac5069850591667ad422d263686d75b52a065f9badeee5a3" dependencies = [ "jni-sys", ] @@ -3390,13 +3371,12 @@ checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" [[package]] name = "nix" -version = "0.29.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" +checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" dependencies = [ "bitflags 2.5.0", "cfg-if", - "cfg_aliases", "libc", "memoffset", ] @@ -3407,6 +3387,16 @@ version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + [[package]] name = "num-conv" version = "0.1.0" @@ -3422,13 +3412,44 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" +dependencies = [ + "num_enum_derive 0.5.11", +] + [[package]] name = "num_enum" version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" dependencies = [ - "num_enum_derive", + "num_enum_derive 0.7.2", +] + +[[package]] +name = "num_enum_derive" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] @@ -3440,7 +3461,7 @@ dependencies = [ "proc-macro-crate 2.0.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -3450,225 +3471,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ "malloc_buf", + "objc_exception", ] [[package]] -name = "objc-sys" -version = "0.3.5" +name = "objc-foundation" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" +checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" +dependencies = [ + "block", + "objc", + "objc_id", +] + +[[package]] +name = "objc_exception" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" dependencies = [ "cc", ] [[package]] -name = "objc2" -version = "0.5.2" +name = "objc_id" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" dependencies = [ - "objc-sys", - "objc2-encode", -] - -[[package]] -name = "objc2-app-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" -dependencies = [ - "bitflags 2.5.0", - "block2", - "libc", - "objc2", - "objc2-core-data", - "objc2-core-image", - "objc2-foundation", - "objc2-quartz-core", -] - -[[package]] -name = "objc2-cloud-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" -dependencies = [ - "bitflags 2.5.0", - "block2", - "objc2", - "objc2-core-location", - "objc2-foundation", -] - -[[package]] -name = "objc2-contacts" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889" -dependencies = [ - "block2", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-data" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" -dependencies = [ - "bitflags 2.5.0", - "block2", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-core-image" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" -dependencies = [ - "block2", - "objc2", - "objc2-foundation", - "objc2-metal", -] - -[[package]] -name = "objc2-core-location" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781" -dependencies = [ - "block2", - "objc2", - "objc2-contacts", - "objc2-foundation", -] - -[[package]] -name = "objc2-encode" -version = "4.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" - -[[package]] -name = "objc2-foundation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" -dependencies = [ - "bitflags 2.5.0", - "block2", - "dispatch", - "libc", - "objc2", -] - -[[package]] -name = "objc2-link-presentation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398" -dependencies = [ - "block2", - "objc2", - "objc2-app-kit", - "objc2-foundation", -] - -[[package]] -name = "objc2-metal" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" -dependencies = [ - "bitflags 2.5.0", - "block2", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-quartz-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" -dependencies = [ - "bitflags 2.5.0", - "block2", - "objc2", - "objc2-foundation", - "objc2-metal", -] - -[[package]] -name = "objc2-symbols" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc" -dependencies = [ - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-ui-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" -dependencies = [ - "bitflags 2.5.0", - "block2", - "objc2", - "objc2-cloud-kit", - "objc2-core-data", - "objc2-core-image", - "objc2-core-location", - "objc2-foundation", - "objc2-link-presentation", - "objc2-quartz-core", - "objc2-symbols", - "objc2-uniform-type-identifiers", - "objc2-user-notifications", -] - -[[package]] -name = "objc2-uniform-type-identifiers" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe" -dependencies = [ - "block2", - "objc2", - "objc2-foundation", -] - -[[package]] -name = "objc2-user-notifications" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" -dependencies = [ - "bitflags 2.5.0", - "block2", - "objc2", - "objc2-core-location", - "objc2-foundation", -] - -[[package]] -name = "objc2-web-kit" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68bc69301064cebefc6c4c90ce9cba69225239e4b8ff99d445a2b5563797da65" -dependencies = [ - "bitflags 2.5.0", - "block2", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc", ] [[package]] @@ -3688,7 +3520,7 @@ checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ "crc32fast", "hashbrown 0.14.5", - "indexmap 2.7.0", + "indexmap 2.2.6", "memchr", ] @@ -3721,7 +3553,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -3758,6 +3590,12 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + [[package]] name = "owning_ref" version = "0.3.3" @@ -3959,7 +3797,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -4006,7 +3844,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -4023,9 +3861,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "piper" -version = "0.2.4" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" +checksum = "ae1d5c74c9876f070d3e8fd503d748c7d974c3e48da8f41350fa5222ef9b4391" dependencies = [ "atomic-waker", "fastrand", @@ -4045,9 +3883,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9d34169e64b3c7a80c8621a48adaf44e0cf62c78a9b25dd9dd35f1881a17cf9" dependencies = [ "base64 0.21.7", - "indexmap 2.7.0", + "indexmap 2.2.6", "line-wrap", - "quick-xml 0.31.0", + "quick-xml", "serde", "time", ] @@ -4067,17 +3905,17 @@ dependencies = [ [[package]] name = "polling" -version = "3.7.4" +version = "3.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f" +checksum = "5e6a007746f34ed64099e88783b0ae369eaa3da6392868ba262e2af9b8fbaea1" dependencies = [ "cfg-if", "concurrent-queue", - "hermit-abi 0.4.0", + "hermit-abi", "pin-project-lite", "rustix", "tracing", - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -4128,15 +3966,6 @@ dependencies = [ "toml_edit 0.20.2", ] -[[package]] -name = "proc-macro-crate" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" -dependencies = [ - "toml_edit 0.22.22", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -4169,9 +3998,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" dependencies = [ "unicode-ident", ] @@ -4203,15 +4032,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "quick-xml" -version = "0.36.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" -dependencies = [ - "memchr", -] - [[package]] name = "quote" version = "1.0.36" @@ -4330,6 +4150,12 @@ dependencies = [ "rand_core 0.5.1", ] +[[package]] +name = "raw-window-handle" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" + [[package]] name = "raw-window-handle" version = "0.6.1" @@ -4382,7 +4208,7 @@ checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror 1.0.60", + "thiserror", ] [[package]] @@ -4400,32 +4226,47 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.1" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", - "regex-automata", - "regex-syntax", + "regex-automata 0.4.6", + "regex-syntax 0.8.3", ] [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax", + "regex-syntax 0.8.3", ] [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.6.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "reqwest" @@ -4474,21 +4315,22 @@ dependencies = [ [[package]] name = "rfd" -version = "0.15.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f6f80a9b882647d9014673ca9925d30ffc9750f2eed2b4490e189eaebd01e8" +checksum = "25a73a7337fc24366edfca76ec521f51877b114e42dab584008209cca6719251" dependencies = [ "ashpd", - "block2", + "block", + "dispatch", "glib-sys", "gobject-sys", "gtk-sys", "js-sys", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", - "raw-window-handle", + "objc", + "objc-foundation", + "objc_id", + "raw-window-handle 0.6.1", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -4577,17 +4419,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustix-openpty" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25c3aad9fc1424eb82c88087789a7d938e1829724f3e4043163baf0d13cfc12" -dependencies = [ - "errno", - "libc", - "rustix", -] - [[package]] name = "rustls" version = "0.21.11" @@ -4703,7 +4534,6 @@ dependencies = [ "serde", "serde_json", "url", - "uuid", ] [[package]] @@ -4715,7 +4545,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -4747,7 +4577,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" dependencies = [ "bitflags 2.5.0", - "core-foundation 0.9.4", + "core-foundation", "core-foundation-sys", "libc", "security-framework-sys", @@ -4800,24 +4630,13 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.200" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "ddc6f9cc94d67c0e21aaf7eda3a010fd3af78ebf6e096aa6e2e13c79749cce4f" dependencies = [ "serde_derive", ] -[[package]] -name = "serde-untagged" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2676ba99bd82f75cae5cbd2c8eda6fa0b8760f18978ea840e980dd5567b5c5b6" -dependencies = [ - "erased-serde", - "serde", - "typeid", -] - [[package]] name = "serde-wasm-bindgen" version = "0.6.5" @@ -4831,13 +4650,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.200" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "856f046b9400cee3c8c94ed572ecdb752444c24528c035cd35882aad6f492bcb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -4848,17 +4667,16 @@ checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "itoa 1.0.11", - "memchr", "ryu", "serde", ] @@ -4871,14 +4689,14 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] name = "serde_spanned" -version = "0.6.8" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" dependencies = [ "serde", ] @@ -4905,7 +4723,7 @@ dependencies = [ "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.7.0", + "indexmap 2.2.6", "serde", "serde_derive", "serde_json", @@ -4922,7 +4740,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -4979,6 +4797,15 @@ dependencies = [ "digest", ] +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + [[package]] name = "shared" version = "0.1.0" @@ -4998,16 +4825,6 @@ dependencies = [ "dirs 4.0.0", ] -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -5080,13 +4897,13 @@ checksum = "61d5d17f23326fe0d9b0af282f73f3af666699420fd5f42629efd9c6e7dc166f" dependencies = [ "bytemuck", "cfg_aliases", - "cocoa 0.25.0", - "core-graphics 0.23.2", + "cocoa", + "core-graphics", "foreign-types 0.5.0", "js-sys", "log", "objc", - "raw-window-handle", + "raw-window-handle 0.6.1", "redox_syscall", "wasm-bindgen", "wayland-sys", @@ -5138,6 +4955,15 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +[[package]] +name = "state" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b8c4a4445d81357df8b1a650d0d0d6fbbbfe99d064aa5e02f3e4022061476d8" +dependencies = [ + "loom", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -5205,7 +5031,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -5216,9 +5042,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "swift-rs" -version = "1.0.7" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4057c98e2e852d51fdcfca832aac7b571f6b351ad159f9eda5db1655f8d0c4d7" +checksum = "1bbdb58577b6301f8d17ae2561f32002a5bae056d444e0f69e611e504a276204" dependencies = [ "base64 0.21.7", "serde", @@ -5238,9 +5064,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "c993ed8ccba56ae856363b1845da7266a7cb78e1d146c8a32d54b45a8b831fc9" dependencies = [ "proc-macro2", "quote", @@ -5263,7 +5089,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ "bitflags 2.5.0", - "core-foundation 0.9.4", + "core-foundation", "system-configuration-sys", ] @@ -5308,14 +5134,14 @@ dependencies = [ [[package]] name = "tao" -version = "0.30.8" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6682a07cf5bab0b8a2bd20d0a542917ab928b5edb75ebd4eda6b05cbaab872da" +checksum = "12a8121bd5721ebbbe0889f8286d5824673beeb04071519b68916fbed04f3093" dependencies = [ "bitflags 2.5.0", - "cocoa 0.26.0", - "core-foundation 0.10.0", - "core-graphics 0.24.0", + "cocoa", + "core-foundation", + "core-graphics", "crossbeam-channel", "dispatch", "dlopen2", @@ -5334,13 +5160,13 @@ dependencies = [ "objc", "once_cell", "parking_lot 0.12.2", - "raw-window-handle", + "raw-window-handle 0.6.1", "scopeguard", "tao-macros", "unicode-segmentation", "url", - "windows", - "windows-core 0.58.0", + "windows 0.56.0", + "windows-core 0.56.0", "windows-version", "x11-dl", ] @@ -5364,13 +5190,14 @@ checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" [[package]] name = "tauri" -version = "2.1.1" +version = "2.0.0-beta.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e545de0a2dfe296fa67db208266cd397c5a55ae782da77973ef4c4fac90e9f2c" +checksum = "5a258ecc5ac7ddade525f512c4962fd01cd0f5265e917b4572579c32c027bb31" dependencies = [ "anyhow", "bytes", - "dirs 5.0.1", + "cocoa", + "dirs-next", "dunce", "embed_plist", "futures-util", @@ -5384,24 +5211,22 @@ dependencies = [ "log", "mime", "muda", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc", "percent-encoding", - "plist", - "raw-window-handle", + "raw-window-handle 0.6.1", "reqwest", "serde", "serde_json", "serde_repr", "serialize-to-javascript", + "state", "swift-rs", "tauri-build", "tauri-macros", "tauri-runtime", "tauri-runtime-wry", "tauri-utils", - "thiserror 2.0.4", + "thiserror", "tokio", "tray-icon", "url", @@ -5409,18 +5234,18 @@ dependencies = [ "webkit2gtk", "webview2-com", "window-vibrancy", - "windows", + "windows 0.56.0", ] [[package]] name = "tauri-build" -version = "2.0.3" +version = "2.0.0-beta.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd2a4bcfaf5fb9f4be72520eefcb61ae565038f8ccba2a497d8c28f463b8c01" +checksum = "82b964bb6d03d97e24e12f896aab463b02a3c2ff76a60f728cc37b5548eb470e" dependencies = [ "anyhow", "cargo_toml", - "dirs 5.0.1", + "dirs-next", "glob", "heck 0.5.0", "json-patch", @@ -5436,9 +5261,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.3" +version = "2.0.0-beta.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf79faeecf301d3e969b1fae977039edb77a4c1f25cc0a961be298b54bff97cf" +checksum = "3529cfa977ed7c097f2a5e8da19ecffbe61982450a6c819e6165b6d0cfd3dd3a" dependencies = [ "base64 0.22.1", "brotli", @@ -5452,9 +5277,9 @@ dependencies = [ "serde", "serde_json", "sha2", - "syn 2.0.90", + "syn 2.0.61", "tauri-utils", - "thiserror 2.0.4", + "thiserror", "time", "url", "uuid", @@ -5463,23 +5288,23 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.3" +version = "2.0.0-beta.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c52027c8c5afb83166dacddc092ee8fff50772f9646d461d8c33ee887e447a03" +checksum = "36f97dd80334f29314aa5f40b5fad10cb9feffd08e5a5324fd728613841e5d33" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", "tauri-codegen", "tauri-utils", ] [[package]] name = "tauri-plugin" -version = "2.0.3" +version = "2.0.0-beta.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e753f2a30933a9bbf0a202fa47d7cc4a3401f06e8d6dcc53b79aa62954828c79" +checksum = "7c8385fd0a4f661f5652b0d9e2d7256187d553bb174f88564d10ebcfa6a3af53" dependencies = [ "anyhow", "glob", @@ -5494,50 +5319,46 @@ dependencies = [ [[package]] name = "tauri-plugin-dialog" -version = "2.0.4" +version = "2.0.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0962c2b9210e43cd849790d33bdf3d28c0e50d9884493fb340835244a708b5ba" +checksum = "fed4b22c59f7b04ae2a0bed8241aa715b41973c3f042c84aa67a1f4dc0174a8d" dependencies = [ + "dunce", "log", - "raw-window-handle", + "raw-window-handle 0.6.1", "rfd", "serde", "serde_json", "tauri", "tauri-plugin", "tauri-plugin-fs", - "thiserror 2.0.4", - "url", + "thiserror", ] [[package]] name = "tauri-plugin-fs" -version = "2.1.0" +version = "2.0.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cdaf6701ee5efc83161cf41004aa5aec4d255c9fb2d2b11fe518fe506acc588" +checksum = "3aa91955751f329e0aa431b87c199b7378b6f91ec0765d2ad9d4c64e017c3cda" dependencies = [ "anyhow", - "dunce", "glob", - "percent-encoding", "schemars", "serde", "serde_json", "serde_repr", "tauri", "tauri-plugin", - "tauri-utils", - "thiserror 2.0.4", - "toml 0.8.14", + "thiserror", "url", "uuid", ] [[package]] name = "tauri-plugin-window-state" -version = "2.0.2" +version = "2.0.0-beta.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683c8764751fbbcebf3a594bcee24cf84c62773fa0080d1b40fc80698472421e" +checksum = "74b5596f41b90668ea37562d512e1dead687d9ae5eadb49f9faa8b875a2740a3" dependencies = [ "bitflags 2.5.0", "log", @@ -5545,43 +5366,41 @@ dependencies = [ "serde_json", "tauri", "tauri-plugin", - "thiserror 1.0.60", + "thiserror", ] [[package]] name = "tauri-runtime" -version = "2.2.0" +version = "2.0.0-beta.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce18d43f80d4aba3aa8a0c953bbe835f3d0f2370aca75e8dbb14bd4bab27958" +checksum = "d7dc96172a43536236ab55b7da7b8461bf75810985e668589e2395cb476937cb" dependencies = [ "dpi", "gtk", "http 1.1.0", "jni", - "raw-window-handle", + "raw-window-handle 0.6.1", "serde", "serde_json", "tauri-utils", - "thiserror 2.0.4", + "thiserror", "url", - "windows", + "windows 0.56.0", ] [[package]] name = "tauri-runtime-wry" -version = "2.2.0" +version = "2.0.0-beta.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f442a38863e10129ffe2cec7bd09c2dcf8a098a3a27801a476a304d5bb991d2" +checksum = "5d4fd913b1f14a9b618c7f3ae35656d3aa759767fcb95b72006357c12b9d0b09" dependencies = [ + "cocoa", "gtk", "http 1.1.0", "jni", "log", - "objc2", - "objc2-app-kit", - "objc2-foundation", "percent-encoding", - "raw-window-handle", + "raw-window-handle 0.6.1", "softbuffer", "tao", "tauri-runtime", @@ -5589,15 +5408,15 @@ dependencies = [ "url", "webkit2gtk", "webview2-com", - "windows", + "windows 0.56.0", "wry", ] [[package]] name = "tauri-utils" -version = "2.1.0" +version = "2.0.0-beta.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9271a88f99b4adea0dc71d0baca4505475a0bbd139fb135f62958721aaa8fe54" +checksum = "4f24a9c20d676a3f025331cc1c3841256ba88c9f25fb7fae709d2b3089c50d90" dependencies = [ "brotli", "cargo_metadata", @@ -5605,7 +5424,6 @@ dependencies = [ "dunce", "glob", "html5ever", - "http 1.1.0", "infer", "json-patch", "kuchikiki", @@ -5618,15 +5436,13 @@ dependencies = [ "schemars", "semver", "serde", - "serde-untagged", "serde_json", "serde_with", "swift-rs", - "thiserror 2.0.4", + "thiserror", "toml 0.8.14", "url", "urlpattern", - "uuid", "walkdir", ] @@ -5684,16 +5500,7 @@ version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" dependencies = [ - "thiserror-impl 1.0.60", -] - -[[package]] -name = "thiserror" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490" -dependencies = [ - "thiserror-impl 2.0.4", + "thiserror-impl", ] [[package]] @@ -5704,18 +5511,17 @@ checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] -name = "thiserror-impl" -version = "2.0.4" +name = "thread_local" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.90", + "cfg-if", + "once_cell", ] [[package]] @@ -5766,32 +5572,33 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.42.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", "libc", - "mio 1.0.3", + "mio", + "num_cpus", "parking_lot 0.12.2", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.48.0", ] [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -5870,14 +5677,14 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.22", + "toml_edit 0.22.14", ] [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" dependencies = [ "serde", ] @@ -5888,7 +5695,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.7.0", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -5901,22 +5708,22 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.7.0", + "indexmap 2.2.6", "toml_datetime", "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ - "indexmap 2.7.0", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.20", + "winnow 0.6.13", ] [[package]] @@ -5967,7 +5774,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -5977,6 +5784,36 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec 1.13.2", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", ] [[package]] @@ -5992,23 +5829,22 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.19.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d48a05076dd272615d03033bf04f480199f7d1b66a8ac64d75c625fc4a70c06b" +checksum = "3ad8319cca93189ea9ab1b290de0595960529750b6b8b501a399ed1ec3775d60" dependencies = [ - "core-graphics 0.24.0", + "cocoa", + "core-graphics", "crossbeam-channel", "dirs 5.0.1", "libappindicator", "muda", - "objc2", - "objc2-app-kit", - "objc2-foundation", + "objc", "once_cell", "png", "serde", - "thiserror 1.0.60", - "windows-sys 0.59.0", + "thiserror", + "windows-sys 0.52.0", ] [[package]] @@ -6027,12 +5863,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "typeid" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e13db2e0ccd5e14a544e8a246ba2312cd25223f616442d7f2cb0e3db614236e" - [[package]] name = "typenum" version = "1.17.0" @@ -6165,10 +5995,11 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "urlpattern" -version = "0.3.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d" +checksum = "f9bd5ff03aea02fa45b13a7980151fe45009af1980ba69f651ec367121a31609" dependencies = [ + "derive_more", "regex", "serde", "unic-ucd-ident", @@ -6181,12 +6012,6 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" -[[package]] -name = "utf8parse" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" - [[package]] name = "uuid" version = "1.8.0" @@ -6194,9 +6019,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" dependencies = [ "getrandom 0.2.15", - "serde", ] +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + [[package]] name = "vcpkg" version = "0.2.15" @@ -6235,30 +6065,6 @@ dependencies = [ "libc", ] -[[package]] -name = "vte" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40eb22ae96f050e0c0d6f7ce43feeae26c348fc4dea56928ca81537cfaa6188b" -dependencies = [ - "bitflags 2.5.0", - "cursor-icon", - "log", - "serde", - "utf8parse", - "vte_generate_state_changes", -] - -[[package]] -name = "vte_generate_state_changes" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e369bee1b05d510a7b4ed645f5faa90619e05437111783ea5848f28d97d3c2e" -dependencies = [ - "proc-macro2", - "quote", -] - [[package]] name = "walkdir" version = "2.5.0" @@ -6313,7 +6119,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", "wasm-bindgen-shared", ] @@ -6347,7 +6153,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -6380,7 +6186,7 @@ checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -6414,7 +6220,7 @@ dependencies = [ "ahash", "bitflags 2.5.0", "hashbrown 0.14.5", - "indexmap 2.7.0", + "indexmap 2.2.6", "semver", "serde", ] @@ -6446,7 +6252,7 @@ dependencies = [ "fxprof-processed-profile", "gimli", "hashbrown 0.14.5", - "indexmap 2.7.0", + "indexmap 2.2.6", "ittapi", "libc", "libm", @@ -6520,7 +6326,7 @@ dependencies = [ "anyhow", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", "wasmtime-component-util", "wasmtime-wit-bindgen", "wit-parser", @@ -6548,7 +6354,7 @@ dependencies = [ "log", "object 0.36.1", "target-lexicon", - "thiserror 1.0.60", + "thiserror", "wasmparser", "wasmtime-environ", "wasmtime-versioned-export-macros", @@ -6564,7 +6370,7 @@ dependencies = [ "cranelift-bitset", "cranelift-entity", "gimli", - "indexmap 2.7.0", + "indexmap 2.2.6", "log", "object 0.36.1", "postcard", @@ -6641,7 +6447,7 @@ source = "git+https://github.com/bytecodealliance/wasmtime?rev=842fa767acdc26f09 dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -6665,7 +6471,7 @@ dependencies = [ "once_cell", "rustix", "system-interface", - "thiserror 1.0.60", + "thiserror", "tokio", "tracing", "url", @@ -6697,7 +6503,7 @@ source = "git+https://github.com/bytecodealliance/wasmtime?rev=842fa767acdc26f09 dependencies = [ "anyhow", "heck 0.4.1", - "indexmap 2.7.0", + "indexmap 2.2.6", "wit-parser", ] @@ -6732,60 +6538,11 @@ dependencies = [ "wast 211.0.1", ] -[[package]] -name = "wayland-backend" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" -dependencies = [ - "cc", - "downcast-rs", - "rustix", - "scoped-tls", - "smallvec 1.13.2", - "wayland-sys", -] - -[[package]] -name = "wayland-client" -version = "0.31.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280" -dependencies = [ - "bitflags 2.5.0", - "rustix", - "wayland-backend", - "wayland-scanner", -] - -[[package]] -name = "wayland-protocols" -version = "0.32.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd0ade57c4e6e9a8952741325c30bf82f4246885dca8bf561898b86d0c1f58e" -dependencies = [ - "bitflags 2.5.0", - "wayland-backend", - "wayland-client", - "wayland-scanner", -] - -[[package]] -name = "wayland-scanner" -version = "0.31.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" -dependencies = [ - "proc-macro2", - "quick-xml 0.36.2", - "quote", -] - [[package]] name = "wayland-sys" -version = "0.31.5" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" +checksum = "15a0c8eaff5216d07f226cb7a549159267f3467b289d9a2e52fd3ef5aae2b7af" dependencies = [ "dlib", "log", @@ -6854,38 +6611,38 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webview2-com" -version = "0.33.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61ff3d9d0ee4efcb461b14eb3acfda2702d10dc329f339303fc3e57215ae2c" +checksum = "5c914dd492a52f0377bef56fd1b6e74a79090f9ee631d625d5b505a00e4538b6" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows", - "windows-core 0.58.0", + "windows 0.56.0", + "windows-core 0.56.0", "windows-implement", "windows-interface", ] [[package]] name = "webview2-com-macros" -version = "0.8.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431" +checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] name = "webview2-com-sys" -version = "0.33.0" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886" +checksum = "2a46bcf03482ec28eeb764ca788f67998cde4213adfbbfa90462622058530f5e" dependencies = [ - "thiserror 1.0.60", - "windows", - "windows-core 0.58.0", + "thiserror", + "windows 0.56.0", + "windows-core 0.56.0", ] [[package]] @@ -6898,10 +6655,10 @@ dependencies = [ "leb128", "lz4_flex", "memmap2", - "num_enum", + "num_enum 0.7.2", "rayon", "serde", - "thiserror 1.0.60", + "thiserror", ] [[package]] @@ -6912,7 +6669,7 @@ dependencies = [ "anyhow", "async-trait", "bitflags 2.5.0", - "thiserror 1.0.60", + "thiserror", "tracing", "wasmtime", "wiggle-macro", @@ -6928,7 +6685,7 @@ dependencies = [ "proc-macro2", "quote", "shellexpand", - "syn 2.0.90", + "syn 2.0.61", "witx", ] @@ -6939,7 +6696,7 @@ source = "git+https://github.com/bytecodealliance/wasmtime?rev=842fa767acdc26f09 dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", "wiggle-generate", ] @@ -6996,20 +6753,29 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33082acd404763b315866e14a0d5193f3422c81086657583937a750cdd3ec340" dependencies = [ - "cocoa 0.25.0", + "cocoa", "objc", - "raw-window-handle", + "raw-window-handle 0.6.1", "windows-sys 0.52.0", "windows-version", ] [[package]] name = "windows" -version = "0.58.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-core 0.58.0", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1de69df01bdf1ead2f4ac895dc77c9351aefff65b2f3db429a343f9cbf05e132" +dependencies = [ + "windows-core 0.56.0", "windows-targets 0.52.6", ] @@ -7024,37 +6790,36 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.58.0" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +checksum = "4698e52ed2d08f8658ab0c39512a7c00ee5fe2688c65f8c0a4f06750d729f2a6" dependencies = [ "windows-implement", "windows-interface", - "windows-result", - "windows-strings", + "windows-result 0.1.1", "windows-targets 0.52.6", ] [[package]] name = "windows-implement" -version = "0.58.0" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" +checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] name = "windows-interface" -version = "0.58.0" +version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -7063,11 +6828,20 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ - "windows-result", + "windows-result 0.2.0", "windows-strings", "windows-targets 0.52.6", ] +[[package]] +name = "windows-result" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "749f0da9cc72d82e600d8d2e44cadd0b9eedb9038f71a1c58556ac1c5791813b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-result" version = "0.2.0" @@ -7083,7 +6857,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-result", + "windows-result 0.2.0", "windows-targets 0.52.6", ] @@ -7321,9 +7095,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.20" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" dependencies = [ "memchr", ] @@ -7365,7 +7139,7 @@ checksum = "a3cc90c50c7ec8a824b5d2cddddff13b2dc12b7a96bf8684d11474223c2ea22f" dependencies = [ "anyhow", "id-arena", - "indexmap 2.7.0", + "indexmap 2.2.6", "log", "semver", "serde", @@ -7383,19 +7157,20 @@ checksum = "e366f27a5cabcddb2706a78296a40b8fcc451e1a6aba2fc1d94b4a01bdaaef4b" dependencies = [ "anyhow", "log", - "thiserror 1.0.60", + "thiserror", "wast 35.0.2", ] [[package]] name = "wry" -version = "0.47.2" +version = "0.40.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ce51277d65170f6379d8cda935c80e3c2d1f0ff712a123c8bddb11b31a4b73" +checksum = "1fa597526af53f310a8e6218630c5024fdde8271f229e70d7d2fc70b52b8fb1e" dependencies = [ "base64 0.22.1", - "block2", - "cookie", + "block", + "cocoa", + "core-graphics", "crossbeam-channel", "dpi", "dunce", @@ -7408,24 +7183,22 @@ dependencies = [ "kuchikiki", "libc", "ndk", - "objc2", - "objc2-app-kit", - "objc2-foundation", - "objc2-ui-kit", - "objc2-web-kit", + "ndk-context", + "ndk-sys", + "objc", + "objc_id", "once_cell", "percent-encoding", - "raw-window-handle", + "raw-window-handle 0.6.1", "sha2", "soup3", "tao-macros", - "thiserror 1.0.60", - "url", + "thiserror", "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows", - "windows-core 0.58.0", + "windows 0.56.0", + "windows-core 0.56.0", "windows-version", "x11-dl", ] @@ -7463,28 +7236,32 @@ dependencies = [ [[package]] name = "zbus" -version = "5.1.1" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1162094dc63b1629fcc44150bcceeaa80798cd28bcbe7fa987b65a034c258608" +checksum = "7b8e3d6ae3342792a6cc2340e4394334c7402f3d793b390d2c5494a4032b3030" dependencies = [ "async-broadcast", + "async-process", "async-recursion", "async-trait", + "derivative", "enumflags2", "event-listener", "futures-core", + "futures-sink", "futures-util", "hex", "nix", "ordered-stream", + "rand 0.8.5", "serde", "serde_repr", + "sha1", "static_assertions", "tokio", "tracing", "uds_windows", - "windows-sys 0.59.0", - "winnow 0.6.20", + "windows-sys 0.52.0", "xdg-home", "zbus_macros", "zbus_names", @@ -7493,28 +7270,26 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.1.1" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd2dcdce3e2727f7d74b7e33b5a89539b3cc31049562137faf7ae4eb86cd16d" +checksum = "b7a3e850ff1e7217a3b7a07eba90d37fe9bb9e89a310f718afcde5885ca9b6d7" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.90", - "zbus_names", - "zvariant", + "regex", + "syn 1.0.109", "zvariant_utils", ] [[package]] name = "zbus_names" -version = "4.1.0" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "856b7a38811f71846fd47856ceee8bccaec8399ff53fb370247e66081ace647b" +checksum = "4b9b1fef7d021261cc16cba64c351d291b715febe0fa10dc3a443ac5a5022e6c" dependencies = [ "serde", "static_assertions", - "winnow 0.6.20", "zvariant", ] @@ -7535,7 +7310,7 @@ checksum = "6f4b6c273f496d8fd4eaf18853e6b448760225dc030ff2c485a786859aea6393" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.61", ] [[package]] @@ -7578,7 +7353,7 @@ dependencies = [ "serde_json", "static_ref_macro", "strum", - "thiserror 1.0.60", + "thiserror", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -7614,43 +7389,38 @@ dependencies = [ [[package]] name = "zvariant" -version = "5.1.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1200ee6ac32f1e5a312e455a949a4794855515d34f9909f4a3e082d14e1a56f" +checksum = "4e09e8be97d44eeab994d752f341e67b3b0d80512a8b315a0671d47232ef1b65" dependencies = [ "endi", "enumflags2", "serde", "static_assertions", "url", - "winnow 0.6.20", "zvariant_derive", - "zvariant_utils", ] [[package]] name = "zvariant_derive" -version = "5.1.0" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "687e3b97fae6c9104fbbd36c73d27d149abf04fb874e2efbd84838763daa8916" +checksum = "72a5857e2856435331636a9fbb415b09243df4521a267c5bedcd5289b4d5799e" dependencies = [ - "proc-macro-crate 3.2.0", + "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.90", + "syn 1.0.109", "zvariant_utils", ] [[package]] name = "zvariant_utils" -version = "3.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20d1d011a38f12360e5fcccceeff5e2c42a8eb7f27f0dcba97a0862ede05c9c6" +checksum = "00bedb16a193cc12451873fee2a1bc6550225acece0e36f333e68326c73c8172" dependencies = [ "proc-macro2", "quote", - "serde", - "static_assertions", - "syn 2.0.90", - "winnow 0.6.20", + "syn 1.0.109", ] diff --git a/Makefile.toml b/Makefile.toml index b810f19..0897fde 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -165,7 +165,7 @@ description = "Install Tauri CLI (tauri) locally" command = "cargo" args = [ "install", - "tauri-cli@=2.1.0", + "tauri-cli@=2.0.0-beta.17", "--locked", "--root", "tauri", diff --git a/README.md b/README.md index 50547bc..1bc24dc 100644 --- a/README.md +++ b/README.md @@ -69,16 +69,6 @@ Fastwave - Diagrams

-

Diagram Connector Demo

-

- Fastwave - Diagram Connector demo -

- -

Diagram Connector Code snippet

-

- Fastwave - Diagram Connector Code snippet -

- --- ### Installation (desktop version): diff --git a/docs/screenshot_diagram_connector_rs.png b/docs/screenshot_diagram_connector_rs.png deleted file mode 100644 index 7f45b75..0000000 Binary files a/docs/screenshot_diagram_connector_rs.png and /dev/null differ diff --git a/docs/video_diagram_connector.gif b/docs/video_diagram_connector.gif deleted file mode 100644 index f556e9a..0000000 Binary files a/docs/video_diagram_connector.gif and /dev/null differ diff --git a/docs/video_konata.gif b/docs/video_konata.gif deleted file mode 100644 index c16cec5..0000000 Binary files a/docs/video_konata.gif and /dev/null differ diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml index be972aa..f463636 100644 --- a/frontend/Cargo.toml +++ b/frontend/Cargo.toml @@ -14,7 +14,6 @@ wasm-bindgen-test = "0.3.19" unexpected_cfgs = { level = "allow", check-cfg = ['cfg(FASTWAVE_PLATFORM)'] } [dependencies] -unicode-segmentation = "1.10" zoon.workspace = true wellen.workspace = true shared = { path = "../shared", features = ["frontend"] } diff --git a/frontend/src/header_panel.rs b/frontend/src/header_panel.rs index c64281d..872025d 100644 --- a/frontend/src/header_panel.rs +++ b/frontend/src/header_panel.rs @@ -1,7 +1,6 @@ use crate::{platform, theme::*, Filename, Layout, Mode}; use std::sync::Arc; use zoon::*; -use crate::term::TERM_OPEN; pub struct HeaderPanel { hierarchy: Mutable>>, @@ -38,7 +37,6 @@ impl HeaderPanel { .item(self.load_button()) .item(self.layout_switcher()) .item(self.mode_switcher()) - .item(self.open_terminal()) .item(self.open_konata_file()), ) } @@ -214,26 +212,4 @@ impl HeaderPanel { .on_hovered_change(move |is_hovered| hovered.set_neq(is_hovered)) .on_press(move || Task::start(platform::open_konata_file())) } - - fn open_terminal(&self) -> impl Element { - let (hovered, hovered_signal) = Mutable::new_and_signal(false); - Button::new() - .s(Padding::new().x(20).y(10)) - .s(Background::new().color_signal( - hovered_signal.map_bool(|| COLOR_MEDIUM_SLATE_BLUE, || COLOR_SLATE_BLUE), - )) - .s(Align::new().left()) - .s(RoundedCorners::all(15)) - .label( - El::new() - .s(Font::new().no_wrap()) - .child("Open Terminal"), - ) - .on_hovered_change(move |is_hovered| hovered.set_neq(is_hovered)) - .on_press(move || { - let term_open = TERM_OPEN.get(); - TERM_OPEN.set(!term_open); - - }) - } } diff --git a/frontend/src/main.rs b/frontend/src/main.rs index 5327a5c..ba113b5 100644 --- a/frontend/src/main.rs +++ b/frontend/src/main.rs @@ -1,5 +1,4 @@ use shared::DiagramConnectorMessage; -use term::TERM_OPEN; use std::{mem, sync::Arc}; use zoon::*; @@ -24,9 +23,6 @@ use command_panel::CommandPanel; pub mod theme; use theme::*; -pub mod term; -use shared::term::{TerminalDownMsg, TerminalScreen}; - #[derive(Clone, Copy, Default)] enum Layout { Tree, @@ -102,10 +98,8 @@ fn main() { .unwrap_throw() .set_component_text(&component_id, &text), } - }).await; - platform::listen_term_update(|down_msg| { - term::TERMINAL_STATE.set(down_msg); - }).await; + }) + .await }); } @@ -187,20 +181,4 @@ fn root() -> impl Element { } }))) .item(CommandPanel::new()) - .item_signal( - TERM_OPEN.signal_cloned().map( - |term_open| { - match term_open { - true => - El::new() - .s(Height::fill().max(400).min(400)) - .s(Padding::all(5)) - .child(term::root()), - false => - El::new() - .child("") - } - } - ) - ) } diff --git a/frontend/src/platform.rs b/frontend/src/platform.rs index e220221..8d3a9c4 100644 --- a/frontend/src/platform.rs +++ b/frontend/src/platform.rs @@ -29,8 +29,6 @@ type DiagramConnectorPath = String; type DiagramConnectorName = String; type ComponentId = String; -use shared::term::{TerminalDownMsg, TerminalScreen}; - pub async fn show_window() { platform::show_window().await } @@ -74,10 +72,6 @@ pub async fn unload_signal(signal_ref: wellen::SignalRef) { platform::unload_signal(signal_ref).await } -pub async fn send_char(c : String) { - platform::send_char(c).await -} - pub async fn add_decoders(decoder_paths: Vec) -> AddedDecodersCount { let count = platform::add_decoders(decoder_paths).await; if count > 0 { @@ -118,12 +112,6 @@ pub async fn listen_diagram_connectors_messages( platform::listen_diagram_connectors_messages(on_message).await; } -pub async fn listen_term_update( - on_message: impl FnMut(TerminalDownMsg) + 'static, -) { - platform::listen_term_update(on_message).await; -} - pub async fn notify_diagram_connector_text_change( diagram_connector: DiagramConnectorName, component_id: ComponentId, diff --git a/frontend/src/platform/tauri.rs b/frontend/src/platform/tauri.rs index 7e81f20..37b4c39 100644 --- a/frontend/src/platform/tauri.rs +++ b/frontend/src/platform/tauri.rs @@ -1,5 +1,4 @@ use shared::DiagramConnectorMessage; -use shared::term::{TerminalDownMsg, TerminalScreen}; use zoon::*; pub(super) async fn show_window() { @@ -58,12 +57,6 @@ pub(super) async fn unload_signal(signal_ref: wellen::SignalRef) { .unwrap_throw() } -pub(super) async fn send_char(c : String) { - tauri_glue::send_char(c) - .await - .unwrap_throw() -} - pub(super) async fn add_decoders( decoder_paths: Vec, ) -> super::AddedDecodersCount { @@ -104,14 +97,6 @@ pub(super) async fn listen_diagram_connectors_messages( tauri_glue::listen_diagram_connectors_messages(Closure::new(on_message).into_js_value()).await } -pub(super) async fn listen_term_update( - mut on_message: impl FnMut(TerminalDownMsg) + 'static, -) { - let on_message = - move |message: JsValue| on_message(serde_wasm_bindgen::from_value(message).unwrap_throw()); - tauri_glue::listen_term_update(Closure::new(on_message).into_js_value()).await -} - pub(super) async fn notify_diagram_connector_text_change( diagram_connector: super::DiagramConnectorName, component_id: super::ComponentId, @@ -157,9 +142,6 @@ mod tauri_glue { #[wasm_bindgen(catch)] pub async fn unload_signal(signal_ref_index: usize) -> Result<(), JsValue>; - #[wasm_bindgen(catch)] - pub async fn send_char(c : String) -> Result<(), JsValue>; - #[wasm_bindgen(catch)] pub async fn add_decoders( decoder_paths: Vec, @@ -178,8 +160,6 @@ mod tauri_glue { pub async fn listen_diagram_connectors_messages(on_event: JsValue); - pub async fn listen_term_update(on_event: JsValue); - #[wasm_bindgen(catch)] pub async fn notify_diagram_connector_text_change( diagram_connector: super::super::DiagramConnectorName, diff --git a/frontend/src/term.rs b/frontend/src/term.rs deleted file mode 100644 index 8b013b0..0000000 --- a/frontend/src/term.rs +++ /dev/null @@ -1,142 +0,0 @@ -use std::ops::Index; - -use chrono::format; -use zoon::*; -use zoon::{println, eprintln, *}; -use shared::term::{TerminalDownMsg, TerminalScreen, TerminalUpMsg}; -use unicode_segmentation::UnicodeSegmentation; - -// use tokio::time::timeout; -pub static TERM_OPEN: Lazy> = Lazy::new(|| {false.into()}); - -pub const TERMINAL_COLOR: Oklch = color!("oklch(20% 0.125 262.26)"); - -pub static TERMINAL_STATE: Lazy> = - Lazy::new(|| { - Mutable::new(TerminalDownMsg::TermNotStarted) - }); - -pub fn root() -> impl Element { - let terminal = - El::new() - .s(Width::fill()) - .s(Height::fill()) - .s(Background::new().color(TERMINAL_COLOR)) - .s(RoundedCorners::all(7)) - .s(Font::new().family([ - FontFamily::new("Lucida Console"), - FontFamily::new("Courier"), - FontFamily::new("monospace") - ])) - .update_raw_el(|raw_el| { - raw_el.global_event_handler(|event: events::KeyDown| { - send_char( - (&event).key().as_str(), - (&event).ctrl_key(), - ); - }) - }) - .child_signal(TERMINAL_STATE.signal_cloned().map( - |down_msg| { - match down_msg { - TerminalDownMsg::FullTermUpdate(term) => { - make_grid_with_newlines(&term) - }, - TerminalDownMsg::TermNotStarted => { - "Term not yet started!".to_string() - }, - TerminalDownMsg::BackendTermStartFailure(msg) => { - format!("Error: BackendTermStartFailure: {}", msg) - } - } - } - ) - ) - ; - let root = Column::new() - .s(Width::fill()) - .s(Height::fill()) - .s(Align::new().top()) - .item(terminal); - root -} - -fn send_char( - s : &str, - has_control : bool, - ) { - match process_str(s, has_control) { - Some(c) => { - let send_c = c.clone(); - Task::start(async move { - crate::platform::send_char(send_c.to_string()).await; - }); - } - None => {} - } - -} - - -fn make_grid_with_newlines(term: &TerminalScreen) -> String { - let mut formatted = String::with_capacity(term.content.len() + (term.content.len() / term.cols as usize)); - - term.content.chars().enumerate().for_each(|(i, c)| { - formatted.push(c); - if (i + 1) as u16 % term.cols == 0 { - formatted.push('\n'); - } - }); - - formatted -} - - -fn process_str(s: &str, has_ctrl: bool) -> Option { - match s { - "Enter" => {return Some('\n');} - "Escape" => {return Some('\x1B');} - "Backspace" => {return Some('\x08');} - "ArrowUp" => {return Some('\x10');} - "ArrowDown" => {return Some('\x0E');} - "ArrowLeft" => {return Some('\x02');} - "ArrowRight" => {return Some('\x06');} - "Control" => {return None;} - "Shift" => {return None;} - "Meta" => {return None;} - "Alt" => {return None;} - _ => {} - } - - let mut graphemes = s.graphemes(true); - let first = graphemes.next(); - - if let Some(g) = first { - if g.len() == 1 { - if let Some(c) = g.chars().next() { - let c = process_for_ctrl_char(c, has_ctrl); - return Some(c); - } - } - } - - None -} - -// Helper function to process control characters - -fn is_lowercase_alpha(c: char) -> bool { - char_is_between_inclusive(c, 'a', 'z') -} - -fn process_for_ctrl_char(c: char, has_ctrl: bool) -> char { - if has_ctrl { - (c as u8 & 0x1F) as char - } else { - c - } -} - -fn char_is_between_inclusive(c : char, lo_char : char, hi_char : char) -> bool { - c >= lo_char && c <= hi_char -} diff --git a/frontend/typescript/bundles/tauri_glue.js b/frontend/typescript/bundles/tauri_glue.js index 575181f..de96555 100644 --- a/frontend/typescript/bundles/tauri_glue.js +++ b/frontend/typescript/bundles/tauri_glue.js @@ -1 +1 @@ -var se=Object.defineProperty;var q=(n,e)=>{for(var t in e)se(n,t,{get:e[t],enumerable:!0})};var M={};q(M,{Channel:()=>k,PluginListener:()=>R,Resource:()=>y,addPluginListener:()=>le,convertFileSrc:()=>oe,invoke:()=>i,isTauri:()=>ue,transformCallback:()=>T});function c(n,e,t,r){if(t==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(n):r?r.value:e.get(n)}function _(n,e,t,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?n!==e||!a:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(n,t):a?a.value=t:e.set(n,t),t}var b,A,f,L;function T(n,e=!1){return window.__TAURI_INTERNALS__.transformCallback(n,e)}var k=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,b.set(this,()=>{}),A.set(this,0),f.set(this,{}),this.id=T(({message:e,id:t})=>{if(t===c(this,A,"f")){_(this,A,t+1,"f"),c(this,b,"f").call(this,e);let r=Object.keys(c(this,f,"f"));if(r.length>0){let a=t+1;for(let u of r.sort())if(parseInt(u)===a){let s=c(this,f,"f")[u];delete c(this,f,"f")[u],c(this,b,"f").call(this,s),a+=1}else break;_(this,A,a,"f")}}else c(this,f,"f")[t.toString()]=e})}set onmessage(e){_(this,b,e,"f")}get onmessage(){return c(this,b,"f")}toJSON(){return`__CHANNEL__:${this.id}`}};b=new WeakMap,A=new WeakMap,f=new WeakMap;var R=class{constructor(e,t,r){this.plugin=e,this.event=t,this.channelId=r}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function le(n,e,t){let r=new k;return r.onmessage=t,i(`plugin:${n}|register_listener`,{event:e,handler:r}).then(()=>new R(n,e,r.id))}async function i(n,e={},t){return window.__TAURI_INTERNALS__.invoke(n,e,t)}function oe(n,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(n,e)}var y=class{get rid(){return c(this,L,"f")}constructor(e){L.set(this,void 0),_(this,L,e,"f")}async close(){return i("plugin:resources|close",{rid:this.rid})}};L=new WeakMap;function ue(){return"isTauri"in window&&!!window.isTauri}var E={};q(E,{TauriEvent:()=>l,emit:()=>x,emitTo:()=>P,listen:()=>p,once:()=>w});var l;(function(n){n.WINDOW_RESIZED="tauri://resize",n.WINDOW_MOVED="tauri://move",n.WINDOW_CLOSE_REQUESTED="tauri://close-requested",n.WINDOW_DESTROYED="tauri://destroyed",n.WINDOW_FOCUS="tauri://focus",n.WINDOW_BLUR="tauri://blur",n.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",n.WINDOW_THEME_CHANGED="tauri://theme-changed",n.WINDOW_CREATED="tauri://window-created",n.WEBVIEW_CREATED="tauri://webview-created",n.DRAG="tauri://drag",n.DROP="tauri://drop",n.DROP_OVER="tauri://drop-over",n.DROP_CANCELLED="tauri://drag-cancelled"})(l||(l={}));async function J(n,e){await i("plugin:event|unlisten",{event:n,eventId:e})}async function p(n,e,t){var r;let a=typeof t?.target=="string"?{kind:"AnyLabel",label:t.target}:(r=t?.target)!==null&&r!==void 0?r:{kind:"Any"};return i("plugin:event|listen",{event:n,target:a,handler:T(e)}).then(u=>async()=>J(n,u))}async function w(n,e,t){return p(n,r=>{e(r),J(n,r.id).catch(()=>{})},t)}async function x(n,e){await i("plugin:event|emit",{event:n,payload:e})}async function P(n,e,t){await i("plugin:event|emit_to",{target:typeof n=="string"?{kind:"AnyLabel",label:n}:n,event:e,payload:t})}var F=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},h=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new F(this.width/e,this.height/e)}},O=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},d=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new O(this.x/e,this.y/e)}};var I=class n extends y{constructor(e){super(e)}static async new(e,t,r){return i("plugin:image|new",{rgba:g(e),width:t,height:r}).then(a=>new n(a))}static async fromBytes(e){return i("plugin:image|from_bytes",{bytes:g(e)}).then(t=>new n(t))}static async fromPath(e){return i("plugin:image|from_path",{path:e}).then(t=>new n(t))}async rgba(){return i("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return i("plugin:image|size",{rid:this.rid})}};function g(n){return n==null?null:typeof n=="string"?n:n instanceof Uint8Array?Array.from(n):n instanceof ArrayBuffer?Array.from(new Uint8Array(n)):n instanceof I?n.rid:n}var V;(function(n){n[n.Critical=1]="Critical",n[n.Informational=2]="Informational"})(V||(V={}));var G=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},K;(function(n){n.None="none",n.Normal="normal",n.Indeterminate="indeterminate",n.Paused="paused",n.Error="error"})(K||(K={}));function H(){return new m(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function z(){return window.__TAURI_INTERNALS__.metadata.windows.map(n=>new m(n.label,{skip:!0}))}var U=["tauri://created","tauri://error"],m=class{constructor(e,t={}){var r;this.label=e,this.listeners=Object.create(null),t?.skip||i("plugin:window|create",{options:{...t,parent:typeof t.parent=="string"?t.parent:(r=t.parent)===null||r===void 0?void 0:r.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async a=>this.emit("tauri://error",a))}static getByLabel(e){var t;return(t=z().find(r=>r.label===e))!==null&&t!==void 0?t:null}static getCurrent(){return H()}static getAll(){return z()}static async getFocusedWindow(){for(let e of z())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):p(e,t,{target:{kind:"Window",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):w(e,t,{target:{kind:"Window",label:this.label}})}async emit(e,t){if(U.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,payload:t});return Promise.resolve()}return x(e,t)}async emitTo(e,t,r){if(U.includes(t)){for(let a of this.listeners[t]||[])a({event:t,id:-1,payload:r});return Promise.resolve()}return P(e,t,r)}_handleTauriEvent(e,t){return U.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:t})=>new d(e,t))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:t})=>new d(e,t))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:t})=>new h(e,t))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:t})=>new h(e,t))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(e===V.Critical?t={type:"Critical"}:t={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async destroy(){return i("plugin:window|destroy",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");let t={};return t[`${e.type}`]={width:e.width,height:e.height},i("plugin:window|set_size",{label:this.label,value:t})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");let t=null;return e&&(t={},t[`${e.type}`]={width:e.width,height:e.height}),i("plugin:window|set_min_size",{label:this.label,value:t})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");let t=null;return e&&(t={},t[`${e.type}`]={width:e.width,height:e.height}),i("plugin:window|set_max_size",{label:this.label,value:t})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");let t={};return t[`${e.type}`]={x:e.x,y:e.y},i("plugin:window|set_position",{label:this.label,value:t})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:g(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");let t={};return t[`${e.type}`]={x:e.x,y:e.y},i("plugin:window|set_cursor_position",{label:this.label,value:t})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return i("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return i("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async onResized(e){return this.listen(l.WINDOW_RESIZED,t=>{t.payload=he(t.payload),e(t)})}async onMoved(e){return this.listen(l.WINDOW_MOVED,t=>{t.payload=W(t.payload),e(t)})}async onCloseRequested(e){return this.listen(l.WINDOW_CLOSE_REQUESTED,t=>{let r=new G(t);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.destroy()})})}async onDragDropEvent(e){let t=await this.listen(l.DRAG,s=>{e({...s,payload:{type:"dragged",paths:s.payload.paths,position:W(s.payload.position)}})}),r=await this.listen(l.DROP,s=>{e({...s,payload:{type:"dropped",paths:s.payload.paths,position:W(s.payload.position)}})}),a=await this.listen(l.DROP_OVER,s=>{e({...s,payload:{type:"dragOver",position:W(s.payload.position)}})}),u=await this.listen(l.DROP_CANCELLED,s=>{e({...s,payload:{type:"cancelled"}})});return()=>{t(),r(),a(),u()}}async onFocusChanged(e){let t=await this.listen(l.WINDOW_FOCUS,a=>{e({...a,payload:!0})}),r=await this.listen(l.WINDOW_BLUR,a=>{e({...a,payload:!1})});return()=>{t(),r()}}async onScaleChanged(e){return this.listen(l.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(l.WINDOW_THEME_CHANGED,e)}},Z;(function(n){n.AppearanceBased="appearanceBased",n.Light="light",n.Dark="dark",n.MediumLight="mediumLight",n.UltraDark="ultraDark",n.Titlebar="titlebar",n.Selection="selection",n.Menu="menu",n.Popover="popover",n.Sidebar="sidebar",n.HeaderView="headerView",n.Sheet="sheet",n.WindowBackground="windowBackground",n.HudWindow="hudWindow",n.FullScreenUI="fullScreenUI",n.Tooltip="tooltip",n.ContentBackground="contentBackground",n.UnderWindowBackground="underWindowBackground",n.UnderPageBackground="underPageBackground",n.Mica="mica",n.Blur="blur",n.Acrylic="acrylic",n.Tabbed="tabbed",n.TabbedDark="tabbedDark",n.TabbedLight="tabbedLight"})(Z||(Z={}));var Y;(function(n){n.FollowsWindowActiveState="followsWindowActiveState",n.Active="active",n.Inactive="inactive"})(Y||(Y={}));function W(n){return new d(n.x,n.y)}function he(n){return new h(n.width,n.height)}function N(){return new v(H(),window.__TAURI_INTERNALS__.metadata.currentWebview.label,{skip:!0})}function X(){return window.__TAURI_INTERNALS__.metadata.webviews.map(n=>new v(m.getByLabel(n.windowLabel),n.label,{skip:!0}))}var j=["tauri://created","tauri://error"],v=class{constructor(e,t,r){this.window=e,this.label=t,this.listeners=Object.create(null),r?.skip||i("plugin:webview|create_webview",{windowLabel:e.label,label:t,options:r}).then(async()=>this.emit("tauri://created")).catch(async a=>this.emit("tauri://error",a))}static getByLabel(e){var t;return(t=X().find(r=>r.label===e))!==null&&t!==void 0?t:null}static getCurrent(){return N()}static getAll(){return X()}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):p(e,t,{target:{kind:"Webview",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):w(e,t,{target:{kind:"Webview",label:this.label}})}async emit(e,t){if(j.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,payload:t});return Promise.resolve()}return x(e,t)}async emitTo(e,t,r){if(j.includes(t)){for(let a of this.listeners[t]||[])a({event:t,id:-1,payload:r});return Promise.resolve()}return P(e,t,r)}_handleTauriEvent(e,t){return j.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}async position(){return i("plugin:webview|webview_position",{label:this.label}).then(({x:e,y:t})=>new d(e,t))}async size(){return i("plugin:webview|webview_size",{label:this.label}).then(({width:e,height:t})=>new h(e,t))}async close(){return i("plugin:webview|close",{label:this.label})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");let t={};return t[`${e.type}`]={width:e.width,height:e.height},i("plugin:webview|set_webview_size",{label:this.label,value:t})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");let t={};return t[`${e.type}`]={x:e.x,y:e.y},i("plugin:webview|set_webview_position",{label:this.label,value:t})}async setFocus(){return i("plugin:webview|set_webview_focus",{label:this.label})}async setZoom(e){return i("plugin:webview|set_webview_zoom",{label:this.label,value:e})}async reparent(e){return i("plugin:webview|set_webview_focus",{label:this.label,window:typeof e=="string"?e:e.label})}async onDragDropEvent(e){let t=await this.listen(l.DRAG,s=>{e({...s,payload:{type:"dragged",paths:s.payload.paths,position:$(s.payload.position)}})}),r=await this.listen(l.DROP,s=>{e({...s,payload:{type:"dropped",paths:s.payload.paths,position:$(s.payload.position)}})}),a=await this.listen(l.DROP_CANCELLED,s=>{e({...s,payload:{type:"dragOver",position:$(s.payload.position)}})}),u=await this.listen(l.DROP_CANCELLED,s=>{e({...s,payload:{type:"cancelled"}})});return()=>{t(),r(),a(),u()}}};function $(n){return new d(n.x,n.y)}function we(){let n=N();return new C(n.label,{skip:!0})}function B(){return window.__TAURI_INTERNALS__.metadata.webviews.map(n=>new C(n.label,{skip:!0}))}var C=class n{constructor(e,t={}){var r;this.label=e,this.listeners=Object.create(null),t?.skip||i("plugin:webview|create_webview_window",{options:{...t,parent:typeof t.parent=="string"?t.parent:(r=t.parent)===null||r===void 0?void 0:r.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async a=>this.emit("tauri://error",a))}static getByLabel(e){var t;let r=(t=B().find(a=>a.label===e))!==null&&t!==void 0?t:null;return r?new n(r.label,{skip:!0}):null}static getCurrent(){return we()}static getAll(){return B().map(e=>new n(e.label,{skip:!0}))}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):p(e,t,{target:{kind:"WebviewWindow",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):w(e,t,{target:{kind:"WebviewWindow",label:this.label}})}};ge(C,[m,v]);function ge(n,e){(Array.isArray(e)?e:[e]).forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(r=>{var a;typeof n.prototype=="object"&&n.prototype&&r in n.prototype||Object.defineProperty(n.prototype,r,(a=Object.getOwnPropertyDescriptor(t.prototype,r))!==null&&a!==void 0?a:Object.create(null))})})}var ee;(function(n){n[n.Audio=1]="Audio",n[n.Cache=2]="Cache",n[n.Config=3]="Config",n[n.Data=4]="Data",n[n.LocalData=5]="LocalData",n[n.Document=6]="Document",n[n.Download=7]="Download",n[n.Picture=8]="Picture",n[n.Public=9]="Public",n[n.Video=10]="Video",n[n.Resource=11]="Resource",n[n.Temp=12]="Temp",n[n.AppConfig=13]="AppConfig",n[n.AppData=14]="AppData",n[n.AppLocalData=15]="AppLocalData",n[n.AppCache=16]="AppCache",n[n.AppLog=17]="AppLog",n[n.Desktop=18]="Desktop",n[n.Executable=19]="Executable",n[n.Font=20]="Font",n[n.Home=21]="Home",n[n.Runtime=22]="Runtime",n[n.Template=23]="Template"})(ee||(ee={}));var ke,ve;ke=new WeakMap,ve=new WeakMap;var Q;(function(n){n.Add="Add",n.Advanced="Advanced",n.Bluetooth="Bluetooth",n.Bookmarks="Bookmarks",n.Caution="Caution",n.ColorPanel="ColorPanel",n.ColumnView="ColumnView",n.Computer="Computer",n.EnterFullScreen="EnterFullScreen",n.Everyone="Everyone",n.ExitFullScreen="ExitFullScreen",n.FlowView="FlowView",n.Folder="Folder",n.FolderBurnable="FolderBurnable",n.FolderSmart="FolderSmart",n.FollowLinkFreestanding="FollowLinkFreestanding",n.FontPanel="FontPanel",n.GoLeft="GoLeft",n.GoRight="GoRight",n.Home="Home",n.IChatTheater="IChatTheater",n.IconView="IconView",n.Info="Info",n.InvalidDataFreestanding="InvalidDataFreestanding",n.LeftFacingTriangle="LeftFacingTriangle",n.ListView="ListView",n.LockLocked="LockLocked",n.LockUnlocked="LockUnlocked",n.MenuMixedState="MenuMixedState",n.MenuOnState="MenuOnState",n.MobileMe="MobileMe",n.MultipleDocuments="MultipleDocuments",n.Network="Network",n.Path="Path",n.PreferencesGeneral="PreferencesGeneral",n.QuickLook="QuickLook",n.RefreshFreestanding="RefreshFreestanding",n.Refresh="Refresh",n.Remove="Remove",n.RevealFreestanding="RevealFreestanding",n.RightFacingTriangle="RightFacingTriangle",n.Share="Share",n.Slideshow="Slideshow",n.SmartBadge="SmartBadge",n.StatusAvailable="StatusAvailable",n.StatusNone="StatusNone",n.StatusPartiallyAvailable="StatusPartiallyAvailable",n.StatusUnavailable="StatusUnavailable",n.StopProgressFreestanding="StopProgressFreestanding",n.StopProgress="StopProgress",n.TrashEmpty="TrashEmpty",n.TrashFull="TrashFull",n.User="User",n.UserAccounts="UserAccounts",n.UserGroup="UserGroup",n.UserGuest="UserGuest"})(Q||(Q={}));var o=M.invoke,ae=E.listen;async function zn(){return await o("show_window")}async function Un(){return await o("pick_and_load_waveform")}async function Vn(){return await o("load_file_with_selected_vars")}async function Gn(){return await o("get_hierarchy")}async function Hn(n,e,t,r,a,u){return await o("load_signal_and_get_timeline",{signal_ref_index:n,timeline_zoom:e,timeline_viewport_width:t,timeline_viewport_x:r,block_height:a,var_format:u})}async function jn(n){return await o("unload_signal",{signal_ref_index:n})}async function $n(n){return await o("send_char",{c:n})}async function Nn(n){return await o("add_decoders",{decoder_paths:n})}async function Qn(){return await o("remove_all_decoders")}async function qn(n){return await o("add_diagram_connectors",{diagram_connector_paths:n})}async function Jn(){return await o("remove_all_diagram_connectors")}async function Kn(n){return await ae("diagram_connector_message",e=>n(e.payload))}async function Zn(n){return await ae("term_content",e=>n(e.payload))}async function Yn(n,e,t){return await o("notify_diagram_connector_text_change",{diagram_connector:n,component_id:e,text:t})}async function Xn(){return await o("open_konata_file")}export{Nn as add_decoders,qn as add_diagram_connectors,Gn as get_hierarchy,Kn as listen_diagram_connectors_messages,Zn as listen_term_update,Vn as load_file_with_selected_vars,Hn as load_signal_and_get_timeline,Yn as notify_diagram_connector_text_change,Xn as open_konata_file,Un as pick_and_load_waveform,Qn as remove_all_decoders,Jn as remove_all_diagram_connectors,$n as send_char,zn as show_window,jn as unload_signal}; +var ae=Object.defineProperty;var q=(n,e)=>{for(var t in e)ae(n,t,{get:e[t],enumerable:!0})};var M={};q(M,{Channel:()=>k,PluginListener:()=>R,Resource:()=>y,addPluginListener:()=>se,convertFileSrc:()=>le,invoke:()=>i,isTauri:()=>oe,transformCallback:()=>T});function c(n,e,t,r){if(t==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?n!==e||!r:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(n):r?r.value:e.get(n)}function _(n,e,t,r,a){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?n!==e||!a:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?a.call(n,t):a?a.value=t:e.set(n,t),t}var b,A,f,L;function T(n,e=!1){return window.__TAURI_INTERNALS__.transformCallback(n,e)}var k=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,b.set(this,()=>{}),A.set(this,0),f.set(this,{}),this.id=T(({message:e,id:t})=>{if(t===c(this,A,"f")){_(this,A,t+1,"f"),c(this,b,"f").call(this,e);let r=Object.keys(c(this,f,"f"));if(r.length>0){let a=t+1;for(let u of r.sort())if(parseInt(u)===a){let s=c(this,f,"f")[u];delete c(this,f,"f")[u],c(this,b,"f").call(this,s),a+=1}else break;_(this,A,a,"f")}}else c(this,f,"f")[t.toString()]=e})}set onmessage(e){_(this,b,e,"f")}get onmessage(){return c(this,b,"f")}toJSON(){return`__CHANNEL__:${this.id}`}};b=new WeakMap,A=new WeakMap,f=new WeakMap;var R=class{constructor(e,t,r){this.plugin=e,this.event=t,this.channelId=r}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function se(n,e,t){let r=new k;return r.onmessage=t,i(`plugin:${n}|register_listener`,{event:e,handler:r}).then(()=>new R(n,e,r.id))}async function i(n,e={},t){return window.__TAURI_INTERNALS__.invoke(n,e,t)}function le(n,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(n,e)}var y=class{get rid(){return c(this,L,"f")}constructor(e){L.set(this,void 0),_(this,L,e,"f")}async close(){return i("plugin:resources|close",{rid:this.rid})}};L=new WeakMap;function oe(){return"isTauri"in window&&!!window.isTauri}var E={};q(E,{TauriEvent:()=>l,emit:()=>x,emitTo:()=>P,listen:()=>p,once:()=>w});var l;(function(n){n.WINDOW_RESIZED="tauri://resize",n.WINDOW_MOVED="tauri://move",n.WINDOW_CLOSE_REQUESTED="tauri://close-requested",n.WINDOW_DESTROYED="tauri://destroyed",n.WINDOW_FOCUS="tauri://focus",n.WINDOW_BLUR="tauri://blur",n.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",n.WINDOW_THEME_CHANGED="tauri://theme-changed",n.WINDOW_CREATED="tauri://window-created",n.WEBVIEW_CREATED="tauri://webview-created",n.DRAG="tauri://drag",n.DROP="tauri://drop",n.DROP_OVER="tauri://drop-over",n.DROP_CANCELLED="tauri://drag-cancelled"})(l||(l={}));async function J(n,e){await i("plugin:event|unlisten",{event:n,eventId:e})}async function p(n,e,t){var r;let a=typeof t?.target=="string"?{kind:"AnyLabel",label:t.target}:(r=t?.target)!==null&&r!==void 0?r:{kind:"Any"};return i("plugin:event|listen",{event:n,target:a,handler:T(e)}).then(u=>async()=>J(n,u))}async function w(n,e,t){return p(n,r=>{e(r),J(n,r.id).catch(()=>{})},t)}async function x(n,e){await i("plugin:event|emit",{event:n,payload:e})}async function P(n,e,t){await i("plugin:event|emit_to",{target:typeof n=="string"?{kind:"AnyLabel",label:n}:n,event:e,payload:t})}var F=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},h=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new F(this.width/e,this.height/e)}},O=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},d=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new O(this.x/e,this.y/e)}};var I=class n extends y{constructor(e){super(e)}static async new(e,t,r){return i("plugin:image|new",{rgba:g(e),width:t,height:r}).then(a=>new n(a))}static async fromBytes(e){return i("plugin:image|from_bytes",{bytes:g(e)}).then(t=>new n(t))}static async fromPath(e){return i("plugin:image|from_path",{path:e}).then(t=>new n(t))}async rgba(){return i("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return i("plugin:image|size",{rid:this.rid})}};function g(n){return n==null?null:typeof n=="string"?n:n instanceof Uint8Array?Array.from(n):n instanceof ArrayBuffer?Array.from(new Uint8Array(n)):n instanceof I?n.rid:n}var V;(function(n){n[n.Critical=1]="Critical",n[n.Informational=2]="Informational"})(V||(V={}));var G=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},K;(function(n){n.None="none",n.Normal="normal",n.Indeterminate="indeterminate",n.Paused="paused",n.Error="error"})(K||(K={}));function H(){return new m(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function z(){return window.__TAURI_INTERNALS__.metadata.windows.map(n=>new m(n.label,{skip:!0}))}var U=["tauri://created","tauri://error"],m=class{constructor(e,t={}){var r;this.label=e,this.listeners=Object.create(null),t?.skip||i("plugin:window|create",{options:{...t,parent:typeof t.parent=="string"?t.parent:(r=t.parent)===null||r===void 0?void 0:r.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async a=>this.emit("tauri://error",a))}static getByLabel(e){var t;return(t=z().find(r=>r.label===e))!==null&&t!==void 0?t:null}static getCurrent(){return H()}static getAll(){return z()}static async getFocusedWindow(){for(let e of z())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):p(e,t,{target:{kind:"Window",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):w(e,t,{target:{kind:"Window",label:this.label}})}async emit(e,t){if(U.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,payload:t});return Promise.resolve()}return x(e,t)}async emitTo(e,t,r){if(U.includes(t)){for(let a of this.listeners[t]||[])a({event:t,id:-1,payload:r});return Promise.resolve()}return P(e,t,r)}_handleTauriEvent(e,t){return U.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:t})=>new d(e,t))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:t})=>new d(e,t))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:t})=>new h(e,t))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:t})=>new h(e,t))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(e===V.Critical?t={type:"Critical"}:t={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async destroy(){return i("plugin:window|destroy",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");let t={};return t[`${e.type}`]={width:e.width,height:e.height},i("plugin:window|set_size",{label:this.label,value:t})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");let t=null;return e&&(t={},t[`${e.type}`]={width:e.width,height:e.height}),i("plugin:window|set_min_size",{label:this.label,value:t})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");let t=null;return e&&(t={},t[`${e.type}`]={width:e.width,height:e.height}),i("plugin:window|set_max_size",{label:this.label,value:t})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");let t={};return t[`${e.type}`]={x:e.x,y:e.y},i("plugin:window|set_position",{label:this.label,value:t})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:g(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");let t={};return t[`${e.type}`]={x:e.x,y:e.y},i("plugin:window|set_cursor_position",{label:this.label,value:t})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return i("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return i("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async onResized(e){return this.listen(l.WINDOW_RESIZED,t=>{t.payload=pe(t.payload),e(t)})}async onMoved(e){return this.listen(l.WINDOW_MOVED,t=>{t.payload=W(t.payload),e(t)})}async onCloseRequested(e){return this.listen(l.WINDOW_CLOSE_REQUESTED,t=>{let r=new G(t);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.destroy()})})}async onDragDropEvent(e){let t=await this.listen(l.DRAG,s=>{e({...s,payload:{type:"dragged",paths:s.payload.paths,position:W(s.payload.position)}})}),r=await this.listen(l.DROP,s=>{e({...s,payload:{type:"dropped",paths:s.payload.paths,position:W(s.payload.position)}})}),a=await this.listen(l.DROP_OVER,s=>{e({...s,payload:{type:"dragOver",position:W(s.payload.position)}})}),u=await this.listen(l.DROP_CANCELLED,s=>{e({...s,payload:{type:"cancelled"}})});return()=>{t(),r(),a(),u()}}async onFocusChanged(e){let t=await this.listen(l.WINDOW_FOCUS,a=>{e({...a,payload:!0})}),r=await this.listen(l.WINDOW_BLUR,a=>{e({...a,payload:!1})});return()=>{t(),r()}}async onScaleChanged(e){return this.listen(l.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(l.WINDOW_THEME_CHANGED,e)}},Z;(function(n){n.AppearanceBased="appearanceBased",n.Light="light",n.Dark="dark",n.MediumLight="mediumLight",n.UltraDark="ultraDark",n.Titlebar="titlebar",n.Selection="selection",n.Menu="menu",n.Popover="popover",n.Sidebar="sidebar",n.HeaderView="headerView",n.Sheet="sheet",n.WindowBackground="windowBackground",n.HudWindow="hudWindow",n.FullScreenUI="fullScreenUI",n.Tooltip="tooltip",n.ContentBackground="contentBackground",n.UnderWindowBackground="underWindowBackground",n.UnderPageBackground="underPageBackground",n.Mica="mica",n.Blur="blur",n.Acrylic="acrylic",n.Tabbed="tabbed",n.TabbedDark="tabbedDark",n.TabbedLight="tabbedLight"})(Z||(Z={}));var Y;(function(n){n.FollowsWindowActiveState="followsWindowActiveState",n.Active="active",n.Inactive="inactive"})(Y||(Y={}));function W(n){return new d(n.x,n.y)}function pe(n){return new h(n.width,n.height)}function N(){return new v(H(),window.__TAURI_INTERNALS__.metadata.currentWebview.label,{skip:!0})}function X(){return window.__TAURI_INTERNALS__.metadata.webviews.map(n=>new v(m.getByLabel(n.windowLabel),n.label,{skip:!0}))}var j=["tauri://created","tauri://error"],v=class{constructor(e,t,r){this.window=e,this.label=t,this.listeners=Object.create(null),r?.skip||i("plugin:webview|create_webview",{windowLabel:e.label,label:t,options:r}).then(async()=>this.emit("tauri://created")).catch(async a=>this.emit("tauri://error",a))}static getByLabel(e){var t;return(t=X().find(r=>r.label===e))!==null&&t!==void 0?t:null}static getCurrent(){return N()}static getAll(){return X()}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):p(e,t,{target:{kind:"Webview",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):w(e,t,{target:{kind:"Webview",label:this.label}})}async emit(e,t){if(j.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,payload:t});return Promise.resolve()}return x(e,t)}async emitTo(e,t,r){if(j.includes(t)){for(let a of this.listeners[t]||[])a({event:t,id:-1,payload:r});return Promise.resolve()}return P(e,t,r)}_handleTauriEvent(e,t){return j.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}async position(){return i("plugin:webview|webview_position",{label:this.label}).then(({x:e,y:t})=>new d(e,t))}async size(){return i("plugin:webview|webview_size",{label:this.label}).then(({width:e,height:t})=>new h(e,t))}async close(){return i("plugin:webview|close",{label:this.label})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");let t={};return t[`${e.type}`]={width:e.width,height:e.height},i("plugin:webview|set_webview_size",{label:this.label,value:t})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");let t={};return t[`${e.type}`]={x:e.x,y:e.y},i("plugin:webview|set_webview_position",{label:this.label,value:t})}async setFocus(){return i("plugin:webview|set_webview_focus",{label:this.label})}async setZoom(e){return i("plugin:webview|set_webview_zoom",{label:this.label,value:e})}async reparent(e){return i("plugin:webview|set_webview_focus",{label:this.label,window:typeof e=="string"?e:e.label})}async onDragDropEvent(e){let t=await this.listen(l.DRAG,s=>{e({...s,payload:{type:"dragged",paths:s.payload.paths,position:$(s.payload.position)}})}),r=await this.listen(l.DROP,s=>{e({...s,payload:{type:"dropped",paths:s.payload.paths,position:$(s.payload.position)}})}),a=await this.listen(l.DROP_CANCELLED,s=>{e({...s,payload:{type:"dragOver",position:$(s.payload.position)}})}),u=await this.listen(l.DROP_CANCELLED,s=>{e({...s,payload:{type:"cancelled"}})});return()=>{t(),r(),a(),u()}}};function $(n){return new d(n.x,n.y)}function ye(){let n=N();return new C(n.label,{skip:!0})}function B(){return window.__TAURI_INTERNALS__.metadata.webviews.map(n=>new C(n.label,{skip:!0}))}var C=class n{constructor(e,t={}){var r;this.label=e,this.listeners=Object.create(null),t?.skip||i("plugin:webview|create_webview_window",{options:{...t,parent:typeof t.parent=="string"?t.parent:(r=t.parent)===null||r===void 0?void 0:r.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async a=>this.emit("tauri://error",a))}static getByLabel(e){var t;let r=(t=B().find(a=>a.label===e))!==null&&t!==void 0?t:null;return r?new n(r.label,{skip:!0}):null}static getCurrent(){return ye()}static getAll(){return B().map(e=>new n(e.label,{skip:!0}))}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):p(e,t,{target:{kind:"WebviewWindow",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):w(e,t,{target:{kind:"WebviewWindow",label:this.label}})}};we(C,[m,v]);function we(n,e){(Array.isArray(e)?e:[e]).forEach(t=>{Object.getOwnPropertyNames(t.prototype).forEach(r=>{var a;typeof n.prototype=="object"&&n.prototype&&r in n.prototype||Object.defineProperty(n.prototype,r,(a=Object.getOwnPropertyDescriptor(t.prototype,r))!==null&&a!==void 0?a:Object.create(null))})})}var ee;(function(n){n[n.Audio=1]="Audio",n[n.Cache=2]="Cache",n[n.Config=3]="Config",n[n.Data=4]="Data",n[n.LocalData=5]="LocalData",n[n.Document=6]="Document",n[n.Download=7]="Download",n[n.Picture=8]="Picture",n[n.Public=9]="Public",n[n.Video=10]="Video",n[n.Resource=11]="Resource",n[n.Temp=12]="Temp",n[n.AppConfig=13]="AppConfig",n[n.AppData=14]="AppData",n[n.AppLocalData=15]="AppLocalData",n[n.AppCache=16]="AppCache",n[n.AppLog=17]="AppLog",n[n.Desktop=18]="Desktop",n[n.Executable=19]="Executable",n[n.Font=20]="Font",n[n.Home=21]="Home",n[n.Runtime=22]="Runtime",n[n.Template=23]="Template"})(ee||(ee={}));var fe,ke;fe=new WeakMap,ke=new WeakMap;var Q;(function(n){n.Add="Add",n.Advanced="Advanced",n.Bluetooth="Bluetooth",n.Bookmarks="Bookmarks",n.Caution="Caution",n.ColorPanel="ColorPanel",n.ColumnView="ColumnView",n.Computer="Computer",n.EnterFullScreen="EnterFullScreen",n.Everyone="Everyone",n.ExitFullScreen="ExitFullScreen",n.FlowView="FlowView",n.Folder="Folder",n.FolderBurnable="FolderBurnable",n.FolderSmart="FolderSmart",n.FollowLinkFreestanding="FollowLinkFreestanding",n.FontPanel="FontPanel",n.GoLeft="GoLeft",n.GoRight="GoRight",n.Home="Home",n.IChatTheater="IChatTheater",n.IconView="IconView",n.Info="Info",n.InvalidDataFreestanding="InvalidDataFreestanding",n.LeftFacingTriangle="LeftFacingTriangle",n.ListView="ListView",n.LockLocked="LockLocked",n.LockUnlocked="LockUnlocked",n.MenuMixedState="MenuMixedState",n.MenuOnState="MenuOnState",n.MobileMe="MobileMe",n.MultipleDocuments="MultipleDocuments",n.Network="Network",n.Path="Path",n.PreferencesGeneral="PreferencesGeneral",n.QuickLook="QuickLook",n.RefreshFreestanding="RefreshFreestanding",n.Refresh="Refresh",n.Remove="Remove",n.RevealFreestanding="RevealFreestanding",n.RightFacingTriangle="RightFacingTriangle",n.Share="Share",n.Slideshow="Slideshow",n.SmartBadge="SmartBadge",n.StatusAvailable="StatusAvailable",n.StatusNone="StatusNone",n.StatusPartiallyAvailable="StatusPartiallyAvailable",n.StatusUnavailable="StatusUnavailable",n.StopProgressFreestanding="StopProgressFreestanding",n.StopProgress="StopProgress",n.TrashEmpty="TrashEmpty",n.TrashFull="TrashFull",n.User="User",n.UserAccounts="UserAccounts",n.UserGroup="UserGroup",n.UserGuest="UserGuest"})(Q||(Q={}));var o=M.invoke,xe=E.listen;async function zn(){return await o("show_window")}async function Un(){return await o("pick_and_load_waveform")}async function Vn(){return await o("load_file_with_selected_vars")}async function Gn(){return await o("get_hierarchy")}async function Hn(n,e,t,r,a,u){return await o("load_signal_and_get_timeline",{signal_ref_index:n,timeline_zoom:e,timeline_viewport_width:t,timeline_viewport_x:r,block_height:a,var_format:u})}async function jn(n){return await o("unload_signal",{signal_ref_index:n})}async function $n(n){return await o("add_decoders",{decoder_paths:n})}async function Nn(){return await o("remove_all_decoders")}async function Qn(n){return await o("add_diagram_connectors",{diagram_connector_paths:n})}async function qn(){return await o("remove_all_diagram_connectors")}async function Jn(n){return await xe("diagram_connector_message",e=>n(e.payload))}async function Kn(n,e,t){return await o("notify_diagram_connector_text_change",{diagram_connector:n,component_id:e,text:t})}async function Zn(){return await o("open_konata_file")}export{$n as add_decoders,Qn as add_diagram_connectors,Gn as get_hierarchy,Jn as listen_diagram_connectors_messages,Vn as load_file_with_selected_vars,Hn as load_signal_and_get_timeline,Kn as notify_diagram_connector_text_change,Zn as open_konata_file,Un as pick_and_load_waveform,Nn as remove_all_decoders,qn as remove_all_diagram_connectors,zn as show_window,jn as unload_signal}; diff --git a/frontend/typescript/tauri_glue/tauri_glue.ts b/frontend/typescript/tauri_glue/tauri_glue.ts index 3f64351..3f37098 100644 --- a/frontend/typescript/tauri_glue/tauri_glue.ts +++ b/frontend/typescript/tauri_glue/tauri_glue.ts @@ -38,20 +38,20 @@ export async function get_hierarchy(): Promise { } export async function load_signal_and_get_timeline( - signal_ref_index: number, + signal_ref_index: number, timeline_zoom: number, timeline_viewport_width: number, - timeline_viewport_x: number, + timeline_viewport_x: number, block_height: number, var_format: VarFormat, ): Promise { - return await invoke("load_signal_and_get_timeline", { - signal_ref_index, - timeline_zoom, + return await invoke("load_signal_and_get_timeline", { + signal_ref_index, + timeline_zoom, timeline_viewport_width, timeline_viewport_x, - block_height, - var_format + block_height, + var_format }); } @@ -59,10 +59,6 @@ export async function unload_signal(signal_ref_index: number): Promise { return await invoke("unload_signal", { signal_ref_index }); } -export async function send_char(c : string): Promise { - return await invoke("send_char", { c }); -} - export async function add_decoders(decoder_paths: Array): Promise { return await invoke("add_decoders", { decoder_paths }); } @@ -83,10 +79,6 @@ export async function listen_diagram_connectors_messages(on_message: (message: a return await listen("diagram_connector_message", (message) => on_message(message.payload)); } -export async function listen_term_update(on_message: (message: any) => void) { - return await listen("term_content", (message) => on_message(message.payload)); -} - export async function notify_diagram_connector_text_change(diagram_connector: DiagramConnectorName, component_id: ComponentId, text: string): Promise { return await invoke("notify_diagram_connector_text_change", { diagram_connector, component_id, text }); } diff --git a/shared/src/lib.rs b/shared/src/lib.rs index 6bc697c..3d07aaf 100644 --- a/shared/src/lib.rs +++ b/shared/src/lib.rs @@ -7,7 +7,6 @@ mod signal_to_timeline; pub use signal_to_timeline::signal_to_timeline; pub mod wellen_helpers; -pub mod term; #[derive(Serialize, Deserialize, Debug, Default)] #[serde(crate = "serde")] diff --git a/shared/src/term.rs b/shared/src/term.rs deleted file mode 100644 index 1f2c2b9..0000000 --- a/shared/src/term.rs +++ /dev/null @@ -1,25 +0,0 @@ -use moonlight::*; - -#[derive(Serialize, Deserialize, Debug, Clone)] -#[serde(crate = "serde")] -pub enum TerminalUpMsg { - RequestFullTermState, - RequestIncrementalTermStateUpdate, - SendCharacter(char), -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -#[serde(crate = "serde")] -pub enum TerminalDownMsg { - FullTermUpdate(TerminalScreen), - BackendTermStartFailure(String), - TermNotStarted -} - -#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)] -#[serde(crate = "serde")] -pub struct TerminalScreen { - pub cols : u16, - pub rows : u16, - pub content : String, -} diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 4917733..421c6c9 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -13,21 +13,19 @@ name = "app_lib" crate-type = ["staticlib", "cdylib", "rlib"] [build-dependencies] -tauri-build = { version = "2.0.3", features = [] } +tauri-build = { version = "=2.0.0-beta.17", features = [] } [dependencies] wellen.workspace = true -alacritty_terminal = { git = "https://github.com/alacritty/alacritty", rev = "cacdb5bb3b72bad2c729227537979d95af75978f" } shared = { path = "../shared", features = ["backend"] } serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "2.1.1", features = ["macos-private-api"] } -tauri-plugin-window-state = "2.0.2" -tauri-plugin-dialog = "2.0.4" +tauri = { version = "=2.0.0-beta.22", features = ["macos-private-api", "linux-ipc-protocol"] } +tauri-plugin-window-state = "=2.0.0-beta.9" +tauri-plugin-dialog = "=2.0.0-beta.9" once_cell = "1.19.0" futures = "0.3.30" reqwest = "0.12.9" -tokio = "*" # wasmtime = "22.0.0" # wasmtime-wasi = "22.0.0" diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index 9f6bf58..9c58e49 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -4,6 +4,14 @@ "description": "enables the default permissions", "windows": ["main"], "permissions": [ - "core:default" + "path:default", + "event:default", + "window:default", + "webview:default", + "app:default", + "resources:default", + "image:default", + "menu:default", + "tray:default" ] } diff --git a/src-tauri/f.txt b/src-tauri/f.txt deleted file mode 100644 index e009d34..0000000 --- a/src-tauri/f.txt +++ /dev/null @@ -1,2 +0,0 @@ -Hello, I'm typing a file in vim!! - diff --git a/src-tauri/src/aterm.rs b/src-tauri/src/aterm.rs deleted file mode 100644 index 45b68a6..0000000 --- a/src-tauri/src/aterm.rs +++ /dev/null @@ -1,116 +0,0 @@ -use std::result; -use std::sync::{mpsc, Arc}; - -use alacritty_terminal::event::{Event, EventListener}; -use alacritty_terminal::event_loop::{EventLoop, Notifier}; -use alacritty_terminal::sync::FairMutex; -use alacritty_terminal::term::{self, Term}; -use alacritty_terminal::term::cell::Cell; -use alacritty_terminal::{tty, Grid}; -use tauri::Emitter; -use shared::term::{TerminalDownMsg, TerminalScreen}; - -use crate::terminal_size; - -#[derive(Clone)] -pub struct EventProxy(mpsc::Sender); -impl EventListener for EventProxy { - fn send_event(&self, event: Event) { - let _ = self.0.send(event.clone()); - } -} - -pub struct ATerm { - pub term: Arc>>, - - pub rows : u16, - pub cols : u16, - - /// Use tx to write things to terminal instance from outside world - pub tx: Notifier, - - /// Use rx to read things from terminal instance. - /// Rx only has data when terminal state has changed, - /// otherwise, `std::sync::mpsc::recv` will block and sleep - /// until there is data. - pub rx: mpsc::Receiver<(u64, Event)>, -} - -impl ATerm { - pub fn new() -> result::Result { - let (rows, cols) = (21, 85); - let id = 1; - let pty_config = tty::Options { - shell: Some(tty::Shell::new("/bin/bash".to_string(), vec![])), - ..tty::Options::default() - }; - let config = term::Config::default(); - let terminal_size = terminal_size::TerminalSize::new(rows, cols); - let pty = tty::new(&pty_config, terminal_size.into(), id)?; - let (event_sender, event_receiver) = mpsc::channel(); - let event_proxy = EventProxy(event_sender); - let term = Term::new::( - config, - &terminal_size.into(), - event_proxy.clone(), - ); - let term = Arc::new(FairMutex::new(term)); - let pty_event_loop = EventLoop::new(term.clone(), event_proxy, pty, false, false)?; - let notifier = Notifier(pty_event_loop.channel()); - let (pty_proxy_sender, pty_proxy_receiver) = std::sync::mpsc::channel(); - // Start pty event loop - pty_event_loop.spawn(); - std::thread::Builder::new() - .name(format!("pty_event_subscription_{}", id)) - .spawn(move || loop { - if let Ok(event) = event_receiver.recv() { - if let Event::Exit = event { - break; - } - else { - if let Some(app_handle) = crate::APP_HANDLE.read().unwrap().clone() { - let term = crate::TERM.lock().unwrap(); - let content = terminal_instance_to_string(&term); - let payload = TerminalScreen { - cols: term.cols, - rows: term.rows, - content: content - }; - let payload = TerminalDownMsg::FullTermUpdate(payload); - let payload = serde_json::json!(payload); - app_handle.emit("term_content", payload).unwrap(); - } - } - } - })?; - Ok(ATerm { - term, - rows, - cols, - tx: notifier, - rx: pty_proxy_receiver, - }) - } -} - -pub fn terminal_instance_to_string(terminal_instance: &ATerm) -> String { - let (rows, cols) = (terminal_instance.rows, terminal_instance.cols); - let term = terminal_instance.term.lock(); - let grid = term.grid().clone(); - - return term_grid_to_string(&grid, rows, cols); -} - -fn term_grid_to_string(grid: &Grid, rows: u16, cols: u16) -> String { - let mut term_content = String::with_capacity((rows*cols) as usize); - - // Populate string from grid - for indexed in grid.display_iter() { - let x = indexed.point.column.0 as usize; - let y = indexed.point.line.0 as usize; - if y < rows as usize && x < cols as usize { - term_content.push(indexed.c); - } - } - return term_content; -} diff --git a/src-tauri/src/component_manager/diagram_connectors.rs b/src-tauri/src/component_manager/diagram_connectors.rs index b278810..c61e278 100644 --- a/src-tauri/src/component_manager/diagram_connectors.rs +++ b/src-tauri/src/component_manager/diagram_connectors.rs @@ -6,7 +6,7 @@ use once_cell::sync::Lazy; use shared::{DiagramConnectorMessage, VarFormat}; use std::sync::Arc; use tauri::async_runtime::{Mutex, RwLock}; -use tauri::Emitter; +use tauri::Manager; use wasmtime::component::{Component as WasmtimeComponent, *}; use wasmtime::{AsContextMut, Engine, Store}; use wasmtime_wasi::{WasiCtx, WasiView}; diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index bac3a91..5582dcf 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -5,10 +5,8 @@ use std::sync::{Arc, RwLock as StdRwLock}; use std::time::Duration; use tauri::{async_runtime::RwLock, AppHandle}; use tauri_plugin_dialog::DialogExt; -use tokio::time::sleep; use wasmtime::AsContextMut; use wellen::simple::Waveform; -use tauri::Emitter; type Filename = String; type JavascriptCode = String; @@ -22,25 +20,15 @@ type RemovedDiagramConnectorsCount = usize; type DiagramConnectorPath = String; type DiagramConnectorName = String; type ComponentId = String; -use alacritty_terminal::event::Notify; -use shared::term::{TerminalDownMsg, TerminalScreen}; mod component_manager; -mod aterm; -mod terminal_size; -use std::sync::Mutex; pub static APP_HANDLE: Lazy>>> = Lazy::new(<_>::default); pub static WAVEFORM: Lazy>>>> = Lazy::new(<_>::default); -static TERM: Lazy> = Lazy::new(|| { - Mutex::new(aterm::ATerm::new().expect("Failed to initialize ATerm")) -}); - #[derive(Default)] struct Store { waveform: Arc>>, - val : Arc>, } #[tauri::command(rename_all = "snake_case")] @@ -53,30 +41,27 @@ async fn pick_and_load_waveform( store: tauri::State<'_, Store>, app: tauri::AppHandle, ) -> Result, ()> { - let Some(file_path) = app.dialog().file().blocking_pick_file() else { + let Some(file_response) = app.dialog().file().blocking_pick_file() else { return Ok(None); }; - let file_buf = file_path.into_path().unwrap(); - let file_str = file_buf.as_os_str().to_str().unwrap(); + let file_path = file_response.path.as_os_str().to_str().unwrap(); // @TODO `read` should accept `Path` instead of `&str` - let waveform = wellen::simple::read(file_str); + let waveform = wellen::simple::read(file_path); let Ok(waveform) = waveform else { panic!("Waveform file reading failed") }; *store.waveform.write().await = Some(waveform); *WAVEFORM.write().unwrap() = Arc::clone(&store.waveform); - Ok(Some( - file_buf.file_name().unwrap().to_string_lossy().to_string(), - )) + Ok(Some(file_response.name.unwrap())) } #[tauri::command(rename_all = "snake_case")] async fn load_file_with_selected_vars(app: tauri::AppHandle) -> Result, ()> { - let Some(file_path) = app.dialog().file().blocking_pick_file() else { + let Some(file_response) = app.dialog().file().blocking_pick_file() else { return Ok(None); }; // @TODO Tokio's `fs` or a Tauri `fs`? - let Ok(javascript_code) = fs::read_to_string(file_path.into_path().unwrap()) else { + let Ok(javascript_code) = fs::read_to_string(file_response.path) else { panic!("Selected vars file reading failed") }; Ok(Some(javascript_code)) @@ -155,17 +140,6 @@ async fn unload_signal(signal_ref_index: usize, store: tauri::State<'_, Store>) Ok(()) } -#[tauri::command(rename_all = "snake_case")] -async fn send_char(c : String) -> Result<(), ()> { - if c.len() == 1 { - let term = TERM.lock().unwrap(); - term.tx.notify(c.into_bytes()); - Ok(()) - } else { - Err(()) - } -} - #[tauri::command(rename_all = "snake_case")] async fn add_decoders(decoder_paths: Vec) -> Result { Ok(component_manager::decoders::add_decoders(decoder_paths).await) @@ -209,66 +183,44 @@ async fn notify_diagram_connector_text_change( #[tauri::command(rename_all = "snake_case")] async fn open_konata_file(app: tauri::AppHandle) { - let Some(file_path) = app.dialog().file().blocking_pick_file() else { + let Some(file_response) = app.dialog().file().blocking_pick_file() else { return; }; - let file_str = file_path - .into_path() - .unwrap() - .into_os_string() - .into_string() - .unwrap(); + let file_path = file_response.path.into_os_string().into_string().unwrap(); + + spawn_konata_app(); let port = 30000; let base_url = format!("http://localhost:{port}"); let client = reqwest::Client::builder() - .connect_timeout(Duration::from_secs(1)) + .timeout(Duration::from_secs(30)) .build() .unwrap(); - - let mut konata_server_ready = false; - - let is_konata_server_ready = || async { - client - .get(format!("{base_url}/status")) - .send() - .await - .is_ok() - }; - - if is_konata_server_ready().await { - konata_server_ready = true; - } else { - spawn_konata_app(); - } - - let mut attempts = 1; - while !konata_server_ready { - attempts += 1; - if attempts > 5 { - eprintln!("Failed to get Konata server status (5 attempts)"); - return; - } - konata_server_ready = is_konata_server_ready().await; - sleep(Duration::from_secs(1)).await; - } - - client - .post(format!("{base_url}/open-konata-file")) - .json(&serde_json::json!({ - "file_path": file_str - })) + if client + .get(format!("{base_url}/status")) .send() .await - .unwrap() - .error_for_status() - .unwrap(); + .is_ok() + { + client + .post(format!("{base_url}/open-konata-file")) + .json(&serde_json::json!({ + "file_path": file_path + })) + .send() + .await + .unwrap() + .error_for_status() + .unwrap(); + } else { + println!("Failed to get Konata server status"); + } } #[cfg(target_family = "windows")] fn spawn_konata_app() { Command::new("cscript") - .current_dir("../../Konata") + .current_dir("../../konata") .arg("konata.vbs") .spawn() .unwrap(); @@ -277,7 +229,7 @@ fn spawn_konata_app() { #[cfg(target_family = "unix")] fn spawn_konata_app() { Command::new("sh") - .current_dir("../../Konata") + .current_dir("../../konata") .arg("konata.sh") .spawn() .unwrap(); @@ -301,7 +253,6 @@ pub fn run() { get_hierarchy, load_signal_and_get_timeline, unload_signal, - send_char, add_decoders, remove_all_decoders, add_diagram_connectors, @@ -311,27 +262,6 @@ pub fn run() { ]) .setup(|app| { *APP_HANDLE.write().unwrap() = Some(app.handle().to_owned()); - println!("Setting up yay!"); - - std::thread::spawn(move || { - // Simulate emitting a message after a delay - std::thread::sleep(std::time::Duration::from_secs(1)); - - //tart term and send initial update to backend - if let Some(app_handle) = crate::APP_HANDLE.read().unwrap().clone() { - let term = crate::TERM.lock().unwrap(); - let content = crate::aterm::terminal_instance_to_string(&term); - let payload = TerminalScreen { - cols: term.cols, - rows: term.rows, - content: content - }; - let payload = TerminalDownMsg::FullTermUpdate(payload); - let payload = serde_json::json!(payload); - app_handle.emit("term_content", payload).unwrap(); - } - }); - Ok(()) }) .run(tauri::generate_context!()) diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 6203dc8..69c3a72 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,8 +1,6 @@ // Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] -mod terminal_size; - fn main() { app_lib::run(); } diff --git a/src-tauri/src/terminal_size.rs b/src-tauri/src/terminal_size.rs deleted file mode 100644 index 055cb07..0000000 --- a/src-tauri/src/terminal_size.rs +++ /dev/null @@ -1,55 +0,0 @@ -use alacritty_terminal::event::{WindowSize}; -use alacritty_terminal::grid::{Dimensions}; -use alacritty_terminal::index::{Column, Line}; - -#[derive(Clone, Copy, Debug)] -pub struct TerminalSize { - pub cell_width: u16, - pub cell_height: u16, - pub num_cols: u16, - pub num_lines: u16, -} - -impl TerminalSize { - pub fn new(rows : u16, cols : u16) -> Self { - Self { - cell_width: 1, - cell_height: 1, - num_cols: cols, - num_lines: rows, - } - } -} - -impl Dimensions for TerminalSize { - fn total_lines(&self) -> usize { - self.screen_lines() - } - - fn screen_lines(&self) -> usize { - self.num_lines as usize - } - - fn columns(&self) -> usize { - self.num_cols as usize - } - - fn last_column(&self) -> Column { - Column(self.num_cols as usize - 1) - } - - fn bottommost_line(&self) -> Line { - Line(self.num_lines as i32 - 1) - } -} - -impl From for WindowSize { - fn from(size: TerminalSize) -> Self { - Self { - num_lines: size.num_lines, - num_cols: size.num_cols, - cell_width: size.cell_width, - cell_height: size.cell_height, - } - } -}