diff --git a/.eslintrc b/.eslintrc index ef4aedff..7bd62cc9 100644 --- a/.eslintrc +++ b/.eslintrc @@ -9,6 +9,7 @@ "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", "prettier" ], + "ignorePatterns": ["**/tests/*.test.*"], "rules": { "no-unused-vars":1, "@typescript-eslint/no-unused-vars": 1, @@ -16,4 +17,6 @@ "no-console": 1, // Means warning "prettier/prettier": 0 // Means error } } + + } diff --git a/package.json b/package.json index d02fa4a8..012f7a7c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "magic-eye", "description": "A magic eye app", - "version": "0.9.1", + "version": "0.9.2", "type": "module", "scripts": { "check-format": "prettier . --check", @@ -19,13 +19,16 @@ "dependencies": { "@headlessui/react": "^1.7.17", "@heroicons/react": "^2.1.1", - "@tabler/icons-react": "^2.44.0", + "@tabler/icons-react": "^2.45.0", "@tailwindcss/forms": "^0.5.7", "@tauri-apps/api": "^2.0.0-alpha", "@tauri-apps/plugin-app": "^2.0.0-alpha", "@tauri-apps/plugin-dialog": "^2.0.0-alpha.5", "@tauri-apps/plugin-window": "^2.0.0-alpha", "framer-motion": "^10.16.16", + "hls-video-element": "^1.1.1", + "hls.js": "^1.4.14", + "media-chrome": "^2.0.1", "react": "^18.2.0", "react-dom": "^18.2.0", "react-icons": "^4.12.0", @@ -42,13 +45,13 @@ "@typescript-eslint/eslint-plugin": "^6.16.0", "@typescript-eslint/parser": "^6.15.0", "@vitejs/plugin-react": "^4.2.1", - "@vitest/coverage-v8": "^1.1.0", - "@vitest/ui": "^1.1.0", + "@vitest/ui": "^1.1.3", + "@vitest/coverage-v8": "^1.1.3", "autoprefixer": "^10.4.16", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.2", - "jsdom": "^23.0.1", + "jsdom": "^23.1.0", "json-loader": "^0.5.7", "postcss": "^8.4.32", "prettier": "^3.1.1", @@ -56,6 +59,6 @@ "tailwindcss": "^3.4.0", "typescript": "^5.3.3", "vite": "^5.0.10", - "vitest": "^1.1.0" + "vitest": "^1.1.3" } } diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 726fb347..a251ab24 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -80,25 +80,6 @@ version = "1.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9d19de80eff169429ac1e9f48fffb163916b448a44e8e046186232046d9e1f9" -[[package]] -name = "arboard" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafb29b107435aa276664c1db8954ac27a6e105cdad3c88287a199eb0e313c08" -dependencies = [ - "clipboard-win", - "core-graphics 0.22.3", - "image", - "log", - "objc", - "objc-foundation", - "objc_id", - "parking_lot", - "thiserror", - "winapi", - "x11rb", -] - [[package]] name = "async-broadcast" version = "0.5.1" @@ -232,7 +213,7 @@ checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -267,7 +248,7 @@ checksum = "fdf6721fb0140e4f897002dd086c06f6c27775df19cfe1fccb21181a48fd2c98" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -277,7 +258,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4af014b17dd80e8af9fa689b2d4a211ddba6eb583c1622f35d0cb543f6b17e4" dependencies = [ "atk-sys", - "glib 0.18.4", + "glib", "libc", ] @@ -287,8 +268,8 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "251e0b7d90e33e0ba930891a505a9a35ece37b2dd37a14f3ffc306c13b980009" dependencies = [ - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "glib-sys", + "gobject-sys", "libc", "system-deps", ] @@ -307,9 +288,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "202651474fe73c62d9e0a56c6133f7a0ff1dc1c8cf7a5b03381af2a26553ac9d" +checksum = "d09dbe0e490df5da9d69b36dca48a76635288a82f92eca90024883a56202026d" dependencies = [ "async-trait", "axum-core", @@ -336,13 +317,14 @@ dependencies = [ "tower", "tower-layer", "tower-service", + "tracing", ] [[package]] name = "axum-core" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77cb22c689c44d4c07b0ab44ebc25d69d8ae601a2f28fb8d672d344178fa17aa" +checksum = "e87c8503f93e6d144ee5690907ba22db7ba79ab001a932ab99034f0fe836b3df" dependencies = [ "async-trait", "bytes", @@ -356,6 +338,7 @@ dependencies = [ "sync_wrapper", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -491,7 +474,7 @@ checksum = "f33613627f0dea6a731b0605101fad59ba4f193a52c96c4687728d822605a8a1" dependencies = [ "bitflags 2.4.1", "cairo-sys-rs", - "glib 0.18.4", + "glib", "libc", "once_cell", "thiserror", @@ -503,7 +486,7 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" dependencies = [ - "glib-sys 0.18.1", + "glib-sys", "libc", "system-deps", ] @@ -579,17 +562,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "clipboard-win" -version = "4.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" -dependencies = [ - "error-code", - "str-buf", - "winapi", -] - [[package]] name = "cocoa" version = "0.24.1" @@ -791,7 +763,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -801,7 +773,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" dependencies = [ "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -825,7 +797,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -836,7 +808,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -983,7 +955,7 @@ checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1012,16 +984,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "error-code" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" -dependencies = [ - "libc", - "str-buf", -] - [[package]] name = "event-listener" version = "2.5.3" @@ -1146,7 +1108,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1248,7 +1210,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1299,7 +1261,7 @@ dependencies = [ "gdk-pixbuf", "gdk-sys", "gio", - "glib 0.18.4", + "glib", "libc", "pango", ] @@ -1312,7 +1274,7 @@ checksum = "446f32b74d22c33b7b258d4af4ffde53c2bf96ca2e29abdf1a785fe59bd6c82c" dependencies = [ "gdk-pixbuf-sys", "gio", - "glib 0.18.4", + "glib", "libc", "once_cell", ] @@ -1323,9 +1285,9 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" dependencies = [ - "gio-sys 0.18.1", - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "gio-sys", + "glib-sys", + "gobject-sys", "libc", "system-deps", ] @@ -1338,9 +1300,9 @@ checksum = "31ff856cb3386dae1703a920f803abafcc580e9b5f711ca62ed1620c25b51ff2" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", - "gio-sys 0.18.1", - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "gio-sys", + "glib-sys", + "gobject-sys", "libc", "pango-sys", "pkg-config", @@ -1354,8 +1316,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a90fbf5c033c65d93792192a49a8efb5bb1e640c419682a58bb96f5ae77f3d4a" dependencies = [ "gdk-sys", - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "glib-sys", + "gobject-sys", "libc", "pkg-config", "system-deps", @@ -1370,7 +1332,7 @@ dependencies = [ "gdk", "gdkx11-sys", "gio", - "glib 0.18.4", + "glib", "libc", "x11", ] @@ -1382,7 +1344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fee8f00f4ee46cad2939b8990f5c70c94ff882c3028f3cc5abf950fa4ab53043" dependencies = [ "gdk-sys", - "glib-sys 0.18.1", + "glib-sys", "libc", "system-deps", "x11", @@ -1411,16 +1373,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "gethostname" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "gethostname" version = "0.4.3" @@ -1469,8 +1421,8 @@ dependencies = [ "futures-core", "futures-io", "futures-util", - "gio-sys 0.18.1", - "glib 0.18.4", + "gio-sys", + "glib", "libc", "once_cell", "pin-project-lite", @@ -1478,54 +1430,19 @@ dependencies = [ "thiserror", ] -[[package]] -name = "gio-sys" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9b693b8e39d042a95547fc258a7b07349b1f0b48f4b2fa3108ba3c51c0b5229" -dependencies = [ - "glib-sys 0.16.3", - "gobject-sys 0.16.3", - "libc", - "system-deps", - "winapi", -] - [[package]] name = "gio-sys" version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" dependencies = [ - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "glib-sys", + "gobject-sys", "libc", "system-deps", "winapi", ] -[[package]] -name = "glib" -version = "0.16.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16aa2475c9debed5a32832cb5ff2af5a3f9e1ab9e69df58eaadc1ab2004d6eba" -dependencies = [ - "bitflags 1.3.2", - "futures-channel", - "futures-core", - "futures-executor", - "futures-task", - "futures-util", - "gio-sys 0.16.3", - "glib-macros 0.16.8", - "glib-sys 0.16.3", - "gobject-sys 0.16.3", - "libc", - "once_cell", - "smallvec", - "thiserror", -] - [[package]] name = "glib" version = "0.18.4" @@ -1538,10 +1455,10 @@ dependencies = [ "futures-executor", "futures-task", "futures-util", - "gio-sys 0.18.1", - "glib-macros 0.18.3", - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", "libc", "memchr", "once_cell", @@ -1549,21 +1466,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "glib-macros" -version = "0.16.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb1a9325847aa46f1e96ffea37611b9d51fc4827e67f79e7de502a297560a67b" -dependencies = [ - "anyhow", - "heck", - "proc-macro-crate 1.3.1", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "glib-macros" version = "0.18.3" @@ -1575,17 +1477,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.43", -] - -[[package]] -name = "glib-sys" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61a4f46316d06bfa33a7ac22df6f0524c8be58e3db2d9ca99ccb1f357b62a65" -dependencies = [ - "libc", - "system-deps", + "syn 2.0.48", ] [[package]] @@ -1604,24 +1496,13 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "gobject-sys" -version = "0.16.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3520bb9c07ae2a12c7f2fbb24d4efc11231c8146a86956413fb1a79bb760a0f1" -dependencies = [ - "glib-sys 0.16.3", - "libc", - "system-deps", -] - [[package]] name = "gobject-sys" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" dependencies = [ - "glib-sys 0.18.1", + "glib-sys", "libc", "system-deps", ] @@ -1639,7 +1520,7 @@ dependencies = [ "gdk", "gdk-pixbuf", "gio", - "glib 0.18.4", + "glib", "gtk-sys", "gtk3-macros", "libc", @@ -1657,9 +1538,9 @@ dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", "gdk-sys", - "gio-sys 0.18.1", - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "gio-sys", + "glib-sys", + "gobject-sys", "libc", "pango-sys", "system-deps", @@ -1675,7 +1556,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -1968,8 +1849,6 @@ dependencies = [ "color_quant", "num-rational", "num-traits", - "png", - "tiff", ] [[package]] @@ -2067,7 +1946,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" dependencies = [ "bitflags 1.3.2", - "glib 0.18.4", + "glib", "javascriptcore-rs-sys", ] @@ -2077,8 +1956,8 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" dependencies = [ - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "glib-sys", + "gobject-sys", "libc", "system-deps", ] @@ -2105,12 +1984,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" -[[package]] -name = "jpeg-decoder" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0000e42512c92e31c2252315bda326620a4e034105e900c98ec492fa077b3e" - [[package]] name = "js-sys" version = "0.3.66" @@ -2168,7 +2041,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" dependencies = [ - "glib 0.18.4", + "glib", "gtk", "gtk-sys", "libappindicator-sys", @@ -2289,7 +2162,7 @@ dependencies = [ [[package]] name = "magic_eye" -version = "0.9.1" +version = "0.9.2" dependencies = [ "axum", "dirs-next", @@ -2300,9 +2173,6 @@ dependencies = [ "serde_json", "tauri", "tauri-build", - "tauri-plugin-app", - "tauri-plugin-clipboard-manager", - "tauri-plugin-dialog", "tauri-plugin-fs", "tauri-plugin-http", "tauri-plugin-log", @@ -2688,7 +2558,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -2743,7 +2613,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" dependencies = [ "gio", - "glib 0.18.4", + "glib", "libc", "once_cell", "pango-sys", @@ -2755,8 +2625,8 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" dependencies = [ - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "glib-sys", + "gobject-sys", "libc", "system-deps", ] @@ -2906,7 +2776,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -2953,7 +2823,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -3112,9 +2982,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.71" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8" +checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" dependencies = [ "unicode-ident", ] @@ -3139,9 +3009,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" dependencies = [ "proc-macro2", ] @@ -3338,29 +3208,6 @@ dependencies = [ "winreg 0.50.0", ] -[[package]] -name = "rfd" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241a0deb168c88050d872294f7b3106c1dfa8740942bcc97bc91b98e97b5c501" -dependencies = [ - "block", - "dispatch", - "glib-sys 0.18.1", - "gobject-sys 0.18.0", - "gtk-sys", - "js-sys", - "log", - "objc", - "objc-foundation", - "objc_id", - "raw-window-handle", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows-sys 0.48.0", -] - [[package]] name = "rustc-demangle" version = "0.1.23" @@ -3502,29 +3349,29 @@ checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.193" +version = "1.0.194" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +checksum = "0b114498256798c94a0689e1a15fec6005dee8ac1f41de56404b67afc2a4b773" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.193" +version = "1.0.194" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +checksum = "a3385e45322e8f9931410f01b3031ec534c3947d0e94c18049af4d9f9907d4e0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" dependencies = [ "itoa 1.0.10", "ryu", @@ -3549,7 +3396,7 @@ checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -3599,7 +3446,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -3729,7 +3576,7 @@ checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" dependencies = [ "futures-channel", "gio", - "glib 0.18.4", + "glib", "libc", "soup3-sys", ] @@ -3740,9 +3587,9 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" dependencies = [ - "gio-sys 0.18.1", - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "gio-sys", + "glib-sys", + "gobject-sys", "libc", "system-deps", ] @@ -3768,12 +3615,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "str-buf" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" - [[package]] name = "string_cache" version = "0.8.7" @@ -3830,9 +3671,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.43" +version = "2.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53" +checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" dependencies = [ "proc-macro2", "quote", @@ -3949,8 +3790,7 @@ checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tauri" version = "2.0.0-alpha.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05fb63873c39d3fd5ddad995d395e7b7394ece0b69aeacb31e91d24af48f3de1" +source = "git+https://github.com/tauri-apps/tauri?branch=dev#29ced5ceec40b2934094ade2db9a8855f294e1d1" dependencies = [ "anyhow", "bytes", @@ -3996,8 +3836,7 @@ dependencies = [ [[package]] name = "tauri-build" version = "2.0.0-alpha.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a2582ffb43e5c28932c43ffc40c295a9196a9a33ffb1163269c6baed84834a" +source = "git+https://github.com/tauri-apps/tauri?branch=dev#29ced5ceec40b2934094ade2db9a8855f294e1d1" dependencies = [ "anyhow", "cargo_toml", @@ -4017,8 +3856,7 @@ dependencies = [ [[package]] name = "tauri-codegen" version = "2.0.0-alpha.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06976ec7b704d6b842169ffd4ce596e9ce45917a0ab462cb96a119fa2829be9" +source = "git+https://github.com/tauri-apps/tauri?branch=dev#29ced5ceec40b2934094ade2db9a8855f294e1d1" dependencies = [ "base64", "brotli", @@ -4043,59 +3881,16 @@ dependencies = [ [[package]] name = "tauri-macros" version = "2.0.0-alpha.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff509be5a5ac34ec2e60d9029af1032c0a33e421f3e823bc92695192e2871c17" +source = "git+https://github.com/tauri-apps/tauri?branch=dev#29ced5ceec40b2934094ade2db9a8855f294e1d1" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", "tauri-codegen", "tauri-utils", ] -[[package]] -name = "tauri-plugin-app" -version = "2.0.0-alpha.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55e543dfb0e446657c7ceaccf2f3d7ced42b6cc70b44b227b1981886f00dccd" -dependencies = [ - "tauri", -] - -[[package]] -name = "tauri-plugin-clipboard-manager" -version = "2.0.0-alpha.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd33e4675642fc51b5538d42169927e39058e02000baea4651dc47a98bf259b" -dependencies = [ - "arboard", - "log", - "serde", - "serde_json", - "tauri", - "tauri-build", - "thiserror", -] - -[[package]] -name = "tauri-plugin-dialog" -version = "2.0.0-alpha.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0ff9a134afd29589d6154547a04dee18f5999aa63b91fdf7d58e597264633a" -dependencies = [ - "glib 0.16.9", - "log", - "raw-window-handle", - "rfd", - "serde", - "serde_json", - "tauri", - "tauri-build", - "tauri-plugin-fs", - "thiserror", -] - [[package]] name = "tauri-plugin-fs" version = "2.0.0-alpha.7" @@ -4178,7 +3973,7 @@ version = "2.0.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7cfaf07f8dcbfd4b2ce6156c4158d9d1419850ffe4e8146b6e890b5381e6906" dependencies = [ - "gethostname 0.4.3", + "gethostname", "log", "os_info", "serde", @@ -4201,8 +3996,7 @@ dependencies = [ [[package]] name = "tauri-runtime" version = "1.0.0-alpha.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a989e58af6e554dbac798a0a8d112faafc1509bcfab626466181e0724f09c5" +source = "git+https://github.com/tauri-apps/tauri?branch=dev#29ced5ceec40b2934094ade2db9a8855f294e1d1" dependencies = [ "gtk", "http 0.2.11", @@ -4219,8 +4013,7 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" version = "1.0.0-alpha.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a9f181a6f5f982204ae293c19f37ba90116b8ec0bfd0a08c7a7ba67200cd9e3" +source = "git+https://github.com/tauri-apps/tauri?branch=dev#29ced5ceec40b2934094ade2db9a8855f294e1d1" dependencies = [ "cocoa 0.25.0", "gtk", @@ -4240,8 +4033,7 @@ dependencies = [ [[package]] name = "tauri-utils" version = "2.0.0-alpha.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4858f99fc9f28b72008ef51d04d18b7e3646845c2bc18ee340045fed6ed5095" +source = "git+https://github.com/tauri-apps/tauri?branch=dev#29ced5ceec40b2934094ade2db9a8855f294e1d1" dependencies = [ "brotli", "ctor", @@ -4333,7 +4125,7 @@ checksum = "e7fbe9b594d6568a6a1443250a7e67d80b74e1e96f6d1715e1e21cc1888291d3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -4346,17 +4138,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tiff" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d172b0f4d3fba17ba89811858b9d3d97f928aece846475bbda076ca46736211" -dependencies = [ - "flate2", - "jpeg-decoder", - "weezl", -] - [[package]] name = "time" version = "0.3.31" @@ -4430,7 +4211,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -4589,7 +4370,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -4860,7 +4641,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", "wasm-bindgen-shared", ] @@ -4894,7 +4675,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4939,10 +4720,10 @@ dependencies = [ "gdk", "gdk-sys", "gio", - "gio-sys 0.18.1", - "glib 0.18.4", - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", "gtk", "gtk-sys", "javascriptcore-rs", @@ -4961,9 +4742,9 @@ dependencies = [ "bitflags 1.3.2", "cairo-sys-rs", "gdk-sys", - "gio-sys 0.18.1", - "glib-sys 0.18.1", - "gobject-sys 0.18.0", + "gio-sys", + "glib-sys", + "gobject-sys", "gtk-sys", "javascriptcore-rs-sys", "libc", @@ -4994,7 +4775,7 @@ checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -5008,12 +4789,6 @@ dependencies = [ "windows-core 0.52.0", ] -[[package]] -name = "weezl" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb" - [[package]] name = "win7-notifications" version = "0.3.1" @@ -5049,15 +4824,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "winapi-wsapoll" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" -dependencies = [ - "winapi", -] - [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -5134,7 +4900,7 @@ checksum = "12168c33176773b86799be25e2a2ba07c7aab9968b37541f1094dbd7a60c8946" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -5145,7 +4911,7 @@ checksum = "9d8dc32e0095a7eeccebd0e3f09e9509365ecb3fc6ac4d6f5f14a3f6392942d1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.43", + "syn 2.0.48", ] [[package]] @@ -5493,28 +5259,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "x11rb" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" -dependencies = [ - "gethostname 0.3.0", - "nix", - "winapi", - "winapi-wsapoll", - "x11rb-protocol", -] - -[[package]] -name = "x11rb-protocol" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc" -dependencies = [ - "nix", -] - [[package]] name = "xdg-home" version = "1.0.0" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 30b9f842..39b407a5 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "magic_eye" -version = "0.9.1" +version = "0.9.2" description = "A small gui application Made with Tauri, let you watch stream for a Mediamtx server." categories = ["utility", "network", "streaming"] authors = ["Thomas Toulouse"] @@ -9,11 +9,12 @@ repository = "https://github.com/Sir-Thom/Magic-eye" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + -[toolchain] -channel = "nightly" - +[patch.crates-io] +tauri = { git = "https://github.com/tauri-apps/tauri", branch = "dev" } +tauri-build = { git = "https://github.com/tauri-apps/tauri", branch = "dev" } [build-dependencies] tauri-build = { version = "2.0.0-alpha", features = [] } @@ -23,8 +24,6 @@ tauri = { version = "2.0.0-alpha", features = [] } tauri-plugin-log = { version = "2.0.0-alpha" } tauri-plugin-fs = { version = "2.0.0-alpha" } -tauri-plugin-clipboard-manager = { version = "2.0.0-alpha" } -tauri-plugin-dialog = { version = "2.0.0-alpha" } tauri-plugin-http = {features = [ "multipart" ], version = "2.0.0-alpha" } tauri-plugin-notification = {version = "2.0.0-alpha", features = [ "windows7-compat" ] } tauri-plugin-os = { version = "2.0.0-alpha" } @@ -32,15 +31,13 @@ tauri-plugin-process = { version = "2.0.0-alpha" } dirs-next = "2.0.0" serde = { version = "^1.0", features = ["derive"] } serde_json = "^1.0" -axum = "0.7.2" +axum = "0.7.3" tokio = { version = "1.35.1", features = ["full"] } tower-http = { version = "0.5.0", features = ["fs", "cors"] } reqwest = "^0.11.23" open = "5.0.1" log = "0.4.20" -tauri-plugin-app = "2.0.0-alpha.2" - [features] # this feature is used for production builds or when `devPath` points to the filesystem # DO NOT REMOVE!! diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 555cfe3e..2283088e 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -1,7 +1,7 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] use axum::Router; -use log::{debug, trace, info}; // Add info log level +use log::{debug, trace, info, LevelFilter}; use axum::http::{HeaderValue, Method}; use magic_eye::server::server_http_verb::{ __cmd__get_server_request, get_server_request, __cmd__patch_server_request, @@ -19,12 +19,10 @@ use magic_eye::utils::config::{ get_config_file_content, update_settings_file, save_api_ip, __cmd__get_api_ip, get_api_ip, }; -use magic_eye::utils::window_function::{__cmd__close_window, close_window, __cmd__minimize_window, minimize_window, __cmd__maximize_window, maximize_window, __cmd__unmaximize_window, unmaximize_window}; +use magic_eye::utils::window_function::{__cmd__close_splashscreen,close_splashscreen,__cmd__close_window, close_window, __cmd__minimize_window, minimize_window, __cmd__maximize_window, maximize_window, __cmd__unmaximize_window, unmaximize_window}; use tauri::path::BaseDirectory; -use std::{env, fs}; use tauri::{generate_handler, Manager}; use tauri_plugin_log::{Target, TargetKind}; -//use tauri::{path::BaseDirectory}; use tower_http::cors::CorsLayer; use tower_http::services::ServeDir; use utils::config::create_configuration_file_setting; @@ -33,47 +31,39 @@ use utils::os_setup_and_info::setup_wayland; const PORT: u16 = 16780; -#[tauri::command] -async fn close_splashscreen(window: tauri::Window) { - // Close splashscreen - if let Some(splashscreen) = window.get_window("splashscreen") { - splashscreen.close().expect("Failed to close splashscreen"); - } - // Show main window - window.get_window("main").expect("Main window not found").show().expect("Failed to show main window"); -} -fn main() -> Result<(), Box> { - create_configuration_file_setting(); + +#[tokio::main] +async fn main() -> Result<(), Box> { + tauri::async_runtime::set(tokio::runtime::Handle::current()); + let config_task = tokio::spawn(async { + create_configuration_file_setting(); + }); + #[cfg(target_os = "linux")] setup_wayland(); - info!("Webkit version: {:?}", tauri::webview_version()); - - trace!("config directory location: {:?}", get_config_dir()); - info!( - "{:?}", - dirs_next::config_dir() - .expect("Failed to get app data dir") - .push("magiceEye") - ); - + + + config_task.await?; let context = tauri::generate_context!(); let builder = tauri::Builder::default() .plugin( tauri_plugin_log::Builder::default().targets([ - Target::new( - TargetKind::Stdout - ), Target::new( - TargetKind::Webview, - ), - Target::new( - TargetKind::LogDir { file_name: Some("magiceye".to_string()) } - ) - + TargetKind::Stdout + ), + Target::new( + TargetKind::Webview, + ), + Target::new( + TargetKind::LogDir { file_name: Some("magiceye".to_string()) }) ]) + .level_for("tauri", LevelFilter::Info) + .level_for("hyper", LevelFilter::Info) + .level_for("reqwest", LevelFilter::Info) + .level_for("tracing", LevelFilter::Info) .build(), ) .plugin(tauri_plugin_fs::init()) @@ -86,35 +76,40 @@ fn main() -> Result<(), Box> { builder .setup(move |app| { - let main_window = app.get_window("main").expect("Main window not found"); - debug!("main_window url: : {:?}", main_window.url()); + info!("Webkit version: {:?}", tauri::webview_version()); + + trace!("config directory location: {:?}", get_config_dir()); + info!( + "{:?}", + dirs_next::config_dir() + .expect("Failed to get app data dir") + .push("magiceEye") + ); let asset_dir_path = app.path().app_data_dir().expect("Failed to get app data dir"); debug!("asset_dir_path: {:?}", asset_dir_path); let resource_path = app.path().resolve("assets/", BaseDirectory::Resource)?; - //let resource_path = app.path().parse(path).expect("Failed to parse asset dir path"); + + debug!("resource_path: {:?}", resource_path); - tauri::async_runtime::spawn(async move { + tokio::spawn(async move { debug!("Initializing..."); let serve_dir = ServeDir::new(resource_path.to_str().expect("Failed to convert resource path to string")); - let _files = fs::read_dir(resource_path).map(|res| res.map(|e| e.expect("error").path())).expect("Failed to read dir"); - debug!("files: {:?}", _files); let axum_app = Router::new().nest_service("/", serve_dir).layer( CorsLayer::new() .allow_origin("*".parse::().expect("Failed to parse header value")) .allow_methods([Method::GET]), ); - - let listener = tokio::net::TcpListener::bind(&format!("127.0.0.1:{}", PORT)).await.expect("Failed to bind to port"); - axum::serve(listener, axum_app).await.unwrap(); + + let listener = tokio::net::TcpListener::bind(&format!("127.0.0.1:{}", PORT)).await.expect("Failed to bind to port"); + axum::serve(listener, axum_app).await.unwrap(); }); - Ok(()) }) .invoke_handler(generate_handler![ diff --git a/src-tauri/src/utils/os_setup_and_info.rs b/src-tauri/src/utils/os_setup_and_info.rs index 341aac87..3b5b2ce4 100644 --- a/src-tauri/src/utils/os_setup_and_info.rs +++ b/src-tauri/src/utils/os_setup_and_info.rs @@ -5,7 +5,5 @@ pub fn setup_wayland() { let key = "GDK_BACKEND"; //set it to xwayland if user is using wayland env::set_var(key, "x11"); - - std::env::set_var("GTK_OVERLAY_SCROLLING", "1"); info!("GDK_BACKEND: {:?}", env::var(key).unwrap()); } diff --git a/src-tauri/src/utils/window_function.rs b/src-tauri/src/utils/window_function.rs index 6c2b1ab9..032f5f23 100644 --- a/src-tauri/src/utils/window_function.rs +++ b/src-tauri/src/utils/window_function.rs @@ -1,3 +1,5 @@ +use tauri::Manager; + #[tauri::command] pub fn close_window(window: tauri::Window) { window.close().expect("Failed to close window"); @@ -22,4 +24,15 @@ pub fn unmaximize_window(window: tauri::Window) { window.unmaximize().expect("Failed to unmaximize window"); } +#[tauri::command] +pub fn close_splashscreen(window: tauri::Window) { + // Close splashscreen + if let Some(splashscreen) = window.get_window("splashscreen") { + splashscreen.close().expect("Failed to close splashscreen"); + } + window.get_window("main").expect("no window labeled 'main' found").show().unwrap(); + + + +} diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index e1acb02e..fd47bc42 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -9,34 +9,48 @@ }, "package": { "productName": "Magic Eye", - "version": "0.9.1" + "version": "0.9.2" }, "tauri": { - "windows": [ + "windows": [ { + "userAgent": "Chrome", "title": "Magic Eye", - "center": false, - "closable": true, - "maximizable": true, - - - + "resizable": true, + "shadow": true, "minimizable": true, - - - "alwaysOnTop": false, - - "resizable": true, + "maximizable": true, + "minWidth": 1000, + "minHeight": 600, "decorations": false, + "alwaysOnTop": false, + "fullscreen": false, + "titleBarStyle": "Visible", + "width": 1000, + "visible": false, + "height": 600, + "closable": true, + "url": "index.html", + "label": "main", + "theme":"Dark" + + }, + { + "title": "Magic Eye", + "titleBarStyle": "Visible", "minWidth": 1000, "minHeight": 600, - - "skipTaskbar": false, - "shadow": true - } - ] , + "resizable": true, + "fullscreen": false, + "decorations": false, + "alwaysOnTop": false, + "url": "splashscreen.html", + "label": "splashscreen" + } + + ], "bundle": { "copyright": "MIT", "active": true, @@ -51,7 +65,7 @@ "icons/icon.icns", "icons/icon.ico" ], - "identifier": "com.MagicEye.dev", + "identifier": "dev.MagicEye.magic", "targets": "all", "windows": { "allowDowngrades": true, @@ -69,7 +83,10 @@ "appimage": { "bundleMediaFramework": true } + + + }, "security": { @@ -80,7 +97,7 @@ "main", "settings" ], - "domain": "localhost" + "domain": "*" } ] @@ -88,52 +105,9 @@ }, "plugins": { - "windows": [ - { - "userAgent": "Chrome", - "close": true, - "title": "Magic Eye", - "titleBarStyle": "Overlay", - "minWidth": 1000, - "setResizable": true, - "minHeight": 600, - "resizable": true, - "fullscreen": false, - - "visible": false, - "decorations": false, - "alwaysOnTop": false, - "url": "index.html", - "label": "main", - "theme":"Dark" - - }, - { - "title": "Magic Eye", - "titleBarStyle": "Visible", - "minWidth": 1000, - "minHeight": 600, - "resizable": true, - "fullscreen": false, - "decorations": false, - "alwaysOnTop": false, - "url": "splashscreen.html", - "label": "splashscreen" - } - - ], - "dialog": { - "all": true, - "ask": false, - "confirm": false, - "message": true, - "open": false, - "save": false - }, "fs": { "all": true, "scope": [ - "$XDG_DATA_HOME/com.MagicEye.dev/assets/*", "$RESOURCE" ] }, @@ -144,11 +118,40 @@ "http://*", "https://*" ] + }, + "allowlist":{ + "all": true, + "window": { + "center": false, + "close": true, + "create": false, + "hide": false, + "maximize": true, + "minimize": true, + "print": false, + "requestUserAttention": false, + "setAlwaysOnTop": false, + "setCursorGrab": true, + "setCursorIcon": true, + "setCursorPosition": false, + "setCursorVisible": false, + "setDecorations": false, + "setFocus": true, + "setFullscreen": true, + "setIcon": true, + "setMaxSize": false, + "setMinSize": false, + "setPosition": false, + "setResizable": true, + "setSize": true, + "setSkipTaskbar": false, + "setTitle": true, + "show": true, + "startDragging": true, + "unmaximize": true, + "unminimize": true + } - } - - - - + } } diff --git a/src/App.tsx b/src/App.tsx index 18cdf478..64264d6f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,7 +8,7 @@ import Titlebar from "./components/titlebar/titlebar"; function App() { useEffect(() => { resizeWindow; - invoke("close_splashscreen"); + invoke("close_splashscreen"); }, []); return ( diff --git a/src/components/checkBox/checkBox.tsx b/src/components/checkBox/checkBox.tsx index 35ce5cf5..1e8aeab4 100644 --- a/src/components/checkBox/checkBox.tsx +++ b/src/components/checkBox/checkBox.tsx @@ -1,6 +1,7 @@ import { FaCheck } from "react-icons/fa"; import ICheckbox from "../../interfaces/ICheckbox"; +import { ChangeEvent } from "react"; export default function Checkbox({ checked, @@ -14,7 +15,7 @@ export default function Checkbox({ const handleCheckboxChange = () => { // Toggle the checked state and call the onChange callback - onChange(!checked as any); + onChange(!checked as unknown as ChangeEvent); }; return ( diff --git a/src/components/titlebar/titlebar.tsx b/src/components/titlebar/titlebar.tsx index 05d4d261..0de3343f 100644 --- a/src/components/titlebar/titlebar.tsx +++ b/src/components/titlebar/titlebar.tsx @@ -46,11 +46,8 @@ export default function Titlebar() { }, []); const ChangeMaximizedIcon = useCallback(async() => { - setMaximized((prevMaximized) => !prevMaximized); - - console.log("maximized:", maximized); - await invoke("maximize_window"); + await invoke("maximize_window"); }, []); @@ -82,6 +79,7 @@ export default function Titlebar() { (
@@ -194,7 +192,7 @@ export default function Titlebar() { type="button" title="Minimize" className="flex items-center justify-center text-text-dark w-8 h-8 rounded-full hover:bg-window-dark-600 " - onClick={async() => invoke("minimize_window")} + onClick={async() => await invoke("minimize_window")} > @@ -224,7 +222,7 @@ export default function Titlebar() { type="button" title="Close" className="flex items-center justify-center text-text-dark w-8 h-8 rounded-full hover:bg-window-dark-600" - onClick={async() => invoke("close_window")} + onClick={async() => await invoke("close_window")} > void; -} + export default function Toggle({ enabled, onChange, className, value -}: ToggleProps) { +}: IToggle) { return ( (null); + const { height, width }: IVideoPlayer = useWindowDimensions(); const prevErrorRef = useRef(null); @@ -21,6 +23,7 @@ export default function VidPlayer() { const handleDismissErrorToast = () => { setError(null); }; + useEffect(() => { (async () => { invoke("get_config_file_content").then((res: string) => { @@ -28,7 +31,6 @@ export default function VidPlayer() { const jsonObject = JSON.parse(res); const placeholderValue = jsonObject.placeholder; setPlaceholderUrl(placeholderValue.toString()); - console.log("placeholderUrl:", placeholderValue); } catch (error) { throw new Error("Error parsing JSON:" + error); } @@ -38,13 +40,11 @@ export default function VidPlayer() { async function get_url() { try { - const response = await fetch(url); - console.log("response:", response); + if (response.status === 200) { setIsConnected(true); setStreamUrl(url); - console.log("streamUrl:", url); setError(""); } else { throw new Error( @@ -53,7 +53,6 @@ export default function VidPlayer() { } } catch (err) { setIsConnected(false); - handleDisconnect(); handlePlayerError(err.message); } @@ -71,9 +70,12 @@ export default function VidPlayer() { function handleDisconnect(): void { setIsConnected(false); setStreamUrl(""); + + + + // Clear the error only if it's different from the previous one if (error && error !== prevErrorRef.current) { - setError(""); - setStreamUrl(""); + setError(null); } prevErrorRef.current = error; } @@ -84,9 +86,11 @@ export default function VidPlayer() { }> {streamUrl ? ( e.preventDefault()} className="flex mx-16 mt-16" - url={streamUrl.toString()} + url={streamUrl} width={width} height={height - 150} controls={false} diff --git a/src/interfaces/IToggle.ts b/src/interfaces/IToggle.ts new file mode 100644 index 00000000..b44f674a --- /dev/null +++ b/src/interfaces/IToggle.ts @@ -0,0 +1,6 @@ +export interface IToggle{ + className?: string; + enabled: boolean; + value?: string; + onChange: (checked: boolean) => void; +} \ No newline at end of file diff --git a/src/main.tsx b/src/main.tsx index 363d9594..0d18fd29 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -15,7 +15,6 @@ root.render( onExitComplete={() => null} mode={"sync"} > - {" "} diff --git a/src/types/serverInfo.d.ts b/src/types/serverInfo.d.ts new file mode 100644 index 00000000..4d678996 --- /dev/null +++ b/src/types/serverInfo.d.ts @@ -0,0 +1,47 @@ +// Define your types here +declare type ServerInfoHLS = { + path: string, + created: string, + lastRequest: string, + bytesSent: number, +}; + +declare type ServerInfoRTMP = { + id: string, + created: string, + remoteAddr: string, + state: string, + path: string, + bytesReceived: number, + bytesSent: number, +}; + +declare type ServerInfoRTSP = { + id: string, + created: string, + remoteAddr: string, + bytesReceived: number, + bytesSent: number, +}; +declare type ServerInfoSRT = { + id: string, + created: string, + remoteAddr: string, + state: string, + path: string, + bytesReceived: number, + bytesSent: number, +}; +declare type ServerInfoWebRTC = { + id: string, + created: string, + remoteAddr: string, + peerConnectionEstablished: boolean, + localCandidate: string, + remoteCandidate: string, + state: string, + path: string, + bytesReceived: number, + bytesSent: number, +}; + diff --git a/src/types/settingApp.d.ts b/src/types/settingApp.d.ts new file mode 100644 index 00000000..d88653e7 --- /dev/null +++ b/src/types/settingApp.d.ts @@ -0,0 +1,4 @@ +declare type SettingApp = { + placeholder: string, + apiIp: string +}; \ No newline at end of file diff --git a/src/utils/WindowSize.tsx b/src/utils/WindowSize.tsx index 319041e6..4c43b570 100644 --- a/src/utils/WindowSize.tsx +++ b/src/utils/WindowSize.tsx @@ -12,7 +12,7 @@ export function useWindowDimensions() { const [windowDimensions, setWindowDimensions] = useState( getWindowDimensions() ); - + useEffect(() => { function handleResize() { setWindowDimensions(getWindowDimensions()); diff --git a/src/utils/hooks/ServerData.tsx b/src/utils/hooks/ServerData.tsx index 7ca0c919..0d7ecbd8 100644 --- a/src/utils/hooks/ServerData.tsx +++ b/src/utils/hooks/ServerData.tsx @@ -40,8 +40,7 @@ function useServerData() { const res = await invoke("get_api_ip"); return res.toString().replace(/^"(.*)"$/, "$1"); } catch (e) { - console.error(e); - return "unable to get API Ip address."; + throw new Error("Unable to get API Ip address."); } } diff --git a/src/views/ServerInfoView/HlsServerInfo.tsx b/src/views/ServerInfoView/HlsServerInfo.tsx index eb63350f..312da863 100644 --- a/src/views/ServerInfoView/HlsServerInfo.tsx +++ b/src/views/ServerInfoView/HlsServerInfo.tsx @@ -6,25 +6,21 @@ import ListView from "../../components/ListBox/listView"; import useServerData from "../../utils/hooks/ServerData"; export default function HLSConnInfo() { - const [items, setItems] = useState([]); + const [items, setItems] = useState([]); const { apiIp } = useServerData(); useEffect(() => { if (apiIp !== null) { - console.log("apiIp:", apiIp); - invoke("get_server_request", { url: `http://${apiIp}/v3/hlsmuxers/list` }).then((response) => { - console.log("Response before parsing:", response); if (response) { response = JSON.parse(response.toString()); - console.log("Parsed Response:", response); } - if (response && (response as { items: any[] }).items) { - setItems((response as { items: any[] }).items); + if (response && (response as { items: ServerInfoHLS[] }).items) { + setItems((response as { items: ServerInfoHLS[] }).items); } else { - console.error("Response does not contain 'items'."); + throw new Error("Response does not contain 'items'."); } }); } diff --git a/src/views/ServerInfoView/RtmpServerInfo.tsx b/src/views/ServerInfoView/RtmpServerInfo.tsx index 183b7d10..0b606a63 100644 --- a/src/views/ServerInfoView/RtmpServerInfo.tsx +++ b/src/views/ServerInfoView/RtmpServerInfo.tsx @@ -6,26 +6,21 @@ import ListView from "../../components/ListBox/listView"; import useServerData from "../../utils/hooks/ServerData"; export default function RtmpConnInfo() { - const [items, setItems] = useState([]); + const [items, setItems] = useState([]); const { apiIp } = useServerData(); useEffect(() => { if (apiIp !== null) { - console.log("apiIp:", apiIp); - invoke("get_server_request", { url: `http://${apiIp}/v3/rtmpconns/list` }).then((response) => { - console.log("Response before parsing:", response); if (response) { response = JSON.parse(response.toString()); - console.log("Parsed Response:", response); } - console.log("response:", response); - if (response && (response as { items: any[] }).items) { - setItems((response as { items: any[] }).items); + if (response && (response as { items: ServerInfoRTMP[] }).items) { + setItems((response as { items: ServerInfoRTMP[] }).items); } else { - console.error("Response does not contain 'items'."); + throw new Error("Response does not contain 'items'."); } }); } @@ -45,18 +40,14 @@ export default function RtmpConnInfo() { async function getAllRTMPSessions() { invoke("get_server_request", { url: `http://${apiIp}/v3/rtmpconns/list` - }).then((response) => { - console.log("Response before parsing:", response); - + }).then((response) => { if (response) { response = JSON.parse(response.toString()); - console.log("Parsed Response:", response); } - console.log("response:", response); - if (response && (response as { items: any[] }).items) { - setItems((response as { items: any[] }).items); + if (response && (response as { items: ServerInfoRTMP[] }).items) { + setItems((response as { items: ServerInfoRTMP[] }).items); } else { - console.error("Response does not contain 'items'."); + throw new Error("Response does not contain 'items'."); } }); } @@ -74,7 +65,7 @@ export default function RtmpConnInfo() { }, 100); }) .catch((error) => { - console.error("Error kicking RTMP session:", error); + throw new Error("Error kicking RTMP session:" + error); }); } diff --git a/src/views/ServerInfoView/RtmpsServerInfo.tsx b/src/views/ServerInfoView/RtmpsServerInfo.tsx index a1f2e149..29a5a4c8 100644 --- a/src/views/ServerInfoView/RtmpsServerInfo.tsx +++ b/src/views/ServerInfoView/RtmpsServerInfo.tsx @@ -6,28 +6,19 @@ import ListView from "../../components/ListBox/listView"; import useServerData from "../../utils/hooks/ServerData"; export default function RtmpsConnInfo() { - const [items, setItems] = useState([]); + const [items, setItems] = useState([]); const { apiIp } = useServerData(); useEffect(() => { if (apiIp !== null) { - console.log("apiIp:", apiIp); - invoke("get_server_request", { url: `http://${apiIp}/v3/rtmpsconns/list` }).then((response) => { - console.log("response:", response); - - - console.log("response:", response); if (response) { response = JSON.parse(response.toString()); - console.log("Parsed Response:", response); } - if (response && (response as { items: any[] }).items) { - setItems((response as { items: any[] }).items); - } else { - console.error("Response does not contain 'items'."); + if (response && (response as { items: ServerInfoRTMP[] }).items) { + setItems((response as { items: ServerInfoRTMP[] }).items); } }); } @@ -37,9 +28,7 @@ export default function RtmpsConnInfo() { invoke("post_server_request", { url: `http://${apiIp}/v3/rtmpsconns/kick/`, value: valueToSend - }).then((res) => { - console.log(res); - }); + }) } return ( diff --git a/src/views/ServerInfoView/RtspServerInfo.tsx b/src/views/ServerInfoView/RtspServerInfo.tsx index 7190696c..fa2a3143 100644 --- a/src/views/ServerInfoView/RtspServerInfo.tsx +++ b/src/views/ServerInfoView/RtspServerInfo.tsx @@ -6,29 +6,25 @@ import ListView from "../../components/ListBox/listView"; import useServerData from "../../utils/hooks/ServerData"; export default function RtspConnInfo() { - const [items, setItems] = useState([]); + const [items, setItems] = useState([]); const { apiIp, loading } = useServerData(); useEffect(() => { if (!loading) { - console.log("apiIp:", apiIp); getAllRtspSessions(); } }, [apiIp, loading]); async function getAllRtspSessions() { try { - console.log("apiIp:", apiIp); const response = await invoke("get_server_request", { url: `http://${apiIp}/v3/rtspsessions/list` }); const parsedResponse = JSON.parse(response.toString()); if (parsedResponse && parsedResponse.items) { setItems(parsedResponse.items); - } else { - console.error("Response does not contain 'items'."); } } catch (error) { - console.error("Error fetching RTSP sessions:", error); + throw new Error("Error fetching RTSP sessions:" + error); } } @@ -45,7 +41,7 @@ export default function RtspConnInfo() { // Update the UI by fetching the updated list of sessions getAllRtspSessions(); } catch (error) { - console.error("Error kicking RTSP session:", error); + throw new Error("Error kicking RTSP session:" + error); } } diff --git a/src/views/ServerInfoView/RtspsServerInfo.tsx b/src/views/ServerInfoView/RtspsServerInfo.tsx index 637e7db8..f24bc73a 100644 --- a/src/views/ServerInfoView/RtspsServerInfo.tsx +++ b/src/views/ServerInfoView/RtspsServerInfo.tsx @@ -6,11 +6,10 @@ import ListView from "../../components/ListBox/listView"; import useServerData from "../../utils/hooks/ServerData"; export default function RtspsConnInfo() { - const [items, setItems] = useState([]); + const [items, setItems] = useState([]); const { apiIp, loading } = useServerData(); useEffect(() => { if (!loading) { - console.log("apiIp:", apiIp); getAllRtspsSessions(); } }, [apiIp, loading]); @@ -28,7 +27,6 @@ export default function RtspsConnInfo() { async function getAllRtspsSessions() { try { - console.log("apiIp:", apiIp); const response = await invoke("get_server_request", { url: `http://${apiIp}/v3/rtspssessions/list` }); @@ -39,7 +37,7 @@ export default function RtspsConnInfo() { throw new Error("Response does not contain 'items'."); } } catch (error) { - console.error("Error fetching RTSPS sessions:", error); + throw new Error("Error fetching RTSP sessions:" + error); } } @@ -56,7 +54,7 @@ export default function RtspsConnInfo() { }, 100); }); } catch (error) { - console.error("Error kicking RTSP session:", error); + throw new Error("Error kicking RTSP session:" + error); } } diff --git a/src/views/ServerInfoView/SrtServerInfo.tsx b/src/views/ServerInfoView/SrtServerInfo.tsx index 472d0307..8ffbdfa4 100644 --- a/src/views/ServerInfoView/SrtServerInfo.tsx +++ b/src/views/ServerInfoView/SrtServerInfo.tsx @@ -6,11 +6,10 @@ import ListView from "../../components/ListBox/listView"; import useServerData from "../../utils/hooks/ServerData"; export default function SRTConnInfo() { - const [items, setItems] = useState([]); + const [items, setItems] = useState([]); const { apiIp, loading } = useServerData(); useEffect(() => { if (!loading) { - console.log("apiIp:", apiIp); getAllSRTSessions(); } }, [apiIp, loading]); @@ -23,11 +22,9 @@ export default function SRTConnInfo() { const parsedResponse = JSON.parse(response.toString()); if (parsedResponse && parsedResponse.items) { setItems(parsedResponse.items); - } else { - console.error("Response does not contain 'items'."); } } catch (error) { - console.error("Error fetching RTSP sessions:", error); + throw new Error("Error fetching SRT sessions:" + error); } } @@ -44,7 +41,8 @@ export default function SRTConnInfo() { // Update the UI by fetching the updated list of sessions getAllSRTSessions(); } catch (error) { - console.error("Error kicking RTSP session:", error); + throw new Error("Error kicking RTSP session:" + error); + } } diff --git a/src/views/ServerInfoView/WebrtcServerInfo.tsx b/src/views/ServerInfoView/WebrtcServerInfo.tsx index a1f0cab7..9047f1d6 100644 --- a/src/views/ServerInfoView/WebrtcServerInfo.tsx +++ b/src/views/ServerInfoView/WebrtcServerInfo.tsx @@ -6,11 +6,10 @@ import ListView from "../../components/ListBox/listView"; import useServerData from "../../utils/hooks/ServerData"; export default function WebRTCConnInfo() { - const [items, setItems] = useState([]); + const [items, setItems] = useState([]); const { apiIp, loading } = useServerData(); useEffect(() => { if (!loading) { - console.log("apiIp:", apiIp); getAllWebRTCSessions(); } }, [apiIp, loading]); @@ -23,11 +22,9 @@ export default function WebRTCConnInfo() { const parsedResponse = JSON.parse(response.toString()); if (parsedResponse && parsedResponse.items) { setItems(parsedResponse.items); - } else { - console.error("Response does not contain 'items'."); } } catch (error) { - console.error("Error fetching RTSP sessions:", error); + throw new Error("Error fetching RTSP sessions:" + error); } } @@ -44,7 +41,7 @@ export default function WebRTCConnInfo() { // Update the UI by fetching the updated list of sessions getAllWebRTCSessions(); } catch (error) { - console.error("Error kicking RTSP session:", error); + throw new Error("Error kicking RTSP session:" + error); } } diff --git a/src/views/Settings.tsx b/src/views/Settings.tsx index 4983a797..917cded1 100644 --- a/src/views/Settings.tsx +++ b/src/views/Settings.tsx @@ -124,7 +124,6 @@ export default function Setting() { } // Make sure parsedResponse is an object before using it if (response && typeof response === "object") { - console.log("parsedResponse:", response); const defaultSettings = getDefaultSettings(fetchConfigData); const updatedSettings = { ...defaultSettings, @@ -134,7 +133,6 @@ export default function Setting() { updateStateAndHandleActions(response as ISettings); } } catch (e) { - console.log("serverError:", e); setError("Error: " + e.message); } }; @@ -181,15 +179,11 @@ export default function Setting() { return updatedSettings; }); - - const apiIpValue = apiIp; - invoke("save_api_ip", { apiIp: apiIpValue }); } async function patchSetting(PatchData) { try { const apiIpValue = apiIp; // Get the API IP - console.log("apiIpInPatch:", apiIpValue); if (!PatchData) { throw new Error("ConfigData is empty."); @@ -199,11 +193,10 @@ export default function Setting() { } const serverUrl = `http://${apiIpValue}/v3/config/global/patch`; - const response = await invoke("patch_server_request", { + await invoke("patch_server_request", { configData: PatchData, url: serverUrl }); - console.log("patch response:", response); // Handle common actions updateStateAndHandleActions(PatchData); diff --git a/src/views/appSetting/appSetting.tsx b/src/views/appSetting/appSetting.tsx index 76966643..d135ee15 100644 --- a/src/views/appSetting/appSetting.tsx +++ b/src/views/appSetting/appSetting.tsx @@ -9,7 +9,7 @@ import { ISetting } from "../../interfaces/ISetting"; import { listen } from "@tauri-apps/api/event"; import ModalConfirm from "../../components/modals/modalConfirm"; -export async function GetConfig() { +export async function GetConfig():Promise { try { const configData = await invoke("get_config_file_content"); // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -19,7 +19,7 @@ export async function GetConfig() { } } -export async function SetConfig(new_settings) { +export async function SetConfig(new_settings: string) { try { await invoke("update_settings_file", { newSettings: new_settings @@ -88,9 +88,7 @@ export default function GeneralSetting() { ...configData }; - const handleCancel = () => { - console.log("initialSettings:", initialSettings); - + const handleCancel = () => { setCurrentPlacholder(initialSettings.placeholder); setApi_ip(initialSettings.api_ip); }; @@ -106,8 +104,8 @@ export default function GeneralSetting() { useEffect(() => { async function fetchConfig() { try { - const configData = await GetConfig(); - const parsedConfig = JSON.parse(configData); + const configData:SettingApp = await GetConfig(); + const parsedConfig = JSON.parse(configData.toString()); setTmpConf(parsedConfig); setCurrentPlacholder(parsedConfig.placeholder); setApi_ip(parsedConfig.api_ip); @@ -120,15 +118,14 @@ export default function GeneralSetting() { parsedConfig.placeholder ]); } - } catch (err) { - setError(err.message); + } catch (err: unknown) { + setError((err as Error).message); } } fetchConfig(); listen("tauri://update_settings_file", () => { fetchConfig(); - console.log("Settings file updated"); }); }, []); @@ -140,7 +137,7 @@ export default function GeneralSetting() { setSuccessMessage(""); } - function handlePlaceholderChange(event) { + function handlePlaceholderChange(event: { target: { value: string; }; }) { const newPlaceholder = event.target.value; setCurrentPlacholder(newPlaceholder); setTmpConf((prevTmpConf) => ({ @@ -148,7 +145,7 @@ export default function GeneralSetting() { placeholder: newPlaceholder })); } - function handleApi_ipChange(event) { + function handleApi_ipChange(event: { target: { value: string; }; }) { const newApi_ip = event.target.value; setApi_ip(newApi_ip); setTmpConf((prevTmpConf) => ({ diff --git a/src/views/serverSetting/ApiSetting.tsx b/src/views/serverSetting/ApiSetting.tsx index 05276b1e..d43a0c69 100644 --- a/src/views/serverSetting/ApiSetting.tsx +++ b/src/views/serverSetting/ApiSetting.tsx @@ -6,7 +6,6 @@ import ModalConfirm from "../../components/modals/modalConfirm"; export default function ApiSetting({ settings, onSave, patchSetting }) { - console.log("api setting:", settings); const initialSettings = { apiEnabled: Boolean(settings.api), metricsEnabled: Boolean(settings.metrics), diff --git a/src/views/serverSetting/LoggingSetting.tsx b/src/views/serverSetting/LoggingSetting.tsx index e37fde7b..fde2129b 100644 --- a/src/views/serverSetting/LoggingSetting.tsx +++ b/src/views/serverSetting/LoggingSetting.tsx @@ -39,7 +39,6 @@ export default function LoggingSetting({ settings, onSave, patchSetting }) { const handleLogLevelChange = (event) => { setLogLevel(event.target.value); - console.log("logLevel:", logLevel); }; const handleLogDestinationsChange = (event) => { @@ -59,7 +58,6 @@ export default function LoggingSetting({ settings, onSave, patchSetting }) { logDestinations: logDestinations, logFile: logFile }; - console.log("updatedSettings:", updatedSettings); // Call the onSave prop to save the changes onSave(updatedSettings); diff --git a/src/views/serverSetting/RtmpSetting.tsx b/src/views/serverSetting/RtmpSetting.tsx index 0280b1e3..8e7a635f 100644 --- a/src/views/serverSetting/RtmpSetting.tsx +++ b/src/views/serverSetting/RtmpSetting.tsx @@ -56,8 +56,6 @@ export default function RtmpSetting({ settings, onSave, patchSetting }) { }; const handleRtmpEncryption = () => { - console.log("toggle: " + rtmpEncryptionToggle); - console.log("rtmpEncryption: " + rtmpEncryption); setRtmpEncryptionToggle(!rtmpEncryptionToggle); setRtmpEncryption(rtmpEncryptionToggle ? "no" : "yes"); }; diff --git a/src/views/serverSetting/RtspSetting.tsx b/src/views/serverSetting/RtspSetting.tsx index f84af1ac..1b65bd29 100644 --- a/src/views/serverSetting/RtspSetting.tsx +++ b/src/views/serverSetting/RtspSetting.tsx @@ -72,8 +72,6 @@ export default function RtspSetting({ settings, onSave, patchSetting }) { }; const handleEncryption = () => { - console.log("toggle: " + rtspEncryptionToggle); - console.log("rtmpEncryption: " + encryption); setRtspEncryptionToggle(!rtspEncryptionToggle); setEncryption(rtspEncryptionToggle ? "no" : "yes"); }; @@ -107,7 +105,7 @@ export default function RtspSetting({ settings, onSave, patchSetting }) { }; useEffect(() => { - console.log("setting updated:", settings); + setRtsp(settings.rtsp); setRtspDisable(settings.rtspDisable || false); @@ -139,7 +137,7 @@ export default function RtspSetting({ settings, onSave, patchSetting }) { multicastRTPPort: multicastRTPPort, multicastRTCPPort: multicastRTCPPort }; - console.log("setting updated:", settings); + onSave(updatedSettings); patchSetting(updatedSettings); diff --git a/src/views/serverSetting/webrtcSetting.tsx b/src/views/serverSetting/webrtcSetting.tsx index 9650a65a..6398ec47 100644 --- a/src/views/serverSetting/webrtcSetting.tsx +++ b/src/views/serverSetting/webrtcSetting.tsx @@ -78,7 +78,7 @@ export default function WebrtcSetting({ settings, onSave, patchSetting }) { const handleWebrtc = () => { setWebrtc(!webrtc); }; - console.log(webrtc); + const handleWebrtcAddress = (event) => { setWebrtcAddress(event.target.value); @@ -147,7 +147,7 @@ export default function WebrtcSetting({ settings, onSave, patchSetting }) { setWebrtcICEUDPMuxAddress(settings.webrtcICEUDPMuxAddress || ""); setWebrtcICETCPMuxAddress(settings.webrtcICETCPMuxAddress || ""); }, [settings]); - console.log(settings); + const handleSaveConfig = () => { hideConfirmation(); diff --git a/tests/listView.test.tsx b/tests/listView.test.tsx index 5a1ae664..2a851f72 100644 --- a/tests/listView.test.tsx +++ b/tests/listView.test.tsx @@ -3,6 +3,7 @@ import { render, screen, fireEvent } from "@testing-library/react"; import ListView from "../src/components/ListBox/listView"; import { expect,describe,test, vi } from "vitest"; + describe("ListView Component", () => { const fetchData = [ { id: 1, name: "Item 1", description: "Description 1" }, diff --git a/tsconfig.json b/tsconfig.json index 27e34617..a93c455a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true, + "allowSyntheticDefaultImports": true, /* Bundler mode */ @@ -12,13 +13,17 @@ "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", + /* Linting */ + "allowUnreachableCode": false, "strict": false, "noUnusedLocals": true, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true + }, "include": ["src"], + "exclude": ["node_modules", "build", "dist", "coverage", "scripts", "test", "tests"], "references": [{ "path": "./tsconfig.node.json" }] } diff --git a/yarn.lock b/yarn.lock index 3d6811b5..cd6a10e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -587,18 +587,18 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== -"@tabler/icons-react@^2.44.0": - version "2.44.0" - resolved "https://registry.yarnpkg.com/@tabler/icons-react/-/icons-react-2.44.0.tgz#8119d3b6321ebaf98400fba7932e280d008125f8" - integrity sha512-10qwrqJ/QBNgY4YYer9PjWmCwm3wv9aVK8kGAkFKkwu6UJURVLZ2ea+oFh5j6vSXnA1zMtUG+X8anR5fZ67Isw== +"@tabler/icons-react@^2.45.0": + version "2.45.0" + resolved "https://registry.yarnpkg.com/@tabler/icons-react/-/icons-react-2.45.0.tgz#5d5ae78782b403b9115fbc37be1ba4756847ae8e" + integrity sha512-1vSBsHnBi9AfMILeJQrQo1XIHtFOxuWNGOeIvNHpDcBXyFTfVvDuh64PjMl57xCh5y/PlQlu3Hpx9vSkpSYXYQ== dependencies: - "@tabler/icons" "2.44.0" + "@tabler/icons" "2.45.0" prop-types "^15.7.2" -"@tabler/icons@2.44.0": - version "2.44.0" - resolved "https://registry.yarnpkg.com/@tabler/icons/-/icons-2.44.0.tgz#9f3cf86150b23e84a6eaf9d29ab2b2aaa8c7eed6" - integrity sha512-WPPtihDcAwEm1QZM9MXQw6+r/R2/qx7KMU1eegsi9DsqBLAb0W2kbt6e/syvd6j9c+6XNpRVBW1ziGqSWQAWOg== +"@tabler/icons@2.45.0": + version "2.45.0" + resolved "https://registry.yarnpkg.com/@tabler/icons/-/icons-2.45.0.tgz#c6dff8df5b33492b832a65b778e8be4b45eed739" + integrity sha512-J10UDghOni9wlrj5CpKAzychDCABCKYq897mGg0wGFsd+tYLaUdz0dt/HZeGnV8gZJo0hIiTPLGwBp5EW42Qsg== "@tailwindcss/forms@^0.5.7": version "0.5.7" @@ -765,6 +765,11 @@ dependencies: "@babel/types" "^7.20.7" +"@types/estree@^1.0.0": + version "1.0.5" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4" + integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== + "@types/istanbul-lib-coverage@^2.0.1": version "2.0.6" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz#7739c232a1fee9b4d3ce8985f314c0c6d33549d7" @@ -813,16 +818,16 @@ resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339" integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== -"@typescript-eslint/eslint-plugin@^6.15.0": - version "6.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.16.0.tgz#cc29fbd208ea976de3db7feb07755bba0ce8d8bc" - integrity sha512-O5f7Kv5o4dLWQtPX4ywPPa+v9G+1q1x8mz0Kr0pXUtKsevo+gIJHLkGc8RxaZWtP8RrhwhSNIWThnW42K9/0rQ== +"@typescript-eslint/eslint-plugin@^6.16.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.17.0.tgz#dfc38f790704ba8a54a1277c51efdb489f6ecf9f" + integrity sha512-Vih/4xLXmY7V490dGwBQJTpIZxH4ZFH6eCVmQ4RFkB+wmaCTDAx4dtgoWwMNGKLkqRY1L6rPqzEbjorRnDo4rQ== dependencies: "@eslint-community/regexpp" "^4.5.1" - "@typescript-eslint/scope-manager" "6.16.0" - "@typescript-eslint/type-utils" "6.16.0" - "@typescript-eslint/utils" "6.16.0" - "@typescript-eslint/visitor-keys" "6.16.0" + "@typescript-eslint/scope-manager" "6.17.0" + "@typescript-eslint/type-utils" "6.17.0" + "@typescript-eslint/utils" "6.17.0" + "@typescript-eslint/visitor-keys" "6.17.0" debug "^4.3.4" graphemer "^1.4.0" ignore "^5.2.4" @@ -849,13 +854,21 @@ "@typescript-eslint/types" "6.16.0" "@typescript-eslint/visitor-keys" "6.16.0" -"@typescript-eslint/type-utils@6.16.0": - version "6.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.16.0.tgz#5f21c3e49e540ad132dc87fc99af463c184d5ed1" - integrity sha512-ThmrEOcARmOnoyQfYkHw/DX2SEYBalVECmoldVuH6qagKROp/jMnfXpAU/pAIWub9c4YTxga+XwgAkoA0pxfmg== +"@typescript-eslint/scope-manager@6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.17.0.tgz#70e6c1334d0d76562dfa61aed9009c140a7601b4" + integrity sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA== dependencies: - "@typescript-eslint/typescript-estree" "6.16.0" - "@typescript-eslint/utils" "6.16.0" + "@typescript-eslint/types" "6.17.0" + "@typescript-eslint/visitor-keys" "6.17.0" + +"@typescript-eslint/type-utils@6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.17.0.tgz#5febad3f523e393006614cbda28b826925b728d5" + integrity sha512-hDXcWmnbtn4P2B37ka3nil3yi3VCQO2QEB9gBiHJmQp5wmyQWqnjA85+ZcE8c4FqnaB6lBwMrPkgd4aBYz3iNg== + dependencies: + "@typescript-eslint/typescript-estree" "6.17.0" + "@typescript-eslint/utils" "6.17.0" debug "^4.3.4" ts-api-utils "^1.0.1" @@ -864,6 +877,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.16.0.tgz#a3abe0045737d44d8234708d5ed8fef5d59dc91e" integrity sha512-hvDFpLEvTJoHutVl87+MG/c5C8I6LOgEx05zExTSJDEVU7hhR3jhV8M5zuggbdFCw98+HhZWPHZeKS97kS3JoQ== +"@typescript-eslint/types@6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.17.0.tgz#844a92eb7c527110bf9a7d177e3f22bd5a2f40cb" + integrity sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A== + "@typescript-eslint/typescript-estree@6.16.0": version "6.16.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.16.0.tgz#d6e0578e4f593045f0df06c4b3a22bd6f13f2d03" @@ -878,17 +896,31 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/utils@6.16.0": - version "6.16.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.16.0.tgz#1c291492d34670f9210d2b7fcf6b402bea3134ae" - integrity sha512-T83QPKrBm6n//q9mv7oiSvy/Xq/7Hyw9SzSEhMHJwznEmQayfBM87+oAlkNAMEO7/MjIwKyOHgBJbxB0s7gx2A== +"@typescript-eslint/typescript-estree@6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.17.0.tgz#b913d19886c52d8dc3db856903a36c6c64fd62aa" + integrity sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg== + dependencies: + "@typescript-eslint/types" "6.17.0" + "@typescript-eslint/visitor-keys" "6.17.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + minimatch "9.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.17.0.tgz#f2b16d4c9984474656c420438cdede7eccd4079e" + integrity sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ== dependencies: "@eslint-community/eslint-utils" "^4.4.0" "@types/json-schema" "^7.0.12" "@types/semver" "^7.5.0" - "@typescript-eslint/scope-manager" "6.16.0" - "@typescript-eslint/types" "6.16.0" - "@typescript-eslint/typescript-estree" "6.16.0" + "@typescript-eslint/scope-manager" "6.17.0" + "@typescript-eslint/types" "6.17.0" + "@typescript-eslint/typescript-estree" "6.17.0" semver "^7.5.4" "@typescript-eslint/visitor-keys@6.16.0": @@ -899,6 +931,14 @@ "@typescript-eslint/types" "6.16.0" eslint-visitor-keys "^3.4.1" +"@typescript-eslint/visitor-keys@6.17.0": + version "6.17.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.17.0.tgz#3ed043709c39b43ec1e58694f329e0b0430c26b6" + integrity sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg== + dependencies: + "@typescript-eslint/types" "6.17.0" + eslint-visitor-keys "^3.4.1" + "@ungap/structured-clone@^1.2.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" @@ -915,10 +955,10 @@ "@types/babel__core" "^7.20.5" react-refresh "^0.14.0" -"@vitest/coverage-v8@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@vitest/coverage-v8/-/coverage-v8-1.1.0.tgz#bc0bbb99fcb608f72794701a86302ff3aabbc125" - integrity sha512-kHQRk70vTdXAyQY2C0vKOHPyQD/R6IUzcGdO4vCuyr4alE5Yg1+Sk2jSdjlIrTTXdcNEs+ReWVM09mmSFJpzyQ== +"@vitest/coverage-v8@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@vitest/coverage-v8/-/coverage-v8-1.1.3.tgz#f90e9d200b4cea9ff39ec1b6c35256a0f77a0e2e" + integrity sha512-Uput7t3eIcbSTOTQBzGtS+0kah96bX+szW9qQrLeGe3UmgL2Akn8POnyC2lH7XsnREZOds9aCUTxgXf+4HX5RA== dependencies: "@ampproject/remapping" "^2.2.1" "@bcoe/v8-coverage" "^0.2.3" @@ -934,52 +974,52 @@ test-exclude "^6.0.0" v8-to-istanbul "^9.2.0" -"@vitest/expect@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-1.1.0.tgz#f58eef7de090ad65f30bb93ec54fa9f94c9d1d5d" - integrity sha512-9IE2WWkcJo2BR9eqtY5MIo3TPmS50Pnwpm66A6neb2hvk/QSLfPXBz2qdiwUOQkwyFuuXEUj5380CbwfzW4+/w== +"@vitest/expect@1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@vitest/expect/-/expect-1.1.3.tgz#9667719dffa82e7350dcca7b95f9ec30426d037e" + integrity sha512-MnJqsKc1Ko04lksF9XoRJza0bGGwTtqfbyrsYv5on4rcEkdo+QgUdITenBQBUltKzdxW7K3rWh+nXRULwsdaVg== dependencies: - "@vitest/spy" "1.1.0" - "@vitest/utils" "1.1.0" + "@vitest/spy" "1.1.3" + "@vitest/utils" "1.1.3" chai "^4.3.10" -"@vitest/runner@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-1.1.0.tgz#b3bf60f4a78f4324ca09811dd0f87b721a96b534" - integrity sha512-zdNLJ00pm5z/uhbWF6aeIJCGMSyTyWImy3Fcp9piRGvueERFlQFbUwCpzVce79OLm2UHk9iwaMSOaU9jVHgNVw== +"@vitest/runner@1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@vitest/runner/-/runner-1.1.3.tgz#c71e0ab6aad0a6a75c804e060c295852dc052beb" + integrity sha512-Va2XbWMnhSdDEh/OFxyUltgQuuDRxnarK1hW5QNN4URpQrqq6jtt8cfww/pQQ4i0LjoYxh/3bYWvDFlR9tU73g== dependencies: - "@vitest/utils" "1.1.0" + "@vitest/utils" "1.1.3" p-limit "^5.0.0" pathe "^1.1.1" -"@vitest/snapshot@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-1.1.0.tgz#b9924e4303382b43bb2c31061b173e69a6fb3437" - integrity sha512-5O/wyZg09V5qmNmAlUgCBqflvn2ylgsWJRRuPrnHEfDNT6tQpQ8O1isNGgo+VxofISHqz961SG3iVvt3SPK/QQ== +"@vitest/snapshot@1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@vitest/snapshot/-/snapshot-1.1.3.tgz#94f321f80c9fb9e10b83dabb83a0d09f034a74b0" + integrity sha512-U0r8pRXsLAdxSVAyGNcqOU2H3Z4Y2dAAGGelL50O0QRMdi1WWeYHdrH/QWpN1e8juWfVKsb8B+pyJwTC+4Gy9w== dependencies: magic-string "^0.30.5" pathe "^1.1.1" pretty-format "^29.7.0" -"@vitest/spy@1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-1.1.0.tgz#7f40697e4fc217ac8c3cc89a865d1751b263f561" - integrity sha512-sNOVSU/GE+7+P76qYo+VXdXhXffzWZcYIPQfmkiRxaNCSPiLANvQx5Mx6ZURJ/ndtEkUJEpvKLXqAYTKEY+lTg== +"@vitest/spy@1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@vitest/spy/-/spy-1.1.3.tgz#244e4e049cd0a5b126a475af327df8b7ffa6b3b5" + integrity sha512-Ec0qWyGS5LhATFQtldvChPTAHv08yHIOZfiNcjwRQbFPHpkih0md9KAbs7TfeIfL7OFKoe7B/6ukBTqByubXkQ== dependencies: tinyspy "^2.2.0" -"@vitest/ui@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@vitest/ui/-/ui-1.1.0.tgz#2956ed59286cc60806740808d5b766dc5d928519" - integrity sha512-7yU1QRFBplz0xJqcgt+agcbrNFdBmLo8UUppdKkFmYx+Ih0+yMYQOyr7kOB+YoggJY/p5ZzXxdbiOz7NBX2y+w== +"@vitest/ui@^1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@vitest/ui/-/ui-1.1.3.tgz#d4367cf30d3b7ae681ce2748bf0d71468ba9434b" + integrity sha512-JKGgftXZgTtK7kfQNicE9Q2FuiUlYvCGyUENkA2/S1VBThtfQyGUwaJmiDFVAKBOrW305cNgjP67vsxMm9/SDQ== dependencies: - "@vitest/utils" "1.1.0" + "@vitest/utils" "1.1.3" fast-glob "^3.3.2" fflate "^0.8.1" flatted "^3.2.9" pathe "^1.1.1" picocolors "^1.0.0" - sirv "^2.0.3" + sirv "^2.0.4" "@vitest/utils@1.1.0": version "1.1.0" @@ -990,12 +1030,22 @@ loupe "^2.3.7" pretty-format "^29.7.0" +"@vitest/utils@1.1.3": + version "1.1.3" + resolved "https://registry.yarnpkg.com/@vitest/utils/-/utils-1.1.3.tgz#1f82122f916b0b6feb5e85fc854cfa1fbd522b55" + integrity sha512-Dyt3UMcdElTll2H75vhxfpZu03uFpXRCHxWnzcrFjZxT1kTbq8ALUYIeBgGolo1gldVdI0YSlQRacsqxTwNqwg== + dependencies: + diff-sequences "^29.6.3" + estree-walker "^3.0.3" + loupe "^2.3.7" + pretty-format "^29.7.0" + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^8.3.0: +acorn-walk@^8.3.1: version "8.3.1" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.3.1.tgz#2f10f5b69329d90ae18c58bf1fa8fccd8b959a43" integrity sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw== @@ -1314,10 +1364,10 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -cssstyle@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-3.0.0.tgz#17ca9c87d26eac764bb8cfd00583cff21ce0277a" - integrity sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg== +cssstyle@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-4.0.1.tgz#ef29c598a1e90125c870525490ea4f354db0660a" + integrity sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ== dependencies: rrweb-cssom "^0.6.0" @@ -1326,6 +1376,11 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81" integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw== +custom-media-element@^1.1.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/custom-media-element/-/custom-media-element-1.2.2.tgz#048e23509004149d20a46bf773495bb905edd0c5" + integrity sha512-tI+NjVRS485QlSxHeM3JIjdEZSJMLOZVp41/vvWukDmIkZSoYG9gLYl9GFZGBpY42UbRVo1eMlF7XkI/IiDHzQ== + data-urls@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-5.0.0.tgz#2f76906bce1824429ffecb6920f45a0b30f00dde" @@ -1533,7 +1588,7 @@ eslint-config-prettier@^9.1.0: resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz#31af3d94578645966c082fcb71a5846d3c94867f" integrity sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw== -eslint-plugin-prettier@^5.1.1: +eslint-plugin-prettier@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.2.tgz#584c94d4bf31329b2d4cbeb10fd600d17d6de742" integrity sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg== @@ -1626,6 +1681,13 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== +estree-walker@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-3.0.3.tgz#67c3e549ec402a487b4fc193d1953a524752340d" + integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== + dependencies: + "@types/estree" "^1.0.0" + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -1927,6 +1989,20 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" +hls-video-element@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/hls-video-element/-/hls-video-element-1.1.1.tgz#5d8680290efdea8c108b626b15f810e3439fd66d" + integrity sha512-okEsufMn+N/z3VMnk4ftKjr7nB3l7P5ziMCO3FX+n0+WoPrRG5FPVWHeQ5nMbleQyxGJrDtN0TytrR1PGnBxuw== + dependencies: + custom-media-element "^1.1.0" + hls.js "^1.4.12" + media-tracks "^0.2.4" + +hls.js@^1.4.12, hls.js@^1.4.14: + version "1.4.14" + resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.4.14.tgz#a48a34a1fbcd4c3451b82a78a02fb8ad8a8812e0" + integrity sha512-UppQjyvPVclg+6t2KY/Rv03h0+bA5u6zwqVoz4LAC/L0fgYmIaCD7ZCrwe8WI1Gv01be1XL0QFsRbSdIHV/Wbw== + html-encoding-sniffer@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz#696df529a7cfd82446369dc5193e590a3735b448" @@ -2235,12 +2311,12 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -jsdom@^23.0.1: - version "23.0.1" - resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-23.0.1.tgz#ede7ff76e89ca035b11178d200710d8982ebfee0" - integrity sha512-2i27vgvlUsGEBO9+/kJQRbtqtm+191b5zAZrU/UezVmnC2dlDAFLgDYJvAEi94T4kjsRKkezEtLQTgsNEsW2lQ== +jsdom@^23.1.0: + version "23.1.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-23.1.0.tgz#f0871e6233605eccc11f0078b84afcaad6795af9" + integrity sha512-wRscu8dBFxi7O65Cvi0jFRDv0Qa7XEHPix8Qg/vlXHLAMQsRWV1EDeQHBermzXf4Dt7JtFgBLbva3iTcBZDXEQ== dependencies: - cssstyle "^3.0.0" + cssstyle "^4.0.1" data-urls "^5.0.0" decimal.js "^10.4.3" form-data "^4.0.0" @@ -2259,7 +2335,7 @@ jsdom@^23.0.1: whatwg-encoding "^3.1.1" whatwg-mimetype "^4.0.0" whatwg-url "^14.0.0" - ws "^8.14.2" + ws "^8.16.0" xml-name-validator "^5.0.0" jsesc@^2.5.1: @@ -2413,6 +2489,16 @@ make-dir@^4.0.0: dependencies: semver "^7.5.3" +media-chrome@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/media-chrome/-/media-chrome-2.0.1.tgz#f7d6af2c82fb80d7f82ed50a86fad2216c66ceee" + integrity sha512-6hoC5OY993t4o/YKYXn7YoWUAKG1UFAhnDXNN6kRRa5mnuL+Cwct/2Md16S4jjmTSmN5XjhEWwfCVM5NLHavOA== + +media-tracks@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/media-tracks/-/media-tracks-0.2.4.tgz#aee3bd69bdc8f246b44af5245f7b0a68d4c94540" + integrity sha512-P/TbDCYTFH5gxpQ6r99iabXOwjsFwzKRgK7wiwo64Ii6nHXYhHtwEP7A7ufmEKxkNCoHc4j3Z2hvs+lXL4wPeQ== + memoize-one@^5.1.1: version "5.2.1" resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" @@ -3079,7 +3165,7 @@ signal-exit@^4.0.1, signal-exit@^4.1.0: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== -sirv@^2.0.3: +sirv@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.4.tgz#5dd9a725c578e34e449f332703eb2a74e46a29b0" integrity sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ== @@ -3419,10 +3505,10 @@ v8-to-istanbul@^9.2.0: "@types/istanbul-lib-coverage" "^2.0.1" convert-source-map "^2.0.0" -vite-node@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-1.1.0.tgz#0ebcb7398692e378954786dfba28e905e28a76b4" - integrity sha512-jV48DDUxGLEBdHCQvxL1mEh7+naVy+nhUUUaPAZLd3FJgXuxQiewHcfeZebbJ6onDqNGkP4r3MhQ342PRlG81Q== +vite-node@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/vite-node/-/vite-node-1.1.3.tgz#196de20a7c2e0467a07da0dd1fe67994f5b79695" + integrity sha512-BLSO72YAkIUuNrOx+8uznYICJfTEbvBAmWClY3hpath5+h1mbPS5OMn42lrTxXuyCazVyZoDkSRnju78GiVCqA== dependencies: cac "^6.7.14" debug "^4.3.4" @@ -3441,17 +3527,17 @@ vite@^5.0.0, vite@^5.0.10: optionalDependencies: fsevents "~2.3.3" -vitest@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/vitest/-/vitest-1.1.0.tgz#47ba67c564aa137b53b0197d2a992908e7f5b04d" - integrity sha512-oDFiCrw7dd3Jf06HoMtSRARivvyjHJaTxikFxuqJjO76U436PqlVw1uLn7a8OSPrhSfMGVaRakKpA2lePdw79A== - dependencies: - "@vitest/expect" "1.1.0" - "@vitest/runner" "1.1.0" - "@vitest/snapshot" "1.1.0" - "@vitest/spy" "1.1.0" - "@vitest/utils" "1.1.0" - acorn-walk "^8.3.0" +vitest@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/vitest/-/vitest-1.1.3.tgz#c911bcbcfd2266d44db6ecb08273b91e0ec20dc7" + integrity sha512-2l8om1NOkiA90/Y207PsEvJLYygddsOyr81wLQ20Ra8IlLKbyQncWsGZjnbkyG2KwwuTXLQjEPOJuxGMG8qJBQ== + dependencies: + "@vitest/expect" "1.1.3" + "@vitest/runner" "1.1.3" + "@vitest/snapshot" "1.1.3" + "@vitest/spy" "1.1.3" + "@vitest/utils" "1.1.3" + acorn-walk "^8.3.1" cac "^6.7.14" chai "^4.3.10" debug "^4.3.4" @@ -3465,7 +3551,7 @@ vitest@^1.1.0: tinybench "^2.5.1" tinypool "^0.8.1" vite "^5.0.0" - vite-node "1.1.0" + vite-node "1.1.3" why-is-node-running "^2.2.2" w3c-xmlserializer@^5.0.0: @@ -3570,7 +3656,7 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -ws@^8.14.2: +ws@^8.16.0: version "8.16.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.16.0.tgz#d1cd774f36fbc07165066a60e40323eab6446fd4" integrity sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==