From 173dd45ecd83c6cb3a5cb03433095b74f998b8a8 Mon Sep 17 00:00:00 2001 From: dmytrodudnik-netizen Date: Thu, 30 Apr 2026 15:08:19 +0300 Subject: [PATCH 01/12] fix(ci): x86_64-apple-darwin CLI build (#15194) * fix(ci): use macos-13 runner for x86_64-apple-darwin CLI build `macos-latest` now resolves to arm64 runners, so the x86_64-apple-darwin build was producing arm64 binaries. Use `macos-13` (Intel) to get a native x86_64 build. * actually enforce target --------- Co-authored-by: dmytro.dudnyk Co-authored-by: Lucas Nogueira --- .github/workflows/publish-cli-rs.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-cli-rs.yml b/.github/workflows/publish-cli-rs.yml index 39887eec7cb5..c5fd1fcff818 100644 --- a/.github/workflows/publish-cli-rs.yml +++ b/.github/workflows/publish-cli-rs.yml @@ -72,22 +72,21 @@ jobs: - name: Build CLI if: ${{ !matrix.config.cross }} - run: cargo build --manifest-path ./crates/tauri-cli/Cargo.toml --profile release-size-optimized ${{ matrix.config.args }} + run: | + cargo build --manifest-path ./crates/tauri-cli/Cargo.toml \ + --target ${{ matrix.config.rust_target }} \ + --profile release-size-optimized \ + ${{ matrix.config.args }} - name: Build CLI (cross) if: ${{ matrix.config.cross }} - run: cross build --manifest-path ./crates/tauri-cli/Cargo.toml --target ${{ matrix.config.rust_target }} --profile release-size-optimized ${{ matrix.config.args }} + run: | + cross build --manifest-path ./crates/tauri-cli/Cargo.toml \ + --target ${{ matrix.config.rust_target }} \ + --profile release-size-optimized \ + ${{ matrix.config.args }} - name: Upload CLI - if: ${{ !matrix.config.cross }} - uses: actions/upload-artifact@v4 - with: - name: cargo-tauri-${{ matrix.config.rust_target }}${{ matrix.config.ext }} - path: target/release-size-optimized/cargo-tauri${{ matrix.config.ext }} - if-no-files-found: error - - - name: Upload CLI (cross) - if: ${{ matrix.config.cross }} uses: actions/upload-artifact@v4 with: name: cargo-tauri-${{ matrix.config.rust_target }}${{ matrix.config.ext }} From 04f704800be041ea207575e53be3ac314baab888 Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Thu, 30 Apr 2026 20:09:28 +0800 Subject: [PATCH 02/12] Revert "fix(deps): update specta in lockfile" (#15305) * Revert "fix(deps): update specta in lockfile (#15303)" This reverts commit b240341b1c8074cf6caf020472b3a41866677376. * Enable lint workflow * Enable other tests as well on Cargo.lock changes --- .github/workflows/lint-rust.yml | 2 ++ .github/workflows/test-cli-rs.yml | 2 ++ .github/workflows/test-core.yml | 2 ++ Cargo.lock | 10 +++++----- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-rust.yml b/.github/workflows/lint-rust.yml index b71cc1648eca..8b2ca12d90c7 100644 --- a/.github/workflows/lint-rust.yml +++ b/.github/workflows/lint-rust.yml @@ -12,6 +12,8 @@ on: paths: - '.github/workflows/lint-rust.yml' - 'crates/**' + - 'Cargo.toml' + - 'Cargo.lock' env: RUST_BACKTRACE: 1 diff --git a/.github/workflows/test-cli-rs.yml b/.github/workflows/test-cli-rs.yml index fe5e082c1751..8b2806a94dae 100644 --- a/.github/workflows/test-cli-rs.yml +++ b/.github/workflows/test-cli-rs.yml @@ -14,6 +14,8 @@ on: - 'crates/tauri-utils/**' - 'crates/tauri-bundler/**' - 'crates/tauri-cli/**' + - 'Cargo.toml' + - 'Cargo.lock' env: RUST_BACKTRACE: 1 diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index 6ab8092b923a..f291dea1c4f9 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -12,6 +12,8 @@ on: paths: - '.github/workflows/test-core.yml' - 'crates/**' + - 'Cargo.toml' + - 'Cargo.lock' - '!crates/tauri/scripts/**' - '!crates/tauri-cli/**' - '!crates/tauri-bundler/**' diff --git a/Cargo.lock b/Cargo.lock index 11cd62da6e0d..e10aaccfde00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8325,20 +8325,20 @@ dependencies = [ [[package]] name = "specta" -version = "2.0.0-rc.24" +version = "2.0.0-rc.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f320c7dd82008b6958f43f6257c95319c407d1c17ade43686e50ea520c28bb26" +checksum = "4ccbb212565d2dc177bc15ecb7b039d66c4490da892436a4eee5b394d620c9bc" dependencies = [ "paste", - "rustc_version", "specta-macros", + "thiserror 1.0.69", ] [[package]] name = "specta-macros" -version = "2.0.0-rc.24" +version = "2.0.0-rc.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "153f185d0051a64d81977bab5012809d5c9d9db8792406a0997352e05494f711" +checksum = "68999d29816965eb9e5201f60aec02a76512139811661a7e8e653abc810b8f72" dependencies = [ "Inflector", "proc-macro2", From 1035f12eeb8b23d9780881606d442d11c786e39e Mon Sep 17 00:00:00 2001 From: Rohit Singh <27754873+razein97@users.noreply.github.com> Date: Thu, 30 Apr 2026 17:50:25 +0530 Subject: [PATCH 03/12] fix(windows): tauri-bundler detect arm system (#14923) * detect arm systems in windows - Arm system were not detected when running signtool causing bundle failures when signing windows binaries --- .changes/windows_arm_signtool_detect.md | 17 +++++++++++++++++ crates/tauri-bundler/src/bundle/windows/sign.rs | 2 +- crates/tauri-bundler/src/bundle/windows/util.rs | 7 +++++-- 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 .changes/windows_arm_signtool_detect.md diff --git a/.changes/windows_arm_signtool_detect.md b/.changes/windows_arm_signtool_detect.md new file mode 100644 index 000000000000..afff5dc2b395 --- /dev/null +++ b/.changes/windows_arm_signtool_detect.md @@ -0,0 +1,17 @@ +--- +"tauri-bundler": patch:enhance +--- + +Signtool path for windows arm systems was not being properly returned which caused failure in signing of windows binaries. + +This patch addresses it. + +Previously only the following were supported: + +- PROCESSOR_ARCHITECTURE_INTEL +- PROCESSOR_ARCHITECTURE_AMD64 + +The following were added: + +- PROCESSOR_ARCHITECTURE_ARM +- PROCESSOR_ARCHITECTURE_ARM64 diff --git a/crates/tauri-bundler/src/bundle/windows/sign.rs b/crates/tauri-bundler/src/bundle/windows/sign.rs index f7c7ad1e2122..d9922f58ff69 100644 --- a/crates/tauri-bundler/src/bundle/windows/sign.rs +++ b/crates/tauri-bundler/src/bundle/windows/sign.rs @@ -97,7 +97,7 @@ fn signtool() -> Option { kit_bin_paths.push(kits_root_10_bin_path); // Choose which version of SignTool to use based on OS bitness - let arch_dir = util::os_bitness().ok_or(crate::Error::UnsupportedBitness)?; + let arch_dir = util::processor_architecture().ok_or(crate::Error::UnsupportedBitness)?; /* Iterate through all bin paths, checking for existence of a SignTool executable. */ for kit_bin_path in &kit_bin_paths { diff --git a/crates/tauri-bundler/src/bundle/windows/util.rs b/crates/tauri-bundler/src/bundle/windows/util.rs index 55cfea3a968f..e716ad7bbef5 100644 --- a/crates/tauri-bundler/src/bundle/windows/util.rs +++ b/crates/tauri-bundler/src/bundle/windows/util.rs @@ -64,9 +64,10 @@ pub fn download_webview2_offline_installer(base_path: &Path, arch: &str) -> crat } #[cfg(target_os = "windows")] -pub fn os_bitness<'a>() -> Option<&'a str> { +pub fn processor_architecture<'a>() -> Option<&'a str> { use windows_sys::Win32::System::SystemInformation::{ - GetNativeSystemInfo, PROCESSOR_ARCHITECTURE_AMD64, PROCESSOR_ARCHITECTURE_INTEL, SYSTEM_INFO, + GetNativeSystemInfo, PROCESSOR_ARCHITECTURE_AMD64, PROCESSOR_ARCHITECTURE_ARM, + PROCESSOR_ARCHITECTURE_ARM64, PROCESSOR_ARCHITECTURE_INTEL, SYSTEM_INFO, }; let mut system_info: SYSTEM_INFO = unsafe { std::mem::zeroed() }; @@ -74,6 +75,8 @@ pub fn os_bitness<'a>() -> Option<&'a str> { match unsafe { system_info.Anonymous.Anonymous.wProcessorArchitecture } { PROCESSOR_ARCHITECTURE_INTEL => Some("x86"), PROCESSOR_ARCHITECTURE_AMD64 => Some("x64"), + PROCESSOR_ARCHITECTURE_ARM => Some("arm"), + PROCESSOR_ARCHITECTURE_ARM64 => Some("arm64"), _ => None, } } From 764b9139a32de149d8a914a6b5ec6cd1937c64eb Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 30 Apr 2026 09:20:44 -0300 Subject: [PATCH 04/12] feat(cli): restart Android emulator if it is disconnected from adb (#14313) * feat(cli): restart Android emulator if it is disconnected from adb needs https://github.com/tauri-apps/cargo-mobile2/pull/495 and https://github.com/tauri-apps/cargo-mobile2/pull/493 * lint --- .changes/restart-emulator.md | 6 + crates/tauri-bundler/src/bundle/macos/icon.rs | 2 +- crates/tauri-bundler/src/bundle/macos/ios.rs | 2 +- .../mobile/android/android_studio_script.rs | 14 +- crates/tauri-cli/src/mobile/android/mod.rs | 173 ++++++++++++++++-- 5 files changed, 179 insertions(+), 18 deletions(-) create mode 100644 .changes/restart-emulator.md diff --git a/.changes/restart-emulator.md b/.changes/restart-emulator.md new file mode 100644 index 000000000000..94186ea82655 --- /dev/null +++ b/.changes/restart-emulator.md @@ -0,0 +1,6 @@ +--- +"@tauri-apps/cli": minor:feat +"tauri-cli": minor:feat +--- + +Prompt to restart the Android emulator if it is not connected to adb. diff --git a/crates/tauri-bundler/src/bundle/macos/icon.rs b/crates/tauri-bundler/src/bundle/macos/icon.rs index 69278ec052ac..dc44e8b9c6bf 100644 --- a/crates/tauri-bundler/src/bundle/macos/icon.rs +++ b/crates/tauri-bundler/src/bundle/macos/icon.rs @@ -65,7 +65,7 @@ pub fn create_icns_file(out_dir: &Path, settings: &Settings) -> crate::Result crate::Result< let icon_path = icon_path?; if icon_path .extension() - .map_or(false, |ext| ext == "png" || ext == "car") + .is_some_and(|ext| ext == "png" || ext == "car") { continue; } else if icon_path.extension() == Some(OsStr::new("icns")) { diff --git a/crates/tauri-cli/src/mobile/android/android_studio_script.rs b/crates/tauri-cli/src/mobile/android/android_studio_script.rs index 321b4104144d..2d3d0fd28672 100644 --- a/crates/tauri-cli/src/mobile/android/android_studio_script.rs +++ b/crates/tauri-cli/src/mobile/android/android_studio_script.rs @@ -13,7 +13,7 @@ use crate::{ use clap::{ArgAction, Parser}; use cargo_mobile2::{ - android::{adb, target::Target}, + android::{adb, device::ConnectionStatus, target::Target}, opts::Profile, target::{call_for_targets_with_fallback, TargetTrait}, }; @@ -194,7 +194,11 @@ fn adb_forward_port( let forward = format!("tcp:{port}"); log::info!("Forwarding port {port} with adb"); - let mut devices = adb::device_list(env).unwrap_or_default(); + let mut devices = adb::device_list(env) + .unwrap_or_default() + .into_iter() + .filter(|d| d.status() == ConnectionStatus::Connected) + .collect::>(); // if we could not detect any running device, let's wait a few seconds, it might be booting up if devices.is_empty() { log::warn!( @@ -206,7 +210,11 @@ fn adb_forward_port( loop { std::thread::sleep(std::time::Duration::from_secs(1)); - devices = adb::device_list(env).unwrap_or_default(); + devices = adb::device_list(env) + .unwrap_or_default() + .into_iter() + .filter(|d| d.status() == ConnectionStatus::Connected) + .collect::>(); if !devices.is_empty() { break; } diff --git a/crates/tauri-cli/src/mobile/android/mod.rs b/crates/tauri-cli/src/mobile/android/mod.rs index fc7406832660..5e41d7eae7ad 100644 --- a/crates/tauri-cli/src/mobile/android/mod.rs +++ b/crates/tauri-cli/src/mobile/android/mod.rs @@ -6,7 +6,7 @@ use cargo_mobile2::{ android::{ adb, config::{Config as AndroidConfig, Metadata as AndroidMetadata, Raw as RawAndroidConfig}, - device::Device, + device::{ConnectionStatus, Device}, emulator, env::Env, target::Target, @@ -678,7 +678,11 @@ fn delete_codegen_vars() { } fn adb_device_prompt<'a>(env: &'_ Env, target: Option<&str>) -> Result> { - let device_list = adb::device_list(env).context("failed to detect connected Android devices")?; + let device_list = adb::device_list(env) + .context("failed to detect connected Android devices")? + .into_iter() + .filter(|d| d.status() == ConnectionStatus::Connected) + .collect::>(); if !device_list.is_empty() { let device = if let Some(t) = target { let (device, score) = device_list @@ -764,29 +768,172 @@ fn emulator_prompt(env: &'_ Env, target: Option<&str>) -> Result(env: &'_ Env, target: Option<&str>) -> Result> { if let Ok(device) = adb_device_prompt(env, target) { Ok(device) } else { let emulator = emulator_prompt(env, target)?; - log::info!("Starting emulator {}", emulator.name()); - emulator - .start_detached(env) - .context("failed to start emulator")?; + let emulator_status = match adb::device_list(env) { + Ok(devices) => { + // emulator might be running but disconnected from adb + devices + .iter() + .find(|d| d.name() == emulator.name()) + .and_then(|d| match d.status() { + ConnectionStatus::Offline | ConnectionStatus::Unauthorized => { + Some(EmulatorStatus::Offline { + serial_no: d.serial_no().to_string(), + }) + } + ConnectionStatus::Connected => Some(EmulatorStatus::Connected), + _ => None, + }) + } + // failed to get device information, check if the device name matches the emulator name + Err( + adb::device_list::Error::ModelFailed { + serial_no, + error: adb::get_prop::Error::CommandFailed { command: _, error }, + } + | adb::device_list::Error::AbiFailed { + serial_no, + error: adb::get_prop::Error::CommandFailed { command: _, error }, + }, + ) => { + if error.kind() == std::io::ErrorKind::TimedOut { + // if the device name matches the emulator name, the emulator is already running and marked as connected + // but we cannot connect to it + adb::device_name(env, &serial_no).map_or(None, |device_name| { + if device_name == emulator.name() { + Some(EmulatorStatus::Offline { serial_no }) + } else { + None + } + }) + } else { + None + } + } + Err(_) => None, + }; + + let emulator_already_running = emulator_status.is_some(); + match emulator_status { + Some(EmulatorStatus::Offline { serial_no }) => { + // emulator is available but not connected to adb, we must restart it + log::info!("Emulator is not connected, we need to restart it"); + restart_emulator(env, &serial_no, &emulator)?; + } + Some(EmulatorStatus::Connected) => { + // emulator is already connected to adb + // this is technically unreachable because we queried the device list with adb_device_prompt + } + None => { + log::info!("Starting emulator {}", emulator.name()); + emulator + .start_detached(env) + .context("failed to start emulator")?; + } + } + let mut tries = 0; loop { sleep(Duration::from_secs(2)); - if let Ok(device) = adb_device_prompt(env, Some(emulator.name())) { - return Ok(device); + // we do not filter for connected devices to detect emulators that are not connected to our adb anymore + match adb::device_list(env) { + Ok(devices) => { + if let Some(device) = devices.into_iter().find(|d| d.name() == emulator.name()) { + if device.status() == ConnectionStatus::Connected { + return Ok(device); + } + } + + if tries >= 3 { + log::info!("Waiting for emulator to start... (maybe the emulator is unauthorized or offline, run `adb devices` to check)"); + } else { + log::info!("Waiting for emulator to start..."); + } + tries += 1; + } + Err( + adb::device_list::Error::ModelFailed { + serial_no, + error: adb::get_prop::Error::CommandFailed { command: _, error }, + } + | adb::device_list::Error::AbiFailed { + serial_no, + error: adb::get_prop::Error::CommandFailed { command: _, error }, + }, + ) => { + if emulator_already_running && error.kind() == std::io::ErrorKind::TimedOut { + log::info!("Emulator is not responding, we need to restart it"); + restart_emulator(env, &serial_no, &emulator)?; + tries = 0; + } else { + log::error!("failed to get properties for device {serial_no}: {error}"); + } + } + Err(e) => { + log::error!("failed to list devices with adb: {e}"); + tries += 1; + } } - if tries >= 3 { - log::info!("Waiting for emulator to start... (maybe the emulator is unauthorized or offline, run `adb devices` to check)"); - } else { - log::info!("Waiting for emulator to start..."); + } + } +} + +fn restart_emulator(env: &Env, serial_no: &str, emulator: &emulator::Emulator) -> Result<()> { + let granted_permission_to_restart = + crate::helpers::prompts::confirm("Do you want to restart the emulator?", Some(true)) + .unwrap_or_default(); + if !granted_permission_to_restart { + crate::error::bail!( + "Cannot connect to the emulator, please restart it manually (a full boot might be required)" + ); + } + + adb::adb(env, &["-s", serial_no, "emu", "kill"]) + .run() + .context("failed to reboot emulator")?; + + log::info!("Waiting for emulator to exit..."); + loop { + let devices = adb::device_list(env).unwrap_or_default(); + if devices + .into_iter() + .find(|d| d.serial_no() == serial_no) + .is_none() + { + break; + } + sleep(Duration::from_secs(1)); + } + + log::info!("Restarting emulator with full boot"); + let mut tries = 0; + loop { + // wait a bit to make sure we can restart the emulator + sleep(Duration::from_secs(2)); + + match emulator.start_detached_with_options(env, emulator::StartOptions::new().full_boot()) { + Ok(_) => break, + Err(e) => { + tries += 1; + if tries >= 3 { + return Err(e).context("failed to start emulator"); + } else { + log::error!("failed to start emulator, retrying..."); + } } - tries += 1; } } + + Ok(()) } fn detect_target_ok<'a>(env: &Env) -> Option<&'a Target<'a>> { From c00a3dbffccd6e051d3b7332f706b6c63759865d Mon Sep 17 00:00:00 2001 From: Tunglies Date: Thu, 30 Apr 2026 06:11:59 -0700 Subject: [PATCH 05/12] feat(macros): add support for rename command macro in tauri-macros #14173 (#14473) * feat(macros): add support for alias command macro in tauri-macros #14173 * feat(macro): rename alias command to improve clarity in tauri-macros * feat(wrapper): refactor rename handling in WrapperAttributes for improved clarity * feat(wrapper): update rename policy to use TokenStream2 for improved flexibility * feat(handler): streamline command definition parsing for improved efficiency * feat(wrapper): simplify macro export logic in wrapper function for clarity * fix(handler): optimize command zipping for improved readability * fix: code style compectiable with rust 1.77.2 * fix const not in scope when command is defined in another mod * update examples * update change file * fmt * style: fix pnpm:check errors --------- Co-authored-by: Lucas Nogueira --- .changes/add-macros-allow-rename-command.md | 6 +++ crates/tauri-macros/src/command/handler.rs | 28 +++++++--- crates/tauri-macros/src/command/wrapper.rs | 60 +++++++++++++++++++-- examples/commands/commands.rs | 5 ++ examples/commands/index.html | 6 ++- examples/commands/main.rs | 9 +++- 6 files changed, 101 insertions(+), 13 deletions(-) create mode 100644 .changes/add-macros-allow-rename-command.md diff --git a/.changes/add-macros-allow-rename-command.md b/.changes/add-macros-allow-rename-command.md new file mode 100644 index 000000000000..bdda4d3427d6 --- /dev/null +++ b/.changes/add-macros-allow-rename-command.md @@ -0,0 +1,6 @@ +--- +"tauri-macros": minor:feat +"tauri": minor:feat +--- + +Add support for the `rename` attribute in the `tauri::command` macro to allow renaming the command to something other than the function name. diff --git a/crates/tauri-macros/src/command/handler.rs b/crates/tauri-macros/src/command/handler.rs index add699b73da2..33143525a7b3 100644 --- a/crates/tauri-macros/src/command/handler.rs +++ b/crates/tauri-macros/src/command/handler.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use quote::format_ident; +use quote::{format_ident, quote}; use syn::{ parse::{Parse, ParseBuffer, ParseStream}, Attribute, Ident, Path, Token, @@ -151,14 +151,30 @@ impl From for proc_macro::TokenStream { ) -> Self { let cmd = format_ident!("__tauri_cmd__"); let invoke = format_ident!("__tauri_invoke__"); - let (paths, attrs): (Vec, Vec>) = command_defs - .into_iter() - .map(|def| (def.path, def.attrs)) - .unzip(); + let mut paths: Vec = Vec::new(); + let mut attrs: Vec> = Vec::new(); + let mut command_name_macros: Vec = Vec::new(); + for (def, command) in command_defs.into_iter().zip(commands) { + let path = def.path; + let attrs_vec = def.attrs; + + let mut command_name_macro_path = path.clone(); + let last = command_name_macro_path + .segments + .last_mut() + .expect("path has at least one segment"); + last.ident = format_ident!("__tauri_command_name_{command}"); + + paths.push(path); + attrs.push(attrs_vec); + // Call the macro to get the command name string literal + command_name_macros.push(quote!(#command_name_macro_path!())); + } + quote::quote!(move |#invoke| { let #cmd = #invoke.message.command(); match #cmd { - #(#(#attrs)* stringify!(#commands) => #wrappers!(#paths, #invoke),)* + #(#(#attrs)* #command_name_macros => #wrappers!(#paths, #invoke),)* _ => { return false; }, diff --git a/crates/tauri-macros/src/command/wrapper.rs b/crates/tauri-macros/src/command/wrapper.rs index 261257d639c7..7eb85510e7ad 100644 --- a/crates/tauri-macros/src/command/wrapper.rs +++ b/crates/tauri-macros/src/command/wrapper.rs @@ -40,6 +40,7 @@ struct WrapperAttributes { root: TokenStream2, execution_context: ExecutionContext, argument_case: ArgumentCase, + rename: RenamePolicy, } impl Parse for WrapperAttributes { @@ -48,6 +49,7 @@ impl Parse for WrapperAttributes { root: quote!(::tauri), execution_context: ExecutionContext::Blocking, argument_case: ArgumentCase::Camel, + rename: RenamePolicy::Keep, }; let attrs = Punctuated::::parse_terminated(input)?; @@ -74,6 +76,19 @@ impl Parse for WrapperAttributes { } }; } + } else if v.path.is_ident("rename") { + if let Expr::Lit(ExprLit { + lit: Lit::Str(s), .. + }) = v.value + { + let lit = s.value(); + wrapper_attributes.rename = RenamePolicy::Rename(quote!(#lit)); + } else { + return Err(syn::Error::new( + v.span(), + "expected string literal for rename", + )); + } } else if v.path.is_ident("root") { if let Expr::Lit(ExprLit { lit: Lit::Str(s), @@ -94,7 +109,7 @@ impl Parse for WrapperAttributes { WrapperAttributeKind::Meta(Meta::Path(_)) => { return Err(syn::Error::new( input.span(), - "unexpected input, expected one of `rename_all`, `root`, `async`", + "unexpected input, expected one of `rename_all`, `rename`, `root`, `async`", )); } WrapperAttributeKind::Async => { @@ -120,6 +135,12 @@ enum ArgumentCase { Camel, } +/// The rename policy for the command. +enum RenamePolicy { + Keep, + Rename(TokenStream2), +} + /// The bindings we attach to `tauri::Invoke`. struct Invoke { message: Ident, @@ -138,9 +159,11 @@ pub fn wrapper(attributes: TokenStream, item: TokenStream) -> TokenStream { attrs.execution_context = ExecutionContext::Async; } - // macros used with `pub use my_macro;` need to be exported with `#[macro_export]` + // macros used with `pub use my_macro;` need to be exported with `#[macro_export]`. let maybe_macro_export = match &function.vis { - Visibility::Public(_) | Visibility::Restricted(_) => quote!(#[macro_export]), + Visibility::Public(_) | Visibility::Restricted(_) => { + quote!(#[macro_export]) + } _ => TokenStream2::default(), }; @@ -270,6 +293,17 @@ pub fn wrapper(attributes: TokenStream, item: TokenStream) -> TokenStream { TokenStream2::default() }; + // Always define a hidden macro that returns the externally invoked command name. + // This lets the handler match on the renamed string while the original function + // identifier remains usable in `generate_handler![original_fn_name]`. + let command_name_macro_ident = format_ident!("__tauri_command_name_{}", function.sig.ident); + let command_name_value = if let RenamePolicy::Rename(ref rename) = attrs.rename { + quote!(#rename) + } else { + let ident = &function.sig.ident; + quote!(stringify!(#ident)) + }; + // Rely on rust 2018 edition to allow importing a macro from a path. quote!( #async_command_check @@ -277,6 +311,17 @@ pub fn wrapper(attributes: TokenStream, item: TokenStream) -> TokenStream { #maybe_allow_unused #function + // Command name macro used by the handler for pattern matching. + // This macro returns the command name string literal (renamed or original). + #maybe_allow_unused + #maybe_macro_export + #[doc(hidden)] + macro_rules! #command_name_macro_ident { + () => { + #command_name_value + }; + } + #maybe_allow_unused #maybe_macro_export #[doc(hidden)] @@ -303,7 +348,7 @@ pub fn wrapper(attributes: TokenStream, item: TokenStream) -> TokenStream { // allow the macro to be resolved with the same path as the command function #[allow(unused_imports)] - #visibility use #wrapper; + #visibility use {#wrapper, #command_name_macro_ident}; ) .into() } @@ -467,11 +512,16 @@ fn parse_arg( } let root = &attributes.root; + let command_name = if let RenamePolicy::Rename(r) = &attributes.rename { + quote!(stringify!(#r)) + } else { + quote!(stringify!(#command)) + }; Ok(quote!(#root::ipc::CommandArg::from_command( #root::ipc::CommandItem { plugin: #plugin_name, - name: stringify!(#command), + name: #command_name, key: #key, message: &#message, acl: &#acl, diff --git a/examples/commands/commands.rs b/examples/commands/commands.rs index 93691c59dca1..4b112e283e7d 100644 --- a/examples/commands/commands.rs +++ b/examples/commands/commands.rs @@ -25,3 +25,8 @@ pub fn simple_command(the_argument: String) { pub fn stateful_command(the_argument: Option, state: State<'_, super::MyState>) { println!("{:?} {:?}", the_argument, state.inner()); } + +#[command(rename = "renamed_command_in_mod_new")] +pub fn renamed_command_in_mod() { + println!("renamed command in mod called"); +} diff --git a/examples/commands/index.html b/examples/commands/index.html index aed95c21ca7d..ef95405fd89a 100644 --- a/examples/commands/index.html +++ b/examples/commands/index.html @@ -63,7 +63,11 @@

Tauri Commands

{ name: 'command_arguments_tuple_struct', args: { inlinePerson: ['ferris', 6] } - } + }, + { name: 'renamed_command' }, + { name: 'renamed_command_new' }, + { name: 'renamed_command_in_mod' }, + { name: 'renamed_command_in_mod_new' } ] for (const command of commands) { diff --git a/examples/commands/main.rs b/examples/commands/main.rs index aa0641de093b..ed846b7f7f4e 100644 --- a/examples/commands/main.rs +++ b/examples/commands/main.rs @@ -6,7 +6,7 @@ // we move some basic commands to a separate module just to show it works mod commands; -use commands::{cmd, invoke, message, resolver}; +use commands::{cmd, invoke, message, renamed_command_in_mod, resolver}; use serde::Deserialize; use tauri::{ @@ -188,6 +188,11 @@ fn command_arguments_wild(_: Window) { println!("we saw the wildcard!") } +#[command(rename = "renamed_command_new")] +fn renamed_command() { + println!("renamed command called") +} + #[derive(Deserialize)] struct Person<'a> { name: &'a str, @@ -246,6 +251,8 @@ fn main() { future_simple_command, async_stateful_command, command_arguments_wild, + renamed_command, + renamed_command_in_mod, command_arguments_struct, simple_command_with_result, async_simple_command_snake, From 110336c88a8c0a04476619db0a5c8f7694d969a5 Mon Sep 17 00:00:00 2001 From: polw1 <111233915+polw1@users.noreply.github.com> Date: Thu, 30 Apr 2026 10:25:40 -0300 Subject: [PATCH 06/12] fix(macOS): fix incorrect window position on multi-monitor setups (#15250) * fix(macOS): fix incorrect window position on multi-monitor setups * avoid 'flash' on current monitor when targeting another display for fullscreen * simplify fullscreen monitor selection * change file --------- Co-authored-by: Lucas Nogueira --- .changes/fix-macos-initial-window-position.md | 6 ++ crates/tauri-runtime-wry/src/lib.rs | 58 +++++++++++++++---- 2 files changed, 52 insertions(+), 12 deletions(-) create mode 100644 .changes/fix-macos-initial-window-position.md diff --git a/.changes/fix-macos-initial-window-position.md b/.changes/fix-macos-initial-window-position.md new file mode 100644 index 000000000000..3a6ab039929d --- /dev/null +++ b/.changes/fix-macos-initial-window-position.md @@ -0,0 +1,6 @@ +--- +"tauri-runtime-wry": patch:bug +"tauri": patch:bug +--- + +Fix initial window position when positioning it to another monitor. diff --git a/crates/tauri-runtime-wry/src/lib.rs b/crates/tauri-runtime-wry/src/lib.rs index da4cb6a637c0..66f04f7f9d8e 100644 --- a/crates/tauri-runtime-wry/src/lib.rs +++ b/crates/tauri-runtime-wry/src/lib.rs @@ -692,6 +692,25 @@ impl From for PositionWrapper { } } +#[cfg(desktop)] +fn find_monitor_for_position( + monitors: impl Iterator, + window_position: TaoPosition, +) -> Option { + monitors.into_iter().find(|m| { + let monitor_pos = m.position(); + let monitor_size = m.size(); + + // type annotations required for 32bit targets. + let window_position = window_position.to_physical::(m.scale_factor()); + + monitor_pos.x <= window_position.x + && window_position.x < monitor_pos.x + monitor_size.width as i32 + && monitor_pos.y <= window_position.y + && window_position.y < monitor_pos.y + monitor_size.height as i32 + }) +} + #[derive(Debug, Clone)] pub struct UserAttentionTypeWrapper(pub TaoUserAttentionType); @@ -4489,18 +4508,7 @@ fn create_window( #[cfg(desktop)] if window_builder.prevent_overflow.is_some() || window_builder.center { let monitor = if let Some(window_position) = &window_builder.inner.window.position { - event_loop.available_monitors().find(|m| { - let monitor_pos = m.position(); - let monitor_size = m.size(); - - // type annotations required for 32bit targets. - let window_position = window_position.to_physical::(m.scale_factor()); - - monitor_pos.x <= window_position.x - && window_position.x < monitor_pos.x + monitor_size.width as i32 - && monitor_pos.y <= window_position.y - && window_position.y < monitor_pos.y + monitor_size.height as i32 - }) + find_monitor_for_position(event_loop.available_monitors(), *window_position) } else { event_loop.primary_monitor() }; @@ -4567,12 +4575,38 @@ fn create_window( } }; + #[cfg(any(target_os = "macos", target_os = "linux"))] + let (initial_position, is_fullscreen) = ( + window_builder.inner.window.position, + window_builder.inner.window.fullscreen.is_some(), + ); + + // If fullscreen is requested with an explicit position, resolve the target + // monitor up front so the window is created fullscreen on that display. + #[cfg(any(target_os = "macos", target_os = "linux"))] + if let (true, Some(position)) = (is_fullscreen, initial_position) { + if let Some(target_monitor) = + find_monitor_for_position(event_loop.available_monitors(), position) + { + window_builder.inner.window.fullscreen = Some(Fullscreen::Borderless(Some(target_monitor))); + } + } + let window = window_builder .inner .build(event_loop) .inspect_err(|e| log::error!("Error creating window: {e:?}")) .map_err(|_| Error::CreateWindow)?; + // On macOS, `with_position` uses the content origin; the title bar is added + // above it. `set_outer_position` is needed for precise window placement. + #[cfg(target_os = "macos")] + if !is_fullscreen { + if let Some(position) = initial_position { + window.set_outer_position(position); + } + } + #[cfg(feature = "tracing")] { drop(window_create_span); From 4ef5797f0fb27fa2df3f39f4a54e48ef319560ec Mon Sep 17 00:00:00 2001 From: Alex Date: Thu, 30 Apr 2026 06:34:17 -0700 Subject: [PATCH 07/12] feat(ios): add --no-sign and --archive-only flags to ios build (#15061) * feat(cli): add --no-sign and --archive-only to tauri ios build * feat(cli): fix manual IPA packaging for --no-sign * feat(cli): add explicit Payload/ directory to IPA zip * separate fn * fmt --------- Co-authored-by: Lucas Nogueira --- .changes/ios-skip-codesign.md | 5 + crates/tauri-cli/src/mobile/ios/build.rs | 120 ++++++++++++++++++++--- crates/tauri-cli/src/mobile/ios/run.rs | 2 + 3 files changed, 114 insertions(+), 13 deletions(-) create mode 100644 .changes/ios-skip-codesign.md diff --git a/.changes/ios-skip-codesign.md b/.changes/ios-skip-codesign.md new file mode 100644 index 000000000000..0a88e0ddaaf3 --- /dev/null +++ b/.changes/ios-skip-codesign.md @@ -0,0 +1,5 @@ +--- +'tauri-cli': 'minor:feat' +--- + +Add `--no-sign` and `--archive-only` flags to `tauri ios build`. diff --git a/crates/tauri-cli/src/mobile/ios/build.rs b/crates/tauri-cli/src/mobile/ios/build.rs index 762654c4ad1d..2ecbf7b0a265 100644 --- a/crates/tauri-cli/src/mobile/ios/build.rs +++ b/crates/tauri-cli/src/mobile/ios/build.rs @@ -36,7 +36,7 @@ use rand::distr::{Alphanumeric, SampleString}; use std::{ env::{set_current_dir, var, var_os}, fs, - path::PathBuf, + path::{Path, PathBuf}, }; #[derive(Debug, Clone, Parser)] @@ -94,6 +94,12 @@ pub struct Options { /// Only use this when you are sure the mismatch is incorrectly detected as version mismatched Tauri packages can lead to unknown behavior. #[clap(long)] pub ignore_version_mismatches: bool, + /// Skip code signing when bundling the app + #[clap(long)] + pub no_sign: bool, + /// Only archive the app, skip generating the IPA. + #[clap(long)] + pub archive_only: bool, /// Target device of this build #[clap(skip)] pub target_device: Option, @@ -154,7 +160,7 @@ impl From for BuildOptions { ci: options.ci, skip_stapling: false, ignore_version_mismatches: options.ignore_version_mismatches, - no_sign: false, + no_sign: options.no_sign, } } } @@ -423,20 +429,26 @@ fn run_build( } let credentials = auth_credentials_from_env()?; - let skip_signing = credentials.is_some(); + let skip_signing = options.no_sign || credentials.is_some(); - let mut build_config = BuildConfig::new().allow_provisioning_updates(); - if let Some(credentials) = &credentials { - build_config = build_config - .authentication_credentials(credentials.clone()) - .skip_codesign(); - } + if !(options.archive_only || options.no_sign) { + let mut build_config = BuildConfig::new().allow_provisioning_updates(); + if let Some(credentials) = &credentials { + build_config = build_config.authentication_credentials(credentials.clone()); + } + if skip_signing { + build_config = build_config.skip_codesign(); + } - target - .build(None, config, env, noise_level, profile, build_config) - .context("failed to build iOS app")?; + target + .build(None, config, env, noise_level, profile, build_config) + .context("failed to build iOS app")?; + } - let mut archive_config = ArchiveConfig::new(); + let mut archive_config = ArchiveConfig::new().allow_provisioning_updates(); + if let Some(credentials) = &credentials { + archive_config = archive_config.authentication_credentials(credentials.clone()); + } if skip_signing { archive_config = archive_config.skip_codesign(); } @@ -452,6 +464,15 @@ fn run_build( ) .context("failed to archive iOS app")?; + if options.archive_only { + out_files.push( + config + .archive_dir() + .join(format!("{}.xcarchive", config.scheme())), + ); + return Ok(()); + } + let out_dir = config.export_dir().join(target.arch); if target.sdk == "iphonesimulator" { @@ -469,6 +490,23 @@ fn run_build( let path = out_dir.join(app_path.file_name().unwrap()); fs::rename(&app_path, &path).fs_context("failed to rename app", app_path)?; out_files.push(path); + } else if options.no_sign { + fs::create_dir_all(&out_dir) + .fs_context("failed to create Xcode output directory", out_dir.clone())?; + + let app_path = config + .archive_dir() + .join(format!("{}.xcarchive", config.scheme())) + .join("Products") + .join("Applications") + .join(config.app().stylized_name()) + .with_extension("app"); + + let ipa_path = out_dir + .join(config.app().stylized_name()) + .with_extension("ipa"); + create_ipa(&app_path, &ipa_path)?; + out_files.push(ipa_path); } else { // if we skipped code signing, we do not have the entitlements applied to our exported IPA // we must force sign the app binary with a dummy certificate just to preserve the entitlements @@ -545,6 +583,62 @@ fn run_build( Ok(handle) } +fn create_ipa(app_path: &Path, ipa_path: &Path) -> Result<()> { + let ipa_file = + fs::File::create(ipa_path).fs_context("failed to create IPA file", ipa_path.to_path_buf())?; + let mut zip = zip::ZipWriter::new(ipa_file); + let options = zip::write::SimpleFileOptions::default() + .compression_method(zip::CompressionMethod::Deflated) + .unix_permissions(0o755); + + zip + .add_directory("Payload/", options) + .context("failed to add Payload directory to zip")?; + + let mut app_files = Vec::new(); + let mut stack = vec![app_path.to_path_buf()]; + while let Some(path) = stack.pop() { + if path.is_dir() { + app_files.push(path.clone()); + for entry in fs::read_dir(&path).fs_context("failed to read directory", path.clone())? { + stack.push( + entry + .fs_context("failed to read directory entry", path.clone())? + .path(), + ); + } + } else { + app_files.push(path); + } + } + + for file_path in app_files { + let name = file_path.strip_prefix(app_path.parent().unwrap()).unwrap(); + let mut name_str = name.to_string_lossy().to_string(); + // zip expects forward slashes + if std::path::MAIN_SEPARATOR == '\\' { + name_str = name_str.replace('\\', "/"); + } + let mut name_in_zip = format!("Payload/{name_str}"); + + if file_path.is_dir() { + name_in_zip.push('/'); + zip + .add_directory(name_in_zip, options) + .context("failed to add directory to zip")?; + } else { + zip + .start_file(name_in_zip, options) + .context("failed to start file in zip")?; + let mut f = fs::File::open(&file_path).fs_context("failed to open file", file_path)?; + std::io::copy(&mut f, &mut zip).context("failed to copy file to zip")?; + } + } + + zip.finish().context("failed to finish zip")?; + Ok(()) +} + fn auth_credentials_from_env() -> Result> { match ( var("APPLE_API_KEY"), diff --git a/crates/tauri-cli/src/mobile/ios/run.rs b/crates/tauri-cli/src/mobile/ios/run.rs index d80828d1c660..44c0c1c9d94d 100644 --- a/crates/tauri-cli/src/mobile/ios/run.rs +++ b/crates/tauri-cli/src/mobile/ios/run.rs @@ -88,6 +88,8 @@ pub fn command(options: Options, noise_level: NoiseLevel) -> Result<()> { export_method: None, args: options.args, ignore_version_mismatches: options.ignore_version_mismatches, + no_sign: false, + archive_only: false, target_device: device.as_ref().map(|d| TargetDevice { id: d.id().to_string(), name: d.name().to_string(), From eb0312ea9e493954298ac0b3fdaae7eafb52750e Mon Sep 17 00:00:00 2001 From: Trevor Morris <61497457+tremorrisdev@users.noreply.github.com> Date: Thu, 30 Apr 2026 06:56:25 -0700 Subject: [PATCH 08/12] feat(mobile): Propagate tao::Event::Suspended and tao::Event::Resumed to the window (feat #15181) (#15199) * wip * docs: adds documentation for forwarded tao events * docs: adds change log * feat: updates js api build --------- Co-authored-by: Lucas Nogueira --- .changes/mobile_tao_events.md | 8 ++ crates/tauri-runtime-wry/src/lib.rs | 25 ++++++ crates/tauri-runtime/src/window.rs | 20 +++++ crates/tauri/scripts/bundle.global.js | 2 +- crates/tauri/src/app.rs | 22 +++++ crates/tauri/src/manager/window.rs | 8 ++ packages/api/src/event.ts | 2 + packages/cli/index.js | 112 +++++++++++++------------- 8 files changed, 144 insertions(+), 55 deletions(-) create mode 100644 .changes/mobile_tao_events.md diff --git a/.changes/mobile_tao_events.md b/.changes/mobile_tao_events.md new file mode 100644 index 000000000000..791e6fd3513d --- /dev/null +++ b/.changes/mobile_tao_events.md @@ -0,0 +1,8 @@ +--- +'tauri-runtime-wry': 'minor:feat' +'tauri-runtime': 'minor:feat' +'tauri': 'minor:feat' +'@tauri-apps/api': 'minor:feat' +--- + +Propagates the `Event::Suspended` and `Event::Resumed` events from `tao` when they are emitted on mobile targets. diff --git a/crates/tauri-runtime-wry/src/lib.rs b/crates/tauri-runtime-wry/src/lib.rs index 66f04f7f9d8e..7cfbe1855033 100644 --- a/crates/tauri-runtime-wry/src/lib.rs +++ b/crates/tauri-runtime-wry/src/lib.rs @@ -4405,6 +4405,31 @@ fn handle_event_loop( Event::SceneRequested { scene, options } => { callback(RunEvent::SceneRequested { scene, options }); } + #[cfg(mobile)] + e @ Event::Resumed | e @ Event::Suspended => { + let event = match e { + Event::Resumed => WindowEvent::Resumed, + Event::Suspended => WindowEvent::Suspended, + _ => unreachable!(), + }; + + let windows_ref = windows.0.borrow(); + windows_ref.values().for_each(|window| { + let label = window.label.clone(); + let window_event_listeners = window.window_event_listeners.clone(); + let listeners = window_event_listeners.lock().unwrap(); + for handler in listeners.values() { + handler(&event); + } + + callback(RunEvent::WindowEvent { + label, + event: event.clone(), + }); + }); + + drop(windows_ref); + } _ => (), } } diff --git a/crates/tauri-runtime/src/window.rs b/crates/tauri-runtime/src/window.rs index 35b84017cb7a..e20613ea260d 100644 --- a/crates/tauri-runtime/src/window.rs +++ b/crates/tauri-runtime/src/window.rs @@ -62,6 +62,26 @@ pub enum WindowEvent { /// /// Applications might wish to react to this to change the theme of the content of the window when the system changes the window theme. ThemeChanged(Theme), + + /// Emitted when the application has been suspended. + /// + /// ## Platform-specific + /// + /// - **Android**: This is triggered by `onPause` method of the Activity. + /// - **iOS**: This is triggered by `applicationWillResignActive` method of the UIApplicationDelegate. + /// - **Linux / macOS / Windows**: Unsupported. + #[cfg(mobile)] + Suspended, + + /// Emitted when the application has been resumed. + /// + /// ## Platform-specific + /// + /// - **Android**: This is triggered by `onResume` method of the Activity. The first onResume() is ignored to match the iOS implementation, since that is called on activity creation. + /// - **iOS**: This is triggered by `applicationWillEnterForeground` method of the UIApplicationDelegate. + /// - **Linux / macOS / Windows**: Unsupported. + #[cfg(mobile)] + Resumed, } /// An event from a window. diff --git a/crates/tauri/scripts/bundle.global.js b/crates/tauri/scripts/bundle.global.js index c56bb9c63ca7..0441f23e6912 100644 --- a/crates/tauri/scripts/bundle.global.js +++ b/crates/tauri/scripts/bundle.global.js @@ -1 +1 @@ -var __TAURI_IIFE__=function(e){"use strict";function n(e,n,t,i){if("a"===t&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!i:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?i:"a"===t?i.call(e):i?i.value:n.get(e)}function t(e,n,t,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,t):r?r.value=t:n.set(e,t),t}var i,r,s,a,l;"function"==typeof SuppressedError&&SuppressedError;const o="__TAURI_TO_IPC_KEY__";function u(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}class c{constructor(e){i.set(this,void 0),r.set(this,0),s.set(this,[]),a.set(this,void 0),t(this,i,e||(()=>{}),"f"),this.id=u(e=>{const l=e.index;if("end"in e)return void(l==n(this,r,"f")?this.cleanupCallback():t(this,a,l,"f"));const o=e.message;if(l==n(this,r,"f")){for(n(this,i,"f").call(this,o),t(this,r,n(this,r,"f")+1,"f");n(this,r,"f")in n(this,s,"f");){const e=n(this,s,"f")[n(this,r,"f")];n(this,i,"f").call(this,e),delete n(this,s,"f")[n(this,r,"f")],t(this,r,n(this,r,"f")+1,"f")}n(this,r,"f")===n(this,a,"f")&&this.cleanupCallback()}else n(this,s,"f")[l]=o})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){t(this,i,e,"f")}get onmessage(){return n(this,i,"f")}[(i=new WeakMap,r=new WeakMap,s=new WeakMap,a=new WeakMap,o)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[o]()}}class d{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return h(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function p(e,n,t){const i=new c(t);try{return await h(`plugin:${e}|register_listener`,{event:n,handler:i}),new d(e,n,i.id)}catch{return await h(`plugin:${e}|registerListener`,{event:n,handler:i}),new d(e,n,i.id)}}async function h(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}class w{get rid(){return n(this,l,"f")}constructor(e){l.set(this,void 0),t(this,l,e,"f")}async close(){return h("plugin:resources|close",{rid:this.rid})}}l=new WeakMap;var _=Object.freeze({__proto__:null,Channel:c,PluginListener:d,Resource:w,SERIALIZE_TO_IPC_FN:o,addPluginListener:p,checkPermissions:async function(e){return h(`plugin:${e}|check_permissions`)},convertFileSrc:function(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)},invoke:h,isTauri:function(){return!!(globalThis||window).isTauri},requestPermissions:async function(e){return h(`plugin:${e}|request_permissions`)},transformCallback:u});class y extends w{constructor(e){super(e)}static async new(e,n,t){return h("plugin:image|new",{rgba:g(e),width:n,height:t}).then(e=>new y(e))}static async fromBytes(e){return h("plugin:image|from_bytes",{bytes:g(e)}).then(e=>new y(e))}static async fromPath(e){return h("plugin:image|from_path",{path:e}).then(e=>new y(e))}async rgba(){return h("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return h("plugin:image|size",{rid:this.rid})}}function g(e){return null==e?null:"string"==typeof e?e:e instanceof y?e.rid:e}var b,m=Object.freeze({__proto__:null,Image:y,transformImage:g});!function(e){e.Nsis="nsis",e.Msi="msi",e.Deb="deb",e.Rpm="rpm",e.AppImage="appimage",e.App="app"}(b||(b={}));var f=Object.freeze({__proto__:null,get BundleType(){return b},defaultWindowIcon:async function(){return h("plugin:app|default_window_icon").then(e=>e?new y(e):null)},fetchDataStoreIdentifiers:async function(){return h("plugin:app|fetch_data_store_identifiers")},getBundleType:async function(){return h("plugin:app|bundle_type")},getIdentifier:async function(){return h("plugin:app|identifier")},getName:async function(){return h("plugin:app|name")},getTauriVersion:async function(){return h("plugin:app|tauri_version")},getVersion:async function(){return h("plugin:app|version")},hide:async function(){return h("plugin:app|app_hide")},onBackButtonPress:async function(e){return p("app","back-button",e)},removeDataStore:async function(e){return h("plugin:app|remove_data_store",{uuid:e})},setDockVisibility:async function(e){return h("plugin:app|set_dock_visibility",{visible:e})},setTheme:async function(e){return h("plugin:app|set_app_theme",{theme:e})},show:async function(){return h("plugin:app|app_show")},supportsMultipleWindows:async function(){return h("plugin:app|supports_multiple_windows")}});class v{constructor(...e){this.type="Logical",1===e.length?"Logical"in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new k(this.width*e,this.height*e)}[o](){return{width:this.width,height:this.height}}toJSON(){return this[o]()}}class k{constructor(...e){this.type="Physical",1===e.length?"Physical"in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new v(this.width/e,this.height/e)}[o](){return{width:this.width,height:this.height}}toJSON(){return this[o]()}}class A{constructor(e){this.size=e}toLogical(e){return this.size instanceof v?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof k?this.size:this.size.toPhysical(e)}[o](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[o]()}}class T{constructor(...e){this.type="Logical",1===e.length?"Logical"in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new I(this.x*e,this.y*e)}[o](){return{x:this.x,y:this.y}}toJSON(){return this[o]()}}class I{constructor(...e){this.type="Physical",1===e.length?"Physical"in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new T(this.x/e,this.y/e)}[o](){return{x:this.x,y:this.y}}toJSON(){return this[o]()}}class E{constructor(e){this.position=e}toLogical(e){return this.position instanceof T?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof I?this.position:this.position.toPhysical(e)}[o](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[o]()}}var R,D=Object.freeze({__proto__:null,LogicalPosition:T,LogicalSize:v,PhysicalPosition:I,PhysicalSize:k,Position:E,Size:A});async function S(e,n){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,n),await h("plugin:event|unlisten",{event:e,eventId:n})}async function N(e,n,t){var i;const r="string"==typeof(null==t?void 0:t.target)?{kind:"AnyLabel",label:t.target}:null!==(i=null==t?void 0:t.target)&&void 0!==i?i:{kind:"Any"};return h("plugin:event|listen",{event:e,target:r,handler:u(n)}).then(n=>async()=>S(e,n))}async function L(e,n,t){return N(e,t=>{S(e,t.id),n(t)},t)}async function C(e,n){await h("plugin:event|emit",{event:e,payload:n})}async function x(e,n,t){const i="string"==typeof e?{kind:"AnyLabel",label:e}:e;await h("plugin:event|emit_to",{target:i,event:n,payload:t})}!function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"}(R||(R={}));var P,z,W,O=Object.freeze({__proto__:null,get TauriEvent(){return R},emit:C,emitTo:x,listen:N,once:L});function U(e){var n;if("items"in e)e.items=null===(n=e.items)||void 0===n?void 0:n.map(e=>"rid"in e?e:U(e));else if("action"in e&&e.action){const n=new c;return n.onmessage=e.action,delete e.action,{...e,handler:n}}return e}async function F(e,n){const t=new c;if(n&&"object"==typeof n&&("action"in n&&n.action&&(t.onmessage=n.action,delete n.action),"item"in n&&n.item&&"object"==typeof n.item&&"About"in n.item&&n.item.About&&"object"==typeof n.item.About&&"icon"in n.item.About&&n.item.About.icon&&(n.item.About.icon=g(n.item.About.icon)),"icon"in n&&n.icon&&(n.icon=g(n.icon)),"items"in n&&n.items)){function i(e){var n;return"rid"in e?[e.rid,e.kind]:("item"in e&&"object"==typeof e.item&&(null===(n=e.item.About)||void 0===n?void 0:n.icon)&&(e.item.About.icon=g(e.item.About.icon)),"icon"in e&&e.icon&&(e.icon=g(e.icon)),"items"in e&&e.items&&(e.items=e.items.map(i)),U(e))}n.items=n.items.map(i)}return h("plugin:menu|new",{kind:e,options:n,handler:t})}class M extends w{get id(){return n(this,P,"f")}get kind(){return n(this,z,"f")}constructor(e,n,i){super(e),P.set(this,void 0),z.set(this,void 0),t(this,P,n,"f"),t(this,z,i,"f")}}P=new WeakMap,z=new WeakMap;class B extends M{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return F("MenuItem",e).then(([e,n])=>new B(e,n))}async text(){return h("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return h("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return h("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return h("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return h("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}}class V extends M{constructor(e,n){super(e,n,"Check")}static async new(e){return F("Check",e).then(([e,n])=>new V(e,n))}async text(){return h("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return h("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return h("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return h("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return h("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return h("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return h("plugin:menu|set_checked",{rid:this.rid,checked:e})}}!function(e){e.Add="Add",e.Advanced="Advanced",e.Bluetooth="Bluetooth",e.Bookmarks="Bookmarks",e.Caution="Caution",e.ColorPanel="ColorPanel",e.ColumnView="ColumnView",e.Computer="Computer",e.EnterFullScreen="EnterFullScreen",e.Everyone="Everyone",e.ExitFullScreen="ExitFullScreen",e.FlowView="FlowView",e.Folder="Folder",e.FolderBurnable="FolderBurnable",e.FolderSmart="FolderSmart",e.FollowLinkFreestanding="FollowLinkFreestanding",e.FontPanel="FontPanel",e.GoLeft="GoLeft",e.GoRight="GoRight",e.Home="Home",e.IChatTheater="IChatTheater",e.IconView="IconView",e.Info="Info",e.InvalidDataFreestanding="InvalidDataFreestanding",e.LeftFacingTriangle="LeftFacingTriangle",e.ListView="ListView",e.LockLocked="LockLocked",e.LockUnlocked="LockUnlocked",e.MenuMixedState="MenuMixedState",e.MenuOnState="MenuOnState",e.MobileMe="MobileMe",e.MultipleDocuments="MultipleDocuments",e.Network="Network",e.Path="Path",e.PreferencesGeneral="PreferencesGeneral",e.QuickLook="QuickLook",e.RefreshFreestanding="RefreshFreestanding",e.Refresh="Refresh",e.Remove="Remove",e.RevealFreestanding="RevealFreestanding",e.RightFacingTriangle="RightFacingTriangle",e.Share="Share",e.Slideshow="Slideshow",e.SmartBadge="SmartBadge",e.StatusAvailable="StatusAvailable",e.StatusNone="StatusNone",e.StatusPartiallyAvailable="StatusPartiallyAvailable",e.StatusUnavailable="StatusUnavailable",e.StopProgressFreestanding="StopProgressFreestanding",e.StopProgress="StopProgress",e.TrashEmpty="TrashEmpty",e.TrashFull="TrashFull",e.User="User",e.UserAccounts="UserAccounts",e.UserGroup="UserGroup",e.UserGuest="UserGuest"}(W||(W={}));class G extends M{constructor(e,n){super(e,n,"Icon")}static async new(e){return F("Icon",e).then(([e,n])=>new G(e,n))}async text(){return h("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return h("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return h("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return h("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return h("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return h("plugin:menu|set_icon",{rid:this.rid,kind:this.kind,icon:g(e)})}}class j extends M{constructor(e,n){super(e,n,"Predefined")}static async new(e){return F("Predefined",e).then(([e,n])=>new j(e,n))}async text(){return h("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return h("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}}function H([e,n,t]){switch(t){case"Submenu":return new $(e,n);case"Predefined":return new j(e,n);case"Check":return new V(e,n);case"Icon":return new G(e,n);default:return new B(e,n)}}class $ extends M{constructor(e,n){super(e,n,"Submenu")}static async new(e){return F("Submenu",e).then(([e,n])=>new $(e,n))}async text(){return h("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return h("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return h("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return h("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return h("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(e=>"rid"in e?[e.rid,e.kind]:e)})}async prepend(e){return h("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(e=>"rid"in e?[e.rid,e.kind]:e)})}async insert(e,n){return h("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(e=>"rid"in e?[e.rid,e.kind]:e),position:n})}async remove(e){return h("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return h("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(H)}async items(){return h("plugin:menu|items",{rid:this.rid,kind:this.kind}).then(e=>e.map(H))}async get(e){return h("plugin:menu|get",{rid:this.rid,kind:this.kind,id:e}).then(e=>e?H(e):null)}async popup(e,n){var t;return h("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:null!==(t=null==n?void 0:n.label)&&void 0!==t?t:null,at:e instanceof E?e:e?new E(e):null})}async setAsWindowsMenuForNSApp(){return h("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return h("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}async setIcon(e){return h("plugin:menu|set_icon",{rid:this.rid,kind:this.kind,icon:g(e)})}}class q extends M{constructor(e,n){super(e,n,"Menu")}static async new(e){return F("Menu",e).then(([e,n])=>new q(e,n))}static async default(){return h("plugin:menu|create_default").then(([e,n])=>new q(e,n))}async append(e){return h("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(e=>"rid"in e?[e.rid,e.kind]:e)})}async prepend(e){return h("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(e=>"rid"in e?[e.rid,e.kind]:e)})}async insert(e,n){return h("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(e=>"rid"in e?[e.rid,e.kind]:e),position:n})}async remove(e){return h("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return h("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(H)}async items(){return h("plugin:menu|items",{rid:this.rid,kind:this.kind}).then(e=>e.map(H))}async get(e){return h("plugin:menu|get",{rid:this.rid,kind:this.kind,id:e}).then(e=>e?H(e):null)}async popup(e,n){var t;return h("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:null!==(t=null==n?void 0:n.label)&&void 0!==t?t:null,at:e instanceof E?e:e?new E(e):null})}async setAsAppMenu(){return h("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new q(e[0],e[1]):null)}async setAsWindowMenu(e){var n;return h("plugin:menu|set_as_window_menu",{rid:this.rid,window:null!==(n=null==e?void 0:e.label)&&void 0!==n?n:null}).then(e=>e?new q(e[0],e[1]):null)}}var J=Object.freeze({__proto__:null,CheckMenuItem:V,IconMenuItem:G,Menu:q,MenuItem:B,get NativeIcon(){return W},PredefinedMenuItem:j,Submenu:$,itemFromKind:H});function Q(){var e,n;window.__TAURI_INTERNALS__=null!==(e=window.__TAURI_INTERNALS__)&&void 0!==e?e:{},window.__TAURI_EVENT_PLUGIN_INTERNALS__=null!==(n=window.__TAURI_EVENT_PLUGIN_INTERNALS__)&&void 0!==n?n:{}}var Z,K=Object.freeze({__proto__:null,clearMocks:function(){"object"==typeof window.__TAURI_INTERNALS__&&(delete window.__TAURI_INTERNALS__.invoke,delete window.__TAURI_INTERNALS__.transformCallback,delete window.__TAURI_INTERNALS__.unregisterCallback,delete window.__TAURI_INTERNALS__.runCallback,delete window.__TAURI_INTERNALS__.callbacks,delete window.__TAURI_INTERNALS__.convertFileSrc,delete window.__TAURI_INTERNALS__.metadata,"object"==typeof window.__TAURI_EVENT_PLUGIN_INTERNALS__&&delete window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener)},mockConvertFileSrc:function(e){Q(),window.__TAURI_INTERNALS__.convertFileSrc=function(n,t="asset"){const i=encodeURIComponent(n);return"windows"===e?`http://${t}.localhost/${i}`:`${t}://localhost/${i}`}},mockIPC:function(e,n){function t(e,n){switch(e){case"plugin:event|listen":return function(e){i.has(e.event)||i.set(e.event,[]);return i.get(e.event).push(e.handler),e.handler}(n);case"plugin:event|emit":return function(e){const n=i.get(e.event)||[];for(const t of n)a(t,e);return null}(n);case"plugin:event|unlisten":return function(e){const n=i.get(e.event);if(n){const t=n.indexOf(e.id);-1!==t&&n.splice(t,1)}}(n)}}Q();const i=new Map,r=new Map;function s(e){r.delete(e)}function a(e,n){const t=r.get(e);t?t(n):console.warn(`[TAURI] Couldn't find callback id ${e}. This might happen when the app is reloaded while Rust is running an asynchronous operation.`)}window.__TAURI_INTERNALS__.invoke=async function(i,r,s){return(null==n?void 0:n.shouldMockEvents)&&function(e){return e.startsWith("plugin:event|")}(i)?t(i,r):e(i,r)},window.__TAURI_INTERNALS__.transformCallback=function(e,n=!1){const t=window.crypto.getRandomValues(new Uint32Array(1))[0];return r.set(t,i=>(n&&s(t),e&&e(i))),t},window.__TAURI_INTERNALS__.unregisterCallback=s,window.__TAURI_INTERNALS__.runCallback=a,window.__TAURI_INTERNALS__.callbacks=r,window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener=function(e,n){s(n)}},mockWindows:function(e,...n){Q(),window.__TAURI_INTERNALS__.metadata={currentWindow:{label:e},currentWebview:{windowLabel:e,label:e}}}});!function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"}(Z||(Z={}));var Y=Object.freeze({__proto__:null,get BaseDirectory(){return Z},appCacheDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.AppCache})},appConfigDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.AppConfig})},appDataDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.AppData})},appLocalDataDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.AppLocalData})},appLogDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.AppLog})},audioDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Audio})},basename:async function(e,n){return h("plugin:path|basename",{path:e,ext:n})},cacheDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Cache})},configDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Config})},dataDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Data})},delimiter:function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},desktopDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Desktop})},dirname:async function(e){return h("plugin:path|dirname",{path:e})},documentDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Document})},downloadDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Download})},executableDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Executable})},extname:async function(e){return h("plugin:path|extname",{path:e})},fontDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Font})},homeDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Home})},isAbsolute:async function(e){return h("plugin:path|is_absolute",{path:e})},join:async function(...e){return h("plugin:path|join",{paths:e})},localDataDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.LocalData})},normalize:async function(e){return h("plugin:path|normalize",{path:e})},pictureDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Picture})},publicDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Public})},resolve:async function(...e){return h("plugin:path|resolve",{paths:e})},resolveResource:async function(e){return h("plugin:path|resolve_directory",{directory:Z.Resource,path:e})},resourceDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Resource})},runtimeDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Runtime})},sep:function(){return window.__TAURI_INTERNALS__.plugins.path.sep},tempDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Temp})},templateDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Template})},videoDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Video})}});class X extends w{constructor(e,n){super(e),this.id=n}static async getById(e){return h("plugin:tray|get_by_id",{id:e}).then(n=>n?new X(n,e):null)}static async removeById(e){return h("plugin:tray|remove_by_id",{id:e})}static async new(e){(null==e?void 0:e.menu)&&(e.menu=[e.menu.rid,e.menu.kind]),(null==e?void 0:e.icon)&&(e.icon=g(e.icon));const n=new c;if(null==e?void 0:e.action){const t=e.action;n.onmessage=e=>t(function(e){const n=e;return n.position=new I(e.position),n.rect.position=new I(e.rect.position),n.rect.size=new k(e.rect.size),n}(e)),delete e.action}return h("plugin:tray|new",{options:null!=e?e:{},handler:n}).then(([e,n])=>new X(e,n))}async setIcon(e){let n=null;return e&&(n=g(e)),h("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),h("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return h("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return h("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return h("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return h("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return h("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setIconWithAsTemplate(e,n){let t=null;return e&&(t=g(e)),h("plugin:tray|set_icon_with_as_template",{rid:this.rid,icon:t,asTemplate:n})}async setMenuOnLeftClick(e){return h("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}async setShowMenuOnLeftClick(e){return h("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}var ee,ne,te=Object.freeze({__proto__:null,TrayIcon:X});!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(ee||(ee={}));class ie{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function re(){return new le(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function se(){return h("plugin:window|get_all_windows").then(e=>e.map(e=>new le(e,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(ne||(ne={}));const ae=["tauri://created","tauri://error"];class le{constructor(e,n={}){var t;this.label=e,this.listeners=Object.create(null),(null==n?void 0:n.skip)||h("plugin:window|create",{options:{...n,parent:"string"==typeof n.parent?n.parent:null===(t=n.parent)||void 0===t?void 0:t.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async e=>this.emit("tauri://error",e))}static async getByLabel(e){var n;return null!==(n=(await se()).find(n=>n.label===e))&&void 0!==n?n:null}static getCurrent(){return re()}static async getAll(){return se()}static async getFocusedWindow(){for(const e of await se())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)}:N(e,n,{target:{kind:"Window",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)}:L(e,n,{target:{kind:"Window",label:this.label}})}async emit(e,n){if(!ae.includes(e))return C(e,n);for(const t of this.listeners[e]||[])t({event:e,id:-1,payload:n})}async emitTo(e,n,t){if(!ae.includes(n))return x(e,n,t);for(const e of this.listeners[n]||[])e({event:n,id:-1,payload:t})}_handleTauriEvent(e,n){return!!ae.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}async scaleFactor(){return h("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return h("plugin:window|inner_position",{label:this.label}).then(e=>new I(e))}async outerPosition(){return h("plugin:window|outer_position",{label:this.label}).then(e=>new I(e))}async innerSize(){return h("plugin:window|inner_size",{label:this.label}).then(e=>new k(e))}async outerSize(){return h("plugin:window|outer_size",{label:this.label}).then(e=>new k(e))}async isFullscreen(){return h("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return h("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return h("plugin:window|is_maximized",{label:this.label})}async isFocused(){return h("plugin:window|is_focused",{label:this.label})}async isDecorated(){return h("plugin:window|is_decorated",{label:this.label})}async isResizable(){return h("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return h("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return h("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return h("plugin:window|is_closable",{label:this.label})}async isVisible(){return h("plugin:window|is_visible",{label:this.label})}async title(){return h("plugin:window|title",{label:this.label})}async theme(){return h("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return h("plugin:window|is_always_on_top",{label:this.label})}async activityName(){return h("plugin:window|activity_name",{label:this.label})}async sceneIdentifier(){return h("plugin:window|scene_identifier",{label:this.label})}async center(){return h("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(n=e===ee.Critical?{type:"Critical"}:{type:"Informational"}),h("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return h("plugin:window|set_resizable",{label:this.label,value:e})}async setEnabled(e){return h("plugin:window|set_enabled",{label:this.label,value:e})}async isEnabled(){return h("plugin:window|is_enabled",{label:this.label})}async setMaximizable(e){return h("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return h("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return h("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return h("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return h("plugin:window|maximize",{label:this.label})}async unmaximize(){return h("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return h("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return h("plugin:window|minimize",{label:this.label})}async unminimize(){return h("plugin:window|unminimize",{label:this.label})}async show(){return h("plugin:window|show",{label:this.label})}async hide(){return h("plugin:window|hide",{label:this.label})}async close(){return h("plugin:window|close",{label:this.label})}async destroy(){return h("plugin:window|destroy",{label:this.label})}async setDecorations(e){return h("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return h("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return h("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return h("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return h("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return h("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return h("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){return h("plugin:window|set_size",{label:this.label,value:e instanceof A?e:new A(e)})}async setMinSize(e){return h("plugin:window|set_min_size",{label:this.label,value:e instanceof A?e:e?new A(e):null})}async setMaxSize(e){return h("plugin:window|set_max_size",{label:this.label,value:e instanceof A?e:e?new A(e):null})}async setSizeConstraints(e){function n(e){return e?{Logical:e}:null}return h("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:n(null==e?void 0:e.minWidth),minHeight:n(null==e?void 0:e.minHeight),maxWidth:n(null==e?void 0:e.maxWidth),maxHeight:n(null==e?void 0:e.maxHeight)}})}async setPosition(e){return h("plugin:window|set_position",{label:this.label,value:e instanceof E?e:new E(e)})}async setFullscreen(e){return h("plugin:window|set_fullscreen",{label:this.label,value:e})}async setSimpleFullscreen(e){return h("plugin:window|set_simple_fullscreen",{label:this.label,value:e})}async setFocus(){return h("plugin:window|set_focus",{label:this.label})}async setFocusable(e){return h("plugin:window|set_focusable",{label:this.label,value:e})}async setIcon(e){return h("plugin:window|set_icon",{label:this.label,value:g(e)})}async setSkipTaskbar(e){return h("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return h("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return h("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return h("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setBackgroundColor(e){return h("plugin:window|set_background_color",{color:e})}async setCursorPosition(e){return h("plugin:window|set_cursor_position",{label:this.label,value:e instanceof E?e:new E(e)})}async setIgnoreCursorEvents(e){return h("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return h("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return h("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setBadgeCount(e){return h("plugin:window|set_badge_count",{label:this.label,value:e})}async setBadgeLabel(e){return h("plugin:window|set_badge_label",{label:this.label,value:e})}async setOverlayIcon(e){return h("plugin:window|set_overlay_icon",{label:this.label,value:e?g(e):void 0})}async setProgressBar(e){return h("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return h("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async setTitleBarStyle(e){return h("plugin:window|set_title_bar_style",{label:this.label,value:e})}async setTheme(e){return h("plugin:window|set_theme",{label:this.label,value:e})}async onResized(e){return this.listen(R.WINDOW_RESIZED,n=>{n.payload=new k(n.payload),e(n)})}async onMoved(e){return this.listen(R.WINDOW_MOVED,n=>{n.payload=new I(n.payload),e(n)})}async onCloseRequested(e){return this.listen(R.WINDOW_CLOSE_REQUESTED,async n=>{const t=new ie(n);await e(t),t.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){const n=await this.listen(R.DRAG_ENTER,n=>{e({...n,payload:{type:"enter",paths:n.payload.paths,position:new I(n.payload.position)}})}),t=await this.listen(R.DRAG_OVER,n=>{e({...n,payload:{type:"over",position:new I(n.payload.position)}})}),i=await this.listen(R.DRAG_DROP,n=>{e({...n,payload:{type:"drop",paths:n.payload.paths,position:new I(n.payload.position)}})}),r=await this.listen(R.DRAG_LEAVE,n=>{e({...n,payload:{type:"leave"}})});return()=>{n(),i(),t(),r()}}async onFocusChanged(e){const n=await this.listen(R.WINDOW_FOCUS,n=>{e({...n,payload:!0})}),t=await this.listen(R.WINDOW_BLUR,n=>{e({...n,payload:!1})});return()=>{n(),t()}}async onScaleChanged(e){return this.listen(R.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(R.WINDOW_THEME_CHANGED,e)}}var oe,ue,ce,de;function pe(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:new I(e.position),size:new k(e.size),workArea:{position:new I(e.workArea.position),size:new k(e.workArea.size)}}}!function(e){e.Disabled="disabled",e.Throttle="throttle",e.Suspend="suspend"}(oe||(oe={})),function(e){e.Default="default",e.FluentOverlay="fluentOverlay"}(ue||(ue={})),function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(ce||(ce={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(de||(de={}));var he=Object.freeze({__proto__:null,CloseRequestedEvent:ie,get Effect(){return ce},get EffectState(){return de},LogicalPosition:T,LogicalSize:v,PhysicalPosition:I,PhysicalSize:k,get ProgressBarStatus(){return ne},get UserAttentionType(){return ee},Window:le,availableMonitors:async function(){return h("plugin:window|available_monitors").then(e=>e.map(pe))},currentMonitor:async function(){return h("plugin:window|current_monitor").then(pe)},cursorPosition:async function(){return h("plugin:window|cursor_position").then(e=>new I(e))},getAllWindows:se,getCurrentWindow:re,monitorFromPoint:async function(e,n){return h("plugin:window|monitor_from_point",{x:e,y:n}).then(pe)},primaryMonitor:async function(){return h("plugin:window|primary_monitor").then(pe)}});function we(){return new ge(re(),window.__TAURI_INTERNALS__.metadata.currentWebview.label,{skip:!0})}async function _e(){return h("plugin:webview|get_all_webviews").then(e=>e.map(e=>new ge(new le(e.windowLabel,{skip:!0}),e.label,{skip:!0})))}const ye=["tauri://created","tauri://error"];class ge{constructor(e,n,t){this.window=e,this.label=n,this.listeners=Object.create(null),(null==t?void 0:t.skip)||h("plugin:webview|create_webview",{windowLabel:e.label,options:{...t,label:n}}).then(async()=>this.emit("tauri://created")).catch(async e=>this.emit("tauri://error",e))}static async getByLabel(e){var n;return null!==(n=(await _e()).find(n=>n.label===e))&&void 0!==n?n:null}static getCurrent(){return we()}static async getAll(){return _e()}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)}:N(e,n,{target:{kind:"Webview",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)}:L(e,n,{target:{kind:"Webview",label:this.label}})}async emit(e,n){if(!ye.includes(e))return C(e,n);for(const t of this.listeners[e]||[])t({event:e,id:-1,payload:n})}async emitTo(e,n,t){if(!ye.includes(n))return x(e,n,t);for(const e of this.listeners[n]||[])e({event:n,id:-1,payload:t})}_handleTauriEvent(e,n){return!!ye.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}async position(){return h("plugin:webview|webview_position",{label:this.label}).then(e=>new I(e))}async size(){return h("plugin:webview|webview_size",{label:this.label}).then(e=>new k(e))}async close(){return h("plugin:webview|webview_close",{label:this.label})}async setSize(e){return h("plugin:webview|set_webview_size",{label:this.label,value:e instanceof A?e:new A(e)})}async setPosition(e){return h("plugin:webview|set_webview_position",{label:this.label,value:e instanceof E?e:new E(e)})}async setFocus(){return h("plugin:webview|set_webview_focus",{label:this.label})}async setAutoResize(e){return h("plugin:webview|set_webview_auto_resize",{label:this.label,value:e})}async hide(){return h("plugin:webview|webview_hide",{label:this.label})}async show(){return h("plugin:webview|webview_show",{label:this.label})}async setZoom(e){return h("plugin:webview|set_webview_zoom",{label:this.label,value:e})}async reparent(e){return h("plugin:webview|reparent",{label:this.label,window:"string"==typeof e?e:e.label})}async clearAllBrowsingData(){return h("plugin:webview|clear_all_browsing_data")}async setBackgroundColor(e){return h("plugin:webview|set_webview_background_color",{color:e})}async onDragDropEvent(e){const n=await this.listen(R.DRAG_ENTER,n=>{e({...n,payload:{type:"enter",paths:n.payload.paths,position:new I(n.payload.position)}})}),t=await this.listen(R.DRAG_OVER,n=>{e({...n,payload:{type:"over",position:new I(n.payload.position)}})}),i=await this.listen(R.DRAG_DROP,n=>{e({...n,payload:{type:"drop",paths:n.payload.paths,position:new I(n.payload.position)}})}),r=await this.listen(R.DRAG_LEAVE,n=>{e({...n,payload:{type:"leave"}})});return()=>{n(),i(),t(),r()}}}var be,me,fe=Object.freeze({__proto__:null,Webview:ge,getAllWebviews:_e,getCurrentWebview:we});function ve(){const e=we();return new Ae(e.label,{skip:!0})}async function ke(){return h("plugin:window|get_all_windows").then(e=>e.map(e=>new Ae(e,{skip:!0})))}class Ae{constructor(e,n={}){var t;this.label=e,this.listeners=Object.create(null),(null==n?void 0:n.skip)||h("plugin:webview|create_webview_window",{options:{...n,parent:"string"==typeof n.parent?n.parent:null===(t=n.parent)||void 0===t?void 0:t.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async e=>this.emit("tauri://error",e))}static async getByLabel(e){var n;const t=null!==(n=(await ke()).find(n=>n.label===e))&&void 0!==n?n:null;return t?new Ae(t.label,{skip:!0}):null}static getCurrent(){return ve()}static async getAll(){return ke()}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)}:N(e,n,{target:{kind:"WebviewWindow",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)}:L(e,n,{target:{kind:"WebviewWindow",label:this.label}})}async setBackgroundColor(e){return h("plugin:window|set_background_color",{color:e}).then(()=>h("plugin:webview|set_webview_background_color",{color:e}))}}be=Ae,me=[le,ge],(Array.isArray(me)?me:[me]).forEach(e=>{Object.getOwnPropertyNames(e.prototype).forEach(n=>{var t;"object"==typeof be.prototype&&be.prototype&&n in be.prototype||Object.defineProperty(be.prototype,n,null!==(t=Object.getOwnPropertyDescriptor(e.prototype,n))&&void 0!==t?t:Object.create(null))})});var Te=Object.freeze({__proto__:null,WebviewWindow:Ae,getAllWebviewWindows:ke,getCurrentWebviewWindow:ve});return e.app=f,e.core=_,e.dpi=D,e.event=O,e.image=m,e.menu=J,e.mocks=K,e.path=Y,e.tray=te,e.webview=fe,e.webviewWindow=Te,e.window=he,e}({});window.__TAURI__=__TAURI_IIFE__; +var __TAURI_IIFE__=function(e){"use strict";function n(e,n,t,i){if("a"===t&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!i:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?i:"a"===t?i.call(e):i?i.value:n.get(e)}function t(e,n,t,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,t):r?r.value=t:n.set(e,t),t}var i,r,s,a,l;"function"==typeof SuppressedError&&SuppressedError;const o="__TAURI_TO_IPC_KEY__";function u(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}class c{constructor(e){i.set(this,void 0),r.set(this,0),s.set(this,[]),a.set(this,void 0),t(this,i,e||(()=>{}),"f"),this.id=u(e=>{const l=e.index;if("end"in e)return void(l==n(this,r,"f")?this.cleanupCallback():t(this,a,l,"f"));const o=e.message;if(l==n(this,r,"f")){for(n(this,i,"f").call(this,o),t(this,r,n(this,r,"f")+1,"f");n(this,r,"f")in n(this,s,"f");){const e=n(this,s,"f")[n(this,r,"f")];n(this,i,"f").call(this,e),delete n(this,s,"f")[n(this,r,"f")],t(this,r,n(this,r,"f")+1,"f")}n(this,r,"f")===n(this,a,"f")&&this.cleanupCallback()}else n(this,s,"f")[l]=o})}cleanupCallback(){window.__TAURI_INTERNALS__.unregisterCallback(this.id)}set onmessage(e){t(this,i,e,"f")}get onmessage(){return n(this,i,"f")}[(i=new WeakMap,r=new WeakMap,s=new WeakMap,a=new WeakMap,o)](){return`__CHANNEL__:${this.id}`}toJSON(){return this[o]()}}class d{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return h(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function p(e,n,t){const i=new c(t);try{return await h(`plugin:${e}|register_listener`,{event:n,handler:i}),new d(e,n,i.id)}catch{return await h(`plugin:${e}|registerListener`,{event:n,handler:i}),new d(e,n,i.id)}}async function h(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}class w{get rid(){return n(this,l,"f")}constructor(e){l.set(this,void 0),t(this,l,e,"f")}async close(){return h("plugin:resources|close",{rid:this.rid})}}l=new WeakMap;var _=Object.freeze({__proto__:null,Channel:c,PluginListener:d,Resource:w,SERIALIZE_TO_IPC_FN:o,addPluginListener:p,checkPermissions:async function(e){return h(`plugin:${e}|check_permissions`)},convertFileSrc:function(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)},invoke:h,isTauri:function(){return!!(globalThis||window).isTauri},requestPermissions:async function(e){return h(`plugin:${e}|request_permissions`)},transformCallback:u});class y extends w{constructor(e){super(e)}static async new(e,n,t){return h("plugin:image|new",{rgba:g(e),width:n,height:t}).then(e=>new y(e))}static async fromBytes(e){return h("plugin:image|from_bytes",{bytes:g(e)}).then(e=>new y(e))}static async fromPath(e){return h("plugin:image|from_path",{path:e}).then(e=>new y(e))}async rgba(){return h("plugin:image|rgba",{rid:this.rid}).then(e=>new Uint8Array(e))}async size(){return h("plugin:image|size",{rid:this.rid})}}function g(e){return null==e?null:"string"==typeof e?e:e instanceof y?e.rid:e}var b,m=Object.freeze({__proto__:null,Image:y,transformImage:g});!function(e){e.Nsis="nsis",e.Msi="msi",e.Deb="deb",e.Rpm="rpm",e.AppImage="appimage",e.App="app"}(b||(b={}));var f=Object.freeze({__proto__:null,get BundleType(){return b},defaultWindowIcon:async function(){return h("plugin:app|default_window_icon").then(e=>e?new y(e):null)},fetchDataStoreIdentifiers:async function(){return h("plugin:app|fetch_data_store_identifiers")},getBundleType:async function(){return h("plugin:app|bundle_type")},getIdentifier:async function(){return h("plugin:app|identifier")},getName:async function(){return h("plugin:app|name")},getTauriVersion:async function(){return h("plugin:app|tauri_version")},getVersion:async function(){return h("plugin:app|version")},hide:async function(){return h("plugin:app|app_hide")},onBackButtonPress:async function(e){return p("app","back-button",e)},removeDataStore:async function(e){return h("plugin:app|remove_data_store",{uuid:e})},setDockVisibility:async function(e){return h("plugin:app|set_dock_visibility",{visible:e})},setTheme:async function(e){return h("plugin:app|set_app_theme",{theme:e})},show:async function(){return h("plugin:app|app_show")},supportsMultipleWindows:async function(){return h("plugin:app|supports_multiple_windows")}});class v{constructor(...e){this.type="Logical",1===e.length?"Logical"in e[0]?(this.width=e[0].Logical.width,this.height=e[0].Logical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toPhysical(e){return new k(this.width*e,this.height*e)}[o](){return{width:this.width,height:this.height}}toJSON(){return this[o]()}}class k{constructor(...e){this.type="Physical",1===e.length?"Physical"in e[0]?(this.width=e[0].Physical.width,this.height=e[0].Physical.height):(this.width=e[0].width,this.height=e[0].height):(this.width=e[0],this.height=e[1])}toLogical(e){return new v(this.width/e,this.height/e)}[o](){return{width:this.width,height:this.height}}toJSON(){return this[o]()}}class A{constructor(e){this.size=e}toLogical(e){return this.size instanceof v?this.size:this.size.toLogical(e)}toPhysical(e){return this.size instanceof k?this.size:this.size.toPhysical(e)}[o](){return{[`${this.size.type}`]:{width:this.size.width,height:this.size.height}}}toJSON(){return this[o]()}}class T{constructor(...e){this.type="Logical",1===e.length?"Logical"in e[0]?(this.x=e[0].Logical.x,this.y=e[0].Logical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toPhysical(e){return new I(this.x*e,this.y*e)}[o](){return{x:this.x,y:this.y}}toJSON(){return this[o]()}}class I{constructor(...e){this.type="Physical",1===e.length?"Physical"in e[0]?(this.x=e[0].Physical.x,this.y=e[0].Physical.y):(this.x=e[0].x,this.y=e[0].y):(this.x=e[0],this.y=e[1])}toLogical(e){return new T(this.x/e,this.y/e)}[o](){return{x:this.x,y:this.y}}toJSON(){return this[o]()}}class E{constructor(e){this.position=e}toLogical(e){return this.position instanceof T?this.position:this.position.toLogical(e)}toPhysical(e){return this.position instanceof I?this.position:this.position.toPhysical(e)}[o](){return{[`${this.position.type}`]:{x:this.position.x,y:this.position.y}}}toJSON(){return this[o]()}}var R,D=Object.freeze({__proto__:null,LogicalPosition:T,LogicalSize:v,PhysicalPosition:I,PhysicalSize:k,Position:E,Size:A});async function S(e,n){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,n),await h("plugin:event|unlisten",{event:e,eventId:n})}async function N(e,n,t){var i;const r="string"==typeof(null==t?void 0:t.target)?{kind:"AnyLabel",label:t.target}:null!==(i=null==t?void 0:t.target)&&void 0!==i?i:{kind:"Any"};return h("plugin:event|listen",{event:e,target:r,handler:u(n)}).then(n=>async()=>S(e,n))}async function L(e,n,t){return N(e,t=>{S(e,t.id),n(t)},t)}async function C(e,n){await h("plugin:event|emit",{event:e,payload:n})}async function x(e,n,t){const i="string"==typeof e?{kind:"AnyLabel",label:e}:e;await h("plugin:event|emit_to",{target:i,event:n,payload:t})}!function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_SUSPENDED="tauri://suspended",e.WINDOW_RESUMED="tauri://resumed",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"}(R||(R={}));var W,P,z,O=Object.freeze({__proto__:null,get TauriEvent(){return R},emit:C,emitTo:x,listen:N,once:L});function U(e){var n;if("items"in e)e.items=null===(n=e.items)||void 0===n?void 0:n.map(e=>"rid"in e?e:U(e));else if("action"in e&&e.action){const n=new c;return n.onmessage=e.action,delete e.action,{...e,handler:n}}return e}async function F(e,n){const t=new c;if(n&&"object"==typeof n&&("action"in n&&n.action&&(t.onmessage=n.action,delete n.action),"item"in n&&n.item&&"object"==typeof n.item&&"About"in n.item&&n.item.About&&"object"==typeof n.item.About&&"icon"in n.item.About&&n.item.About.icon&&(n.item.About.icon=g(n.item.About.icon)),"icon"in n&&n.icon&&(n.icon=g(n.icon)),"items"in n&&n.items)){function i(e){var n;return"rid"in e?[e.rid,e.kind]:("item"in e&&"object"==typeof e.item&&(null===(n=e.item.About)||void 0===n?void 0:n.icon)&&(e.item.About.icon=g(e.item.About.icon)),"icon"in e&&e.icon&&(e.icon=g(e.icon)),"items"in e&&e.items&&(e.items=e.items.map(i)),U(e))}n.items=n.items.map(i)}return h("plugin:menu|new",{kind:e,options:n,handler:t})}class M extends w{get id(){return n(this,W,"f")}get kind(){return n(this,P,"f")}constructor(e,n,i){super(e),W.set(this,void 0),P.set(this,void 0),t(this,W,n,"f"),t(this,P,i,"f")}}W=new WeakMap,P=new WeakMap;class B extends M{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return F("MenuItem",e).then(([e,n])=>new B(e,n))}async text(){return h("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return h("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return h("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return h("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return h("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}}class V extends M{constructor(e,n){super(e,n,"Check")}static async new(e){return F("Check",e).then(([e,n])=>new V(e,n))}async text(){return h("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return h("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return h("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return h("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return h("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return h("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return h("plugin:menu|set_checked",{rid:this.rid,checked:e})}}!function(e){e.Add="Add",e.Advanced="Advanced",e.Bluetooth="Bluetooth",e.Bookmarks="Bookmarks",e.Caution="Caution",e.ColorPanel="ColorPanel",e.ColumnView="ColumnView",e.Computer="Computer",e.EnterFullScreen="EnterFullScreen",e.Everyone="Everyone",e.ExitFullScreen="ExitFullScreen",e.FlowView="FlowView",e.Folder="Folder",e.FolderBurnable="FolderBurnable",e.FolderSmart="FolderSmart",e.FollowLinkFreestanding="FollowLinkFreestanding",e.FontPanel="FontPanel",e.GoLeft="GoLeft",e.GoRight="GoRight",e.Home="Home",e.IChatTheater="IChatTheater",e.IconView="IconView",e.Info="Info",e.InvalidDataFreestanding="InvalidDataFreestanding",e.LeftFacingTriangle="LeftFacingTriangle",e.ListView="ListView",e.LockLocked="LockLocked",e.LockUnlocked="LockUnlocked",e.MenuMixedState="MenuMixedState",e.MenuOnState="MenuOnState",e.MobileMe="MobileMe",e.MultipleDocuments="MultipleDocuments",e.Network="Network",e.Path="Path",e.PreferencesGeneral="PreferencesGeneral",e.QuickLook="QuickLook",e.RefreshFreestanding="RefreshFreestanding",e.Refresh="Refresh",e.Remove="Remove",e.RevealFreestanding="RevealFreestanding",e.RightFacingTriangle="RightFacingTriangle",e.Share="Share",e.Slideshow="Slideshow",e.SmartBadge="SmartBadge",e.StatusAvailable="StatusAvailable",e.StatusNone="StatusNone",e.StatusPartiallyAvailable="StatusPartiallyAvailable",e.StatusUnavailable="StatusUnavailable",e.StopProgressFreestanding="StopProgressFreestanding",e.StopProgress="StopProgress",e.TrashEmpty="TrashEmpty",e.TrashFull="TrashFull",e.User="User",e.UserAccounts="UserAccounts",e.UserGroup="UserGroup",e.UserGuest="UserGuest"}(z||(z={}));class G extends M{constructor(e,n){super(e,n,"Icon")}static async new(e){return F("Icon",e).then(([e,n])=>new G(e,n))}async text(){return h("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return h("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return h("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return h("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return h("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return h("plugin:menu|set_icon",{rid:this.rid,kind:this.kind,icon:g(e)})}}class j extends M{constructor(e,n){super(e,n,"Predefined")}static async new(e){return F("Predefined",e).then(([e,n])=>new j(e,n))}async text(){return h("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return h("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}}function H([e,n,t]){switch(t){case"Submenu":return new $(e,n);case"Predefined":return new j(e,n);case"Check":return new V(e,n);case"Icon":return new G(e,n);default:return new B(e,n)}}class $ extends M{constructor(e,n){super(e,n,"Submenu")}static async new(e){return F("Submenu",e).then(([e,n])=>new $(e,n))}async text(){return h("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return h("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return h("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return h("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return h("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(e=>"rid"in e?[e.rid,e.kind]:e)})}async prepend(e){return h("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(e=>"rid"in e?[e.rid,e.kind]:e)})}async insert(e,n){return h("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(e=>"rid"in e?[e.rid,e.kind]:e),position:n})}async remove(e){return h("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return h("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(H)}async items(){return h("plugin:menu|items",{rid:this.rid,kind:this.kind}).then(e=>e.map(H))}async get(e){return h("plugin:menu|get",{rid:this.rid,kind:this.kind,id:e}).then(e=>e?H(e):null)}async popup(e,n){var t;return h("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:null!==(t=null==n?void 0:n.label)&&void 0!==t?t:null,at:e instanceof E?e:e?new E(e):null})}async setAsWindowsMenuForNSApp(){return h("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return h("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}async setIcon(e){return h("plugin:menu|set_icon",{rid:this.rid,kind:this.kind,icon:g(e)})}}class q extends M{constructor(e,n){super(e,n,"Menu")}static async new(e){return F("Menu",e).then(([e,n])=>new q(e,n))}static async default(){return h("plugin:menu|create_default").then(([e,n])=>new q(e,n))}async append(e){return h("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(e=>"rid"in e?[e.rid,e.kind]:e)})}async prepend(e){return h("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(e=>"rid"in e?[e.rid,e.kind]:e)})}async insert(e,n){return h("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(e=>"rid"in e?[e.rid,e.kind]:e),position:n})}async remove(e){return h("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return h("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(H)}async items(){return h("plugin:menu|items",{rid:this.rid,kind:this.kind}).then(e=>e.map(H))}async get(e){return h("plugin:menu|get",{rid:this.rid,kind:this.kind,id:e}).then(e=>e?H(e):null)}async popup(e,n){var t;return h("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:null!==(t=null==n?void 0:n.label)&&void 0!==t?t:null,at:e instanceof E?e:e?new E(e):null})}async setAsAppMenu(){return h("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new q(e[0],e[1]):null)}async setAsWindowMenu(e){var n;return h("plugin:menu|set_as_window_menu",{rid:this.rid,window:null!==(n=null==e?void 0:e.label)&&void 0!==n?n:null}).then(e=>e?new q(e[0],e[1]):null)}}var J=Object.freeze({__proto__:null,CheckMenuItem:V,IconMenuItem:G,Menu:q,MenuItem:B,get NativeIcon(){return z},PredefinedMenuItem:j,Submenu:$,itemFromKind:H});function Q(){var e,n;window.__TAURI_INTERNALS__=null!==(e=window.__TAURI_INTERNALS__)&&void 0!==e?e:{},window.__TAURI_EVENT_PLUGIN_INTERNALS__=null!==(n=window.__TAURI_EVENT_PLUGIN_INTERNALS__)&&void 0!==n?n:{}}var Z,K=Object.freeze({__proto__:null,clearMocks:function(){"object"==typeof window.__TAURI_INTERNALS__&&(delete window.__TAURI_INTERNALS__.invoke,delete window.__TAURI_INTERNALS__.transformCallback,delete window.__TAURI_INTERNALS__.unregisterCallback,delete window.__TAURI_INTERNALS__.runCallback,delete window.__TAURI_INTERNALS__.callbacks,delete window.__TAURI_INTERNALS__.convertFileSrc,delete window.__TAURI_INTERNALS__.metadata,"object"==typeof window.__TAURI_EVENT_PLUGIN_INTERNALS__&&delete window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener)},mockConvertFileSrc:function(e){Q(),window.__TAURI_INTERNALS__.convertFileSrc=function(n,t="asset"){const i=encodeURIComponent(n);return"windows"===e?`http://${t}.localhost/${i}`:`${t}://localhost/${i}`}},mockIPC:function(e,n){function t(e,n){switch(e){case"plugin:event|listen":return function(e){i.has(e.event)||i.set(e.event,[]);return i.get(e.event).push(e.handler),e.handler}(n);case"plugin:event|emit":return function(e){const n=i.get(e.event)||[];for(const t of n)a(t,e);return null}(n);case"plugin:event|unlisten":return function(e){const n=i.get(e.event);if(n){const t=n.indexOf(e.id);-1!==t&&n.splice(t,1)}}(n)}}Q();const i=new Map,r=new Map;function s(e){r.delete(e)}function a(e,n){const t=r.get(e);t?t(n):console.warn(`[TAURI] Couldn't find callback id ${e}. This might happen when the app is reloaded while Rust is running an asynchronous operation.`)}window.__TAURI_INTERNALS__.invoke=async function(i,r,s){return(null==n?void 0:n.shouldMockEvents)&&function(e){return e.startsWith("plugin:event|")}(i)?t(i,r):e(i,r)},window.__TAURI_INTERNALS__.transformCallback=function(e,n=!1){const t=window.crypto.getRandomValues(new Uint32Array(1))[0];return r.set(t,i=>(n&&s(t),e&&e(i))),t},window.__TAURI_INTERNALS__.unregisterCallback=s,window.__TAURI_INTERNALS__.runCallback=a,window.__TAURI_INTERNALS__.callbacks=r,window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener=function(e,n){s(n)}},mockWindows:function(e,...n){Q(),window.__TAURI_INTERNALS__.metadata={currentWindow:{label:e},currentWebview:{windowLabel:e,label:e}}}});!function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"}(Z||(Z={}));var Y=Object.freeze({__proto__:null,get BaseDirectory(){return Z},appCacheDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.AppCache})},appConfigDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.AppConfig})},appDataDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.AppData})},appLocalDataDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.AppLocalData})},appLogDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.AppLog})},audioDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Audio})},basename:async function(e,n){return h("plugin:path|basename",{path:e,ext:n})},cacheDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Cache})},configDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Config})},dataDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Data})},delimiter:function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},desktopDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Desktop})},dirname:async function(e){return h("plugin:path|dirname",{path:e})},documentDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Document})},downloadDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Download})},executableDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Executable})},extname:async function(e){return h("plugin:path|extname",{path:e})},fontDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Font})},homeDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Home})},isAbsolute:async function(e){return h("plugin:path|is_absolute",{path:e})},join:async function(...e){return h("plugin:path|join",{paths:e})},localDataDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.LocalData})},normalize:async function(e){return h("plugin:path|normalize",{path:e})},pictureDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Picture})},publicDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Public})},resolve:async function(...e){return h("plugin:path|resolve",{paths:e})},resolveResource:async function(e){return h("plugin:path|resolve_directory",{directory:Z.Resource,path:e})},resourceDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Resource})},runtimeDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Runtime})},sep:function(){return window.__TAURI_INTERNALS__.plugins.path.sep},tempDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Temp})},templateDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Template})},videoDir:async function(){return h("plugin:path|resolve_directory",{directory:Z.Video})}});class X extends w{constructor(e,n){super(e),this.id=n}static async getById(e){return h("plugin:tray|get_by_id",{id:e}).then(n=>n?new X(n,e):null)}static async removeById(e){return h("plugin:tray|remove_by_id",{id:e})}static async new(e){(null==e?void 0:e.menu)&&(e.menu=[e.menu.rid,e.menu.kind]),(null==e?void 0:e.icon)&&(e.icon=g(e.icon));const n=new c;if(null==e?void 0:e.action){const t=e.action;n.onmessage=e=>t(function(e){const n=e;return n.position=new I(e.position),n.rect.position=new I(e.rect.position),n.rect.size=new k(e.rect.size),n}(e)),delete e.action}return h("plugin:tray|new",{options:null!=e?e:{},handler:n}).then(([e,n])=>new X(e,n))}async setIcon(e){let n=null;return e&&(n=g(e)),h("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),h("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return h("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return h("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return h("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return h("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return h("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setIconWithAsTemplate(e,n){let t=null;return e&&(t=g(e)),h("plugin:tray|set_icon_with_as_template",{rid:this.rid,icon:t,asTemplate:n})}async setMenuOnLeftClick(e){return h("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}async setShowMenuOnLeftClick(e){return h("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}var ee,ne,te=Object.freeze({__proto__:null,TrayIcon:X});!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(ee||(ee={}));class ie{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function re(){return new le(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}async function se(){return h("plugin:window|get_all_windows").then(e=>e.map(e=>new le(e,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(ne||(ne={}));const ae=["tauri://created","tauri://error"];class le{constructor(e,n={}){var t;this.label=e,this.listeners=Object.create(null),(null==n?void 0:n.skip)||h("plugin:window|create",{options:{...n,parent:"string"==typeof n.parent?n.parent:null===(t=n.parent)||void 0===t?void 0:t.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async e=>this.emit("tauri://error",e))}static async getByLabel(e){var n;return null!==(n=(await se()).find(n=>n.label===e))&&void 0!==n?n:null}static getCurrent(){return re()}static async getAll(){return se()}static async getFocusedWindow(){for(const e of await se())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)}:N(e,n,{target:{kind:"Window",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)}:L(e,n,{target:{kind:"Window",label:this.label}})}async emit(e,n){if(!ae.includes(e))return C(e,n);for(const t of this.listeners[e]||[])t({event:e,id:-1,payload:n})}async emitTo(e,n,t){if(!ae.includes(n))return x(e,n,t);for(const e of this.listeners[n]||[])e({event:n,id:-1,payload:t})}_handleTauriEvent(e,n){return!!ae.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}async scaleFactor(){return h("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return h("plugin:window|inner_position",{label:this.label}).then(e=>new I(e))}async outerPosition(){return h("plugin:window|outer_position",{label:this.label}).then(e=>new I(e))}async innerSize(){return h("plugin:window|inner_size",{label:this.label}).then(e=>new k(e))}async outerSize(){return h("plugin:window|outer_size",{label:this.label}).then(e=>new k(e))}async isFullscreen(){return h("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return h("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return h("plugin:window|is_maximized",{label:this.label})}async isFocused(){return h("plugin:window|is_focused",{label:this.label})}async isDecorated(){return h("plugin:window|is_decorated",{label:this.label})}async isResizable(){return h("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return h("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return h("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return h("plugin:window|is_closable",{label:this.label})}async isVisible(){return h("plugin:window|is_visible",{label:this.label})}async title(){return h("plugin:window|title",{label:this.label})}async theme(){return h("plugin:window|theme",{label:this.label})}async isAlwaysOnTop(){return h("plugin:window|is_always_on_top",{label:this.label})}async activityName(){return h("plugin:window|activity_name",{label:this.label})}async sceneIdentifier(){return h("plugin:window|scene_identifier",{label:this.label})}async center(){return h("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(n=e===ee.Critical?{type:"Critical"}:{type:"Informational"}),h("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return h("plugin:window|set_resizable",{label:this.label,value:e})}async setEnabled(e){return h("plugin:window|set_enabled",{label:this.label,value:e})}async isEnabled(){return h("plugin:window|is_enabled",{label:this.label})}async setMaximizable(e){return h("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return h("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return h("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return h("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return h("plugin:window|maximize",{label:this.label})}async unmaximize(){return h("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return h("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return h("plugin:window|minimize",{label:this.label})}async unminimize(){return h("plugin:window|unminimize",{label:this.label})}async show(){return h("plugin:window|show",{label:this.label})}async hide(){return h("plugin:window|hide",{label:this.label})}async close(){return h("plugin:window|close",{label:this.label})}async destroy(){return h("plugin:window|destroy",{label:this.label})}async setDecorations(e){return h("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return h("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return h("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return h("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return h("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return h("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return h("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){return h("plugin:window|set_size",{label:this.label,value:e instanceof A?e:new A(e)})}async setMinSize(e){return h("plugin:window|set_min_size",{label:this.label,value:e instanceof A?e:e?new A(e):null})}async setMaxSize(e){return h("plugin:window|set_max_size",{label:this.label,value:e instanceof A?e:e?new A(e):null})}async setSizeConstraints(e){function n(e){return e?{Logical:e}:null}return h("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:n(null==e?void 0:e.minWidth),minHeight:n(null==e?void 0:e.minHeight),maxWidth:n(null==e?void 0:e.maxWidth),maxHeight:n(null==e?void 0:e.maxHeight)}})}async setPosition(e){return h("plugin:window|set_position",{label:this.label,value:e instanceof E?e:new E(e)})}async setFullscreen(e){return h("plugin:window|set_fullscreen",{label:this.label,value:e})}async setSimpleFullscreen(e){return h("plugin:window|set_simple_fullscreen",{label:this.label,value:e})}async setFocus(){return h("plugin:window|set_focus",{label:this.label})}async setFocusable(e){return h("plugin:window|set_focusable",{label:this.label,value:e})}async setIcon(e){return h("plugin:window|set_icon",{label:this.label,value:g(e)})}async setSkipTaskbar(e){return h("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return h("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return h("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return h("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setBackgroundColor(e){return h("plugin:window|set_background_color",{color:e})}async setCursorPosition(e){return h("plugin:window|set_cursor_position",{label:this.label,value:e instanceof E?e:new E(e)})}async setIgnoreCursorEvents(e){return h("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return h("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return h("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setBadgeCount(e){return h("plugin:window|set_badge_count",{label:this.label,value:e})}async setBadgeLabel(e){return h("plugin:window|set_badge_label",{label:this.label,value:e})}async setOverlayIcon(e){return h("plugin:window|set_overlay_icon",{label:this.label,value:e?g(e):void 0})}async setProgressBar(e){return h("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return h("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async setTitleBarStyle(e){return h("plugin:window|set_title_bar_style",{label:this.label,value:e})}async setTheme(e){return h("plugin:window|set_theme",{label:this.label,value:e})}async onResized(e){return this.listen(R.WINDOW_RESIZED,n=>{n.payload=new k(n.payload),e(n)})}async onMoved(e){return this.listen(R.WINDOW_MOVED,n=>{n.payload=new I(n.payload),e(n)})}async onCloseRequested(e){return this.listen(R.WINDOW_CLOSE_REQUESTED,async n=>{const t=new ie(n);await e(t),t.isPreventDefault()||await this.destroy()})}async onDragDropEvent(e){const n=await this.listen(R.DRAG_ENTER,n=>{e({...n,payload:{type:"enter",paths:n.payload.paths,position:new I(n.payload.position)}})}),t=await this.listen(R.DRAG_OVER,n=>{e({...n,payload:{type:"over",position:new I(n.payload.position)}})}),i=await this.listen(R.DRAG_DROP,n=>{e({...n,payload:{type:"drop",paths:n.payload.paths,position:new I(n.payload.position)}})}),r=await this.listen(R.DRAG_LEAVE,n=>{e({...n,payload:{type:"leave"}})});return()=>{n(),i(),t(),r()}}async onFocusChanged(e){const n=await this.listen(R.WINDOW_FOCUS,n=>{e({...n,payload:!0})}),t=await this.listen(R.WINDOW_BLUR,n=>{e({...n,payload:!1})});return()=>{n(),t()}}async onScaleChanged(e){return this.listen(R.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(R.WINDOW_THEME_CHANGED,e)}}var oe,ue,ce,de;function pe(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:new I(e.position),size:new k(e.size),workArea:{position:new I(e.workArea.position),size:new k(e.workArea.size)}}}!function(e){e.Disabled="disabled",e.Throttle="throttle",e.Suspend="suspend"}(oe||(oe={})),function(e){e.Default="default",e.FluentOverlay="fluentOverlay"}(ue||(ue={})),function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(ce||(ce={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(de||(de={}));var he=Object.freeze({__proto__:null,CloseRequestedEvent:ie,get Effect(){return ce},get EffectState(){return de},LogicalPosition:T,LogicalSize:v,PhysicalPosition:I,PhysicalSize:k,get ProgressBarStatus(){return ne},get UserAttentionType(){return ee},Window:le,availableMonitors:async function(){return h("plugin:window|available_monitors").then(e=>e.map(pe))},currentMonitor:async function(){return h("plugin:window|current_monitor").then(pe)},cursorPosition:async function(){return h("plugin:window|cursor_position").then(e=>new I(e))},getAllWindows:se,getCurrentWindow:re,monitorFromPoint:async function(e,n){return h("plugin:window|monitor_from_point",{x:e,y:n}).then(pe)},primaryMonitor:async function(){return h("plugin:window|primary_monitor").then(pe)}});function we(){return new ge(re(),window.__TAURI_INTERNALS__.metadata.currentWebview.label,{skip:!0})}async function _e(){return h("plugin:webview|get_all_webviews").then(e=>e.map(e=>new ge(new le(e.windowLabel,{skip:!0}),e.label,{skip:!0})))}const ye=["tauri://created","tauri://error"];class ge{constructor(e,n,t){this.window=e,this.label=n,this.listeners=Object.create(null),(null==t?void 0:t.skip)||h("plugin:webview|create_webview",{windowLabel:e.label,options:{...t,label:n}}).then(async()=>this.emit("tauri://created")).catch(async e=>this.emit("tauri://error",e))}static async getByLabel(e){var n;return null!==(n=(await _e()).find(n=>n.label===e))&&void 0!==n?n:null}static getCurrent(){return we()}static async getAll(){return _e()}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)}:N(e,n,{target:{kind:"Webview",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)}:L(e,n,{target:{kind:"Webview",label:this.label}})}async emit(e,n){if(!ye.includes(e))return C(e,n);for(const t of this.listeners[e]||[])t({event:e,id:-1,payload:n})}async emitTo(e,n,t){if(!ye.includes(n))return x(e,n,t);for(const e of this.listeners[n]||[])e({event:n,id:-1,payload:t})}_handleTauriEvent(e,n){return!!ye.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}async position(){return h("plugin:webview|webview_position",{label:this.label}).then(e=>new I(e))}async size(){return h("plugin:webview|webview_size",{label:this.label}).then(e=>new k(e))}async close(){return h("plugin:webview|webview_close",{label:this.label})}async setSize(e){return h("plugin:webview|set_webview_size",{label:this.label,value:e instanceof A?e:new A(e)})}async setPosition(e){return h("plugin:webview|set_webview_position",{label:this.label,value:e instanceof E?e:new E(e)})}async setFocus(){return h("plugin:webview|set_webview_focus",{label:this.label})}async setAutoResize(e){return h("plugin:webview|set_webview_auto_resize",{label:this.label,value:e})}async hide(){return h("plugin:webview|webview_hide",{label:this.label})}async show(){return h("plugin:webview|webview_show",{label:this.label})}async setZoom(e){return h("plugin:webview|set_webview_zoom",{label:this.label,value:e})}async reparent(e){return h("plugin:webview|reparent",{label:this.label,window:"string"==typeof e?e:e.label})}async clearAllBrowsingData(){return h("plugin:webview|clear_all_browsing_data")}async setBackgroundColor(e){return h("plugin:webview|set_webview_background_color",{color:e})}async onDragDropEvent(e){const n=await this.listen(R.DRAG_ENTER,n=>{e({...n,payload:{type:"enter",paths:n.payload.paths,position:new I(n.payload.position)}})}),t=await this.listen(R.DRAG_OVER,n=>{e({...n,payload:{type:"over",position:new I(n.payload.position)}})}),i=await this.listen(R.DRAG_DROP,n=>{e({...n,payload:{type:"drop",paths:n.payload.paths,position:new I(n.payload.position)}})}),r=await this.listen(R.DRAG_LEAVE,n=>{e({...n,payload:{type:"leave"}})});return()=>{n(),i(),t(),r()}}}var be,me,fe=Object.freeze({__proto__:null,Webview:ge,getAllWebviews:_e,getCurrentWebview:we});function ve(){const e=we();return new Ae(e.label,{skip:!0})}async function ke(){return h("plugin:window|get_all_windows").then(e=>e.map(e=>new Ae(e,{skip:!0})))}class Ae{constructor(e,n={}){var t;this.label=e,this.listeners=Object.create(null),(null==n?void 0:n.skip)||h("plugin:webview|create_webview_window",{options:{...n,parent:"string"==typeof n.parent?n.parent:null===(t=n.parent)||void 0===t?void 0:t.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async e=>this.emit("tauri://error",e))}static async getByLabel(e){var n;const t=null!==(n=(await ke()).find(n=>n.label===e))&&void 0!==n?n:null;return t?new Ae(t.label,{skip:!0}):null}static getCurrent(){return ve()}static async getAll(){return ke()}async listen(e,n){return this._handleTauriEvent(e,n)?()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)}:N(e,n,{target:{kind:"WebviewWindow",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)}:L(e,n,{target:{kind:"WebviewWindow",label:this.label}})}async setBackgroundColor(e){return h("plugin:window|set_background_color",{color:e}).then(()=>h("plugin:webview|set_webview_background_color",{color:e}))}}be=Ae,me=[le,ge],(Array.isArray(me)?me:[me]).forEach(e=>{Object.getOwnPropertyNames(e.prototype).forEach(n=>{var t;"object"==typeof be.prototype&&be.prototype&&n in be.prototype||Object.defineProperty(be.prototype,n,null!==(t=Object.getOwnPropertyDescriptor(e.prototype,n))&&void 0!==t?t:Object.create(null))})});var Te=Object.freeze({__proto__:null,WebviewWindow:Ae,getAllWebviewWindows:ke,getCurrentWebviewWindow:ve});return e.app=f,e.core=_,e.dpi=D,e.event=O,e.image=m,e.menu=J,e.mocks=K,e.path=Y,e.tray=te,e.webview=fe,e.webviewWindow=Te,e.window=he,e}({});window.__TAURI__=__TAURI_IIFE__; diff --git a/crates/tauri/src/app.rs b/crates/tauri/src/app.rs index 5b5bf5ae2e05..5e4a66551954 100644 --- a/crates/tauri/src/app.rs +++ b/crates/tauri/src/app.rs @@ -149,6 +149,24 @@ pub enum WindowEvent { /// /// - **Linux**: Not supported. ThemeChanged(Theme), + /// Emitted when the application has been suspended. + /// + /// ## Platform-specific + /// + /// - **Android**: This is triggered by `onPause` method of the Activity. + /// - **iOS**: This is triggered by `applicationWillResignActive` method of the UIApplicationDelegate. + /// - **Linux / macOS / Windows**: Unsupported. + #[cfg(mobile)] + Suspended, + /// Emitted when the application has been resumed. + /// + /// ## Platform-specific + /// + /// - **Android**: This is triggered by `onResume` method of the Activity. The first onResume() is ignored to match the iOS implementation, since that is called on activity creation. + /// - **iOS**: This is triggered by `applicationWillEnterForeground` method of the UIApplicationDelegate. + /// - **Linux / macOS / Windows**: Unsupported. + #[cfg(mobile)] + Resumed, } impl From for WindowEvent { @@ -170,6 +188,10 @@ impl From for WindowEvent { }, RuntimeWindowEvent::DragDrop(event) => Self::DragDrop(event), RuntimeWindowEvent::ThemeChanged(theme) => Self::ThemeChanged(theme), + #[cfg(mobile)] + RuntimeWindowEvent::Suspended => Self::Suspended, + #[cfg(mobile)] + RuntimeWindowEvent::Resumed => Self::Resumed, } } } diff --git a/crates/tauri/src/manager/window.rs b/crates/tauri/src/manager/window.rs index f56f40a26c23..e84b3ca0d4a2 100644 --- a/crates/tauri/src/manager/window.rs +++ b/crates/tauri/src/manager/window.rs @@ -37,6 +37,10 @@ pub(crate) const DRAG_ENTER_EVENT: EventName<&str> = EventName::from_str("tauri: pub(crate) const DRAG_OVER_EVENT: EventName<&str> = EventName::from_str("tauri://drag-over"); pub(crate) const DRAG_DROP_EVENT: EventName<&str> = EventName::from_str("tauri://drag-drop"); pub(crate) const DRAG_LEAVE_EVENT: EventName<&str> = EventName::from_str("tauri://drag-leave"); +#[cfg(mobile)] +pub(crate) const WINDOW_SUSPENDED_EVENT: EventName<&str> = EventName::from_str("tauri://suspended"); +#[cfg(mobile)] +pub(crate) const WINDOW_RESUMED_EVENT: EventName<&str> = EventName::from_str("tauri://resumed"); pub struct WindowManager { pub windows: Mutex>>, @@ -265,6 +269,10 @@ fn on_window_event(window: &Window, event: &WindowEvent) -> crate _ => unimplemented!(), }, WindowEvent::ThemeChanged(theme) => window.emit_to_window(WINDOW_THEME_CHANGED, &theme)?, + #[cfg(mobile)] + WindowEvent::Suspended => window.emit_to_window(WINDOW_SUSPENDED_EVENT, &())?, + #[cfg(mobile)] + WindowEvent::Resumed => window.emit_to_window(WINDOW_RESUMED_EVENT, &())?, } Ok(()) } diff --git a/packages/api/src/event.ts b/packages/api/src/event.ts index 1cf0f542a32d..7d8da18c83fe 100644 --- a/packages/api/src/event.ts +++ b/packages/api/src/event.ts @@ -65,6 +65,8 @@ enum TauriEvent { WINDOW_SCALE_FACTOR_CHANGED = 'tauri://scale-change', WINDOW_THEME_CHANGED = 'tauri://theme-changed', WINDOW_CREATED = 'tauri://window-created', + WINDOW_SUSPENDED = 'tauri://suspended', + WINDOW_RESUMED = 'tauri://resumed', WEBVIEW_CREATED = 'tauri://webview-created', DRAG_ENTER = 'tauri://drag-enter', DRAG_OVER = 'tauri://drag-over', diff --git a/packages/cli/index.js b/packages/cli/index.js index c9e399696117..9034ed8cd24e 100644 --- a/packages/cli/index.js +++ b/packages/cli/index.js @@ -81,8 +81,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-android-arm64') const bindingPackageVersion = require('@tauri-apps/cli-android-arm64/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -97,8 +97,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-android-arm-eabi') const bindingPackageVersion = require('@tauri-apps/cli-android-arm-eabi/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -118,8 +118,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-win32-x64-gnu') const bindingPackageVersion = require('@tauri-apps/cli-win32-x64-gnu/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -134,8 +134,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-win32-x64-msvc') const bindingPackageVersion = require('@tauri-apps/cli-win32-x64-msvc/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -151,8 +151,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-win32-ia32-msvc') const bindingPackageVersion = require('@tauri-apps/cli-win32-ia32-msvc/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -167,8 +167,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-win32-arm64-msvc') const bindingPackageVersion = require('@tauri-apps/cli-win32-arm64-msvc/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -186,8 +186,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-darwin-universal') const bindingPackageVersion = require('@tauri-apps/cli-darwin-universal/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -202,8 +202,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-darwin-x64') const bindingPackageVersion = require('@tauri-apps/cli-darwin-x64/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -218,8 +218,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-darwin-arm64') const bindingPackageVersion = require('@tauri-apps/cli-darwin-arm64/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -238,8 +238,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-freebsd-x64') const bindingPackageVersion = require('@tauri-apps/cli-freebsd-x64/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -254,8 +254,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-freebsd-arm64') const bindingPackageVersion = require('@tauri-apps/cli-freebsd-arm64/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -275,8 +275,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-linux-x64-musl') const bindingPackageVersion = require('@tauri-apps/cli-linux-x64-musl/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -291,8 +291,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-linux-x64-gnu') const bindingPackageVersion = require('@tauri-apps/cli-linux-x64-gnu/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -309,8 +309,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-linux-arm64-musl') const bindingPackageVersion = require('@tauri-apps/cli-linux-arm64-musl/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -325,8 +325,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-linux-arm64-gnu') const bindingPackageVersion = require('@tauri-apps/cli-linux-arm64-gnu/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -343,8 +343,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-linux-arm-musleabihf') const bindingPackageVersion = require('@tauri-apps/cli-linux-arm-musleabihf/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -359,8 +359,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-linux-arm-gnueabihf') const bindingPackageVersion = require('@tauri-apps/cli-linux-arm-gnueabihf/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -377,8 +377,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-linux-loong64-musl') const bindingPackageVersion = require('@tauri-apps/cli-linux-loong64-musl/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -393,8 +393,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-linux-loong64-gnu') const bindingPackageVersion = require('@tauri-apps/cli-linux-loong64-gnu/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -411,8 +411,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-linux-riscv64-musl') const bindingPackageVersion = require('@tauri-apps/cli-linux-riscv64-musl/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -427,8 +427,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-linux-riscv64-gnu') const bindingPackageVersion = require('@tauri-apps/cli-linux-riscv64-gnu/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -444,8 +444,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-linux-ppc64-gnu') const bindingPackageVersion = require('@tauri-apps/cli-linux-ppc64-gnu/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -460,8 +460,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-linux-s390x-gnu') const bindingPackageVersion = require('@tauri-apps/cli-linux-s390x-gnu/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -480,8 +480,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-openharmony-arm64') const bindingPackageVersion = require('@tauri-apps/cli-openharmony-arm64/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -496,8 +496,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-openharmony-x64') const bindingPackageVersion = require('@tauri-apps/cli-openharmony-x64/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -512,8 +512,8 @@ function requireNative() { try { const binding = require('@tauri-apps/cli-openharmony-arm') const bindingPackageVersion = require('@tauri-apps/cli-openharmony-arm/package.json').version - if (bindingPackageVersion !== '2.10.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { - throw new Error(`Native binding package version mismatch, expected 2.10.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '2.10.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { + throw new Error(`Native binding package version mismatch, expected 2.10.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -540,13 +540,17 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { wasiBindingError = err } } - if (!nativeBinding) { + if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) { try { wasiBinding = require('@tauri-apps/cli-wasm32-wasi') nativeBinding = wasiBinding } catch (err) { if (process.env.NAPI_RS_FORCE_WASI) { - wasiBindingError.cause = err + if (!wasiBindingError) { + wasiBindingError = err + } else { + wasiBindingError.cause = err + } loadErrors.push(err) } } From 9808236ebf7755d498d674b614f3fc75eeac1ec4 Mon Sep 17 00:00:00 2001 From: Jonathan Baudanza Date: Thu, 30 Apr 2026 23:37:33 +0900 Subject: [PATCH 09/12] fix(macOS): correct value for work_area.position.y (#14655) * fix(macOS): correct value for work_area.position.y * Update macos.rs Co-authored-by: Lucas Fernandes Nogueira * Add change file for #14655 --------- Co-authored-by: Lucas Fernandes Nogueira --- .changes/work-area.md | 6 ++++++ crates/tauri-runtime-wry/src/monitor/macos.rs | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 .changes/work-area.md diff --git a/.changes/work-area.md b/.changes/work-area.md new file mode 100644 index 000000000000..0c7422f347aa --- /dev/null +++ b/.changes/work-area.md @@ -0,0 +1,6 @@ +--- +"tauri": patch:bug +"tauri-runtime-wry": patch:bug +--- + +Fix monitor work area Y position on macOS. diff --git a/crates/tauri-runtime-wry/src/monitor/macos.rs b/crates/tauri-runtime-wry/src/monitor/macos.rs index 6ed9f3c1dd56..f56a48884ef2 100644 --- a/crates/tauri-runtime-wry/src/monitor/macos.rs +++ b/crates/tauri-runtime-wry/src/monitor/macos.rs @@ -19,6 +19,8 @@ impl super::MonitorExt for tao::monitor::MonitorHandle { position.x += visible_frame.origin.x - screen_frame.origin.x; +position.y += (screen_frame.origin.y + screen_frame.size.height) + - (visible_frame.origin.y + visible_frame.size.height); PhysicalRect { size: LogicalSize::new(visible_frame.size.width, visible_frame.size.height) .to_physical(scale_factor), From 13bea1777fed60c75e37fe67d7ded5dde0b2997d Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Thu, 30 Apr 2026 11:37:53 -0300 Subject: [PATCH 10/12] chore: fmt --- crates/tauri-runtime-wry/src/monitor/macos.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/tauri-runtime-wry/src/monitor/macos.rs b/crates/tauri-runtime-wry/src/monitor/macos.rs index f56a48884ef2..aca8e334d0a5 100644 --- a/crates/tauri-runtime-wry/src/monitor/macos.rs +++ b/crates/tauri-runtime-wry/src/monitor/macos.rs @@ -19,7 +19,7 @@ impl super::MonitorExt for tao::monitor::MonitorHandle { position.x += visible_frame.origin.x - screen_frame.origin.x; -position.y += (screen_frame.origin.y + screen_frame.size.height) + position.y += (screen_frame.origin.y + screen_frame.size.height) - (visible_frame.origin.y + visible_frame.size.height); PhysicalRect { size: LogicalSize::new(visible_frame.size.width, visible_frame.size.height) From df05c00563a91fc936bd15c6b10dd2825472f96b Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Thu, 30 Apr 2026 11:41:00 -0300 Subject: [PATCH 11/12] chore: minor bump for codegen crate --- .changes/utils-bump.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changes/utils-bump.md diff --git a/.changes/utils-bump.md b/.changes/utils-bump.md new file mode 100644 index 000000000000..fd0a89ad2adb --- /dev/null +++ b/.changes/utils-bump.md @@ -0,0 +1,5 @@ +--- +"tauri-codegen": minor:deps +--- + +Upgraded to `tauri-utils@2.9.0` From e60834fc67d87c10e2f44b2568052295cb61c325 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 30 Apr 2026 12:21:07 -0300 Subject: [PATCH 12/12] Apply Version Updates From Current Changes (#15041) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- ...-all-to-front-predefined-menu-item-type.md | 6 --- .changes/add-macros-allow-rename-command.md | 6 --- .changes/append-rc-content-support.md | 5 -- .changes/base64.md | 5 -- .changes/change-pr-15117.md | 6 --- .changes/change-pr-15175.md | 7 --- .changes/change-pr-15177.md | 6 --- .changes/change-pr-15218.md | 7 --- .changes/change-pr-15262.md | 5 -- .changes/changed.md | 6 --- .changes/data-tauri-drag-region-deep.md | 5 -- .changes/disable-autofill.md | 9 ---- .changes/eval-with-callback.md | 7 --- .changes/feat-async_runtime-track.md | 5 -- .changes/feat-uninstaller-icon-image.md | 13 ----- .changes/file-association.md | 9 ---- .changes/fix-build-bundles-arg.md | 7 --- .changes/fix-ios-metal-toolchain.md | 6 --- .changes/fix-macos-initial-window-position.md | 6 --- .changes/ios-skip-codesign.md | 5 -- .changes/linux-deploy-link.md | 5 -- .changes/liquid-glass-icon.md | 5 -- .changes/mobile-file-associations.md | 7 --- .changes/mobile_tao_events.md | 8 --- .changes/multi-window-mobile.md | 8 --- .changes/new-window-main-thread.md | 6 --- .../prompt-signing-key-password-context.md | 6 --- .changes/restart-emulator.md | 6 --- .changes/safepathbuf_into_pathbuf.md | 5 -- .changes/supersede-kuchikiki.md | 6 --- .changes/tauri-dbus.md | 5 -- .changes/toml-ver.md | 5 -- .changes/tray-icon-0.22.md | 5 -- .changes/utils-bump.md | 5 -- .changes/web-content-process-termination.md | 7 --- .../windows-fileversion-build-metadata.md | 5 -- .changes/windows-versioninfo-strings.md | 5 -- .changes/windows_arm_signtool_detect.md | 17 ------- .changes/wix-minimum-webview2-version.md | 12 ----- .changes/work-area.md | 6 --- Cargo.lock | 28 +++++----- crates/tauri-build/CHANGELOG.md | 21 ++++++++ crates/tauri-build/Cargo.toml | 6 +-- crates/tauri-bundler/CHANGELOG.md | 51 +++++++++++++++++++ crates/tauri-bundler/Cargo.toml | 6 +-- crates/tauri-cli/CHANGELOG.md | 40 +++++++++++++++ crates/tauri-cli/Cargo.toml | 8 +-- crates/tauri-cli/config.schema.json | 2 +- crates/tauri-cli/metadata-v2.json | 8 +-- crates/tauri-codegen/CHANGELOG.md | 7 +++ crates/tauri-codegen/Cargo.toml | 4 +- crates/tauri-macos-sign/CHANGELOG.md | 6 +++ crates/tauri-macos-sign/Cargo.toml | 2 +- crates/tauri-macros/CHANGELOG.md | 11 ++++ crates/tauri-macros/Cargo.toml | 6 +-- crates/tauri-plugin/CHANGELOG.md | 10 ++++ crates/tauri-plugin/Cargo.toml | 4 +- crates/tauri-runtime-wry/CHANGELOG.md | 25 +++++++++ crates/tauri-runtime-wry/Cargo.toml | 6 +-- crates/tauri-runtime/CHANGELOG.md | 15 ++++++ crates/tauri-runtime/Cargo.toml | 4 +- .../schemas/config.schema.json | 2 +- crates/tauri-utils/CHANGELOG.md | 19 +++++++ crates/tauri-utils/Cargo.toml | 2 +- crates/tauri/CHANGELOG.md | 43 ++++++++++++++++ crates/tauri/Cargo.toml | 14 ++--- packages/api/CHANGELOG.md | 9 ++++ packages/api/package.json | 2 +- packages/cli/CHANGELOG.md | 36 +++++++++++++ packages/cli/package.json | 2 +- 70 files changed, 346 insertions(+), 318 deletions(-) delete mode 100644 .changes/add-bring-all-to-front-predefined-menu-item-type.md delete mode 100644 .changes/add-macros-allow-rename-command.md delete mode 100644 .changes/append-rc-content-support.md delete mode 100644 .changes/base64.md delete mode 100644 .changes/change-pr-15117.md delete mode 100644 .changes/change-pr-15175.md delete mode 100644 .changes/change-pr-15177.md delete mode 100644 .changes/change-pr-15218.md delete mode 100644 .changes/change-pr-15262.md delete mode 100644 .changes/changed.md delete mode 100644 .changes/data-tauri-drag-region-deep.md delete mode 100644 .changes/disable-autofill.md delete mode 100644 .changes/eval-with-callback.md delete mode 100644 .changes/feat-async_runtime-track.md delete mode 100644 .changes/feat-uninstaller-icon-image.md delete mode 100644 .changes/file-association.md delete mode 100644 .changes/fix-build-bundles-arg.md delete mode 100644 .changes/fix-ios-metal-toolchain.md delete mode 100644 .changes/fix-macos-initial-window-position.md delete mode 100644 .changes/ios-skip-codesign.md delete mode 100644 .changes/linux-deploy-link.md delete mode 100644 .changes/liquid-glass-icon.md delete mode 100644 .changes/mobile-file-associations.md delete mode 100644 .changes/mobile_tao_events.md delete mode 100644 .changes/multi-window-mobile.md delete mode 100644 .changes/new-window-main-thread.md delete mode 100644 .changes/prompt-signing-key-password-context.md delete mode 100644 .changes/restart-emulator.md delete mode 100644 .changes/safepathbuf_into_pathbuf.md delete mode 100644 .changes/supersede-kuchikiki.md delete mode 100644 .changes/tauri-dbus.md delete mode 100644 .changes/toml-ver.md delete mode 100644 .changes/tray-icon-0.22.md delete mode 100644 .changes/utils-bump.md delete mode 100644 .changes/web-content-process-termination.md delete mode 100644 .changes/windows-fileversion-build-metadata.md delete mode 100644 .changes/windows-versioninfo-strings.md delete mode 100644 .changes/windows_arm_signtool_detect.md delete mode 100644 .changes/wix-minimum-webview2-version.md delete mode 100644 .changes/work-area.md diff --git a/.changes/add-bring-all-to-front-predefined-menu-item-type.md b/.changes/add-bring-all-to-front-predefined-menu-item-type.md deleted file mode 100644 index b27261856723..000000000000 --- a/.changes/add-bring-all-to-front-predefined-menu-item-type.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'tauri': 'minor:feat' -'@tauri-apps/api': 'minor:feat' ---- - -Add Bring All to Front predefined menu item type diff --git a/.changes/add-macros-allow-rename-command.md b/.changes/add-macros-allow-rename-command.md deleted file mode 100644 index bdda4d3427d6..000000000000 --- a/.changes/add-macros-allow-rename-command.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri-macros": minor:feat -"tauri": minor:feat ---- - -Add support for the `rename` attribute in the `tauri::command` macro to allow renaming the command to something other than the function name. diff --git a/.changes/append-rc-content-support.md b/.changes/append-rc-content-support.md deleted file mode 100644 index cfe01754f4d7..000000000000 --- a/.changes/append-rc-content-support.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-build": minor:feat ---- - -Allow users to append extra `.rc` content by `append_rc_content` in `WindowsAttributes`. diff --git a/.changes/base64.md b/.changes/base64.md deleted file mode 100644 index 2fb599baba49..000000000000 --- a/.changes/base64.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-macos-sign": patch:enhance ---- - -Do not rely on system base64 CLI to decode certificates. diff --git a/.changes/change-pr-15117.md b/.changes/change-pr-15117.md deleted file mode 100644 index 85eddd21f6ff..000000000000 --- a/.changes/change-pr-15117.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri-build": patch:enhance -"tauri": patch:enhance ---- - -Simplify async-sync code boundaries, no externally visible changes diff --git a/.changes/change-pr-15175.md b/.changes/change-pr-15175.md deleted file mode 100644 index dc485c25ded5..000000000000 --- a/.changes/change-pr-15175.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"tauri-bundler": patch:changes -"@tauri-apps/cli": patch:changes -"tauri-cli": patch:changes ---- - -Update NSIS installer Italian translations diff --git a/.changes/change-pr-15177.md b/.changes/change-pr-15177.md deleted file mode 100644 index f15e72aca316..000000000000 --- a/.changes/change-pr-15177.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri": patch:deps -"tauri-bundler": patch:deps ---- - -Update Specta in lockfile and upgrade dependencies using the removed `doc_auto_cfg` attribute to fix errors building documentation diff --git a/.changes/change-pr-15218.md b/.changes/change-pr-15218.md deleted file mode 100644 index ab3b50d0dc29..000000000000 --- a/.changes/change-pr-15218.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"tauri-bundler": patch:enhance -"@tauri-apps/cli": patch:enhance -"tauri-cli": patch:enhance ---- - -Added Vietnamese translations for the NSIS installer diff --git a/.changes/change-pr-15262.md b/.changes/change-pr-15262.md deleted file mode 100644 index 9f54c0eb4f43..000000000000 --- a/.changes/change-pr-15262.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri": patch:enhance ---- - -Remove a clone, no user-facing changes. diff --git a/.changes/changed.md b/.changes/changed.md deleted file mode 100644 index df4743908869..000000000000 --- a/.changes/changed.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'tauri': 'minor:feat' -'@tauri-apps/api': 'minor:feat' ---- - -Add macos support for setting the icon and icon template state in the same step of the main thread, to prevent flickering. diff --git a/.changes/data-tauri-drag-region-deep.md b/.changes/data-tauri-drag-region-deep.md deleted file mode 100644 index 1391ff5ac589..000000000000 --- a/.changes/data-tauri-drag-region-deep.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri": minor:feat ---- - -Add `data-tauri-drag-region="deep"` so clicks on non-clickable children will drag as well. Can still opt out of drag on some regions using `data-tauri-drag-region="false"` diff --git a/.changes/disable-autofill.md b/.changes/disable-autofill.md deleted file mode 100644 index 41dfd62dc042..000000000000 --- a/.changes/disable-autofill.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'tauri-runtime': 'minor:feat' -'tauri-runtime-wry': 'minor:feat' -'tauri-utils': 'minor:feat' -'tauri': 'minor:feat' -'@tauri-apps/api': 'minor:feat' ---- - -Add a WebView option to control browser-level general autofill behavior. This option does not disable password or credit card autofill. On Windows (WebView2), setting it to true disables the general autofill "Suggestions" UI, which may appear even when `autocomplete="off"` is specified on input elements. On Linux, macOS, iOS, and Android, this option is currently unsupported and performs no operation. \ No newline at end of file diff --git a/.changes/eval-with-callback.md b/.changes/eval-with-callback.md deleted file mode 100644 index c43cf0841c06..000000000000 --- a/.changes/eval-with-callback.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'tauri': 'minor:feat' -'tauri-runtime': 'minor:feat' -'tauri-runtime-wry': 'minor:feat' ---- - -Add `eval_with_callback` to the Tauri webview APIs and runtime dispatch layers. diff --git a/.changes/feat-async_runtime-track.md b/.changes/feat-async_runtime-track.md deleted file mode 100644 index 7a761ccbe09d..000000000000 --- a/.changes/feat-async_runtime-track.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri": minor:feat ---- - -Enable track_caller attribute for async_runtime to provide better location information in logs and panics. diff --git a/.changes/feat-uninstaller-icon-image.md b/.changes/feat-uninstaller-icon-image.md deleted file mode 100644 index af2177e17263..000000000000 --- a/.changes/feat-uninstaller-icon-image.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"tauri-bundler": minor:feat -"tauri-cli": minor:feat -"@tauri-apps/cli": minor:feat -"tauri-utils": minor:feat ---- - -Added uninstaller icon and uninstaller header image support for NSIS installer. - -Notes: - -- For `tauri-bundler` lib users, the `NsisSettings` now has 2 new fields `uninstaller_icon` and `uninstaller_header_image` which can be a breaking change -- When bundling with NSIS, users can add `uninstallerIcon` and `uninstallerHeaderImage` under `bundle > windows > nsis` to configure them. diff --git a/.changes/file-association.md b/.changes/file-association.md deleted file mode 100644 index 6e95978db5a8..000000000000 --- a/.changes/file-association.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"tauri": minor:feat -"tauri-build": minor:feat -"tauri-plugin": minor:feat -"tauri-cli": minor:feat -"tauri-bundler": minor:feat ---- - -Implement file association for Android and iOS. diff --git a/.changes/fix-build-bundles-arg.md b/.changes/fix-build-bundles-arg.md deleted file mode 100644 index de735d18c47d..000000000000 --- a/.changes/fix-build-bundles-arg.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"tauri-bundler": patch:bug -"tauri-cli": patch:bug -"@tauri-apps/cli": patch:bug ---- - -Fix `build --bundles` to allow `nsis` arg in linux+macOS diff --git a/.changes/fix-ios-metal-toolchain.md b/.changes/fix-ios-metal-toolchain.md deleted file mode 100644 index ff08280304a2..000000000000 --- a/.changes/fix-ios-metal-toolchain.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri-cli": patch:bug -"@tauri-apps/cli": patch:bug ---- - -Fix iOS build failure when `Metal Toolchain` is installed by using explicit `$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain` path instead of `$(TOOLCHAIN_DIR)` for Swift library search paths. \ No newline at end of file diff --git a/.changes/fix-macos-initial-window-position.md b/.changes/fix-macos-initial-window-position.md deleted file mode 100644 index 3a6ab039929d..000000000000 --- a/.changes/fix-macos-initial-window-position.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri-runtime-wry": patch:bug -"tauri": patch:bug ---- - -Fix initial window position when positioning it to another monitor. diff --git a/.changes/ios-skip-codesign.md b/.changes/ios-skip-codesign.md deleted file mode 100644 index 0a88e0ddaaf3..000000000000 --- a/.changes/ios-skip-codesign.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'tauri-cli': 'minor:feat' ---- - -Add `--no-sign` and `--archive-only` flags to `tauri ios build`. diff --git a/.changes/linux-deploy-link.md b/.changes/linux-deploy-link.md deleted file mode 100644 index c3c3486871f5..000000000000 --- a/.changes/linux-deploy-link.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-bundler": patch:bug ---- - -Correct GitHub Release URL path for Linux i686 tooling. diff --git a/.changes/liquid-glass-icon.md b/.changes/liquid-glass-icon.md deleted file mode 100644 index ab00b0fb3603..000000000000 --- a/.changes/liquid-glass-icon.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-bundler": minor:feat ---- - -Added support to Liquid Glass icons. diff --git a/.changes/mobile-file-associations.md b/.changes/mobile-file-associations.md deleted file mode 100644 index 308a50a2bece..000000000000 --- a/.changes/mobile-file-associations.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"tauri": minor:feat -"tauri-runtime": minor:feat -"tauri-runtime-wry": minor:feat ---- - -Trigger `RunEvent::Opened` on Android. diff --git a/.changes/mobile_tao_events.md b/.changes/mobile_tao_events.md deleted file mode 100644 index 791e6fd3513d..000000000000 --- a/.changes/mobile_tao_events.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'tauri-runtime-wry': 'minor:feat' -'tauri-runtime': 'minor:feat' -'tauri': 'minor:feat' -'@tauri-apps/api': 'minor:feat' ---- - -Propagates the `Event::Suspended` and `Event::Resumed` events from `tao` when they are emitted on mobile targets. diff --git a/.changes/multi-window-mobile.md b/.changes/multi-window-mobile.md deleted file mode 100644 index 57af55470ac8..000000000000 --- a/.changes/multi-window-mobile.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"tauri": minor:feat -"tauri-runtime-wry": minor:feat -"tauri-runtime": minor:feat -"tauri-utils": minor:feat ---- - -Support creating multiple windows on Android (activity embedding) and iOS (scenes). diff --git a/.changes/new-window-main-thread.md b/.changes/new-window-main-thread.md deleted file mode 100644 index e4911da87246..000000000000 --- a/.changes/new-window-main-thread.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri": minor:changes -"tauri-runtime-wry": minor:changes ---- - -The new window handler passed to `on_new_window` no longer requires `Sync`, and runs on main thread on Windows, aligning with other platforms diff --git a/.changes/prompt-signing-key-password-context.md b/.changes/prompt-signing-key-password-context.md deleted file mode 100644 index 59f9fbb9bf17..000000000000 --- a/.changes/prompt-signing-key-password-context.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri-cli": patch:enhance -"@tauri-apps/cli": patch:enhance ---- - -Show the context before prompting for updater signing key password diff --git a/.changes/restart-emulator.md b/.changes/restart-emulator.md deleted file mode 100644 index 94186ea82655..000000000000 --- a/.changes/restart-emulator.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@tauri-apps/cli": minor:feat -"tauri-cli": minor:feat ---- - -Prompt to restart the Android emulator if it is not connected to adb. diff --git a/.changes/safepathbuf_into_pathbuf.md b/.changes/safepathbuf_into_pathbuf.md deleted file mode 100644 index 1a72fa205040..000000000000 --- a/.changes/safepathbuf_into_pathbuf.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri": patch:enhance ---- - -Implement retrieving inner PathBuf from SafePathBuf to ease using APIs that require an owned PathBuf diff --git a/.changes/supersede-kuchikiki.md b/.changes/supersede-kuchikiki.md deleted file mode 100644 index 18974ff48ab8..000000000000 --- a/.changes/supersede-kuchikiki.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri-utils": minor:deps ---- - -Add new `html-manipulation-2` and `build-2` feature flags that use `dom_query` instead of `kuchikiki` for HTML parsing / manipulation. -This allows downstream users to remove `kuchikiki` and its dependencies from their dependency tree. diff --git a/.changes/tauri-dbus.md b/.changes/tauri-dbus.md deleted file mode 100644 index cab4b325103c..000000000000 --- a/.changes/tauri-dbus.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tauri: minor:feat ---- - -Added `dbus` feature flag (enabled by default) which is required for theme detection on Linux. diff --git a/.changes/toml-ver.md b/.changes/toml-ver.md deleted file mode 100644 index 1732908c17a0..000000000000 --- a/.changes/toml-ver.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tauri-utils: patch:deps ---- - -Changed `toml` crate version from `0.9` to `">=0.9, <=1"` diff --git a/.changes/tray-icon-0.22.md b/.changes/tray-icon-0.22.md deleted file mode 100644 index e91e419abd0a..000000000000 --- a/.changes/tray-icon-0.22.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -tauri: minor:deps ---- - -Updated `tray-icon` to v0.22 diff --git a/.changes/utils-bump.md b/.changes/utils-bump.md deleted file mode 100644 index fd0a89ad2adb..000000000000 --- a/.changes/utils-bump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-codegen": minor:deps ---- - -Upgraded to `tauri-utils@2.9.0` diff --git a/.changes/web-content-process-termination.md b/.changes/web-content-process-termination.md deleted file mode 100644 index c10fc18cdb69..000000000000 --- a/.changes/web-content-process-termination.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"tauri": "minor:feat" -"tauri-runtime": "minor:feat" -"tauri-runtime-wry": "minor:feat" ---- - -Add handler for web content process termination on macOS and iOS. diff --git a/.changes/windows-fileversion-build-metadata.md b/.changes/windows-fileversion-build-metadata.md deleted file mode 100644 index a3fdc2007f08..000000000000 --- a/.changes/windows-fileversion-build-metadata.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-build": "patch:enhance" ---- - -Preserve a numeric semver build identifier such as `1.2.3+42` in the 4th segment of the Windows `FILEVERSION` fixed field when it fits in the Windows version format. diff --git a/.changes/windows-versioninfo-strings.md b/.changes/windows-versioninfo-strings.md deleted file mode 100644 index ea0e772b0df6..000000000000 --- a/.changes/windows-versioninfo-strings.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"tauri-build": "patch:bug" ---- - -Set the correct Windows `FileVersion` and `ProductVersion` string values using the version from the Tauri config. diff --git a/.changes/windows_arm_signtool_detect.md b/.changes/windows_arm_signtool_detect.md deleted file mode 100644 index afff5dc2b395..000000000000 --- a/.changes/windows_arm_signtool_detect.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"tauri-bundler": patch:enhance ---- - -Signtool path for windows arm systems was not being properly returned which caused failure in signing of windows binaries. - -This patch addresses it. - -Previously only the following were supported: - -- PROCESSOR_ARCHITECTURE_INTEL -- PROCESSOR_ARCHITECTURE_AMD64 - -The following were added: - -- PROCESSOR_ARCHITECTURE_ARM -- PROCESSOR_ARCHITECTURE_ARM64 diff --git a/.changes/wix-minimum-webview2-version.md b/.changes/wix-minimum-webview2-version.md deleted file mode 100644 index 2b34203f6467..000000000000 --- a/.changes/wix-minimum-webview2-version.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"tauri-bundler": minor:feat -"tauri-cli": minor:feat -"@tauri-apps/cli": minor:feat ---- - -Added support for `minimumWebview2Version` option support for the MSI (Wix) installer, the old `bundle > windows > nsis > minimumWebview2Version` is now deprecated in favor of `bundle > windows > minimumWebview2Version` - -Notes: - -- For anyone relying on the `WVRTINSTALLED` `Property` tag in `main.wxs`, it is now renamed to `INSTALLED_WEBVIEW2_VERSION` -- For `tauri-bundler` lib users, the `WindowsSettings` now has a new field `minimum_webview2_version` which can be a breaking change diff --git a/.changes/work-area.md b/.changes/work-area.md deleted file mode 100644 index 0c7422f347aa..000000000000 --- a/.changes/work-area.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"tauri": patch:bug -"tauri-runtime-wry": patch:bug ---- - -Fix monitor work area Y position on macOS. diff --git a/Cargo.lock b/Cargo.lock index e10aaccfde00..910edefe4e9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1321,7 +1321,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] @@ -5522,7 +5522,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d8fae84b431384b68627d0f9b3b1245fcf9f46f6c0e3dc902e9dce64edd1967" dependencies = [ "libc", - "windows-sys 0.60.2", + "windows-sys 0.48.0", ] [[package]] @@ -8766,7 +8766,7 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" [[package]] name = "tauri" -version = "2.10.3" +version = "2.11.0" dependencies = [ "anyhow", "bytes", @@ -8827,7 +8827,7 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.5.6" +version = "2.6.0" dependencies = [ "anyhow", "cargo_toml", @@ -8848,7 +8848,7 @@ dependencies = [ [[package]] name = "tauri-bundler" -version = "2.8.1" +version = "2.9.0" dependencies = [ "anyhow", "ar", @@ -8894,7 +8894,7 @@ dependencies = [ [[package]] name = "tauri-cli" -version = "2.10.1" +version = "2.11.0" dependencies = [ "ar", "axum", @@ -8986,7 +8986,7 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.5.5" +version = "2.6.0" dependencies = [ "base64 0.22.1", "brotli", @@ -9052,7 +9052,7 @@ dependencies = [ [[package]] name = "tauri-macos-sign" -version = "2.3.3" +version = "2.3.4" dependencies = [ "apple-codesign", "base64 0.22.1", @@ -9074,7 +9074,7 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.5.5" +version = "2.6.0" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -9086,7 +9086,7 @@ dependencies = [ [[package]] name = "tauri-plugin" -version = "2.5.4" +version = "2.6.0" dependencies = [ "anyhow", "glob", @@ -9133,7 +9133,7 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "2.10.1" +version = "2.11.0" dependencies = [ "cookie", "dpi", @@ -9156,7 +9156,7 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "2.10.1" +version = "2.11.0" dependencies = [ "gtk", "http 1.3.1", @@ -9206,7 +9206,7 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.8.3" +version = "2.9.0" dependencies = [ "aes-gcm", "anyhow", @@ -10634,7 +10634,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/crates/tauri-build/CHANGELOG.md b/crates/tauri-build/CHANGELOG.md index 121ffcf8668d..0488982f172a 100644 --- a/crates/tauri-build/CHANGELOG.md +++ b/crates/tauri-build/CHANGELOG.md @@ -1,5 +1,26 @@ # Changelog +## \[2.6.0] + +### New Features + +- [`b7a0ff030`](https://www.github.com/tauri-apps/tauri/commit/b7a0ff03087a73fce6888361562faf9738afc829) ([#15263](https://www.github.com/tauri-apps/tauri/pull/15263)) Allow users to append extra `.rc` content by `append_rc_content` in `WindowsAttributes`. +- [`cc5c97602`](https://www.github.com/tauri-apps/tauri/commit/cc5c976027b0ab2431c13ec5b2e201d4414a8a6e) ([#14486](https://www.github.com/tauri-apps/tauri/pull/14486)) Implement file association for Android and iOS. + +### Enhancements + +- [`d730770bb`](https://www.github.com/tauri-apps/tauri/commit/d730770bb93d77358cfc6f1286f10187cef37362) ([#15117](https://www.github.com/tauri-apps/tauri/pull/15117)) Simplify async-sync code boundaries, no externally visible changes +- [`b3f2d12b8`](https://www.github.com/tauri-apps/tauri/commit/b3f2d12b89daefe528e562b93871db62f77973b9) ([#15289](https://www.github.com/tauri-apps/tauri/pull/15289)) Preserve a numeric semver build identifier such as `1.2.3+42` in the 4th segment of the Windows `FILEVERSION` fixed field when it fits in the Windows version format. + +### Bug Fixes + +- [`a30dca482`](https://www.github.com/tauri-apps/tauri/commit/a30dca4820d0ad681f04737a1819e6a6fab9fe84) ([#15288](https://www.github.com/tauri-apps/tauri/pull/15288)) Set the correct Windows `FileVersion` and `ProductVersion` string values using the version from the Tauri config. + +### Dependencies + +- Upgraded to `tauri-utils@2.9.0` +- Upgraded to `tauri-codegen@2.6.0` + ## \[2.5.6] ### Dependencies diff --git a/crates/tauri-build/Cargo.toml b/crates/tauri-build/Cargo.toml index aa72428572b1..b90e1951af98 100644 --- a/crates/tauri-build/Cargo.toml +++ b/crates/tauri-build/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-build" -version = "2.5.6" +version = "2.6.0" description = "build time code to pair with https://crates.io/crates/tauri" exclude = ["CHANGELOG.md", "/target"] readme = "README.md" @@ -26,8 +26,8 @@ targets = [ [dependencies] anyhow = "1" quote = { version = "1", optional = true } -tauri-codegen = { version = "2.5.5", path = "../tauri-codegen", optional = true } -tauri-utils = { version = "2.8.3", path = "../tauri-utils", features = [ +tauri-codegen = { version = "2.6.0", path = "../tauri-codegen", optional = true } +tauri-utils = { version = "2.9.0", path = "../tauri-utils", features = [ "build-2", "resources", ] } diff --git a/crates/tauri-bundler/CHANGELOG.md b/crates/tauri-bundler/CHANGELOG.md index b2fec9ab6a18..16736ca311e4 100644 --- a/crates/tauri-bundler/CHANGELOG.md +++ b/crates/tauri-bundler/CHANGELOG.md @@ -1,5 +1,56 @@ # Changelog +## \[2.9.0] + +### New Features + +- [`926a57bb0`](https://www.github.com/tauri-apps/tauri/commit/926a57bb0851e45d47ad1ee68fc96a9c25754c7c) ([#15201](https://www.github.com/tauri-apps/tauri/pull/15201)) Added uninstaller icon and uninstaller header image support for NSIS installer. + + Notes: + + - For `tauri-bundler` lib users, the `NsisSettings` now has 2 new fields `uninstaller_icon` and `uninstaller_header_image` which can be a breaking change + - When bundling with NSIS, users can add `uninstallerIcon` and `uninstallerHeaderImage` under `bundle > windows > nsis` to configure them. +- [`cc5c97602`](https://www.github.com/tauri-apps/tauri/commit/cc5c976027b0ab2431c13ec5b2e201d4414a8a6e) ([#14486](https://www.github.com/tauri-apps/tauri/pull/14486)) Implement file association for Android and iOS. +- [`5a0ca7edb`](https://www.github.com/tauri-apps/tauri/commit/5a0ca7edbbc707199615a91845146e98b6f5e8ca) ([#14671](https://www.github.com/tauri-apps/tauri/pull/14671)) Added support to Liquid Glass icons. +- [`5dc2cee60`](https://www.github.com/tauri-apps/tauri/commit/5dc2cee60370665af88c185684432e425b1c987d) ([#14793](https://www.github.com/tauri-apps/tauri/pull/14793)) Added support for `minimumWebview2Version` option support for the MSI (Wix) installer, the old `bundle > windows > nsis > minimumWebview2Version` is now deprecated in favor of `bundle > windows > minimumWebview2Version` + + Notes: + + - For anyone relying on the `WVRTINSTALLED` `Property` tag in `main.wxs`, it is now renamed to `INSTALLED_WEBVIEW2_VERSION` + - For `tauri-bundler` lib users, the `WindowsSettings` now has a new field `minimum_webview2_version` which can be a breaking change + +### Enhancements + +- [`be0e4bd2d`](https://www.github.com/tauri-apps/tauri/commit/be0e4bd2da02eb6cc75a8dc7c81663277e64c590) ([#15218](https://www.github.com/tauri-apps/tauri/pull/15218)) Added Vietnamese translations for the NSIS installer +- [`1035f12ee`](https://www.github.com/tauri-apps/tauri/commit/1035f12eeb8b23d9780881606d442d11c786e39e) ([#14923](https://www.github.com/tauri-apps/tauri/pull/14923)) Signtool path for windows arm systems was not being properly returned which caused failure in signing of windows binaries. + + This patch addresses it. + + Previously only the following were supported: + + - PROCESSOR_ARCHITECTURE_INTEL + - PROCESSOR_ARCHITECTURE_AMD64 + + The following were added: + + - PROCESSOR_ARCHITECTURE_ARM + - PROCESSOR_ARCHITECTURE_ARM64 + +### Bug Fixes + +- [`fcb702ec4`](https://www.github.com/tauri-apps/tauri/commit/fcb702ec4d924e81943efaeebea8d3edb7289c33) ([#14954](https://www.github.com/tauri-apps/tauri/pull/14954)) Fix `build --bundles` to allow `nsis` arg in linux+macOS +- [`c8d7003b2`](https://www.github.com/tauri-apps/tauri/commit/c8d7003b23657019a547fd7cdf3164834a28849a) ([#15102](https://www.github.com/tauri-apps/tauri/pull/15102)) Correct GitHub Release URL path for Linux i686 tooling. + +### What's Changed + +- [`9979cde1c`](https://www.github.com/tauri-apps/tauri/commit/9979cde1c5534dafb1a07cc4dc2bc280d15d2f66) ([#15175](https://www.github.com/tauri-apps/tauri/pull/15175)) Update NSIS installer Italian translations + +### Dependencies + +- Upgraded to `tauri-macos-sign@2.3.4` +- Upgraded to `tauri-utils@2.9.0` +- [`373b7e677`](https://www.github.com/tauri-apps/tauri/commit/373b7e677ec498899759de9fcd35941fe792b58b) ([#15177](https://www.github.com/tauri-apps/tauri/pull/15177)) Update Specta in lockfile and upgrade dependencies using the removed `doc_auto_cfg` attribute to fix errors building documentation + ## \[2.8.1] ### Bug Fixes diff --git a/crates/tauri-bundler/Cargo.toml b/crates/tauri-bundler/Cargo.toml index bacf6b64590a..7c8bb3e3b41f 100644 --- a/crates/tauri-bundler/Cargo.toml +++ b/crates/tauri-bundler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-bundler" -version = "2.8.1" +version = "2.9.0" authors = [ "George Burton ", "Tauri Programme within The Commons Conservancy", @@ -15,7 +15,7 @@ rust-version = "1.77.2" exclude = ["CHANGELOG.md", "/target", "rustfmt.toml"] [dependencies] -tauri-utils = { version = "2.8.3", path = "../tauri-utils", features = [ +tauri-utils = { version = "2.9.0", path = "../tauri-utils", features = [ "resources", ] } image = "0.25" @@ -59,7 +59,7 @@ features = ["Win32_System_SystemInformation", "Win32_System_Diagnostics_Debug"] [target."cfg(target_os = \"macos\")".dependencies] icns = { package = "tauri-icns", version = "0.1" } time = { version = "0.3", features = ["formatting"] } -tauri-macos-sign = { version = "2.3.3", path = "../tauri-macos-sign" } +tauri-macos-sign = { version = "2.3.4", path = "../tauri-macos-sign" } [target."cfg(target_os = \"linux\")".dependencies] heck = "0.5" diff --git a/crates/tauri-cli/CHANGELOG.md b/crates/tauri-cli/CHANGELOG.md index 601cffc02c65..90c6e2203e57 100644 --- a/crates/tauri-cli/CHANGELOG.md +++ b/crates/tauri-cli/CHANGELOG.md @@ -1,5 +1,45 @@ # Changelog +## \[2.11.0] + +### New Features + +- [`926a57bb0`](https://www.github.com/tauri-apps/tauri/commit/926a57bb0851e45d47ad1ee68fc96a9c25754c7c) ([#15201](https://www.github.com/tauri-apps/tauri/pull/15201)) Added uninstaller icon and uninstaller header image support for NSIS installer. + + Notes: + + - For `tauri-bundler` lib users, the `NsisSettings` now has 2 new fields `uninstaller_icon` and `uninstaller_header_image` which can be a breaking change + - When bundling with NSIS, users can add `uninstallerIcon` and `uninstallerHeaderImage` under `bundle > windows > nsis` to configure them. +- [`cc5c97602`](https://www.github.com/tauri-apps/tauri/commit/cc5c976027b0ab2431c13ec5b2e201d4414a8a6e) ([#14486](https://www.github.com/tauri-apps/tauri/pull/14486)) Implement file association for Android and iOS. +- [`4ef5797f0`](https://www.github.com/tauri-apps/tauri/commit/4ef5797f0fb27fa2df3f39f4a54e48ef319560ec) ([#15061](https://www.github.com/tauri-apps/tauri/pull/15061)) Add `--no-sign` and `--archive-only` flags to `tauri ios build`. +- [`764b9139a`](https://www.github.com/tauri-apps/tauri/commit/764b9139a32de149d8a914a6b5ec6cd1937c64eb) ([#14313](https://www.github.com/tauri-apps/tauri/pull/14313)) Prompt to restart the Android emulator if it is not connected to adb. +- [`5dc2cee60`](https://www.github.com/tauri-apps/tauri/commit/5dc2cee60370665af88c185684432e425b1c987d) ([#14793](https://www.github.com/tauri-apps/tauri/pull/14793)) Added support for `minimumWebview2Version` option support for the MSI (Wix) installer, the old `bundle > windows > nsis > minimumWebview2Version` is now deprecated in favor of `bundle > windows > minimumWebview2Version` + + Notes: + + - For anyone relying on the `WVRTINSTALLED` `Property` tag in `main.wxs`, it is now renamed to `INSTALLED_WEBVIEW2_VERSION` + - For `tauri-bundler` lib users, the `WindowsSettings` now has a new field `minimum_webview2_version` which can be a breaking change + +### Enhancements + +- [`be0e4bd2d`](https://www.github.com/tauri-apps/tauri/commit/be0e4bd2da02eb6cc75a8dc7c81663277e64c590) ([#15218](https://www.github.com/tauri-apps/tauri/pull/15218)) Added Vietnamese translations for the NSIS installer +- [`8718d0816`](https://www.github.com/tauri-apps/tauri/commit/8718d08163f074dfc53387ebd1d823f9c28280ee) ([#15033](https://www.github.com/tauri-apps/tauri/pull/15033)) Show the context before prompting for updater signing key password + +### Bug Fixes + +- [`fcb702ec4`](https://www.github.com/tauri-apps/tauri/commit/fcb702ec4d924e81943efaeebea8d3edb7289c33) ([#14954](https://www.github.com/tauri-apps/tauri/pull/14954)) Fix `build --bundles` to allow `nsis` arg in linux+macOS +- [`80c1425af`](https://www.github.com/tauri-apps/tauri/commit/80c1425af86058b1fc9489a30f778b6288d79b6b) ([#14921](https://www.github.com/tauri-apps/tauri/pull/14921)) Fix iOS build failure when `Metal Toolchain` is installed by using explicit `$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain` path instead of `$(TOOLCHAIN_DIR)` for Swift library search paths. + +### What's Changed + +- [`9979cde1c`](https://www.github.com/tauri-apps/tauri/commit/9979cde1c5534dafb1a07cc4dc2bc280d15d2f66) ([#15175](https://www.github.com/tauri-apps/tauri/pull/15175)) Update NSIS installer Italian translations + +### Dependencies + +- Upgraded to `tauri-macos-sign@2.3.4` +- Upgraded to `tauri-bundler@2.9.0` +- Upgraded to `tauri-utils@2.9.0` + ## \[2.10.1] ### Bug Fixes diff --git a/crates/tauri-cli/Cargo.toml b/crates/tauri-cli/Cargo.toml index fa460e15a68a..52e18440fe8c 100644 --- a/crates/tauri-cli/Cargo.toml +++ b/crates/tauri-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-cli" -version = "2.10.1" +version = "2.11.0" authors = ["Tauri Programme within The Commons Conservancy"] edition = "2021" rust-version = "1.77.2" @@ -47,7 +47,7 @@ sublime_fuzzy = "0.7" clap_complete = "4" clap = { version = "4", features = ["derive", "env"] } thiserror = "2" -tauri-bundler = { version = "2.8.1", default-features = false, path = "../tauri-bundler" } +tauri-bundler = { version = "2.9.0", default-features = false, path = "../tauri-bundler" } colored = "2" serde = { version = "1", features = ["derive"] } serde_json = { version = "1", features = ["preserve_order"] } @@ -58,7 +58,7 @@ shared_child = "1" duct = "1.0" toml_edit = { version = "0.25", features = ["serde"] } json-patch = "3" -tauri-utils = { version = "2.8.3", path = "../tauri-utils", features = [ +tauri-utils = { version = "2.9.0", path = "../tauri-utils", features = [ "isolation", "schema", "config-json5", @@ -133,7 +133,7 @@ libc = "0.2" [target."cfg(target_os = \"macos\")".dependencies] plist = "1" -tauri-macos-sign = { version = "2.3.3", path = "../tauri-macos-sign" } +tauri-macos-sign = { version = "2.3.4", path = "../tauri-macos-sign" } object = { version = "0.36", default-features = false, features = [ "macho", "read_core", diff --git a/crates/tauri-cli/config.schema.json b/crates/tauri-cli/config.schema.json index 6b0ec229bd96..4ee062b4b001 100644 --- a/crates/tauri-cli/config.schema.json +++ b/crates/tauri-cli/config.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://schema.tauri.app/config/2.10.3", + "$id": "https://schema.tauri.app/config/2.11.0", "title": "Config", "description": "The Tauri configuration object.\n It is read from a file where you can define your frontend assets,\n configure the bundler and define a tray icon.\n\n The configuration file is generated by the\n [`tauri init`](https://v2.tauri.app/reference/cli/#init) command that lives in\n your Tauri application source directory (src-tauri).\n\n Once generated, you may modify it at will to customize your Tauri application.\n\n ## File Formats\n\n By default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\n Tauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\n The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\n The TOML file name is `Tauri.toml`.\n\n ## Platform-Specific Configuration\n\n In addition to the default configuration file, Tauri can\n read a platform-specific configuration from `tauri.linux.conf.json`,\n `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json`\n (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used),\n which gets merged with the main configuration object.\n\n ## Configuration Structure\n\n The configuration is composed of the following objects:\n\n - [`app`](#appconfig): The Tauri configuration\n - [`build`](#buildconfig): The build configuration\n - [`bundle`](#bundleconfig): The bundle configurations\n - [`plugins`](#pluginconfig): The plugins configuration\n\n Example tauri.config.json file:\n\n ```json\n {\n \"productName\": \"tauri-app\",\n \"version\": \"0.1.0\",\n \"build\": {\n \"beforeBuildCommand\": \"\",\n \"beforeDevCommand\": \"\",\n \"devUrl\": \"http://localhost:3000\",\n \"frontendDist\": \"../dist\"\n },\n \"app\": {\n \"security\": {\n \"csp\": null\n },\n \"windows\": [\n {\n \"fullscreen\": false,\n \"height\": 600,\n \"resizable\": true,\n \"title\": \"Tauri App\",\n \"width\": 800\n }\n ]\n },\n \"bundle\": {},\n \"plugins\": {}\n }\n ```", "type": "object", diff --git a/crates/tauri-cli/metadata-v2.json b/crates/tauri-cli/metadata-v2.json index 3e034233271e..a37e32ae8fe1 100644 --- a/crates/tauri-cli/metadata-v2.json +++ b/crates/tauri-cli/metadata-v2.json @@ -1,9 +1,9 @@ { "cli.js": { - "version": "2.10.1", + "version": "2.11.0", "node": ">= 10.0.0" }, - "tauri": "2.10.3", - "tauri-build": "2.5.6", - "tauri-plugin": "2.5.4" + "tauri": "2.11.0", + "tauri-build": "2.6.0", + "tauri-plugin": "2.6.0" } diff --git a/crates/tauri-codegen/CHANGELOG.md b/crates/tauri-codegen/CHANGELOG.md index d874ccd7631f..7385c40ac0ee 100644 --- a/crates/tauri-codegen/CHANGELOG.md +++ b/crates/tauri-codegen/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## \[2.6.0] + +### Dependencies + +- Upgraded to `tauri-utils@2.9.0` +- [`df05c0056`](https://www.github.com/tauri-apps/tauri/commit/df05c00563a91fc936bd15c6b10dd2825472f96b) Upgraded to `tauri-utils@2.9.0` + ## \[2.5.5] ### Dependencies diff --git a/crates/tauri-codegen/Cargo.toml b/crates/tauri-codegen/Cargo.toml index 78de83cf0791..04caf098b92c 100644 --- a/crates/tauri-codegen/Cargo.toml +++ b/crates/tauri-codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-codegen" -version = "2.5.5" +version = "2.6.0" description = "code generation meant to be consumed inside of `tauri` through `tauri-build` or `tauri-macros`" exclude = ["CHANGELOG.md", "/target"] readme = "README.md" @@ -20,7 +20,7 @@ quote = "1" syn = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" -tauri-utils = { version = "2.8.3", path = "../tauri-utils", features = [ +tauri-utils = { version = "2.9.0", path = "../tauri-utils", features = [ "build-2", ] } thiserror = "2" diff --git a/crates/tauri-macos-sign/CHANGELOG.md b/crates/tauri-macos-sign/CHANGELOG.md index 577e23e336b4..9502ef75c3bb 100644 --- a/crates/tauri-macos-sign/CHANGELOG.md +++ b/crates/tauri-macos-sign/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## \[2.3.4] + +### Enhancements + +- [`eacd36a4e`](https://www.github.com/tauri-apps/tauri/commit/eacd36a4ea4d6a14a73f414981fb5a8af7dfdafe) ([#15038](https://www.github.com/tauri-apps/tauri/pull/15038)) Do not rely on system base64 CLI to decode certificates. + ## \[2.3.3] ### Dependencies diff --git a/crates/tauri-macos-sign/Cargo.toml b/crates/tauri-macos-sign/Cargo.toml index fa4c429fd0f3..a8b444d6021d 100644 --- a/crates/tauri-macos-sign/Cargo.toml +++ b/crates/tauri-macos-sign/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-macos-sign" -version = "2.3.3" +version = "2.3.4" authors = ["Tauri Programme within The Commons Conservancy"] license = "Apache-2.0 OR MIT" keywords = ["codesign", "signing", "macos", "ios", "tauri"] diff --git a/crates/tauri-macros/CHANGELOG.md b/crates/tauri-macros/CHANGELOG.md index 2406a7af5f42..9d9b62b458e4 100644 --- a/crates/tauri-macros/CHANGELOG.md +++ b/crates/tauri-macros/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## \[2.6.0] + +### New Features + +- [`c00a3dbff`](https://www.github.com/tauri-apps/tauri/commit/c00a3dbffccd6e051d3b7332f706b6c63759865d) ([#14473](https://www.github.com/tauri-apps/tauri/pull/14473)) Add support for the `rename` attribute in the `tauri::command` macro to allow renaming the command to something other than the function name. + +### Dependencies + +- Upgraded to `tauri-utils@2.9.0` +- Upgraded to `tauri-codegen@2.6.0` + ## \[2.5.5] ### Dependencies diff --git a/crates/tauri-macros/Cargo.toml b/crates/tauri-macros/Cargo.toml index 29ba5044f629..91fe054213be 100644 --- a/crates/tauri-macros/Cargo.toml +++ b/crates/tauri-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-macros" -version = "2.5.5" +version = "2.6.0" description = "Macros for the tauri crate." exclude = ["CHANGELOG.md", "/target"] readme = "README.md" @@ -20,8 +20,8 @@ proc-macro2 = { version = "1", features = ["span-locations"] } quote = "1" syn = { version = "2", features = ["full"] } heck = "0.5" -tauri-codegen = { version = "2.5.5", default-features = false, path = "../tauri-codegen" } -tauri-utils = { version = "2.8.3", path = "../tauri-utils" } +tauri-codegen = { version = "2.6.0", default-features = false, path = "../tauri-codegen" } +tauri-utils = { version = "2.9.0", path = "../tauri-utils" } [features] custom-protocol = [] diff --git a/crates/tauri-plugin/CHANGELOG.md b/crates/tauri-plugin/CHANGELOG.md index 93a1115aa31e..5f0840371e9b 100644 --- a/crates/tauri-plugin/CHANGELOG.md +++ b/crates/tauri-plugin/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## \[2.6.0] + +### New Features + +- [`cc5c97602`](https://www.github.com/tauri-apps/tauri/commit/cc5c976027b0ab2431c13ec5b2e201d4414a8a6e) ([#14486](https://www.github.com/tauri-apps/tauri/pull/14486)) Implement file association for Android and iOS. + +### Dependencies + +- Upgraded to `tauri-utils@2.9.0` + ## \[2.5.4] ### Dependencies diff --git a/crates/tauri-plugin/Cargo.toml b/crates/tauri-plugin/Cargo.toml index 022492dceed0..02665a56cd77 100644 --- a/crates/tauri-plugin/Cargo.toml +++ b/crates/tauri-plugin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin" -version = "2.5.4" +version = "2.6.0" description = "Build script and runtime Tauri plugin definitions" authors.workspace = true homepage.workspace = true @@ -27,7 +27,7 @@ runtime = [] [dependencies] anyhow = { version = "1", optional = true } serde = { version = "1", optional = true } -tauri-utils = { version = "2.8.3", default-features = false, features = [ +tauri-utils = { version = "2.9.0", default-features = false, features = [ "build-2", ], path = "../tauri-utils" } serde_json = { version = "1", optional = true } diff --git a/crates/tauri-runtime-wry/CHANGELOG.md b/crates/tauri-runtime-wry/CHANGELOG.md index 3d01fa27e84b..621774ffb211 100644 --- a/crates/tauri-runtime-wry/CHANGELOG.md +++ b/crates/tauri-runtime-wry/CHANGELOG.md @@ -1,5 +1,30 @@ # Changelog +## \[2.11.0] + +### New Features + +- [`001c8fe3d`](https://www.github.com/tauri-apps/tauri/commit/001c8fe3d288802de9a8c29cfd2f46f9220d97c5) ([#14722](https://www.github.com/tauri-apps/tauri/pull/14722)) Add a WebView option to control browser-level general autofill behavior. This option does not disable password or credit card autofill. On Windows (WebView2), setting it to true disables the general autofill "Suggestions" UI, which may appear even when `autocomplete="off"` is specified on input elements. On Linux, macOS, iOS, and Android, this option is currently unsupported and performs no operation. +- [`b27be063f`](https://www.github.com/tauri-apps/tauri/commit/b27be063ff3052cb1071ac3ec719cfa104460fa4) ([#14925](https://www.github.com/tauri-apps/tauri/pull/14925)) Add `eval_with_callback` to the Tauri webview APIs and runtime dispatch layers. +- [`cc5c97602`](https://www.github.com/tauri-apps/tauri/commit/cc5c976027b0ab2431c13ec5b2e201d4414a8a6e) ([#14486](https://www.github.com/tauri-apps/tauri/pull/14486)) Trigger `RunEvent::Opened` on Android. +- [`eb0312ea9`](https://www.github.com/tauri-apps/tauri/commit/eb0312ea9e493954298ac0b3fdaae7eafb52750e) ([#15199](https://www.github.com/tauri-apps/tauri/pull/15199)) Propagates the `Event::Suspended` and `Event::Resumed` events from `tao` when they are emitted on mobile targets. +- [`093e2b47c`](https://www.github.com/tauri-apps/tauri/commit/093e2b47c01361c18783e9ff18750388e41650c5) ([#14484](https://www.github.com/tauri-apps/tauri/pull/14484)) Support creating multiple windows on Android (activity embedding) and iOS (scenes). +- [`1063c48c5`](https://www.github.com/tauri-apps/tauri/commit/1063c48c5e7d099ad74d28a937edf42e3f5c9f03) ([#14523](https://www.github.com/tauri-apps/tauri/pull/14523)) Add handler for web content process termination on macOS and iOS. + +### Bug Fixes + +- [`110336c88`](https://www.github.com/tauri-apps/tauri/commit/110336c88a8c0a04476619db0a5c8f7694d969a5) ([#15250](https://www.github.com/tauri-apps/tauri/pull/15250)) Fix initial window position when positioning it to another monitor. +- [`9808236eb`](https://www.github.com/tauri-apps/tauri/commit/9808236ebf7755d498d674b614f3fc75eeac1ec4) ([#14655](https://www.github.com/tauri-apps/tauri/pull/14655)) Fix monitor work area Y position on macOS. + +### What's Changed + +- [`d34497ef1`](https://www.github.com/tauri-apps/tauri/commit/d34497ef154eddcc36327a30dda06dc4748f6b20) ([#14862](https://www.github.com/tauri-apps/tauri/pull/14862)) The new window handler passed to `on_new_window` no longer requires `Sync`, and runs on main thread on Windows, aligning with other platforms + +### Dependencies + +- Upgraded to `tauri-runtime@2.11.0` +- Upgraded to `tauri-utils@2.9.0` + ## \[2.10.1] ### Dependencies diff --git a/crates/tauri-runtime-wry/Cargo.toml b/crates/tauri-runtime-wry/Cargo.toml index 675f7fd8c876..0bb75e2634ec 100644 --- a/crates/tauri-runtime-wry/Cargo.toml +++ b/crates/tauri-runtime-wry/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-runtime-wry" -version = "2.10.1" +version = "2.11.0" description = "Wry bindings to the Tauri runtime" exclude = ["CHANGELOG.md", "/target"] readme = "README.md" @@ -19,8 +19,8 @@ wry = { version = "0.55.0", default-features = false, features = [ "linux-body", ] } tao = { version = "0.35.0", default-features = false, features = ["rwh_06"] } -tauri-runtime = { version = "2.10.1", path = "../tauri-runtime" } -tauri-utils = { version = "2.8.3", path = "../tauri-utils" } +tauri-runtime = { version = "2.11.0", path = "../tauri-runtime" } +tauri-utils = { version = "2.9.0", path = "../tauri-utils" } raw-window-handle = "0.6" http = "1" url = "2" diff --git a/crates/tauri-runtime/CHANGELOG.md b/crates/tauri-runtime/CHANGELOG.md index 47263c499fe9..2e227da880a6 100644 --- a/crates/tauri-runtime/CHANGELOG.md +++ b/crates/tauri-runtime/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## \[2.11.0] + +### New Features + +- [`001c8fe3d`](https://www.github.com/tauri-apps/tauri/commit/001c8fe3d288802de9a8c29cfd2f46f9220d97c5) ([#14722](https://www.github.com/tauri-apps/tauri/pull/14722)) Add a WebView option to control browser-level general autofill behavior. This option does not disable password or credit card autofill. On Windows (WebView2), setting it to true disables the general autofill "Suggestions" UI, which may appear even when `autocomplete="off"` is specified on input elements. On Linux, macOS, iOS, and Android, this option is currently unsupported and performs no operation. +- [`b27be063f`](https://www.github.com/tauri-apps/tauri/commit/b27be063ff3052cb1071ac3ec719cfa104460fa4) ([#14925](https://www.github.com/tauri-apps/tauri/pull/14925)) Add `eval_with_callback` to the Tauri webview APIs and runtime dispatch layers. +- [`cc5c97602`](https://www.github.com/tauri-apps/tauri/commit/cc5c976027b0ab2431c13ec5b2e201d4414a8a6e) ([#14486](https://www.github.com/tauri-apps/tauri/pull/14486)) Trigger `RunEvent::Opened` on Android. +- [`eb0312ea9`](https://www.github.com/tauri-apps/tauri/commit/eb0312ea9e493954298ac0b3fdaae7eafb52750e) ([#15199](https://www.github.com/tauri-apps/tauri/pull/15199)) Propagates the `Event::Suspended` and `Event::Resumed` events from `tao` when they are emitted on mobile targets. +- [`093e2b47c`](https://www.github.com/tauri-apps/tauri/commit/093e2b47c01361c18783e9ff18750388e41650c5) ([#14484](https://www.github.com/tauri-apps/tauri/pull/14484)) Support creating multiple windows on Android (activity embedding) and iOS (scenes). +- [`1063c48c5`](https://www.github.com/tauri-apps/tauri/commit/1063c48c5e7d099ad74d28a937edf42e3f5c9f03) ([#14523](https://www.github.com/tauri-apps/tauri/pull/14523)) Add handler for web content process termination on macOS and iOS. + +### Dependencies + +- Upgraded to `tauri-utils@2.9.0` + ## \[2.10.1] ### Dependencies diff --git a/crates/tauri-runtime/Cargo.toml b/crates/tauri-runtime/Cargo.toml index 4a3f3ea571b8..a8bb85d4f7f1 100644 --- a/crates/tauri-runtime/Cargo.toml +++ b/crates/tauri-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-runtime" -version = "2.10.1" +version = "2.11.0" description = "Runtime for Tauri applications" exclude = ["CHANGELOG.md", "/target"] readme = "README.md" @@ -27,7 +27,7 @@ targets = [ serde = { version = "1", features = ["derive"] } serde_json = "1" thiserror = "2" -tauri-utils = { version = "2.8.3", path = "../tauri-utils" } +tauri-utils = { version = "2.9.0", path = "../tauri-utils" } http = "1" raw-window-handle = "0.6" url = { version = "2" } diff --git a/crates/tauri-schema-generator/schemas/config.schema.json b/crates/tauri-schema-generator/schemas/config.schema.json index 6b0ec229bd96..4ee062b4b001 100644 --- a/crates/tauri-schema-generator/schemas/config.schema.json +++ b/crates/tauri-schema-generator/schemas/config.schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-07/schema#", - "$id": "https://schema.tauri.app/config/2.10.3", + "$id": "https://schema.tauri.app/config/2.11.0", "title": "Config", "description": "The Tauri configuration object.\n It is read from a file where you can define your frontend assets,\n configure the bundler and define a tray icon.\n\n The configuration file is generated by the\n [`tauri init`](https://v2.tauri.app/reference/cli/#init) command that lives in\n your Tauri application source directory (src-tauri).\n\n Once generated, you may modify it at will to customize your Tauri application.\n\n ## File Formats\n\n By default, the configuration is defined as a JSON file named `tauri.conf.json`.\n\n Tauri also supports JSON5 and TOML files via the `config-json5` and `config-toml` Cargo features, respectively.\n The JSON5 file name must be either `tauri.conf.json` or `tauri.conf.json5`.\n The TOML file name is `Tauri.toml`.\n\n ## Platform-Specific Configuration\n\n In addition to the default configuration file, Tauri can\n read a platform-specific configuration from `tauri.linux.conf.json`,\n `tauri.windows.conf.json`, `tauri.macos.conf.json`, `tauri.android.conf.json` and `tauri.ios.conf.json`\n (or `Tauri.linux.toml`, `Tauri.windows.toml`, `Tauri.macos.toml`, `Tauri.android.toml` and `Tauri.ios.toml` if the `Tauri.toml` format is used),\n which gets merged with the main configuration object.\n\n ## Configuration Structure\n\n The configuration is composed of the following objects:\n\n - [`app`](#appconfig): The Tauri configuration\n - [`build`](#buildconfig): The build configuration\n - [`bundle`](#bundleconfig): The bundle configurations\n - [`plugins`](#pluginconfig): The plugins configuration\n\n Example tauri.config.json file:\n\n ```json\n {\n \"productName\": \"tauri-app\",\n \"version\": \"0.1.0\",\n \"build\": {\n \"beforeBuildCommand\": \"\",\n \"beforeDevCommand\": \"\",\n \"devUrl\": \"http://localhost:3000\",\n \"frontendDist\": \"../dist\"\n },\n \"app\": {\n \"security\": {\n \"csp\": null\n },\n \"windows\": [\n {\n \"fullscreen\": false,\n \"height\": 600,\n \"resizable\": true,\n \"title\": \"Tauri App\",\n \"width\": 800\n }\n ]\n },\n \"bundle\": {},\n \"plugins\": {}\n }\n ```", "type": "object", diff --git a/crates/tauri-utils/CHANGELOG.md b/crates/tauri-utils/CHANGELOG.md index 4ed8a4248dcb..60f1bec08479 100644 --- a/crates/tauri-utils/CHANGELOG.md +++ b/crates/tauri-utils/CHANGELOG.md @@ -1,5 +1,24 @@ # Changelog +## \[2.9.0] + +### New Features + +- [`001c8fe3d`](https://www.github.com/tauri-apps/tauri/commit/001c8fe3d288802de9a8c29cfd2f46f9220d97c5) ([#14722](https://www.github.com/tauri-apps/tauri/pull/14722)) Add a WebView option to control browser-level general autofill behavior. This option does not disable password or credit card autofill. On Windows (WebView2), setting it to true disables the general autofill "Suggestions" UI, which may appear even when `autocomplete="off"` is specified on input elements. On Linux, macOS, iOS, and Android, this option is currently unsupported and performs no operation. +- [`926a57bb0`](https://www.github.com/tauri-apps/tauri/commit/926a57bb0851e45d47ad1ee68fc96a9c25754c7c) ([#15201](https://www.github.com/tauri-apps/tauri/pull/15201)) Added uninstaller icon and uninstaller header image support for NSIS installer. + + Notes: + + - For `tauri-bundler` lib users, the `NsisSettings` now has 2 new fields `uninstaller_icon` and `uninstaller_header_image` which can be a breaking change + - When bundling with NSIS, users can add `uninstallerIcon` and `uninstallerHeaderImage` under `bundle > windows > nsis` to configure them. +- [`093e2b47c`](https://www.github.com/tauri-apps/tauri/commit/093e2b47c01361c18783e9ff18750388e41650c5) ([#14484](https://www.github.com/tauri-apps/tauri/pull/14484)) Support creating multiple windows on Android (activity embedding) and iOS (scenes). + +### Dependencies + +- [`e032c3b34`](https://www.github.com/tauri-apps/tauri/commit/e032c3b3421f53bca7b869ffee2be105c5c06ad9) ([#14959](https://www.github.com/tauri-apps/tauri/pull/14959)) Add new `html-manipulation-2` and `build-2` feature flags that use `dom_query` instead of `kuchikiki` for HTML parsing / manipulation. + This allows downstream users to remove `kuchikiki` and its dependencies from their dependency tree. +- [`1ef6a119b`](https://www.github.com/tauri-apps/tauri/commit/1ef6a119b1571d1da0acc08bdb7fd5521a4c6d52) ([#15115](https://www.github.com/tauri-apps/tauri/pull/15115)) Changed `toml` crate version from `0.9` to `">=0.9, <=1"` + ## \[2.8.3] ### Bug Fixes diff --git a/crates/tauri-utils/Cargo.toml b/crates/tauri-utils/Cargo.toml index 133c8644c979..1a8bee5dddae 100644 --- a/crates/tauri-utils/Cargo.toml +++ b/crates/tauri-utils/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-utils" -version = "2.8.3" +version = "2.9.0" description = "Utilities for Tauri" exclude = ["CHANGELOG.md", "/target"] readme = "README.md" diff --git a/crates/tauri/CHANGELOG.md b/crates/tauri/CHANGELOG.md index 3572afd7ab04..76b972004af5 100644 --- a/crates/tauri/CHANGELOG.md +++ b/crates/tauri/CHANGELOG.md @@ -1,5 +1,48 @@ # Changelog +## \[2.11.0] + +### New Features + +- [`074299c08`](https://www.github.com/tauri-apps/tauri/commit/074299c08dd99d2e1c57796f55ab24bc1d3976cc) ([#14307](https://www.github.com/tauri-apps/tauri/pull/14307)) Add Bring All to Front predefined menu item type +- [`c00a3dbff`](https://www.github.com/tauri-apps/tauri/commit/c00a3dbffccd6e051d3b7332f706b6c63759865d) ([#14473](https://www.github.com/tauri-apps/tauri/pull/14473)) Add support for the `rename` attribute in the `tauri::command` macro to allow renaming the command to something other than the function name. +- [`a12142a48`](https://www.github.com/tauri-apps/tauri/commit/a12142a481f7a19b69e88ee36a438b1db71b36f5) ([#14357](https://www.github.com/tauri-apps/tauri/pull/14357)) Add macos support for setting the icon and icon template state in the same step of the main thread, to prevent flickering. +- [`2dd9b15a2`](https://www.github.com/tauri-apps/tauri/commit/2dd9b15a2bcab8e52c87b03a919b4a75567ad3ce) ([#15062](https://www.github.com/tauri-apps/tauri/pull/15062)) Add `data-tauri-drag-region="deep"` so clicks on non-clickable children will drag as well. Can still opt out of drag on some regions using `data-tauri-drag-region="false"` +- [`001c8fe3d`](https://www.github.com/tauri-apps/tauri/commit/001c8fe3d288802de9a8c29cfd2f46f9220d97c5) ([#14722](https://www.github.com/tauri-apps/tauri/pull/14722)) Add a WebView option to control browser-level general autofill behavior. This option does not disable password or credit card autofill. On Windows (WebView2), setting it to true disables the general autofill "Suggestions" UI, which may appear even when `autocomplete="off"` is specified on input elements. On Linux, macOS, iOS, and Android, this option is currently unsupported and performs no operation. +- [`b27be063f`](https://www.github.com/tauri-apps/tauri/commit/b27be063ff3052cb1071ac3ec719cfa104460fa4) ([#14925](https://www.github.com/tauri-apps/tauri/pull/14925)) Add `eval_with_callback` to the Tauri webview APIs and runtime dispatch layers. +- [`d83d2d92b`](https://www.github.com/tauri-apps/tauri/commit/d83d2d92b4327da3dbac60f83cada36c8ec194dc) ([#14905](https://www.github.com/tauri-apps/tauri/pull/14905)) Enable track_caller attribute for async_runtime to provide better location information in logs and panics. +- [`cc5c97602`](https://www.github.com/tauri-apps/tauri/commit/cc5c976027b0ab2431c13ec5b2e201d4414a8a6e) ([#14486](https://www.github.com/tauri-apps/tauri/pull/14486)) Implement file association for Android and iOS. +- [`cc5c97602`](https://www.github.com/tauri-apps/tauri/commit/cc5c976027b0ab2431c13ec5b2e201d4414a8a6e) ([#14486](https://www.github.com/tauri-apps/tauri/pull/14486)) Trigger `RunEvent::Opened` on Android. +- [`eb0312ea9`](https://www.github.com/tauri-apps/tauri/commit/eb0312ea9e493954298ac0b3fdaae7eafb52750e) ([#15199](https://www.github.com/tauri-apps/tauri/pull/15199)) Propagates the `Event::Suspended` and `Event::Resumed` events from `tao` when they are emitted on mobile targets. +- [`093e2b47c`](https://www.github.com/tauri-apps/tauri/commit/093e2b47c01361c18783e9ff18750388e41650c5) ([#14484](https://www.github.com/tauri-apps/tauri/pull/14484)) Support creating multiple windows on Android (activity embedding) and iOS (scenes). +- [`093e2b47c`](https://www.github.com/tauri-apps/tauri/commit/093e2b47c01361c18783e9ff18750388e41650c5) ([#14484](https://www.github.com/tauri-apps/tauri/pull/14484)) Added `dbus` feature flag (enabled by default) which is required for theme detection on Linux. +- [`1063c48c5`](https://www.github.com/tauri-apps/tauri/commit/1063c48c5e7d099ad74d28a937edf42e3f5c9f03) ([#14523](https://www.github.com/tauri-apps/tauri/pull/14523)) Add handler for web content process termination on macOS and iOS. + +### Enhancements + +- [`d730770bb`](https://www.github.com/tauri-apps/tauri/commit/d730770bb93d77358cfc6f1286f10187cef37362) ([#15117](https://www.github.com/tauri-apps/tauri/pull/15117)) Simplify async-sync code boundaries, no externally visible changes +- [`c69d5ca4b`](https://www.github.com/tauri-apps/tauri/commit/c69d5ca4b1a646843c3f250a0d1b13414c5e8223) ([#15262](https://www.github.com/tauri-apps/tauri/pull/15262)) Remove a clone, no user-facing changes. +- [`4017a7ed7`](https://www.github.com/tauri-apps/tauri/commit/4017a7ed7313cebf912ef3af1e3b280855b6f100) ([#14908](https://www.github.com/tauri-apps/tauri/pull/14908)) Implement retrieving inner PathBuf from SafePathBuf to ease using APIs that require an owned PathBuf + +### Bug Fixes + +- [`110336c88`](https://www.github.com/tauri-apps/tauri/commit/110336c88a8c0a04476619db0a5c8f7694d969a5) ([#15250](https://www.github.com/tauri-apps/tauri/pull/15250)) Fix initial window position when positioning it to another monitor. +- [`9808236eb`](https://www.github.com/tauri-apps/tauri/commit/9808236ebf7755d498d674b614f3fc75eeac1ec4) ([#14655](https://www.github.com/tauri-apps/tauri/pull/14655)) Fix monitor work area Y position on macOS. + +### What's Changed + +- [`d34497ef1`](https://www.github.com/tauri-apps/tauri/commit/d34497ef154eddcc36327a30dda06dc4748f6b20) ([#14862](https://www.github.com/tauri-apps/tauri/pull/14862)) The new window handler passed to `on_new_window` no longer requires `Sync`, and runs on main thread on Windows, aligning with other platforms + +### Dependencies + +- Upgraded to `tauri-macros@2.6.0` +- Upgraded to `tauri-build@2.6.0` +- Upgraded to `tauri-runtime@2.11.0` +- Upgraded to `tauri-runtime-wry@2.11.0` +- Upgraded to `tauri-utils@2.9.0` +- [`373b7e677`](https://www.github.com/tauri-apps/tauri/commit/373b7e677ec498899759de9fcd35941fe792b58b) ([#15177](https://www.github.com/tauri-apps/tauri/pull/15177)) Update Specta in lockfile and upgrade dependencies using the removed `doc_auto_cfg` attribute to fix errors building documentation +- [`a219ede00`](https://www.github.com/tauri-apps/tauri/commit/a219ede0003bb8073d8002be42bcf343538c42f8) ([#15203](https://www.github.com/tauri-apps/tauri/pull/15203)) Updated `tray-icon` to v0.22 + ## \[2.10.3] ### Dependencies diff --git a/crates/tauri/Cargo.toml b/crates/tauri/Cargo.toml index ba2329abc20c..41c518382ee9 100644 --- a/crates/tauri/Cargo.toml +++ b/crates/tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri" -version = "2.10.3" +version = "2.11.0" description = "Make tiny, secure apps for all desktop platforms with Tauri" exclude = ["/test", "/.scripts", "CHANGELOG.md", "/target"] readme = "README.md" @@ -56,12 +56,12 @@ uuid = { version = "1", features = ["v4"], optional = true } url = "2" anyhow = "1" thiserror = "2" -tauri-runtime = { version = "2.10.1", path = "../tauri-runtime" } -tauri-macros = { version = "2.5.5", path = "../tauri-macros" } -tauri-utils = { version = "2.8.3", features = [ +tauri-runtime = { version = "2.11.0", path = "../tauri-runtime" } +tauri-macros = { version = "2.6.0", path = "../tauri-macros" } +tauri-utils = { version = "2.9.0", features = [ "resources", ], path = "../tauri-utils" } -tauri-runtime-wry = { version = "2.10.1", path = "../tauri-runtime-wry", default-features = false, optional = true } +tauri-runtime-wry = { version = "2.11.0", path = "../tauri-runtime-wry", default-features = false, optional = true } getrandom = "0.3" serde_repr = "0.1" http = "1" @@ -168,8 +168,8 @@ objc2-ui-kit = { version = "0.3.0", default-features = false, features = [ [build-dependencies] glob = "0.3" heck = "0.5" -tauri-build = { path = "../tauri-build/", default-features = false, version = "2.5.6" } -tauri-utils = { path = "../tauri-utils/", version = "2.8.3", features = [ +tauri-build = { path = "../tauri-build/", default-features = false, version = "2.6.0" } +tauri-utils = { path = "../tauri-utils/", version = "2.9.0", features = [ "build-2", ] } diff --git a/packages/api/CHANGELOG.md b/packages/api/CHANGELOG.md index 5af686715ac4..078cb72cd8d3 100644 --- a/packages/api/CHANGELOG.md +++ b/packages/api/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## \[2.11.0] + +### New Features + +- [`074299c08`](https://www.github.com/tauri-apps/tauri/commit/074299c08dd99d2e1c57796f55ab24bc1d3976cc) ([#14307](https://www.github.com/tauri-apps/tauri/pull/14307)) Add Bring All to Front predefined menu item type +- [`a12142a48`](https://www.github.com/tauri-apps/tauri/commit/a12142a481f7a19b69e88ee36a438b1db71b36f5) ([#14357](https://www.github.com/tauri-apps/tauri/pull/14357)) Add macos support for setting the icon and icon template state in the same step of the main thread, to prevent flickering. +- [`001c8fe3d`](https://www.github.com/tauri-apps/tauri/commit/001c8fe3d288802de9a8c29cfd2f46f9220d97c5) ([#14722](https://www.github.com/tauri-apps/tauri/pull/14722)) Add a WebView option to control browser-level general autofill behavior. This option does not disable password or credit card autofill. On Windows (WebView2), setting it to true disables the general autofill "Suggestions" UI, which may appear even when `autocomplete="off"` is specified on input elements. On Linux, macOS, iOS, and Android, this option is currently unsupported and performs no operation. +- [`eb0312ea9`](https://www.github.com/tauri-apps/tauri/commit/eb0312ea9e493954298ac0b3fdaae7eafb52750e) ([#15199](https://www.github.com/tauri-apps/tauri/pull/15199)) Propagates the `Event::Suspended` and `Event::Resumed` events from `tao` when they are emitted on mobile targets. + ## \[2.10.1] ### Bug Fixes diff --git a/packages/api/package.json b/packages/api/package.json index 9018a79bf4cf..c54379d052cd 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/api", - "version": "2.10.1", + "version": "2.11.0", "description": "Tauri API definitions", "funding": { "type": "opencollective", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index 236ecc1d3e69..44eedd598856 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,41 @@ # Changelog +## \[2.11.0] + +### New Features + +- [`926a57bb0`](https://www.github.com/tauri-apps/tauri/commit/926a57bb0851e45d47ad1ee68fc96a9c25754c7c) ([#15201](https://www.github.com/tauri-apps/tauri/pull/15201)) Added uninstaller icon and uninstaller header image support for NSIS installer. + + Notes: + + - For `tauri-bundler` lib users, the `NsisSettings` now has 2 new fields `uninstaller_icon` and `uninstaller_header_image` which can be a breaking change + - When bundling with NSIS, users can add `uninstallerIcon` and `uninstallerHeaderImage` under `bundle > windows > nsis` to configure them. +- [`764b9139a`](https://www.github.com/tauri-apps/tauri/commit/764b9139a32de149d8a914a6b5ec6cd1937c64eb) ([#14313](https://www.github.com/tauri-apps/tauri/pull/14313)) Prompt to restart the Android emulator if it is not connected to adb. +- [`5dc2cee60`](https://www.github.com/tauri-apps/tauri/commit/5dc2cee60370665af88c185684432e425b1c987d) ([#14793](https://www.github.com/tauri-apps/tauri/pull/14793)) Added support for `minimumWebview2Version` option support for the MSI (Wix) installer, the old `bundle > windows > nsis > minimumWebview2Version` is now deprecated in favor of `bundle > windows > minimumWebview2Version` + + Notes: + + - For anyone relying on the `WVRTINSTALLED` `Property` tag in `main.wxs`, it is now renamed to `INSTALLED_WEBVIEW2_VERSION` + - For `tauri-bundler` lib users, the `WindowsSettings` now has a new field `minimum_webview2_version` which can be a breaking change + +### Enhancements + +- [`be0e4bd2d`](https://www.github.com/tauri-apps/tauri/commit/be0e4bd2da02eb6cc75a8dc7c81663277e64c590) ([#15218](https://www.github.com/tauri-apps/tauri/pull/15218)) Added Vietnamese translations for the NSIS installer +- [`8718d0816`](https://www.github.com/tauri-apps/tauri/commit/8718d08163f074dfc53387ebd1d823f9c28280ee) ([#15033](https://www.github.com/tauri-apps/tauri/pull/15033)) Show the context before prompting for updater signing key password + +### Bug Fixes + +- [`fcb702ec4`](https://www.github.com/tauri-apps/tauri/commit/fcb702ec4d924e81943efaeebea8d3edb7289c33) ([#14954](https://www.github.com/tauri-apps/tauri/pull/14954)) Fix `build --bundles` to allow `nsis` arg in linux+macOS +- [`80c1425af`](https://www.github.com/tauri-apps/tauri/commit/80c1425af86058b1fc9489a30f778b6288d79b6b) ([#14921](https://www.github.com/tauri-apps/tauri/pull/14921)) Fix iOS build failure when `Metal Toolchain` is installed by using explicit `$(DEVELOPER_DIR)/Toolchains/XcodeDefault.xctoolchain` path instead of `$(TOOLCHAIN_DIR)` for Swift library search paths. + +### What's Changed + +- [`9979cde1c`](https://www.github.com/tauri-apps/tauri/commit/9979cde1c5534dafb1a07cc4dc2bc280d15d2f66) ([#15175](https://www.github.com/tauri-apps/tauri/pull/15175)) Update NSIS installer Italian translations + +### Dependencies + +- Upgraded to `tauri-cli@2.11.0` + ## \[2.10.1] ### Bug Fixes diff --git a/packages/cli/package.json b/packages/cli/package.json index d289be61f669..c6543c7d5705 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@tauri-apps/cli", - "version": "2.10.1", + "version": "2.11.0", "description": "Command line interface for building Tauri apps", "type": "commonjs", "funding": {