diff --git a/.changes/bump-1.5.md b/.changes/bump-1.5.md new file mode 100644 index 000000000000..0ff0d3398480 --- /dev/null +++ b/.changes/bump-1.5.md @@ -0,0 +1,15 @@ +--- +"tauri": 'patch:enhance' +"tauri-bundler": 'patch:enhance' +"tauri-build": 'patch:enhance' +"tauri-codegen": 'patch:enhance' +"tauri-macros": 'patch:enhance' +"tauri-utils": 'patch:enhance' +"tauri-runtime": 'patch:enhance' +"tauri-runtime-wry": 'patch:enhance' +"tauri-cli": 'patch:enhance' +"@tauri-apps/cli": 'patch:enhance' +"@tauri-apps/api": 'patch:enhance' +--- + +Pull changes from Tauri 1.5 release. diff --git a/.changes/config.json b/.changes/config.json index 7fb05912edf6..707f7c8d26f4 100644 --- a/.changes/config.json +++ b/.changes/config.json @@ -1,6 +1,5 @@ { "gitSiteUrl": "https://www.github.com/tauri-apps/tauri/", - "timeout": 3600000, "changeTags": { "feat": "New Features", "enhance": "Enhancements", @@ -271,7 +270,8 @@ }, "tauri-driver": { "path": "./tooling/webdriver", - "manager": "rust" + "manager": "rust", + "postversion": "cargo check" } } } diff --git a/.changes/nsis-german.md b/.changes/nsis-german.md new file mode 100644 index 000000000000..8425d0cf2bd1 --- /dev/null +++ b/.changes/nsis-german.md @@ -0,0 +1,5 @@ +--- +'tauri-bundler': 'patch:enhance' +--- + +Added German language support to the NSIS bundler. diff --git a/.changes/prevent-ios-crash.md b/.changes/prevent-ios-crash.md new file mode 100644 index 000000000000..8d3295d4b2b9 --- /dev/null +++ b/.changes/prevent-ios-crash.md @@ -0,0 +1,5 @@ +--- +"tauri": patch:bug +--- + +Prevent crash on iOS when the Swift plugin data is not a valid JSON string. diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 92d294722d82..ba7eabfb64a5 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -10,6 +10,7 @@ on: - cron: '0 0 * * *' push: paths: + - '.github/workflows/audit.yml' - '**/Cargo.lock' - '**/Cargo.toml' - '**/package.json' @@ -33,6 +34,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: yarn audit + - name: audit workspace + run: yarn audit + - name: audit @tauri-apps/api + working-directory: tooling/api + run: yarn audit + - name: audit @tauri-apps/cli working-directory: tooling/cli/node run: yarn audit diff --git a/.github/workflows/check-generated-files.yml b/.github/workflows/check-generated-files.yml index 0f5b6ecc64c1..69d0ba86004f 100644 --- a/.github/workflows/check-generated-files.yml +++ b/.github/workflows/check-generated-files.yml @@ -32,7 +32,6 @@ jobs: filters: | api: - 'tooling/api/src/**' - - 'tooling/api/docs/js-api.json' - 'core/tauri/scripts/bundle.global.js' schema: - 'core/tauri-utils/src/config.rs' @@ -50,9 +49,7 @@ jobs: working-directory: tooling/api run: yarn && yarn build - name: check api - run: | - git restore tooling/api/docs/js-api.json - ./.scripts/ci/has-diff.sh + run: ./.scripts/ci/has-diff.sh schema: runs-on: ubuntu-latest diff --git a/.github/workflows/covector-version-or-publish-v1.yml b/.github/workflows/covector-version-or-publish-v1.yml new file mode 100644 index 000000000000..4be13c600697 --- /dev/null +++ b/.github/workflows/covector-version-or-publish-v1.yml @@ -0,0 +1,148 @@ +# Copyright 2019-2023 Tauri Programme within The Commons Conservancy +# SPDX-License-Identifier: Apache-2.0 +# SPDX-License-Identifier: MIT + +name: covector version or publish + +on: + push: + branches: + - 1.x + +jobs: + run-integration-tests: + runs-on: ${{ matrix.platform }} + + strategy: + fail-fast: false + matrix: + platform: [ubuntu-latest, macos-latest, windows-latest] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: install stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: install Linux dependencies + if: matrix.platform == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev libfuse2 + + - uses: Swatinem/rust-cache@v2 + with: + workspaces: | + core -> ../target + tooling/cli + + - name: build CLI + uses: actions-rs/cargo@v1 + with: + command: build + args: --manifest-path ./tooling/cli/Cargo.toml + + - name: run integration tests + run: cargo test --test '*' -- --ignored + + - name: run CLI tests + timeout-minutes: 30 + run: | + cd ./tooling/cli/node + yarn + yarn build + yarn test + + version-or-publish: + runs-on: ubuntu-latest + timeout-minutes: 65 + outputs: + change: ${{ steps.covector.outputs.change }} + commandRan: ${{ steps.covector.outputs.commandRan }} + successfulPublish: ${{ steps.covector.outputs.successfulPublish }} + needs: + - run-integration-tests + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-node@v2 + with: + node-version: 14 + registry-url: 'https://registry.npmjs.org' + cache: yarn + cache-dependency-path: tooling/*/yarn.lock + + - name: cargo login + run: cargo login ${{ secrets.ORG_CRATES_IO_TOKEN }} + - name: git config + run: | + git config --global user.name "${{ github.event.pusher.name }}" + git config --global user.email "${{ github.event.pusher.email }}" + + - name: covector version or publish (publish when no change files present) + uses: jbolda/covector/packages/action@covector-v0 + id: covector + env: + NODE_AUTH_TOKEN: ${{ secrets.ORG_NPM_TOKEN }} + CARGO_AUDIT_OPTIONS: ${{ secrets.CARGO_AUDIT_OPTIONS }} + with: + token: ${{ secrets.GITHUB_TOKEN }} + command: 'version-or-publish' + createRelease: true + + - name: Create Pull Request With Versions Bumped + if: steps.covector.outputs.commandRan == 'version' + uses: tauri-apps/create-pull-request@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: release/version-updates-v1 + title: Apply Version Updates From Current Changes (v1) + commit-message: 'apply version updates' + labels: 'version updates' + body: ${{ steps.covector.outputs.change }} + + - name: Trigger doc update + if: | + steps.covector.outputs.successfulPublish == 'true' && + steps.covector.outputs.packagesPublished != '' + uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.ORG_TAURI_BOT_PAT }} + repository: tauri-apps/tauri-docs + event-type: update-docs + + - name: Get `@tauri-apps/cli` release id + id: cliReleaseId + if: | + steps.covector.outputs.successfulPublish == 'true' && + contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli') + run: | + echo '${{ steps.covector.outputs }}' > output.json + id=$(jq '.["-tauri-apps-cli-releaseId"]' < output.json) + rm output.json + echo "cliReleaseId=$id" >> "$GITHUB_OUTPUT" + + - name: Trigger `@tauri-apps/cli` publishing workflow + if: | + steps.covector.outputs.successfulPublish == 'true' && + contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli') + uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.ORG_TAURI_BOT_PAT }} + repository: tauri-apps/tauri + event-type: publish-js-cli + client-payload: '{"releaseId": "${{ steps.cliReleaseId.outputs.cliReleaseId }}" }' + + - name: Trigger `tauri-cli` publishing workflow + if: | + steps.covector.outputs.successfulPublish == 'true' && + contains(steps.covector.outputs.packagesPublished, 'tauri-cli') + uses: peter-evans/repository-dispatch@v1 + with: + token: ${{ secrets.ORG_TAURI_BOT_PAT }} + repository: tauri-apps/tauri + event-type: publish-clirs diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index d9f5a65e9227..49616bbdfa96 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -115,15 +115,13 @@ jobs: repository: tauri-apps/tauri-docs event-type: update-docs - - name: Get `@tauri-apps/cli` release id - id: cliReleaseId + - name: Process covector output + id: covectorOutput if: | steps.covector.outputs.successfulPublish == 'true' && contains(steps.covector.outputs.packagesPublished, '@tauri-apps/cli') run: | - echo '${{ toJSON(steps.covector.outputs) }}' > output.json - id=$(jq '.["-tauri-apps-cli-releaseId"]' < output.json) - rm output.json + id=$(node .scripts/covector/parse-output.js '${{ toJSON(steps.covector.outputs) }}' "-tauri-apps-cli-releaseId") echo "cliReleaseId=$id" >> "$GITHUB_OUTPUT" - name: Trigger `@tauri-apps/cli` publishing workflow @@ -135,7 +133,7 @@ jobs: token: ${{ secrets.ORG_TAURI_BOT_PAT }} repository: tauri-apps/tauri event-type: publish-js-cli - client-payload: '{"releaseId": "${{ steps.cliReleaseId.outputs.cliReleaseId }}" }' + client-payload: '{"releaseId": "${{ steps.covectorOutput.outputs.cliReleaseId }}" }' - name: Trigger `tauri-cli` publishing workflow if: | diff --git a/.prettierignore b/.prettierignore index 2028912e0d2f..f8dc4774520a 100644 --- a/.prettierignore +++ b/.prettierignore @@ -9,5 +9,4 @@ dist /tooling/cli/templates /tooling/cli/node /tooling/cli/schema.json -/tooling/api/docs/js-api.json /core/tauri-config-schema/schema.json diff --git a/.scripts/covector/parse-output.js b/.scripts/covector/parse-output.js new file mode 100644 index 000000000000..4c1747de6f85 --- /dev/null +++ b/.scripts/covector/parse-output.js @@ -0,0 +1,11 @@ +#!/usr/bin/env node + +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +const json = process.argv[2] +const field = process.argv[3] + +const output = JSON.parse(json) +console.log(output[field]) diff --git a/Cargo.toml b/Cargo.toml index 02941cabdd5e..6c6f337be6b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "2" members = [ # core "core/tauri", @@ -13,7 +14,6 @@ members = [ # integration tests "core/tests/restart", ] -resolver = "2" exclude = [ # examples that can be compiled with the tauri CLI diff --git a/core/tauri-build/CHANGELOG.md b/core/tauri-build/CHANGELOG.md index 04132b1fd98b..a49beb868a4d 100644 --- a/core/tauri-build/CHANGELOG.md +++ b/core/tauri-build/CHANGELOG.md @@ -86,6 +86,24 @@ - First mobile alpha release! - [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08 +## \[1.5.0] + +### What's Changed + +- [`d1e09da0`](https://www.github.com/tauri-apps/tauri/commit/d1e09da084b849b9e384fc27ed250dd17e72c7a3)([#7918](https://www.github.com/tauri-apps/tauri/pull/7918)) Bump to 1.5 due to tauri-utils dependency bump. + +## \[1.4.1] + +### Bug Fixes + +- [`5ecb46b3`](https://www.github.com/tauri-apps/tauri/commit/5ecb46b3410afd1b5c82494c1e0a91d5a358c41a)([#7773](https://www.github.com/tauri-apps/tauri/pull/7773)) Automatically set rpath on macOS if frameworks are bundled and copy frameworks to `src-tauri/target/Frameworks` for usage in development. +- [`290e366a`](https://www.github.com/tauri-apps/tauri/commit/290e366ae98e9a52b1b43bfd3e285150427ebffa)([#7419](https://www.github.com/tauri-apps/tauri/pull/7419)) Correctly copy the WebView2 runtime in development when `webviewInstallMode` is used instead of `webviewFixedRuntimePath`. + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` +- Upgraded to `tauri-codegen@1.4.1` + ## \[1.4.0] ### Enhancements diff --git a/core/tauri-build/Cargo.toml b/core/tauri-build/Cargo.toml index 8441279f1be8..cb2b800df8c8 100644 --- a/core/tauri-build/Cargo.toml +++ b/core/tauri-build/Cargo.toml @@ -29,6 +29,7 @@ json-patch = "1.0" walkdir = "2" tauri-winres = "0.1" semver = "1" +dirs-next = "2" [target."cfg(target_os = \"macos\")".dependencies] swift-rs = { version = "1.0.6", features = [ "build" ] } diff --git a/core/tauri-build/src/lib.rs b/core/tauri-build/src/lib.rs index 4fb304e52f68..a998c9d4b358 100644 --- a/core/tauri-build/src/lib.rs +++ b/core/tauri-build/src/lib.rs @@ -18,8 +18,8 @@ use cargo_toml::Manifest; use heck::AsShoutySnakeCase; use tauri_utils::{ - config::Config, - resources::{external_binaries, resource_relpath, ResourcePaths}, + config::{BundleResources, Config, WebviewInstallMode}, + resources::{external_binaries, ResourcePaths}, }; use std::{ @@ -88,11 +88,117 @@ fn copy_binaries( /// Copies resources to a path. fn copy_resources(resources: ResourcePaths<'_>, path: &Path) -> Result<()> { - for src in resources { - let src = src?; - println!("cargo:rerun-if-changed={}", src.display()); - let dest = path.join(resource_relpath(&src)); - copy_file(&src, dest)?; + for resource in resources.iter() { + let resource = resource?; + println!("cargo:rerun-if-changed={}", resource.path().display()); + copy_file(resource.path(), path.join(resource.target()))?; + } + Ok(()) +} + +#[cfg(unix)] +fn symlink_dir(src: &Path, dst: &Path) -> std::io::Result<()> { + std::os::unix::fs::symlink(src, dst) +} + +/// Makes a symbolic link to a directory. +#[cfg(windows)] +fn symlink_dir(src: &Path, dst: &Path) -> std::io::Result<()> { + std::os::windows::fs::symlink_dir(src, dst) +} + +/// Makes a symbolic link to a file. +#[cfg(unix)] +fn symlink_file(src: &Path, dst: &Path) -> std::io::Result<()> { + std::os::unix::fs::symlink(src, dst) +} + +/// Makes a symbolic link to a file. +#[cfg(windows)] +fn symlink_file(src: &Path, dst: &Path) -> std::io::Result<()> { + std::os::windows::fs::symlink_file(src, dst) +} + +fn copy_dir(from: &Path, to: &Path) -> Result<()> { + for entry in walkdir::WalkDir::new(from) { + let entry = entry?; + debug_assert!(entry.path().starts_with(from)); + let rel_path = entry.path().strip_prefix(from)?; + let dest_path = to.join(rel_path); + if entry.file_type().is_symlink() { + let target = std::fs::read_link(entry.path())?; + if entry.path().is_dir() { + symlink_dir(&target, &dest_path)?; + } else { + symlink_file(&target, &dest_path)?; + } + } else if entry.file_type().is_dir() { + std::fs::create_dir(dest_path)?; + } else { + std::fs::copy(entry.path(), dest_path)?; + } + } + Ok(()) +} + +// Copies the framework under `{src_dir}/{framework}.framework` to `{dest_dir}/{framework}.framework`. +fn copy_framework_from(src_dir: &Path, framework: &str, dest_dir: &Path) -> Result { + let src_name = format!("{}.framework", framework); + let src_path = src_dir.join(&src_name); + if src_path.exists() { + copy_dir(&src_path, &dest_dir.join(&src_name))?; + Ok(true) + } else { + Ok(false) + } +} + +// Copies the macOS application bundle frameworks to the target folder +fn copy_frameworks(dest_dir: &Path, frameworks: &[String]) -> Result<()> { + std::fs::create_dir_all(dest_dir).with_context(|| { + format!( + "Failed to create frameworks output directory at {:?}", + dest_dir + ) + })?; + for framework in frameworks.iter() { + if framework.ends_with(".framework") { + let src_path = PathBuf::from(framework); + let src_name = src_path + .file_name() + .expect("Couldn't get framework filename"); + let dest_path = dest_dir.join(src_name); + copy_dir(&src_path, &dest_path)?; + continue; + } else if framework.ends_with(".dylib") { + let src_path = PathBuf::from(framework); + if !src_path.exists() { + return Err(anyhow::anyhow!("Library not found: {}", framework)); + } + let src_name = src_path.file_name().expect("Couldn't get library filename"); + let dest_path = dest_dir.join(src_name); + copy_file(&src_path, &dest_path)?; + continue; + } else if framework.contains('/') { + return Err(anyhow::anyhow!( + "Framework path should have .framework extension: {}", + framework + )); + } + if let Some(home_dir) = dirs_next::home_dir() { + if copy_framework_from(&home_dir.join("Library/Frameworks/"), framework, dest_dir)? { + continue; + } + } + if copy_framework_from(&PathBuf::from("/Library/Frameworks/"), framework, dest_dir)? + || copy_framework_from( + &PathBuf::from("/Network/Library/Frameworks/"), + framework, + dest_dir, + )? + { + continue; + } } Ok(()) } @@ -361,17 +467,47 @@ pub fn try_build(attributes: Attributes) -> Result<()> { } #[allow(unused_mut, clippy::redundant_clone)] - let mut resources = config.tauri.bundle.resources.clone().unwrap_or_default(); + let mut resources = config + .tauri + .bundle + .resources + .clone() + .unwrap_or_else(|| BundleResources::List(Vec::new())); if target_triple.contains("windows") { if let Some(fixed_webview2_runtime_path) = - &config.tauri.bundle.windows.webview_fixed_runtime_path + match &config.tauri.bundle.windows.webview_fixed_runtime_path { + Some(path) => Some(path), + None => match &config.tauri.bundle.windows.webview_install_mode { + WebviewInstallMode::FixedRuntime { path } => Some(path), + _ => None, + }, + } { resources.push(fixed_webview2_runtime_path.display().to_string()); } } - copy_resources(ResourcePaths::new(resources.as_slice(), true), target_dir)?; + match resources { + BundleResources::List(res) => { + copy_resources(ResourcePaths::new(res.as_slice(), true), target_dir)? + } + BundleResources::Map(map) => copy_resources(ResourcePaths::from_map(&map, true), target_dir)?, + } if target_triple.contains("darwin") { + if let Some(frameworks) = &config.tauri.bundle.macos.frameworks { + if !frameworks.is_empty() { + let frameworks_dir = target_dir.parent().unwrap().join("Frameworks"); + let _ = std::fs::remove_dir_all(&frameworks_dir); + // copy frameworks to the root `target` folder (instead of `target/debug` for instance) + // because the rpath is set to `@executable_path/../Frameworks`. + copy_frameworks(&frameworks_dir, frameworks)?; + + // If we have frameworks, we need to set the @rpath + // https://github.com/tauri-apps/tauri/issues/7710 + println!("cargo:rustc-link-arg=-Wl,-rpath,@executable_path/../Frameworks"); + } + } + if let Some(version) = &config.tauri.bundle.macos.minimum_system_version { println!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET={version}"); } @@ -414,25 +550,23 @@ pub fn try_build(attributes: Attributes) -> Result<()> { res.set_version_info(VersionInfo::FILEVERSION, version); res.set_version_info(VersionInfo::PRODUCTVERSION, version); } - res.set("FileVersion", version_str); - res.set("ProductVersion", version_str); - } - if let Some(product_name) = &config.package.product_name { - res.set("ProductName", product_name); - } - if let Some(short_description) = &config.tauri.bundle.short_description { - res.set("FileDescription", short_description); - } - if let Some(copyright) = &config.tauri.bundle.copyright { - res.set("LegalCopyright", copyright); + if let Some(product_name) = &config.package.product_name { + res.set("ProductName", product_name); + } + if let Some(short_description) = &config.tauri.bundle.short_description { + res.set("FileDescription", short_description); + } + if let Some(copyright) = &config.tauri.bundle.copyright { + res.set("LegalCopyright", copyright); + } + res.set_icon_with_id(&window_icon_path.display().to_string(), "32512"); + res.compile().with_context(|| { + format!( + "failed to compile `{}` into a Windows Resource file during tauri-build", + window_icon_path.display() + ) + })?; } - res.set_icon_with_id(&window_icon_path.display().to_string(), "32512"); - res.compile().with_context(|| { - format!( - "failed to compile `{}` into a Windows Resource file during tauri-build", - window_icon_path.display() - ) - })?; } else { return Err(anyhow!(format!( "`{}` not found; required for generating a Windows Resource file during tauri-build", diff --git a/core/tauri-codegen/CHANGELOG.md b/core/tauri-codegen/CHANGELOG.md index 3ee6baa2f40e..0da51a1622de 100644 --- a/core/tauri-codegen/CHANGELOG.md +++ b/core/tauri-codegen/CHANGELOG.md @@ -72,6 +72,12 @@ - First mobile alpha release! - [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08 +## \[1.4.1] + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` + ## \[1.4.0] ### Enhancements diff --git a/core/tauri-codegen/Cargo.toml b/core/tauri-codegen/Cargo.toml index fc6bf82f18d4..2cd8bc6f0041 100644 --- a/core/tauri-codegen/Cargo.toml +++ b/core/tauri-codegen/Cargo.toml @@ -23,11 +23,12 @@ tauri-utils = { version = "2.0.0-alpha.9", path = "../tauri-utils", features = [ thiserror = "1" walkdir = "2" brotli = { version = "3", optional = true, default-features = false, features = [ "std" ] } +regex = { version = "1", optional = true } uuid = { version = "1", features = [ "v4" ] } semver = "1" ico = "0.3" png = "0.17" -json-patch = "1.0" +json-patch = "1.2" url = "2" [target."cfg(target_os = \"macos\")".dependencies] diff --git a/core/tauri-codegen/src/context.rs b/core/tauri-codegen/src/context.rs index 4d69a44310e6..7cdccab72c78 100644 --- a/core/tauri-codegen/src/context.rs +++ b/core/tauri-codegen/src/context.rs @@ -320,14 +320,11 @@ pub fn context_codegen(data: ContextData) -> Result>( let width = entry.width(); let height = entry.height(); - let out_path = out_dir.join(path.file_name().unwrap()); + let icon_file_name = path.file_name().unwrap(); + let out_path = out_dir.join(icon_file_name); write_if_changed(&out_path, &rgba).map_err(|error| EmbeddedAssetsError::AssetWrite { path: path.to_owned(), error, })?; - let out_path = out_path.display().to_string(); - - let icon = quote!(#root::Icon::Rgba { rgba: include_bytes!(#out_path).to_vec(), width: #width, height: #height }); + let icon_file_name = icon_file_name.to_str().unwrap(); + let icon = quote!(#root::Icon::Rgba { + rgba: include_bytes!(concat!(std::env!("OUT_DIR"), "/", #icon_file_name)).to_vec(), + width: #width, + height: #height + }); Ok(icon) } @@ -436,10 +437,9 @@ fn raw_icon>(out_dir: &Path, path: P) -> Result>( let width = reader.info().width; let height = reader.info().height; - let out_path = out_dir.join(path.file_name().unwrap()); + let icon_file_name = path.file_name().unwrap(); + let out_path = out_dir.join(icon_file_name); write_if_changed(&out_path, &buffer).map_err(|error| EmbeddedAssetsError::AssetWrite { path: path.to_owned(), error, })?; - let out_path = out_path.display().to_string(); - - let icon = quote!(#root::Icon::Rgba { rgba: include_bytes!(#out_path).to_vec(), width: #width, height: #height }); + let icon_file_name = icon_file_name.to_str().unwrap(); + let icon = quote!(#root::Icon::Rgba { + rgba: include_bytes!(concat!(std::env!("OUT_DIR"), "/", #icon_file_name)).to_vec(), + width: #width, + height: #height, + }); Ok(icon) } diff --git a/core/tauri-config-schema/schema.json b/core/tauri-config-schema/schema.json index 49a4a83bdd9d..a91fdf16eed6 100644 --- a/core/tauri-config-schema/schema.json +++ b/core/tauri-config-schema/schema.json @@ -934,13 +934,14 @@ }, "resources": { "description": "App resources to bundle. Each resource is a path to a file or directory. Glob patterns are supported.", - "type": [ - "array", - "null" - ], - "items": { - "type": "string" - } + "anyOf": [ + { + "$ref": "#/definitions/BundleResources" + }, + { + "type": "null" + } + ] }, "copyright": { "description": "A copyright string associated with your application.", @@ -1163,6 +1164,25 @@ } ] }, + "BundleResources": { + "description": "Definition for bundle resources. Can be either a list of paths to include or a map of source to target paths.", + "anyOf": [ + { + "description": "A list of paths to include.", + "type": "array", + "items": { + "type": "string" + } + }, + { + "description": "A map of source to target paths.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + ] + }, "FileAssociation": { "description": "File association", "type": "object", @@ -1753,6 +1773,17 @@ "description": "Whether to display a language selector dialog before the installer and uninstaller windows are rendered or not. By default the OS language is selected, with a fallback to the first language in the `languages` array.", "default": false, "type": "boolean" + }, + "compression": { + "description": "Set the compression algorithm used to compress files in the installer.\n\nSee ", + "anyOf": [ + { + "$ref": "#/definitions/NsisCompression" + }, + { + "type": "null" + } + ] } }, "additionalProperties": false @@ -1783,6 +1814,32 @@ } ] }, + "NsisCompression": { + "description": "Compression algorithms used in the NSIS installer.\n\nSee ", + "oneOf": [ + { + "description": "ZLIB uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory.", + "type": "string", + "enum": [ + "zlib" + ] + }, + { + "description": "BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory.", + "type": "string", + "enum": [ + "bzip2" + ] + }, + { + "description": "LZMA (default) is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB.", + "type": "string", + "enum": [ + "lzma" + ] + } + ] + }, "IosConfig": { "description": "General configuration for the iOS target.", "type": "object", @@ -2019,7 +2076,7 @@ } }, "plugins": { - "description": "The list of plugins that are allowed in this scope.", + "description": "The list of plugins that are allowed in this scope. The names should be without the `tauri-plugin-` prefix, for example `\"store\"` for `tauri-plugin-store`.", "default": [], "type": "array", "items": { diff --git a/core/tauri-macros/CHANGELOG.md b/core/tauri-macros/CHANGELOG.md index eded3a5c5284..8f6325e5547f 100644 --- a/core/tauri-macros/CHANGELOG.md +++ b/core/tauri-macros/CHANGELOG.md @@ -86,6 +86,13 @@ - First mobile alpha release! - [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08 +## \[1.4.1] + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` +- Upgraded to `tauri-codegen@1.4.1` + ## \[1.4.0] ### Enhancements diff --git a/core/tauri-runtime-wry/CHANGELOG.md b/core/tauri-runtime-wry/CHANGELOG.md index dc76a0250cba..c160aa96f93d 100644 --- a/core/tauri-runtime-wry/CHANGELOG.md +++ b/core/tauri-runtime-wry/CHANGELOG.md @@ -121,6 +121,21 @@ - Support `with_webview` for Android platform alowing execution of JNI code in context. - [8ea87e9c](https://www.github.com/tauri-apps/tauri/commit/8ea87e9c9ca8ba4c7017c8281f78aacd08f45785) feat(android): with_webview access for jni execution ([#5148](https://www.github.com/tauri-apps/tauri/pull/5148)) on 2022-09-08 +## \[0.14.1] + +### Enhancements + +- [`9aa34ada`](https://www.github.com/tauri-apps/tauri/commit/9aa34ada5769dbefa7dfe5f7a6288b3d20b294e4)([#7645](https://www.github.com/tauri-apps/tauri/pull/7645)) Add setting to switch to `http://.localhost/` for custom protocols on Windows. + +### Bug Fixes + +- [`4bf1e85e`](https://www.github.com/tauri-apps/tauri/commit/4bf1e85e6bf85a7ec92d50c8465bc0588a6399d8)([#7722](https://www.github.com/tauri-apps/tauri/pull/7722)) Properly respect the `focused` option when creating the webview. + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` +- Upgraded to `tauri-runtime@0.14.1` + ## \[0.14.0] ### New Features diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index 0675bfc72acc..c9eef74d8f08 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -2673,6 +2673,7 @@ fn create_webview( } let is_window_transparent = window_builder.inner.window.transparent; + let focused = window_builder.inner.window.focused; let window = window_builder.inner.build(event_loop).unwrap(); context.webview_id_map.insert(window.id(), window_id); @@ -2708,6 +2709,7 @@ fn create_webview( let mut webview_builder = WebViewBuilder::new(window) .map_err(|e| Error::CreateWebview(Box::new(e)))? + .with_focused(focused) .with_url(&url) .unwrap() // safe to unwrap because we validate the URL beforehand .with_transparent(is_window_transparent) @@ -2742,6 +2744,11 @@ fn create_webview( } } + #[cfg(windows)] + { + webview_builder = webview_builder.with_https_scheme(false); + } + if let Some(handler) = ipc_handler { webview_builder = webview_builder.with_ipc_handler(create_ipc_handler(context.clone(), label.clone(), handler)); diff --git a/core/tauri-runtime/CHANGELOG.md b/core/tauri-runtime/CHANGELOG.md index 2f6141291608..1fbf975c5307 100644 --- a/core/tauri-runtime/CHANGELOG.md +++ b/core/tauri-runtime/CHANGELOG.md @@ -110,6 +110,16 @@ - Bumped due to a bump in tauri-utils. - [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08 +## \[0.14.1] + +### Enhancements + +- [`9aa34ada`](https://www.github.com/tauri-apps/tauri/commit/9aa34ada5769dbefa7dfe5f7a6288b3d20b294e4)([#7645](https://www.github.com/tauri-apps/tauri/pull/7645)) Add setting to switch to `http://.localhost/` for custom protocols on Windows. + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` + ## \[0.14.0] ### New Features diff --git a/core/tauri-utils/CHANGELOG.md b/core/tauri-utils/CHANGELOG.md index 6b04b0be19f4..3b4e82268c0c 100644 --- a/core/tauri-utils/CHANGELOG.md +++ b/core/tauri-utils/CHANGELOG.md @@ -90,6 +90,24 @@ - First mobile alpha release! - [fa3a1098](https://www.github.com/tauri-apps/tauri/commit/fa3a10988a03aed1b66fb17d893b1a9adb90f7cd) feat(ci): prepare 2.0.0-alpha.0 ([#5786](https://www.github.com/tauri-apps/tauri/pull/5786)) on 2022-12-08 +## \[1.5.0] + +### New Features + +- [`4dd4893d`](https://www.github.com/tauri-apps/tauri/commit/4dd4893d7d166ac3a3b6dc2e3bd2540326352a78)([#5950](https://www.github.com/tauri-apps/tauri/pull/5950)) Allow specifying resources as a map specifying source and target paths. + +### Enhancements + +- [`9aa34ada`](https://www.github.com/tauri-apps/tauri/commit/9aa34ada5769dbefa7dfe5f7a6288b3d20b294e4)([#7645](https://www.github.com/tauri-apps/tauri/pull/7645)) Add setting to switch to `http://.localhost/` for custom protocols on Windows. + +### Bug Fixes + +- [`a6b52e44`](https://www.github.com/tauri-apps/tauri/commit/a6b52e44f22844009e273fb0250368d7a463f095)([#6519](https://www.github.com/tauri-apps/tauri/pull/6519)) Fix `io::read_line` not including the new line character `\n`. + +### Security fixes + +- [`eeff1784`](https://www.github.com/tauri-apps/tauri/commit/eeff1784e1ffa568e4ba024e17dd611f8e086784)([#7367](https://www.github.com/tauri-apps/tauri/pull/7367)) Changed HTML implementation from unmaintained `kuchiki` to `kuchikiki`. + ## \[1.4.0] ### New Features diff --git a/core/tauri-utils/Cargo.toml b/core/tauri-utils/Cargo.toml index a0a8e9bec21f..33fa8f21e80e 100644 --- a/core/tauri-utils/Cargo.toml +++ b/core/tauri-utils/Cargo.toml @@ -30,8 +30,8 @@ getrandom = { version = "0.2", optional = true, features = [ "std" ] } serialize-to-javascript = { version = "=0.1.1", optional = true } ctor = "0.2" json5 = { version = "0.4", optional = true } -toml = { version = "0.7", optional = true } -json-patch = "1.0" +toml = { version = "0.8", optional = true } +json-patch = "1.2" glob = { version = "0.3", optional = true } walkdir = { version = "2", optional = true } memchr = "2" @@ -44,7 +44,7 @@ log = "0.4.20" heck = "0.4" [target."cfg(windows)".dependencies.windows] -version = "0.51.0" +version = "0.51.1" features = [ "implement", "Win32_Foundation", diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 5ad76f6e80fe..88d18529ffe5 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -438,6 +438,21 @@ pub struct WixConfig { pub dialog_image_path: Option, } +/// Compression algorithms used in the NSIS installer. +/// +/// See +#[derive(Debug, PartialEq, Eq, Clone, Copy, Serialize, Deserialize)] +#[cfg_attr(feature = "schema", derive(JsonSchema))] +#[serde(rename_all = "camelCase", deny_unknown_fields)] +pub enum NsisCompression { + /// ZLIB uses the deflate algorithm, it is a quick and simple method. With the default compression level it uses about 300 KB of memory. + Zlib, + /// BZIP2 usually gives better compression ratios than ZLIB, but it is a bit slower and uses more memory. With the default compression level it uses about 4 MB of memory. + Bzip2, + /// LZMA (default) is a new compression method that gives very good compression ratios. The decompression speed is high (10-20 MB/s on a 2 GHz CPU), the compression speed is lower. The memory size that will be used for decompression is the dictionary size plus a few KBs, the default is 8 MB. + Lzma, +} + /// Configuration for the Installer bundle using NSIS. #[derive(Debug, Default, PartialEq, Eq, Clone, Deserialize, Serialize)] #[cfg_attr(feature = "schema", derive(JsonSchema))] @@ -480,6 +495,10 @@ pub struct NsisConfig { /// By default the OS language is selected, with a fallback to the first language in the `languages` array. #[serde(default, alias = "display-language-selector")] pub display_language_selector: bool, + /// Set the compression algorithm used to compress files in the installer. + /// + /// See + pub compression: Option, } /// Install Modes for the NSIS installer. @@ -755,6 +774,31 @@ impl Default for UpdaterConfig { } } +/// Definition for bundle resources. +/// Can be either a list of paths to include or a map of source to target paths. +#[derive(Debug, PartialEq, Eq, Clone, Deserialize, Serialize)] +#[cfg_attr(feature = "schema", derive(JsonSchema))] +#[serde(rename_all = "camelCase", deny_unknown_fields, untagged)] +pub enum BundleResources { + /// A list of paths to include. + List(Vec), + /// A map of source to target paths. + Map(HashMap), +} + +impl BundleResources { + /// Adds a path to the resource collection. + pub fn push(&mut self, path: impl Into) { + match self { + Self::List(l) => l.push(path.into()), + Self::Map(l) => { + let path = path.into(); + l.insert(path.clone(), path); + } + } + } +} + /// Configuration for tauri-bundler. /// /// See more: @@ -784,7 +828,7 @@ pub struct BundleConfig { /// App resources to bundle. /// Each resource is a path to a file or directory. /// Glob patterns are supported. - pub resources: Option>, + pub resources: Option, /// A copyright string associated with your application. pub copyright: Option, /// The application kind. @@ -1249,6 +1293,7 @@ pub struct RemoteDomainAccessScope { /// The list of window labels this scope applies to. pub windows: Vec, /// The list of plugins that are allowed in this scope. + /// The names should be without the `tauri-plugin-` prefix, for example `"store"` for `tauri-plugin-store`. #[serde(default)] pub plugins: Vec, } diff --git a/core/tauri-utils/src/io.rs b/core/tauri-utils/src/io.rs index 85d1e6da8402..9dc699fa6b5c 100644 --- a/core/tauri-utils/src/io.rs +++ b/core/tauri-utils/src/io.rs @@ -6,7 +6,7 @@ use std::io::BufRead; -/// Read a line breaking in both \n and \r. +/// Read all bytes until a newline (the `0xA` byte) or a carriage return (`\r`) is reached, and append them to the provided buffer. /// /// Adapted from . pub fn read_line(r: &mut R, buf: &mut Vec) -> std::io::Result { @@ -16,6 +16,7 @@ pub fn read_line(r: &mut R, buf: &mut Vec) -> std::io:: let available = match r.fill_buf() { Ok(n) => n, Err(ref e) if e.kind() == std::io::ErrorKind::Interrupted => continue, + Err(e) => return Err(e), }; match memchr::memchr(b'\n', available) { @@ -40,9 +41,6 @@ pub fn read_line(r: &mut R, buf: &mut Vec) -> std::io:: r.consume(used); read += used; if done || used == 0 { - if buf.ends_with(&[b'\n']) { - buf.pop(); - } return Ok(read); } } diff --git a/core/tauri-utils/src/resources.rs b/core/tauri-utils/src/resources.rs index cad7ae0dbb8b..fb62a64dcc4d 100644 --- a/core/tauri-utils/src/resources.rs +++ b/core/tauri-utils/src/resources.rs @@ -2,7 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use std::path::{Component, Path, PathBuf}; +use std::{ + collections::HashMap, + path::{Component, Path, PathBuf}, +}; /// Given a path (absolute or relative) to a resource file, returns the /// relative path from the bundle resources directory where that resource @@ -39,10 +42,58 @@ pub fn external_binaries(external_binaries: &[String], target_triple: &str) -> V paths } +enum PatternIter<'a> { + Slice(std::slice::Iter<'a, String>), + Map(std::collections::hash_map::Iter<'a, String, String>), +} + /// A helper to iterate through resources. pub struct ResourcePaths<'a> { + iter: ResourcePathsIter<'a>, +} + +impl<'a> ResourcePaths<'a> { + /// Creates a new ResourcePaths from a slice of patterns to iterate + pub fn new(patterns: &'a [String], allow_walk: bool) -> ResourcePaths<'a> { + ResourcePaths { + iter: ResourcePathsIter { + pattern_iter: PatternIter::Slice(patterns.iter()), + glob_iter: None, + walk_iter: None, + allow_walk, + current_pattern: None, + current_pattern_is_valid: false, + current_dest: None, + }, + } + } + + /// Creates a new ResourcePaths from a slice of patterns to iterate + pub fn from_map(patterns: &'a HashMap, allow_walk: bool) -> ResourcePaths<'a> { + ResourcePaths { + iter: ResourcePathsIter { + pattern_iter: PatternIter::Map(patterns.iter()), + glob_iter: None, + walk_iter: None, + allow_walk, + current_pattern: None, + current_pattern_is_valid: false, + current_dest: None, + }, + } + } + + /// Returns the resource iterator that yields the source and target paths. + /// Needed when using [`Self::from_map`]. + pub fn iter(self) -> ResourcePathsIter<'a> { + self.iter + } +} + +/// Iterator of a [`ResourcePaths`]. +pub struct ResourcePathsIter<'a> { /// the patterns to iterate. - pattern_iter: std::slice::Iter<'a, String>, + pattern_iter: PatternIter<'a>, /// the glob iterator if the path from the current iteration is a glob pattern. glob_iter: Option, /// the walkdir iterator if the path from the current iteration is a directory. @@ -50,22 +101,28 @@ pub struct ResourcePaths<'a> { /// whether the resource paths allows directories or not. allow_walk: bool, /// the pattern of the current iteration. - current_pattern: Option, + current_pattern: Option<(String, PathBuf)>, /// whether the current pattern is valid or not. current_pattern_is_valid: bool, + /// Current destination path. Only set when the iterator comes from a Map. + current_dest: Option, } -impl<'a> ResourcePaths<'a> { - /// Creates a new ResourcePaths from a slice of patterns to iterate - pub fn new(patterns: &'a [String], allow_walk: bool) -> ResourcePaths<'a> { - ResourcePaths { - pattern_iter: patterns.iter(), - glob_iter: None, - walk_iter: None, - allow_walk, - current_pattern: None, - current_pattern_is_valid: false, - } +/// Information for a resource. +pub struct Resource { + path: PathBuf, + target: PathBuf, +} + +impl Resource { + /// The path of the resource. + pub fn path(&self) -> &Path { + &self.path + } + + /// The target location of the resource. + pub fn target(&self) -> &Path { + &self.target } } @@ -73,6 +130,28 @@ impl<'a> Iterator for ResourcePaths<'a> { type Item = crate::Result; fn next(&mut self) -> Option> { + self.iter.next().map(|r| r.map(|res| res.path)) + } +} + +fn normalize(path: &Path) -> PathBuf { + let mut dest = PathBuf::new(); + for component in path.components() { + match component { + Component::Prefix(_) => {} + Component::RootDir => dest.push("/"), + Component::CurDir => {} + Component::ParentDir => dest.push(".."), + Component::Normal(string) => dest.push(string), + } + } + dest +} + +impl<'a> Iterator for ResourcePathsIter<'a> { + type Item = crate::Result; + + fn next(&mut self) -> Option> { loop { if let Some(ref mut walk_entries) = self.walk_iter { if let Some(entry) = walk_entries.next() { @@ -85,7 +164,20 @@ impl<'a> Iterator for ResourcePaths<'a> { continue; } self.current_pattern_is_valid = true; - return Some(Ok(path.to_path_buf())); + return Some(Ok(Resource { + target: if let (Some(current_dest), Some(current_pattern)) = + (&self.current_dest, &self.current_pattern) + { + if current_pattern.0.contains('*') { + current_dest.join(path.file_name().unwrap()) + } else { + current_dest.join(path.strip_prefix(¤t_pattern.1).unwrap()) + } + } else { + resource_relpath(path) + }, + path: path.to_path_buf(), + })); } } self.walk_iter = None; @@ -105,24 +197,51 @@ impl<'a> Iterator for ResourcePaths<'a> { } } self.current_pattern_is_valid = true; - return Some(Ok(path)); + return Some(Ok(Resource { + target: if let Some(current_dest) = &self.current_dest { + current_dest.join(path.file_name().unwrap()) + } else { + resource_relpath(&path) + }, + path, + })); } else if let Some(current_path) = &self.current_pattern { if !self.current_pattern_is_valid { self.glob_iter = None; - return Some(Err(crate::Error::GlobPathNotFound(current_path.clone()))); + return Some(Err(crate::Error::GlobPathNotFound(current_path.0.clone()))); } } } self.glob_iter = None; - if let Some(pattern) = self.pattern_iter.next() { - self.current_pattern = Some(pattern.to_string()); - self.current_pattern_is_valid = false; - let glob = match glob::glob(pattern) { - Ok(glob) => glob, - Err(error) => return Some(Err(error.into())), - }; - self.glob_iter = Some(glob); - continue; + self.current_dest = None; + match &mut self.pattern_iter { + PatternIter::Slice(iter) => { + if let Some(pattern) = iter.next() { + self.current_pattern = Some((pattern.to_string(), normalize(Path::new(pattern)))); + self.current_pattern_is_valid = false; + let glob = match glob::glob(pattern) { + Ok(glob) => glob, + Err(error) => return Some(Err(error.into())), + }; + self.glob_iter = Some(glob); + continue; + } + } + PatternIter::Map(iter) => { + if let Some((pattern, dest)) = iter.next() { + self.current_pattern = Some((pattern.to_string(), normalize(Path::new(pattern)))); + self.current_pattern_is_valid = false; + let glob = match glob::glob(pattern) { + Ok(glob) => glob, + Err(error) => return Some(Err(error.into())), + }; + self + .current_dest + .replace(resource_relpath(&PathBuf::from(dest))); + self.glob_iter = Some(glob); + continue; + } + } } return None; } diff --git a/core/tauri/CHANGELOG.md b/core/tauri/CHANGELOG.md index 378257203b60..48d54d7b9582 100644 --- a/core/tauri/CHANGELOG.md +++ b/core/tauri/CHANGELOG.md @@ -339,6 +339,50 @@ - Export types required by the `mobile_entry_point` macro. - [98904863](https://www.github.com/tauri-apps/tauri/commit/9890486321c9c79ccfb7c547fafee85b5c3ffa71) feat(core): add `mobile_entry_point` macro ([#4983](https://www.github.com/tauri-apps/tauri/pull/4983)) on 2022-08-21 +## \[1.5.2] + +### Bug Fixes + +- [`21cdbb41`](https://www.github.com/tauri-apps/tauri/commit/21cdbb41a38f465148bbeb82feb3e7886c320182)([#7982](https://www.github.com/tauri-apps/tauri/pull/7982)) Set the correct `truncate` option on `OpenOptions` so that `write_file` can completely overwrite existing files. + +## \[1.5.1] + +### Bug Fixes + +- [`3671edbc`](https://www.github.com/tauri-apps/tauri/commit/3671edbcff37447c95382ab4c9fd1c36a460a037)([#7937](https://www.github.com/tauri-apps/tauri/pull/7937)) Fix devtools not toggling on `ctrl+shift+i` or `cmd+alt+i` shortcuts. + +## \[1.5.0] + +### New Features + +- [`eeb6be54`](https://www.github.com/tauri-apps/tauri/commit/eeb6be54228f3e5463a28c68956abb06a694c010)([#7512](https://www.github.com/tauri-apps/tauri/pull/7512)) Add `tauri::Manager::emit_filter` and only serialize once when emitting to multiple windows. +- [`6c408b73`](https://www.github.com/tauri-apps/tauri/commit/6c408b736c7aa2a0a91f0a40d45a2b7a7dedfe78)([#7269](https://www.github.com/tauri-apps/tauri/pull/7269)) Add option to specify notification sound. +- [`fdaee9a5`](https://www.github.com/tauri-apps/tauri/commit/fdaee9a5ce988c448dd035c2050c339d275e8d15)([#7350](https://www.github.com/tauri-apps/tauri/pull/7350)) Add `tauri::plugin::Builder::register_uri_scheme_protocol` +- [`10e362d0`](https://www.github.com/tauri-apps/tauri/commit/10e362d098c9bed48f832bad471fb2fab83ab0bb)([#7432](https://www.github.com/tauri-apps/tauri/pull/7432)) Added `UpdateBuilder::endpoints` to add request endpoints at runtime. +- [`10e362d0`](https://www.github.com/tauri-apps/tauri/commit/10e362d098c9bed48f832bad471fb2fab83ab0bb)([#7432](https://www.github.com/tauri-apps/tauri/pull/7432)) Added `UpdateResponse::header` and `UpdateResponse::remove_header` to modify the update download request headers. + +### Enhancements + +- [`757e959e`](https://www.github.com/tauri-apps/tauri/commit/757e959eb276ed535cfddb0dea8897c56441c644)([#7344](https://www.github.com/tauri-apps/tauri/pull/7344)) Open links externally when `` exists +- [`c9827338`](https://www.github.com/tauri-apps/tauri/commit/c98273387c0ffbb8d0de78ce17006411a1f503ee)([#7416](https://www.github.com/tauri-apps/tauri/pull/7416)) Enhance `readDir` API error with path information. +- [`58d6b899`](https://www.github.com/tauri-apps/tauri/commit/58d6b899e21d37bb42810890d289deb57f2273bd)([#7636](https://www.github.com/tauri-apps/tauri/pull/7636)) Add `append` option to `FsOptions` in the `fs` JS module, used in `writeTextFile` and `writeBinaryFile`, to be able to append to existing files instead of overwriting it. +- [`9aa34ada`](https://www.github.com/tauri-apps/tauri/commit/9aa34ada5769dbefa7dfe5f7a6288b3d20b294e4)([#7645](https://www.github.com/tauri-apps/tauri/pull/7645)) Add setting to switch to `http://.localhost/` for custom protocols on Windows. + +### Bug Fixes + +- [`4bf1e85e`](https://www.github.com/tauri-apps/tauri/commit/4bf1e85e6bf85a7ec92d50c8465bc0588a6399d8)([#7722](https://www.github.com/tauri-apps/tauri/pull/7722)) Properly respect the `focused` option when creating the webview. +- [`0797a002`](https://www.github.com/tauri-apps/tauri/commit/0797a002caad29cd8bedccf01f64bf3b45a5e528)([#7746](https://www.github.com/tauri-apps/tauri/pull/7746)) On macOS, fixed tapping on custom title bar doesn't maximize the window. +- [`1a3dcdb8`](https://www.github.com/tauri-apps/tauri/commit/1a3dcdb8302fad511f2c1cd418fbc4cff0bd62ac)([#7185](https://www.github.com/tauri-apps/tauri/pull/7185)) On Windows, fix NSIS installers requiring administrator rights failing to be launched by updater. +- [`fa7f9b77`](https://www.github.com/tauri-apps/tauri/commit/fa7f9b77ab8f0c890e9d7b120901610e0d3e4c46)([#7341](https://www.github.com/tauri-apps/tauri/pull/7341)) Fix updater not following endpoint redirects. +- [`6fbd6dba`](https://www.github.com/tauri-apps/tauri/commit/6fbd6dba5290dc017ab0ba5a44cf4358b022836f)([#17](https://www.github.com/tauri-apps/tauri/pull/17)) Fix the validation of `std::env::current_exe` warn the user if AppImage is not mounted instead of panicking + +### Dependencies + +- Upgraded to `tauri-utils@1.5.0` +- Upgraded to `tauri-runtime-wry@0.14.1` +- Upgraded to `tauri-runtime@0.14.1` +- Upgraded to `tauri-macros@1.4.1` + ## \[1.4.1] ### Bug Fixes diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 69ae6388fa1f..6bee84a33fe6 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -71,7 +71,6 @@ infer = { version = "0.15", optional = true } png = { version = "0.17", optional = true } ico = { version = "0.3.0", optional = true } http-range = { version = "0.1.4", optional = true } -window-vibrancy = "0.4" [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"windows\", target_os = \"macos\"))".dependencies] muda = { version = "0.8", default-features = false } @@ -86,9 +85,11 @@ webkit2gtk = { version = "1.1", features = [ "v2_38" ] } embed_plist = "1.2" cocoa = "0.25" objc = "0.2" +window-vibrancy = "0.4" [target."cfg(windows)".dependencies] webview2-com = "0.25" +window-vibrancy = "0.4" [target."cfg(windows)".dependencies.windows] version = "0.48" diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index b80f11744fe9..2c953f5aa35f 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -1393,6 +1393,11 @@ impl Builder { /// Similar to [`Self::register_uri_scheme_protocol`] but with an asynchronous responder that allows you /// to process the request in a separate thread and respond asynchronously. /// + /// # Arguments + /// + /// * `uri_scheme` The URI scheme to register, such as `example`. + /// * `protocol` the protocol associated with the given URI scheme. It's a function that takes an URL such as `example://localhost/asset.css`. + /// /// # Examples /// ``` /// tauri::Builder::default() @@ -1485,6 +1490,7 @@ impl Builder { for config in manager.config().tauri.windows.clone() { let label = config.label.clone(); let webview_attributes = WebviewAttributes::from(&config); + self.pending_windows.push(PendingWindow::with_config( config, webview_attributes, diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 53a43ed8bfa4..61a6b2fe662e 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -546,7 +546,7 @@ pub trait Manager: sealed::ManagerBase { self.manager().package_info() } - /// Emits a event to all windows. + /// Emits an event to all windows. /// /// Only the webviews receives this event. /// To trigger Rust listeners, use [`Self::trigger_global`], [`Window::trigger`] or [`Window::emit_and_trigger`]. @@ -565,6 +565,26 @@ pub trait Manager: sealed::ManagerBase { self.manager().emit_filter(event, None, payload, |_| true) } + /// Emits an event to windows matching the filter critera. + /// + /// # Examples + /// ``` + /// use tauri::Manager; + /// + /// #[tauri::command] + /// fn synchronize(app: tauri::AppHandle) { + /// // emits the synchronized event to all windows + /// app.emit_filter("synchronized", (), |w| w.label().starts_with("foo-")); + /// } + /// ``` + fn emit_filter(&self, event: &str, payload: S, filter: F) -> Result<()> + where + S: Serialize + Clone, + F: Fn(&Window) -> bool, + { + self.manager().emit_filter(event, None, payload, filter) + } + /// Emits an event to the window with the specified label. /// /// # Examples diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index 6aaec208d4ba..358d541e9625 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -27,6 +27,7 @@ use tauri_utils::{ html::{SCRIPT_NONCE_TOKEN, STYLE_NONCE_TOKEN}, }; +use crate::window::WindowEmitArgs; use crate::{ app::{ AppHandle, GlobalWindowEvent, GlobalWindowEventListener, OnPageLoad, PageLoadPayload, @@ -242,7 +243,7 @@ pub struct InnerWindowManager { package_info: PackageInfo, /// The webview protocols available to all windows. - uri_scheme_protocols: HashMap>>, + uri_scheme_protocols: Mutex>>>, /// A set containing a reference to the active menus, including /// the app-wide menu and the window-specific menus /// @@ -370,7 +371,7 @@ impl WindowManager { tray_icon: context.tray_icon, package_info: context.package_info, pattern: context.pattern, - uri_scheme_protocols, + uri_scheme_protocols: Mutex::new(uri_scheme_protocols), #[cfg(desktop)] menus: Default::default(), #[cfg(desktop)] @@ -488,6 +489,20 @@ impl WindowManager { self.inner.invoke_responder.clone() } + pub(crate) fn register_uri_scheme_protocol>( + &self, + uri_scheme: N, + protocol: Arc>, + ) { + let uri_scheme = uri_scheme.into(); + self + .inner + .uri_scheme_protocols + .lock() + .unwrap() + .insert(uri_scheme, protocol); + } + /// Get the base path to serve data from. /// /// * In dev mode, this will be based on the `devPath` configuration value. @@ -555,6 +570,8 @@ impl WindowManager { } .render_default(&Default::default())?; + let mut webview_attributes = pending.webview_attributes; + let ipc_init = IpcJavascript { isolation_origin: &match self.pattern() { #[cfg(feature = "isolation")] @@ -564,8 +581,6 @@ impl WindowManager { } .render_default(&Default::default())?; - let mut webview_attributes = pending.webview_attributes; - let mut window_labels = window_labels.to_vec(); let l = label.to_string(); if !window_labels.contains(&l) { @@ -619,7 +634,7 @@ impl WindowManager { let mut registered_scheme_protocols = Vec::new(); - for (uri_scheme, protocol) in &self.inner.uri_scheme_protocols { + for (uri_scheme, protocol) in &*self.inner.uri_scheme_protocols.lock().unwrap() { registered_scheme_protocols.push(uri_scheme.clone()); let protocol = protocol.clone(); let app_handle = Mutex::new(app_handle.clone()); @@ -957,8 +972,8 @@ impl WindowManager { let html = String::from_utf8_lossy(&body).into_owned(); // naive way to check if it's an html if html.contains('<') && html.contains('>') { - let mut document = tauri_utils::html::parse(html); - tauri_utils::html::inject_csp(&mut document, &csp.to_string()); + let document = tauri_utils::html::parse(html); + tauri_utils::html::inject_csp(&document, &csp.to_string()); url.set_path(&format!("{},{}", mime::TEXT_HTML, document.to_string())); } } @@ -1142,12 +1157,13 @@ impl WindowManager { S: Serialize + Clone, F: Fn(&Window) -> bool, { + let emit_args = WindowEmitArgs::from(event, source_window_label, payload)?; assert_event_name_is_valid(event); self - .windows_lock() + .windows() .values() .filter(|&w| filter(w)) - .try_for_each(|window| window.emit_internal(event, source_window_label, payload.clone())) + .try_for_each(|window| window.emit_internal(&emit_args)) } pub fn eval_script_all>(&self, script: S) -> crate::Result<()> { @@ -1195,6 +1211,14 @@ impl WindowManager { self.listeners().once(event, window, handler) } + pub fn event_listeners_object_name(&self) -> &str { + self.inner.listeners.listeners_object_name() + } + + pub fn event_emit_function_name(&self) -> &str { + self.inner.listeners.function_name() + } + pub fn unlisten(&self, id: EventId) { self.listeners().unlisten(id) } diff --git a/core/tauri/src/plugin.rs b/core/tauri/src/plugin.rs index 3a0ba77358e3..9f6a14260fd1 100644 --- a/core/tauri/src/plugin.rs +++ b/core/tauri/src/plugin.rs @@ -5,9 +5,10 @@ //! The Tauri plugin extension to expand Tauri functionality. use crate::{ - app::PageLoadPayload, + app::{PageLoadPayload, UriSchemeResponder}, error::Error, ipc::{Invoke, InvokeHandler}, + manager::UriSchemeProtocol, utils::config::PluginConfig, AppHandle, RunEvent, Runtime, Window, }; @@ -16,7 +17,7 @@ use serde_json::Value as JsonValue; use tauri_macros::default_runtime; use url::Url; -use std::{fmt, sync::Arc}; +use std::{borrow::Cow, collections::HashMap, fmt, sync::Arc}; /// Mobile APIs. #[cfg(mobile)] @@ -210,6 +211,7 @@ pub struct Builder { on_webview_ready: Box>, on_event: Box>, on_drop: Option>>, + uri_scheme_protocols: HashMap>>, } impl Builder { @@ -225,6 +227,7 @@ impl Builder { on_webview_ready: Box::new(|_| ()), on_event: Box::new(|_, _| ()), on_drop: None, + uri_scheme_protocols: Default::default(), } } @@ -460,6 +463,111 @@ impl Builder { self } + /// Registers a URI scheme protocol available to all webviews. + /// Leverages [setURLSchemeHandler](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/2875766-seturlschemehandler) on macOS, + /// [AddWebResourceRequestedFilter](https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.addwebresourcerequestedfilter?view=webview2-dotnet-1.0.774.44) on Windows + /// and [webkit-web-context-register-uri-scheme](https://webkitgtk.org/reference/webkit2gtk/stable/WebKitWebContext.html#webkit-web-context-register-uri-scheme) on Linux. + /// + /// # Known limitations + /// + /// URI scheme protocols are registered when the webview is created. Due to this limitation, if the plugin is registed after a webview has been created, this protocol won't be available. + /// + /// # Arguments + /// + /// * `uri_scheme` The URI scheme to register, such as `example`. + /// * `protocol` the protocol associated with the given URI scheme. It's a function that takes an URL such as `example://localhost/asset.css`. + /// + /// # Examples + /// + /// ```rust + /// use tauri::{plugin::{Builder, TauriPlugin}, Runtime}; + /// + /// fn init() -> TauriPlugin { + /// Builder::new("myplugin") + /// .register_uri_scheme_protocol("myscheme", |app, req| { + /// http::Response::builder().body(Vec::new()).unwrap() + /// }) + /// .build() + /// } + /// ``` + #[must_use] + pub fn register_uri_scheme_protocol< + N: Into, + T: Into>, + H: Fn(&AppHandle, http::Request>) -> http::Response + Send + Sync + 'static, + >( + mut self, + uri_scheme: N, + protocol: H, + ) -> Self { + self.uri_scheme_protocols.insert( + uri_scheme.into(), + Arc::new(UriSchemeProtocol { + protocol: Box::new(move |app, request, responder| { + responder.respond(protocol(app, request)) + }), + }), + ); + self + } + + /// Similar to [`Self::register_uri_scheme_protocol`] but with an asynchronous responder that allows you + /// to process the request in a separate thread and respond asynchronously. + /// + /// # Arguments + /// + /// * `uri_scheme` The URI scheme to register, such as `example`. + /// * `protocol` the protocol associated with the given URI scheme. It's a function that takes an URL such as `example://localhost/asset.css`. + /// + /// # Examples + /// + /// ```rust + /// use tauri::{plugin::{Builder, TauriPlugin}, Runtime}; + /// + /// fn init() -> TauriPlugin { + /// Builder::new("myplugin") + /// .register_asynchronous_uri_scheme_protocol("app-files", |_app, request, responder| { + /// // skip leading `/` + /// let path = request.uri().path()[1..].to_string(); + /// std::thread::spawn(move || { + /// if let Ok(data) = std::fs::read(path) { + /// responder.respond( + /// http::Response::builder() + /// .body(data) + /// .unwrap() + /// ); + /// } else { + /// responder.respond( + /// http::Response::builder() + /// .status(http::StatusCode::BAD_REQUEST) + /// .header(http::header::CONTENT_TYPE, mime::TEXT_PLAIN.essence_str()) + /// .body("failed to read file".as_bytes().to_vec()) + /// .unwrap() + /// ); + /// } + /// }); + /// }) + /// .build() + /// } + /// ``` + #[must_use] + pub fn register_asynchronous_uri_scheme_protocol< + N: Into, + H: Fn(&AppHandle, http::Request>, UriSchemeResponder) + Send + Sync + 'static, + >( + mut self, + uri_scheme: N, + protocol: H, + ) -> Self { + self.uri_scheme_protocols.insert( + uri_scheme.into(), + Arc::new(UriSchemeProtocol { + protocol: Box::new(protocol), + }), + ); + self + } + /// Builds the [TauriPlugin]. pub fn build(self) -> TauriPlugin { TauriPlugin { @@ -473,6 +581,7 @@ impl Builder { on_webview_ready: self.on_webview_ready, on_event: self.on_event, on_drop: self.on_drop, + uri_scheme_protocols: self.uri_scheme_protocols, } } } @@ -489,6 +598,7 @@ pub struct TauriPlugin { on_webview_ready: Box>, on_event: Box>, on_drop: Option>>, + uri_scheme_protocols: HashMap>>, } impl Drop for TauriPlugin { @@ -521,6 +631,12 @@ impl Plugin for TauriPlugin { }, )?; } + + for (uri_scheme, protocol) in &self.uri_scheme_protocols { + app + .manager + .register_uri_scheme_protocol(uri_scheme, protocol.clone()) + } Ok(()) } diff --git a/core/tauri/src/plugin/mobile.rs b/core/tauri/src/plugin/mobile.rs index 071eaa7a96e3..15f49aa79e02 100644 --- a/core/tauri/src/plugin/mobile.rs +++ b/core/tauri/src/plugin/mobile.rs @@ -346,12 +346,19 @@ pub(crate) fn run_command, F: FnOnce(PluginResponse) + .unwrap() .remove(&id) { - let payload = serde_json::from_str(payload.to_str().unwrap()).unwrap(); - handler(if success == 1 { - Ok(payload) - } else { - Err(payload) - }); + let json = payload.to_str().unwrap(); + match serde_json::from_str(json) { + Ok(payload) => { + handler(if success == 1 { + Ok(payload) + } else { + Err(payload) + }); + } + Err(err) => { + handler(Err(format!("{err}, data: {}", json).into())); + } + } } } diff --git a/core/tauri/src/window/mod.rs b/core/tauri/src/window/mod.rs index 74ac435ee708..bcc39f0d962c 100644 --- a/core/tauri/src/window/mod.rs +++ b/core/tauri/src/window/mod.rs @@ -71,6 +71,26 @@ struct WindowCreatedEvent { label: String, } +pub(crate) struct WindowEmitArgs { + pub event: String, + pub source_window_label: String, + pub payload: String, +} + +impl WindowEmitArgs { + pub fn from( + event: &str, + source_window_label: Option<&str>, + payload: S, + ) -> crate::Result { + Ok(WindowEmitArgs { + event: serde_json::to_string(event)?, + source_window_label: serde_json::to_string(&source_window_label)?, + payload: serde_json::to_string(&payload)?, + }) + } +} + /// Monitor descriptor. #[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] @@ -2453,18 +2473,13 @@ impl Window { self.emit(event, payload) } - pub(crate) fn emit_internal( - &self, - event: &str, - source_window_label: Option<&str>, - payload: S, - ) -> crate::Result<()> { + pub(crate) fn emit_internal(&self, emit_args: &WindowEmitArgs) -> crate::Result<()> { self.eval(&format!( "(function () {{ const fn = window['{}']; fn && fn({{event: {}, windowLabel: {}, payload: {}}}) }})()", - self.manager.listeners().function_name(), - serde_json::to_string(event)?, - serde_json::to_string(&source_window_label)?, - serde_json::to_value(payload)?, + self.manager.event_emit_function_name(), + emit_args.event, + emit_args.source_window_label, + emit_args.payload ))?; Ok(()) } diff --git a/core/tauri/src/window/plugin.rs b/core/tauri/src/window/plugin.rs index 705f083e5b9e..1d295addd2b0 100644 --- a/core/tauri/src/window/plugin.rs +++ b/core/tauri/src/window/plugin.rs @@ -314,13 +314,12 @@ pub fn init() -> TauriPlugin { #[cfg(any(debug_assertions, feature = "devtools"))] desktop_commands::internal_toggle_devtools, ]); - #[allow(clippy::needless_return)] - return handler(invoke); + handler(invoke) } #[cfg(mobile)] { invoke.resolver.reject("Window API not available on mobile"); - return true; + true } }) .build() diff --git a/core/tests/app-updater/frameworks/test.framework/Headers b/core/tests/app-updater/frameworks/test.framework/Headers new file mode 120000 index 000000000000..a177d2a6b926 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Headers @@ -0,0 +1 @@ +Versions/Current/Headers \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Modules b/core/tests/app-updater/frameworks/test.framework/Modules new file mode 120000 index 000000000000..5736f3186e79 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Modules @@ -0,0 +1 @@ +Versions/Current/Modules \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Resources b/core/tests/app-updater/frameworks/test.framework/Resources new file mode 120000 index 000000000000..953ee36f3bb7 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Resources @@ -0,0 +1 @@ +Versions/Current/Resources \ No newline at end of file diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/Headers/test.h b/core/tests/app-updater/frameworks/test.framework/Versions/A/Headers/test.h new file mode 100644 index 000000000000..3539143d0dd8 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Versions/A/Headers/test.h @@ -0,0 +1,18 @@ +// +// test.h +// test +// +// Created by Trey Smith on 9/15/23. +// + +#import + +//! Project version number for test. +FOUNDATION_EXPORT double testVersionNumber; + +//! Project version string for test. +FOUNDATION_EXPORT const unsigned char testVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/Modules/module.modulemap b/core/tests/app-updater/frameworks/test.framework/Versions/A/Modules/module.modulemap new file mode 100644 index 000000000000..f1545257a73d --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Versions/A/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module test { + umbrella header "test.h" + + export * + module * { export * } +} diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/Info.plist b/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/Info.plist new file mode 100644 index 000000000000..6f736f0a2b46 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Versions/A/Resources/Info.plist @@ -0,0 +1,46 @@ + + + + + BuildMachineOSBuild + 22D68 + CFBundleDevelopmentRegion + en + CFBundleExecutable + test + CFBundleIdentifier + com.tauri.test + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + test + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSupportedPlatforms + + MacOSX + + CFBundleVersion + 1 + DTCompiler + com.apple.compilers.llvm.clang.1_0 + DTPlatformBuild + + DTPlatformName + macosx + DTPlatformVersion + 13.3 + DTSDKBuild + 22E245 + DTSDKName + macosx13.3 + DTXcode + 1431 + DTXcodeBuild + 14E300c + LSMinimumSystemVersion + 13.2 + + diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/_CodeSignature/CodeResources b/core/tests/app-updater/frameworks/test.framework/Versions/A/_CodeSignature/CodeResources new file mode 100644 index 000000000000..82d2063275e6 --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Versions/A/_CodeSignature/CodeResources @@ -0,0 +1,142 @@ + + + + + files + + Resources/Info.plist + + /aPV7Q20g0elr7OiZJoUNggTOcg= + + + files2 + + Headers/test.h + + hash2 + + 5RA6Mnq5sNoaC4wKcFe6zymVmEL5Vb44G4BGqFjgZMM= + + + Modules/module.modulemap + + hash2 + + C6uLLSnQu9M2qLElVCkeo2JpnvWMxtArinQzmlh3v2A= + + + Resources/Info.plist + + hash2 + + nPMotNIMgvMfHtkRdpeehzfBiCZLnksfiD3nldUPzTE= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/A/test b/core/tests/app-updater/frameworks/test.framework/Versions/A/test new file mode 100755 index 000000000000..687eb01d82bd Binary files /dev/null and b/core/tests/app-updater/frameworks/test.framework/Versions/A/test differ diff --git a/core/tests/app-updater/frameworks/test.framework/Versions/Current b/core/tests/app-updater/frameworks/test.framework/Versions/Current new file mode 120000 index 000000000000..8c7e5a667f1b --- /dev/null +++ b/core/tests/app-updater/frameworks/test.framework/Versions/Current @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index 0857d7393fe4..5ecc27cb8eca 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,41 +1,41 @@ -var to=Object.defineProperty;var no=(e,t,l)=>t in e?to(e,t,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[t]=l;var ft=(e,t,l)=>(no(e,typeof t!="symbol"?t+"":t,l),l);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const _ of r.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&i(_)}).observe(document,{childList:!0,subtree:!0});function l(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=l(s);fetch(s.href,r)}})();function ee(){}function Rs(e){return e()}function cs(){return Object.create(null)}function Fe(e){e.forEach(Rs)}function Ds(e){return typeof e=="function"}function Pt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Cl;function lo(e,t){return e===t?!0:(Cl||(Cl=document.createElement("a")),Cl.href=t,e===Cl.href)}function io(e){return Object.keys(e).length===0}function so(e,...t){if(e==null){for(const i of t)i(void 0);return ee}const l=e.subscribe(...t);return l.unsubscribe?()=>l.unsubscribe():l}function oo(e,t,l){e.$$.on_destroy.push(so(t,l))}function n(e,t){e.appendChild(t)}function w(e,t,l){e.insertBefore(t,l||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function Ct(e,t){for(let l=0;le.removeEventListener(t,l,i)}function ds(e){return function(t){return t.preventDefault(),e.call(this,t)}}function a(e,t,l){l==null?e.removeAttribute(t):e.getAttribute(t)!==l&&e.setAttribute(t,l)}function B(e){return e===""?null:+e}function ro(e){return Array.from(e.childNodes)}function se(e,t){t=""+t,e.data!==t&&(e.data=t)}function T(e,t){e.value=t??""}function Jt(e,t,l,i){l==null?e.style.removeProperty(t):e.style.setProperty(t,l,i?"important":"")}function Ye(e,t,l){for(let i=0;ie.indexOf(i)===-1?t.push(i):l.push(i)),l.forEach(i=>i()),$t=t}const Pl=new Set;let St;function bo(){St={r:0,c:[],p:St}}function go(){St.r||Fe(St.c),St=St.p}function ci(e,t){e&&e.i&&(Pl.delete(e),e.i(t))}function ps(e,t,l,i){if(e&&e.o){if(Pl.has(e))return;Pl.add(e),St.c.push(()=>{Pl.delete(e),i&&(l&&e.d(1),i())}),e.o(t)}else i&&i()}function ye(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function bs(e){e&&e.c()}function di(e,t,l){const{fragment:i,after_update:s}=e.$$;i&&i.m(t,l),pt(()=>{const r=e.$$.on_mount.map(Rs).filter(Ds);e.$$.on_destroy?e.$$.on_destroy.push(...r):Fe(r),e.$$.on_mount=[]}),s.forEach(pt)}function fi(e,t){const l=e.$$;l.fragment!==null&&(po(l.after_update),Fe(l.on_destroy),l.fragment&&l.fragment.d(t),l.on_destroy=l.fragment=null,l.ctx=[])}function _o(e,t){e.$$.dirty[0]===-1&&(xt.push(e),fo(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const A=E.length?E[0]:Y;return d.ctx&&s(d.ctx[z],d.ctx[z]=A)&&(!d.skip_bound&&d.bound[z]&&d.bound[z](A),I&&_o(e,z)),Y}):[],d.update(),I=!0,Fe(d.before_update),d.fragment=i?i(d.ctx):!1,t.target){if(t.hydrate){const z=ro(t.target);d.fragment&&d.fragment.l(z),z.forEach(m)}else d.fragment&&d.fragment.c();t.intro&&ci(e.$$.fragment),di(e,t.target,t.anchor),qs()}kn(g)}class tn{constructor(){ft(this,"$$");ft(this,"$$set")}$destroy(){fi(this,1),this.$destroy=ee}$on(t,l){if(!Ds(l))return ee;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(l),()=>{const s=i.indexOf(l);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!io(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const mo="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(mo);const Zt=[];function wo(e,t=ee){let l;const i=new Set;function s(h){if(Pt(e,h)&&(e=h,l)){const g=!Zt.length;for(const d of i)d[1](),Zt.push(d,e);if(g){for(let d=0;d{i.delete(d),i.size===0&&l&&(l(),l=null)}}return{set:s,update:r,subscribe:_}}var vo=Object.defineProperty,En=(e,t)=>{for(var l in t)vo(e,l,{get:t[l],enumerable:!0})},Bs=(e,t,l)=>{if(!t.has(e))throw TypeError("Cannot "+l)},gs=(e,t,l)=>(Bs(e,t,"read from private field"),l?l.call(e):t.get(e)),yo=(e,t,l)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,l)},ko=(e,t,l,i)=>(Bs(e,t,"write to private field"),i?i.call(e,l):t.set(e,l),l),zo={};En(zo,{Channel:()=>Fs,PluginListener:()=>js,addPluginListener:()=>Lo,convertFileSrc:()=>Eo,invoke:()=>b,transformCallback:()=>pi});function pi(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}var yn,Fs=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,yo(this,yn,()=>{}),this.id=pi(t=>{gs(this,yn).call(this,t)})}set onmessage(t){ko(this,yn,t)}get onmessage(){return gs(this,yn)}toJSON(){return`__CHANNEL__:${this.id}`}};yn=new WeakMap;var js=class{constructor(t,l,i){this.plugin=t,this.event=l,this.channelId=i}async unregister(){return b(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function Lo(e,t,l){let i=new Fs;return i.onmessage=l,b(`plugin:${e}|register_listener`,{event:t,handler:i}).then(()=>new js(e,t,i.id))}async function b(e,t={},l){return window.__TAURI_INTERNALS__.invoke(e,t,l)}function Eo(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}var So={};En(So,{getName:()=>Gs,getTauriVersion:()=>Xs,getVersion:()=>Vs,hide:()=>Ks,show:()=>Ys});async function Vs(){return b("plugin:app|version")}async function Gs(){return b("plugin:app|name")}async function Xs(){return b("plugin:app|tauri_version")}async function Ys(){return b("plugin:app|app_show")}async function Ks(){return b("plugin:app|app_hide")}function Co(e){let t,l,i,s,r,_,h,g,d,I,z,Y,E,A,M,N,ae,H,W,V,G,P,F,re;return{c(){t=o("div"),l=o("p"),l.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our +var no=Object.defineProperty;var lo=(e,t,n)=>t in e?no(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ft=(e,t,n)=>(lo(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const _ of r.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&i(_)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();function ee(){}function Rs(e){return e()}function cs(){return Object.create(null)}function Fe(e){e.forEach(Rs)}function Ds(e){return typeof e=="function"}function Pt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Sl;function io(e,t){return e===t?!0:(Sl||(Sl=document.createElement("a")),Sl.href=t,e===Sl.href)}function so(e){return Object.keys(e).length===0}function oo(e,...t){if(e==null){for(const i of t)i(void 0);return ee}const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ao(e,t,n){e.$$.on_destroy.push(oo(t,n))}function l(e,t){e.appendChild(t)}function w(e,t,n){e.insertBefore(t,n||null)}function m(e){e.parentNode&&e.parentNode.removeChild(e)}function Ct(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function ds(e){return function(t){return t.preventDefault(),e.call(this,t)}}function a(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function B(e){return e===""?null:+e}function uo(e){return Array.from(e.childNodes)}function se(e,t){t=""+t,e.data!==t&&(e.data=t)}function T(e,t){e.value=t??""}function Jt(e,t,n,i){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,i?"important":"")}function Ye(e,t,n){for(let i=0;ie.indexOf(i)===-1?t.push(i):n.push(i)),n.forEach(i=>i()),$t=t}const Cl=new Set;let St;function go(){St={r:0,c:[],p:St}}function _o(){St.r||Fe(St.c),St=St.p}function ci(e,t){e&&e.i&&(Cl.delete(e),e.i(t))}function ps(e,t,n,i){if(e&&e.o){if(Cl.has(e))return;Cl.add(e),St.c.push(()=>{Cl.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function ye(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function bs(e){e&&e.c()}function di(e,t,n){const{fragment:i,after_update:o}=e.$$;i&&i.m(t,n),pt(()=>{const r=e.$$.on_mount.map(Rs).filter(Ds);e.$$.on_destroy?e.$$.on_destroy.push(...r):Fe(r),e.$$.on_mount=[]}),o.forEach(pt)}function fi(e,t){const n=e.$$;n.fragment!==null&&(bo(n.after_update),Fe(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function mo(e,t){e.$$.dirty[0]===-1&&(xt.push(e),ho(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const A=E.length?E[0]:Y;return d.ctx&&o(d.ctx[z],d.ctx[z]=A)&&(!d.skip_bound&&d.bound[z]&&d.bound[z](A),I&&mo(e,z)),Y}):[],d.update(),I=!0,Fe(d.before_update),d.fragment=i?i(d.ctx):!1,t.target){if(t.hydrate){const z=uo(t.target);d.fragment&&d.fragment.l(z),z.forEach(m)}else d.fragment&&d.fragment.c();t.intro&&ci(e.$$.fragment),di(e,t.target,t.anchor),qs()}kn(g)}class tn{constructor(){ft(this,"$$");ft(this,"$$set")}$destroy(){fi(this,1),this.$destroy=ee}$on(t,n){if(!Ds(n))return ee;const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!so(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const wo="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(wo);const Zt=[];function vo(e,t=ee){let n;const i=new Set;function o(h){if(Pt(e,h)&&(e=h,n)){const g=!Zt.length;for(const d of i)d[1](),Zt.push(d,e);if(g){for(let d=0;d{i.delete(d),i.size===0&&n&&(n(),n=null)}}return{set:o,update:r,subscribe:_}}var yo=Object.defineProperty,En=(e,t)=>{for(var n in t)yo(e,n,{get:t[n],enumerable:!0})},Bs=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},gs=(e,t,n)=>(Bs(e,t,"read from private field"),n?n.call(e):t.get(e)),ko=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},zo=(e,t,n,i)=>(Bs(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Lo={};En(Lo,{Channel:()=>Fs,PluginListener:()=>js,addPluginListener:()=>Eo,convertFileSrc:()=>So,invoke:()=>b,transformCallback:()=>pi});function pi(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}var yn,Fs=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,ko(this,yn,()=>{}),this.id=pi(t=>{gs(this,yn).call(this,t)})}set onmessage(t){zo(this,yn,t)}get onmessage(){return gs(this,yn)}toJSON(){return`__CHANNEL__:${this.id}`}};yn=new WeakMap;var js=class{constructor(t,n,i){this.plugin=t,this.event=n,this.channelId=i}async unregister(){return b(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function Eo(e,t,n){let i=new Fs;return i.onmessage=n,b(`plugin:${e}|register_listener`,{event:t,handler:i}).then(()=>new js(e,t,i.id))}async function b(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}function So(e,t="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,t)}var Co={};En(Co,{getName:()=>Gs,getTauriVersion:()=>Xs,getVersion:()=>Vs,hide:()=>Ks,show:()=>Ys});async function Vs(){return b("plugin:app|version")}async function Gs(){return b("plugin:app|name")}async function Xs(){return b("plugin:app|tauri_version")}async function Ys(){return b("plugin:app|app_show")}async function Ks(){return b("plugin:app|app_hide")}function Po(e){let t,n,i,o,r,_,h,g,d,I,z,Y,E,A,M,N,ae,H,W,V,G,P,F,re;return{c(){t=s("div"),n=s("p"),n.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our development process. In the future, this app will be used on Tauri's integration - tests.`,i=c(),s=o("br"),r=c(),_=o("br"),h=c(),g=o("pre"),d=p(" App name: "),I=o("code"),z=p(e[2]),Y=p(` - App version: `),E=o("code"),A=p(e[0]),M=p(` - Tauri version: `),N=o("code"),ae=p(e[1]),H=p(` - `),W=c(),V=o("br"),G=c(),P=o("button"),P.textContent="Context menu",a(P,"class","btn")},m(R,x){w(R,t,x),n(t,l),n(t,i),n(t,s),n(t,r),n(t,_),n(t,h),n(t,g),n(g,d),n(g,I),n(I,z),n(g,Y),n(g,E),n(E,A),n(g,M),n(g,N),n(N,ae),n(g,H),n(t,W),n(t,V),n(t,G),n(t,P),F||(re=k(P,"click",e[3]),F=!0)},p(R,[x]){x&4&&se(z,R[2]),x&1&&se(A,R[0]),x&2&&se(ae,R[1])},i:ee,o:ee,d(R){R&&m(t),F=!1,re()}}}function Po(e,t,l){let i="1.0.0",s="1.0.0",r="Unknown";Gs().then(h=>{l(2,r=h)}),Vs().then(h=>{l(0,i=h)}),Xs().then(h=>{l(1,s=h)});function _(){b("popup_context_menu")}return[i,s,r,_]}class To extends tn{constructor(t){super(),en(this,t,Po,Co,Pt,{})}}var Ao={};En(Ao,{TauriEvent:()=>Js,emit:()=>bi,listen:()=>Nl,once:()=>Zs});var Js=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",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_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e))(Js||{});async function Qs(e,t){await b("plugin:event|unlisten",{event:e,eventId:t})}async function Nl(e,t,l){return b("plugin:event|listen",{event:e,windowLabel:l==null?void 0:l.target,handler:pi(t)}).then(i=>async()=>Qs(e,i))}async function Zs(e,t,l){return Nl(e,i=>{t(i),Qs(e,i.id).catch(()=>{})},l)}async function bi(e,t,l){await b("plugin:event|emit",{event:e,windowLabel:l==null?void 0:l.target,payload:t})}function Mo(e){let t,l,i,s,r,_,h,g;return{c(){t=o("div"),l=o("button"),l.textContent="Call Log API",i=c(),s=o("button"),s.textContent="Call Request (async) API",r=c(),_=o("button"),_.textContent="Send event to Rust",a(l,"class","btn"),a(l,"id","log"),a(s,"class","btn"),a(s,"id","request"),a(_,"class","btn"),a(_,"id","event")},m(d,I){w(d,t,I),n(t,l),n(t,i),n(t,s),n(t,r),n(t,_),h||(g=[k(l,"click",e[0]),k(s,"click",e[1]),k(_,"click",e[2])],h=!0)},p:ee,i:ee,o:ee,d(d){d&&m(t),h=!1,Fe(g)}}}function Io(e,t,l){let{onMessage:i}=t,s;Al(async()=>{s=await Nl("rust-event",i)}),Us(()=>{s&&s()});function r(){b("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function _(){b("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function h(){bi("js-event","this is the payload string")}return e.$$set=g=>{"onMessage"in g&&l(3,i=g.onMessage)},[r,_,h,i]}class Oo extends tn{constructor(t){super(),en(this,t,Io,Mo,Pt,{onMessage:3})}}var No={};En(No,{LogicalPosition:()=>gi,LogicalSize:()=>Ln,PhysicalPosition:()=>xe,PhysicalSize:()=>ht});var Ln=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},ht=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new Ln(this.width/e,this.height/e)}},gi=class{constructor(t,l){this.type="Logical",this.x=t,this.y=l}},xe=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new gi(this.x/e,this.y/e)}},Wo={};En(Wo,{CloseRequestedEvent:()=>xs,Effect:()=>Il,EffectState:()=>Ol,LogicalPosition:()=>gi,LogicalSize:()=>Ln,PhysicalPosition:()=>xe,PhysicalSize:()=>ht,ProgressBarStatus:()=>Ml,UserAttentionType:()=>_i,Window:()=>Sn,availableMonitors:()=>Ho,currentMonitor:()=>Ro,getAll:()=>Tl,getCurrent:()=>mi,primaryMonitor:()=>Do});var _i=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(_i||{}),xs=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},Ml=(e=>(e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error",e))(Ml||{});function mi(){return new Sn(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function Tl(){return window.__TAURI_INTERNALS__.metadata.windows.map(e=>new Sn(e.label,{skip:!0}))}var _s=["tauri://created","tauri://error"],Sn=class{constructor(e,t={}){this.label=e,this.listeners=Object.create(null),t!=null&&t.skip||b("plugin:window|create",{options:{...t,label:e}}).then(async()=>this.emit("tauri://created")).catch(async l=>this.emit("tauri://error",l))}static getByLabel(e){return Tl().some(t=>t.label===e)?new Sn(e,{skip:!0}):null}static getCurrent(){return mi()}static getAll(){return Tl()}static async getFocusedWindow(){for(let e of Tl())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let l=this.listeners[e];l.splice(l.indexOf(t),1)}):Nl(e,t,{target:this.label})}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let l=this.listeners[e];l.splice(l.indexOf(t),1)}):Zs(e,t,{target:this.label})}async emit(e,t){if(_s.includes(e)){for(let l of this.listeners[e]||[])l({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return bi(e,t,{target:this.label})}_handleTauriEvent(e,t){return _s.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}async scaleFactor(){return b("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return b("plugin:window|inner_position",{label:this.label}).then(({x:e,y:t})=>new xe(e,t))}async outerPosition(){return b("plugin:window|outer_position",{label:this.label}).then(({x:e,y:t})=>new xe(e,t))}async innerSize(){return b("plugin:window|inner_size",{label:this.label}).then(({width:e,height:t})=>new ht(e,t))}async outerSize(){return b("plugin:window|outer_size",{label:this.label}).then(({width:e,height:t})=>new ht(e,t))}async isFullscreen(){return b("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return b("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return b("plugin:window|is_maximized",{label:this.label})}async isFocused(){return b("plugin:window|is_focused",{label:this.label})}async isDecorated(){return b("plugin:window|is_decorated",{label:this.label})}async isResizable(){return b("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return b("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return b("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return b("plugin:window|is_closable",{label:this.label})}async isVisible(){return b("plugin:window|is_visible",{label:this.label})}async title(){return b("plugin:window|title",{label:this.label})}async theme(){return b("plugin:window|theme",{label:this.label})}async center(){return b("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),b("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return b("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return b("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return b("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return b("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return b("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return b("plugin:window|maximize",{label:this.label})}async unmaximize(){return b("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return b("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return b("plugin:window|minimize",{label:this.label})}async unminimize(){return b("plugin:window|unminimize",{label:this.label})}async show(){return b("plugin:window|show",{label:this.label})}async hide(){return b("plugin:window|hide",{label:this.label})}async close(){return b("plugin:window|close",{label:this.label})}async setDecorations(e){return b("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return b("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return b("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return b("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return b("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return b("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return b("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return b("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return b("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return b("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return b("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return b("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return b("plugin:window|set_focus",{label:this.label})}async setIcon(e){return b("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return b("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return b("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return b("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return b("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return b("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return b("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return b("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return b("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen("tauri://resize",t=>{t.payload=eo(t.payload),e(t)})}async onMoved(e){return this.listen("tauri://move",t=>{t.payload=$s(t.payload),e(t)})}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let l=new xs(t);Promise.resolve(e(l)).then(()=>{if(!l.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),l=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),l()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",s=>{e({...s,payload:{type:"drop",paths:s.payload}})}),l=await this.listen("tauri://file-drop-hover",s=>{e({...s,payload:{type:"hover",paths:s.payload}})}),i=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{t(),l(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},Il=(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",e))(Il||{}),Ol=(e=>(e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive",e))(Ol||{});function wi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:$s(e.position),size:eo(e.size)}}function $s(e){return new xe(e.x,e.y)}function eo(e){return new ht(e.width,e.height)}async function Ro(){return b("plugin:window|current_monitor").then(wi)}async function Do(){return b("plugin:window|primary_monitor").then(wi)}async function Ho(){return b("plugin:window|available_monitors").then(e=>e.map(wi))}function ms(e,t,l){const i=e.slice();return i[105]=t[l],i}function ws(e,t,l){const i=e.slice();return i[108]=t[l],i}function vs(e,t,l){const i=e.slice();return i[111]=t[l],i}function ys(e,t,l){const i=e.slice();return i[114]=t[l],i}function ks(e,t,l){const i=e.slice();return i[117]=t[l],i}function zs(e){let t,l,i,s,r,_,h=ye(Object.keys(e[1])),g=[];for(let d=0;de[59].call(i))},m(d,I){w(d,t,I),w(d,l,I),w(d,i,I),n(i,s);for(let z=0;ze[83].call(Qe)),a(ut,"class","input"),a(ut,"type","number"),a(ct,"class","input"),a(ct,"type","number"),a(Je,"class","flex gap-2"),a(dt,"class","input grow"),a(dt,"id","title"),a(_n,"class","btn"),a(_n,"type","submit"),a(Lt,"class","flex gap-1"),a(gn,"class","flex flex-col gap-1"),a(Ze,"class","input"),e[26]===void 0&&pt(()=>e[87].call(Ze)),a(Xe,"class","input"),a(Xe,"type","number"),a(Xe,"min","0"),a(Xe,"max","100"),a(Xt,"class","flex gap-2"),a(mn,"class","flex flex-col gap-1")},m(u,f){w(u,t,f),w(u,l,f),w(u,i,f),n(i,s),n(i,r),n(i,_),n(_,h),T(h,e[43]),n(_,g),n(_,d),w(u,I,f),w(u,z,f),w(u,Y,f),w(u,E,f),n(E,A),n(E,M),n(E,N),n(E,ae),n(E,H),n(E,W),n(E,V),w(u,G,f),w(u,P,f),n(P,F),n(F,re),n(F,R),R.checked=e[6],n(P,x),n(P,te),n(te,y),n(te,U),U.checked=e[2],n(P,j),n(P,$),n($,ue),n($,K),K.checked=e[3],n(P,_e),n(P,ke),n(ke,de),n(ke,oe),oe.checked=e[4],n(P,J),n(P,he),n(he,q),n(he,ne),ne.checked=e[5],n(P,Z),n(P,v),n(v,X),n(v,S),S.checked=e[7],n(P,fe),n(P,Ee),n(Ee,me),n(Ee,pe),pe.checked=e[8],n(P,Me),n(P,Se),n(Se,Ie),n(Se,be),be.checked=e[9],n(P,ge),n(P,ze),n(ze,Ce),n(ze,ce),ce.checked=e[10],n(P,Le),n(P,le),n(le,Oe),n(le,Ne),Ne.checked=e[11],w(u,Pe,f),w(u,ie,f),w(u,L,f),w(u,Q,f),n(Q,C),n(C,Te),n(Te,Cn),n(Te,We),T(We,e[18]),n(C,Pn),n(C,Tt),n(Tt,Tn),n(Tt,Re),T(Re,e[19]),n(Q,An),n(Q,$e),n($e,At),n(At,Mn),n(At,De),T(De,e[12]),n($e,In),n($e,Mt),n(Mt,On),n(Mt,He),T(He,e[13]),n(Q,Nn),n(Q,et),n(et,It),n(It,Wn),n(It,je),T(je,e[14]),n(et,Rn),n(et,Ot),n(Ot,Dn),n(Ot,Ve),T(Ve,e[15]),n(Q,Hn),n(Q,tt),n(tt,Nt),n(Nt,Un),n(Nt,Ue),T(Ue,e[16]),n(tt,qn),n(tt,Wt),n(Wt,Bn),n(Wt,qe),T(qe,e[17]),w(u,nn,f),w(u,ln,f),w(u,sn,f),w(u,Ae,f),n(Ae,nt),n(nt,Ge),n(Ge,O),n(Ge,on),n(Ge,bt),n(bt,an),n(bt,Rt),n(Ge,rn),n(Ge,_t),n(_t,un),n(_t,Dt),n(nt,cn),n(nt,Be),n(Be,wt),n(Be,dn),n(Be,vt),n(vt,fn),n(vt,Ht),n(Be,hn),n(Be,kt),n(kt,pn),n(kt,Ut),n(Ae,Fn),n(Ae,qt),n(qt,lt),n(lt,jn),n(lt,vi),n(lt,Vn),n(Vn,yi),n(Vn,Wl),n(lt,ki),n(lt,Xn),n(Xn,zi),n(Xn,Rl),n(qt,Li),n(qt,it),n(it,Kn),n(it,Ei),n(it,Jn),n(Jn,Si),n(Jn,Dl),n(it,Ci),n(it,Zn),n(Zn,Pi),n(Zn,Hl),n(Ae,Ti),n(Ae,Bt),n(Bt,st),n(st,$n),n(st,Ai),n(st,el),n(el,Mi),n(el,Ul),n(st,Ii),n(st,nl),n(nl,Oi),n(nl,ql),n(Bt,Ni),n(Bt,ot),n(ot,il),n(ot,Wi),n(ot,sl),n(sl,Ri),n(sl,Bl),n(ot,Di),n(ot,al),n(al,Hi),n(al,Fl),n(Ae,Ui),n(Ae,Ft),n(Ft,at),n(at,ul),n(at,qi),n(at,cl),n(cl,Bi),n(cl,jl),n(at,Fi),n(at,fl),n(fl,ji),n(fl,Vl),n(Ft,Vi),n(Ft,rt),n(rt,pl),n(rt,Gi),n(rt,bl),n(bl,Xi),n(bl,Gl),n(rt,Yi),n(rt,_l),n(_l,Ki),n(_l,Xl),w(u,Yl,f),w(u,Kl,f),w(u,Jl,f),w(u,bn,f),w(u,Ql,f),w(u,Ke,f),n(Ke,wl),n(wl,jt),jt.checked=e[20],n(wl,Ji),n(Ke,Qi),n(Ke,vl),n(vl,Vt),Vt.checked=e[21],n(vl,Zi),n(Ke,xi),n(Ke,yl),n(yl,Gt),Gt.checked=e[25],n(yl,$i),w(u,Zl,f),w(u,Je,f),n(Je,kl),n(kl,es),n(kl,Qe);for(let D=0;De[89].call(r)),a(d,"class","input"),e[37]===void 0&&pt(()=>e[90].call(d)),a(E,"class","input"),a(E,"type","number"),a(l,"class","flex"),Jt(W,"max-width","120px"),a(W,"class","input"),a(W,"type","number"),a(W,"placeholder","R"),Jt(G,"max-width","120px"),a(G,"class","input"),a(G,"type","number"),a(G,"placeholder","G"),Jt(F,"max-width","120px"),a(F,"class","input"),a(F,"type","number"),a(F,"placeholder","B"),Jt(R,"max-width","120px"),a(R,"class","input"),a(R,"type","number"),a(R,"placeholder","A"),a(H,"class","flex"),a(M,"class","flex"),a(y,"class","btn"),Jt(y,"width","80px"),a(te,"class","flex"),a(de,"class","btn"),Jt(de,"width","80px"),a(j,"class","flex"),a(t,"class","flex flex-col gap-1")},m(v,X){w(v,t,X),n(t,l),n(l,i),n(i,s),n(i,r);for(let S=0;S=1,I,z,Y,E=d&&zs(e),A=e[1][e[0]]&&Es(e);return{c(){t=o("div"),l=o("div"),i=o("input"),s=c(),r=o("button"),r.textContent="New window",_=c(),h=o("br"),g=c(),E&&E.c(),I=c(),A&&A.c(),a(i,"class","input grow"),a(i,"type","text"),a(i,"placeholder","New Window label.."),a(r,"class","btn"),a(l,"class","flex gap-1"),a(t,"class","flex flex-col children:grow gap-2")},m(M,N){w(M,t,N),n(t,l),n(l,i),T(i,e[28]),n(l,s),n(l,r),n(t,_),n(t,h),n(t,g),E&&E.m(t,null),n(t,I),A&&A.m(t,null),z||(Y=[k(i,"input",e[58]),k(r,"click",e[53])],z=!0)},p(M,N){N[0]&268435456&&i.value!==M[28]&&T(i,M[28]),N[0]&2&&(d=Object.keys(M[1]).length>=1),d?E?E.p(M,N):(E=zs(M),E.c(),E.m(t,I)):E&&(E.d(1),E=null),M[1][M[0]]?A?A.p(M,N):(A=Es(M),A.c(),A.m(t,null)):A&&(A.d(1),A=null)},i:ee,o:ee,d(M){M&&m(t),E&&E.d(),A&&A.d(),z=!1,Fe(Y)}}}function Bo(e,t,l){const i=mi();let s=i.label;const r={[i.label]:i},_=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"],h=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],g=navigator.appVersion.includes("Windows"),d=navigator.appVersion.includes("Macintosh");let I=g?h:Object.keys(Il).map(O=>Il[O]).filter(O=>!h.includes(O));const z=Object.keys(Ol).map(O=>Ol[O]),Y=Object.keys(Ml).map(O=>Ml[O]);let{onMessage:E}=t;const A=document.querySelector("main");let M,N=!0,ae=!0,H=!0,W=!0,V=!1,G=!0,P=!1,F=!1,re=!0,R=!1,x=null,te=null,y=null,U=null,j=null,$=null,ue=null,K=null,_e=1,ke=new xe(ue,K),de=new xe(ue,K),oe=new ht(x,te),J=new ht(x,te),he,q,ne=!1,Z=!0,v=null,X=null,S="default",fe=!1,Ee="Awesome Tauri Example!",me=[],pe,Me,Se,Ie,be,ge,ze,Ce="none",ce=0,Le;function le(){r[s].setTitle(Ee)}function Oe(){r[s].hide(),setTimeout(r[s].show,2e3)}function Ne(){r[s].minimize(),setTimeout(r[s].unminimize,2e3)}function Pe(){if(!M)return;const O=new Sn(M);l(1,r[M]=O,r),O.once("tauri://error",function(){E("Error creating new webview")})}function ie(){r[s].innerSize().then(O=>{l(32,oe=O),l(12,x=oe.width),l(13,te=oe.height)}),r[s].outerSize().then(O=>{l(33,J=O)})}function L(){r[s].innerPosition().then(O=>{l(30,ke=O)}),r[s].outerPosition().then(O=>{l(31,de=O),l(18,ue=de.x),l(19,K=de.y)})}async function Q(O){O&&(he&&he(),q&&q(),q=await O.listen("tauri://move",L),he=await O.listen("tauri://resize",ie))}async function C(){await r[s].minimize(),await r[s].requestUserAttention(_i.Critical),await new Promise(O=>setTimeout(O,3e3)),await r[s].requestUserAttention(null)}async function Te(){me.includes(pe)||l(35,me=[...me,pe]);const O={effects:me,state:Me,radius:Se};Number.isInteger(Ie)&&Number.isInteger(be)&&Number.isInteger(ge)&&Number.isInteger(ze)&&(O.color=[Ie,be,ge,ze]),A.classList.remove("bg-primary"),A.classList.remove("dark:bg-darkPrimary"),await r[s].clearEffects(),await r[s].setEffects(O)}async function Cn(){l(35,me=[]),await r[s].clearEffects(),A.classList.add("bg-primary"),A.classList.add("dark:bg-darkPrimary")}function We(){M=this.value,l(28,M)}function Pn(){s=vn(this),l(0,s),l(1,r)}function Tt(){Le=this.value,l(43,Le)}const Tn=()=>r[s].center();function Re(){V=this.checked,l(6,V)}function An(){N=this.checked,l(2,N)}function $e(){ae=this.checked,l(3,ae)}function At(){H=this.checked,l(4,H)}function Mn(){W=this.checked,l(5,W)}function De(){G=this.checked,l(7,G)}function In(){P=this.checked,l(8,P)}function Mt(){F=this.checked,l(9,F)}function On(){re=this.checked,l(10,re)}function He(){R=this.checked,l(11,R)}function Nn(){ue=B(this.value),l(18,ue)}function et(){K=B(this.value),l(19,K)}function It(){x=B(this.value),l(12,x)}function Wn(){te=B(this.value),l(13,te)}function je(){y=B(this.value),l(14,y)}function Rn(){U=B(this.value),l(15,U)}function Ot(){j=B(this.value),l(16,j)}function Dn(){$=B(this.value),l(17,$)}function Ve(){ne=this.checked,l(20,ne)}function Hn(){Z=this.checked,l(21,Z)}function tt(){fe=this.checked,l(25,fe)}function Nt(){S=vn(this),l(24,S),l(44,_)}function Un(){v=B(this.value),l(22,v)}function Ue(){X=B(this.value),l(23,X)}function qn(){Ee=this.value,l(34,Ee)}function Wt(){Ce=vn(this),l(26,Ce),l(49,Y)}function Bn(){ce=B(this.value),l(27,ce)}function qe(){pe=vn(this),l(36,pe),l(47,I)}function nn(){Me=vn(this),l(37,Me),l(48,z)}function ln(){Se=B(this.value),l(38,Se)}function sn(){Ie=B(this.value),l(39,Ie)}function Ae(){be=B(this.value),l(40,be)}function nt(){ge=B(this.value),l(41,ge)}function Ge(){ze=B(this.value),l(42,ze)}return e.$$set=O=>{"onMessage"in O&&l(57,E=O.onMessage)},e.$$.update=()=>{var O,on,bt,an,gt,Rt,rn,_t,un,mt,Dt,cn,Be,wt,dn,vt,fn,yt,Ht,hn,kt,pn,zt,Ut;e.$$.dirty[0]&3&&(r[s],L(),ie()),e.$$.dirty[0]&7&&((O=r[s])==null||O.setResizable(N)),e.$$.dirty[0]&11&&((on=r[s])==null||on.setMaximizable(ae)),e.$$.dirty[0]&19&&((bt=r[s])==null||bt.setMinimizable(H)),e.$$.dirty[0]&35&&((an=r[s])==null||an.setClosable(W)),e.$$.dirty[0]&67&&(V?(gt=r[s])==null||gt.maximize():(Rt=r[s])==null||Rt.unmaximize()),e.$$.dirty[0]&131&&((rn=r[s])==null||rn.setDecorations(G)),e.$$.dirty[0]&259&&((_t=r[s])==null||_t.setAlwaysOnTop(P)),e.$$.dirty[0]&515&&((un=r[s])==null||un.setAlwaysOnBottom(F)),e.$$.dirty[0]&1027&&((mt=r[s])==null||mt.setContentProtected(re)),e.$$.dirty[0]&2051&&((Dt=r[s])==null||Dt.setFullscreen(R)),e.$$.dirty[0]&12291&&x&&te&&((cn=r[s])==null||cn.setSize(new ht(x,te))),e.$$.dirty[0]&49155&&(y&&U?(Be=r[s])==null||Be.setMinSize(new Ln(y,U)):(wt=r[s])==null||wt.setMinSize(null)),e.$$.dirty[0]&196611&&(j>800&&$>400?(dn=r[s])==null||dn.setMaxSize(new Ln(j,$)):(vt=r[s])==null||vt.setMaxSize(null)),e.$$.dirty[0]&786435&&ue!==null&&K!==null&&((fn=r[s])==null||fn.setPosition(new xe(ue,K))),e.$$.dirty[0]&3&&((yt=r[s])==null||yt.scaleFactor().then(Fn=>l(29,_e=Fn))),e.$$.dirty[0]&3&&Q(r[s]),e.$$.dirty[0]&1048579&&((Ht=r[s])==null||Ht.setCursorGrab(ne)),e.$$.dirty[0]&2097155&&((hn=r[s])==null||hn.setCursorVisible(Z)),e.$$.dirty[0]&16777219&&((kt=r[s])==null||kt.setCursorIcon(S)),e.$$.dirty[0]&12582915&&v!==null&&X!==null&&((pn=r[s])==null||pn.setCursorPosition(new xe(v,X))),e.$$.dirty[0]&33554435&&((zt=r[s])==null||zt.setIgnoreCursorEvents(fe)),e.$$.dirty[0]&201326595&&((Ut=r[s])==null||Ut.setProgressBar({status:Ce,progress:ce}))},[s,r,N,ae,H,W,V,G,P,F,re,R,x,te,y,U,j,$,ue,K,ne,Z,v,X,S,fe,Ce,ce,M,_e,ke,de,oe,J,Ee,me,pe,Me,Se,Ie,be,ge,ze,Le,_,g,d,I,z,Y,le,Oe,Ne,Pe,C,Te,Cn,E,We,Pn,Tt,Tn,Re,An,$e,At,Mn,De,In,Mt,On,He,Nn,et,It,Wn,je,Rn,Ot,Dn,Ve,Hn,tt,Nt,Un,Ue,qn,Wt,Bn,qe,nn,ln,sn,Ae,nt,Ge]}class Fo extends tn{constructor(t){super(),en(this,t,Bo,qo,Pt,{onMessage:57},null,[-1,-1,-1,-1])}}function jo(e){let t;return{c(){t=o("div"),t.innerHTML='
Not available for Linux
',a(t,"class","flex flex-col gap-2")},m(l,i){w(l,t,i)},p:ee,i:ee,o:ee,d(l){l&&m(t)}}}function Vo(e,t,l){let{onMessage:i}=t;const s=window.constraints={audio:!0,video:!0};function r(h){const g=document.querySelector("video"),d=h.getVideoTracks();i("Got stream with constraints:",s),i(`Using video device: ${d[0].label}`),window.stream=h,g.srcObject=h}function _(h){if(h.name==="ConstraintNotSatisfiedError"){const g=s.video;i(`The resolution ${g.width.exact}x${g.height.exact} px is not supported by your device.`)}else h.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${h.name}`,h)}return Al(async()=>{try{const h=await navigator.mediaDevices.getUserMedia(s);r(h)}catch(h){_(h)}}),Us(()=>{window.stream.getTracks().forEach(function(h){h.stop()})}),e.$$set=h=>{"onMessage"in h&&l(0,i=h.onMessage)},[i]}class Go extends tn{constructor(t){super(),en(this,t,Vo,jo,Pt,{onMessage:0})}}function Xo(e){let t,l,i,s,r,_;return{c(){t=o("div"),l=o("button"),l.textContent="Show",i=c(),s=o("button"),s.textContent="Hide",a(l,"class","btn"),a(l,"id","show"),a(l,"title","Hides and shows the app after 2 seconds"),a(s,"class","btn"),a(s,"id","hide")},m(h,g){w(h,t,g),n(t,l),n(t,i),n(t,s),r||(_=[k(l,"click",e[0]),k(s,"click",e[1])],r=!0)},p:ee,i:ee,o:ee,d(h){h&&m(t),r=!1,Fe(_)}}}function Yo(e,t,l){let{onMessage:i}=t;function s(){r().then(()=>{setTimeout(()=>{Ys().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function r(){return Ks().then(()=>i("Hide app")).catch(i)}return e.$$set=_=>{"onMessage"in _&&l(2,i=_.onMessage)},[s,r,i]}class Ko extends tn{constructor(t){super(),en(this,t,Yo,Xo,Pt,{onMessage:2})}}function As(e,t,l){const i=e.slice();return i[25]=t[l],i}function Ms(e,t,l){const i=e.slice();return i[28]=t[l],i}function Jo(e){let t;return{c(){t=o("span"),a(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(l,i){w(l,t,i)},d(l){l&&m(t)}}}function Qo(e){let t;return{c(){t=o("span"),a(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(l,i){w(l,t,i)},d(l){l&&m(t)}}}function Zo(e){let t,l;return{c(){t=p(`Switch to Dark mode - `),l=o("div"),a(l,"class","i-ph-moon")},m(i,s){w(i,t,s),w(i,l,s)},d(i){i&&(m(t),m(l))}}}function xo(e){let t,l;return{c(){t=p(`Switch to Light mode - `),l=o("div"),a(l,"class","i-ph-sun")},m(i,s){w(i,t,s),w(i,l,s)},d(i){i&&(m(t),m(l))}}}function $o(e){let t,l,i,s,r,_,h;function g(){return e[14](e[28])}return{c(){t=o("a"),l=o("div"),i=c(),s=o("p"),s.textContent=`${e[28].label}`,a(l,"class",e[28].icon+" mr-2"),a(t,"href","##"),a(t,"class",r="nv "+(e[1]===e[28]?"nv_selected":""))},m(d,I){w(d,t,I),n(t,l),n(t,i),n(t,s),_||(h=k(t,"click",g),_=!0)},p(d,I){e=d,I&2&&r!==(r="nv "+(e[1]===e[28]?"nv_selected":""))&&a(t,"class",r)},d(d){d&&m(t),_=!1,h()}}}function Is(e){let t,l=e[28]&&$o(e);return{c(){l&&l.c(),t=hi()},m(i,s){l&&l.m(i,s),w(i,t,s)},p(i,s){i[28]&&l.p(i,s)},d(i){i&&m(t),l&&l.d(i)}}}function Os(e){let t,l=e[25].html+"",i;return{c(){t=new uo(!1),i=hi(),t.a=i},m(s,r){t.m(l,s,r),w(s,i,r)},p(s,r){r&16&&l!==(l=s[25].html+"")&&t.p(l)},d(s){s&&(m(i),t.d())}}}function ea(e){let t,l,i,s,r,_,h,g,d,I,z,Y,E,A,M,N,ae,H,W,V,G,P,F,re,R,x,te,y,U,j,$,ue,K=e[1].label+"",_e,ke,de,oe,J,he,q,ne,Z,v,X,S,fe,Ee,me,pe,Me,Se;function Ie(L,Q){return L[0]?Qo:Jo}let be=Ie(e),ge=be(e);function ze(L,Q){return L[2]?xo:Zo}let Ce=ze(e),ce=Ce(e),Le=ye(e[5]),le=[];for(let L=0;L`,ae=c(),H=o("a"),H.innerHTML=`GitHub - `,W=c(),V=o("a"),V.innerHTML=`Source - `,G=c(),P=o("br"),F=c(),re=o("div"),R=c(),x=o("br"),te=c(),y=o("div");for(let L=0;L',Ee=c(),me=o("div");for(let L=0;L{fi(C,1)}),go()}Oe?(J=fs(Oe,Ne(L)),bs(J.$$.fragment),ci(J.$$.fragment,1),di(J,oe,null)):J=null}if(Q&16){Pe=ye(L[4]);let C;for(C=0;C{y.ctrlKey&&y.key==="b"&&b("toggle_menu")});const s=navigator.userAgent.toLowerCase(),r=s.includes("android")||s.includes("iphone"),_=[{label:"Welcome",component:To,icon:"i-ph-hand-waving"},{label:"Communication",component:Oo,icon:"i-codicon-radio-tower"},!r&&{label:"App",component:Ko,icon:"i-codicon-hubot"},{label:"Window",component:Fo,icon:"i-codicon-window"},{label:"WebRTC",component:Go,icon:"i-ph-broadcast"}];let h=_[0];function g(y){l(1,h=y)}let d;Al(()=>{l(2,d=localStorage&&localStorage.getItem("theme")=="dark"),Ws(d)});function I(){l(2,d=!d),Ws(d)}let z=wo([]);oo(e,z,y=>l(4,i=y));function Y(y){z.update(U=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof y=="string"?y:JSON.stringify(y,null,1))+"
"},...U])}function E(y){z.update(U=>[{html:`
[${new Date().toLocaleTimeString()}]: `+y+"
"},...U])}function A(){z.update(()=>[])}let M,N,ae;function H(y){ae=y.clientY;const U=window.getComputedStyle(M);N=parseInt(U.height,10);const j=ue=>{const K=ue.clientY-ae,_e=N-K;l(3,M.style.height=`${_e{document.removeEventListener("mouseup",$),document.removeEventListener("mousemove",j)};document.addEventListener("mouseup",$),document.addEventListener("mousemove",j)}let W=!1,V,G,P=!1,F=0,re=0;const R=(y,U,j)=>Math.min(Math.max(U,y),j);Al(()=>{l(13,V=document.querySelector("#sidebar")),G=document.querySelector("#sidebarToggle"),document.addEventListener("click",y=>{G.contains(y.target)?l(0,W=!W):W&&!V.contains(y.target)&&l(0,W=!1)}),document.addEventListener("touchstart",y=>{if(G.contains(y.target))return;const U=y.touches[0].clientX;(0{if(P){const U=y.touches[0].clientX;re=U;const j=(U-F)/10;V.style.setProperty("--translate-x",`-${R(0,W?0-j:18.75-j,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(P){const y=(re-F)/10;l(0,W=W?y>-(18.75/2):y>18.75/2)}P=!1})});const x=y=>{g(y),l(0,W=!1)};function te(y){ri[y?"unshift":"push"](()=>{M=y,l(3,M)})}return e.$$.update=()=>{if(e.$$.dirty&1){const y=document.querySelector("#sidebar");y&&ta(y,W)}},[W,h,d,M,i,_,g,I,z,Y,E,A,H,V,x,te]}class la extends tn{constructor(t){super(),en(this,t,na,ea,Pt,{})}}new la({target:document.querySelector("#app")}); + tests.`,i=c(),o=s("br"),r=c(),_=s("br"),h=c(),g=s("pre"),d=p(" App name: "),I=s("code"),z=p(e[2]),Y=p(` + App version: `),E=s("code"),A=p(e[0]),M=p(` + Tauri version: `),N=s("code"),ae=p(e[1]),H=p(` + `),W=c(),V=s("br"),G=c(),P=s("button"),P.textContent="Context menu",a(P,"class","btn")},m(R,x){w(R,t,x),l(t,n),l(t,i),l(t,o),l(t,r),l(t,_),l(t,h),l(t,g),l(g,d),l(g,I),l(I,z),l(g,Y),l(g,E),l(E,A),l(g,M),l(g,N),l(N,ae),l(g,H),l(t,W),l(t,V),l(t,G),l(t,P),F||(re=k(P,"click",e[3]),F=!0)},p(R,[x]){x&4&&se(z,R[2]),x&1&&se(A,R[0]),x&2&&se(ae,R[1])},i:ee,o:ee,d(R){R&&m(t),F=!1,re()}}}function To(e,t,n){let i="1.0.0",o="1.0.0",r="Unknown";Gs().then(h=>{n(2,r=h)}),Vs().then(h=>{n(0,i=h)}),Xs().then(h=>{n(1,o=h)});function _(){b("popup_context_menu")}return[i,o,r,_]}class Ao extends tn{constructor(t){super(),en(this,t,To,Po,Pt,{})}}var Mo={};En(Mo,{TauriEvent:()=>Js,emit:()=>bi,listen:()=>Ol,once:()=>Zs});var Js=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",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_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e))(Js||{});async function Qs(e,t){await b("plugin:event|unlisten",{event:e,eventId:t})}async function Ol(e,t,n){return b("plugin:event|listen",{event:e,windowLabel:n==null?void 0:n.target,handler:pi(t)}).then(i=>async()=>Qs(e,i))}async function Zs(e,t,n){return Ol(e,i=>{t(i),Qs(e,i.id).catch(()=>{})},n)}async function bi(e,t,n){await b("plugin:event|emit",{event:e,windowLabel:n==null?void 0:n.target,payload:t})}function Io(e){let t,n,i,o,r,_,h,g;return{c(){t=s("div"),n=s("button"),n.textContent="Call Log API",i=c(),o=s("button"),o.textContent="Call Request (async) API",r=c(),_=s("button"),_.textContent="Send event to Rust",a(n,"class","btn"),a(n,"id","log"),a(o,"class","btn"),a(o,"id","request"),a(_,"class","btn"),a(_,"id","event")},m(d,I){w(d,t,I),l(t,n),l(t,i),l(t,o),l(t,r),l(t,_),h||(g=[k(n,"click",e[0]),k(o,"click",e[1]),k(_,"click",e[2])],h=!0)},p:ee,i:ee,o:ee,d(d){d&&m(t),h=!1,Fe(g)}}}function Oo(e,t,n){let{onMessage:i}=t,o;Tl(async()=>{o=await Ol("rust-event",i)}),Us(()=>{o&&o()});function r(){b("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function _(){b("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function h(){bi("js-event","this is the payload string")}return e.$$set=g=>{"onMessage"in g&&n(3,i=g.onMessage)},[r,_,h,i]}class No extends tn{constructor(t){super(),en(this,t,Oo,Io,Pt,{onMessage:3})}}var Wo={};En(Wo,{LogicalPosition:()=>gi,LogicalSize:()=>Ln,PhysicalPosition:()=>xe,PhysicalSize:()=>ht});var Ln=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},ht=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new Ln(this.width/e,this.height/e)}},gi=class{constructor(t,n){this.type="Logical",this.x=t,this.y=n}},xe=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new gi(this.x/e,this.y/e)}},Ro={};En(Ro,{CloseRequestedEvent:()=>xs,Effect:()=>Ml,EffectState:()=>Il,LogicalPosition:()=>gi,LogicalSize:()=>Ln,PhysicalPosition:()=>xe,PhysicalSize:()=>ht,ProgressBarStatus:()=>Al,UserAttentionType:()=>_i,Window:()=>Nl,availableMonitors:()=>Uo,currentMonitor:()=>Do,getAll:()=>Pl,getCurrent:()=>mi,primaryMonitor:()=>Ho});var _i=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(_i||{}),xs=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},Al=(e=>(e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error",e))(Al||{});function mi(){return new Nl(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function Pl(){return window.__TAURI_INTERNALS__.metadata.windows.map(e=>new Nl(e.label,{skip:!0}))}var _s=["tauri://created","tauri://error"],Nl=class $s{constructor(t,n={}){this.label=t,this.listeners=Object.create(null),n!=null&&n.skip||b("plugin:window|create",{options:{...n,label:t}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static getByLabel(t){return Pl().some(n=>n.label===t)?new $s(t,{skip:!0}):null}static getCurrent(){return mi()}static getAll(){return Pl()}static async getFocusedWindow(){for(let t of Pl())if(await t.isFocused())return t;return null}async listen(t,n){return this._handleTauriEvent(t,n)?Promise.resolve(()=>{let i=this.listeners[t];i.splice(i.indexOf(n),1)}):Ol(t,n,{target:this.label})}async once(t,n){return this._handleTauriEvent(t,n)?Promise.resolve(()=>{let i=this.listeners[t];i.splice(i.indexOf(n),1)}):Zs(t,n,{target:this.label})}async emit(t,n){if(_s.includes(t)){for(let i of this.listeners[t]||[])i({event:t,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return bi(t,n,{target:this.label})}_handleTauriEvent(t,n){return _s.includes(t)?(t in this.listeners?this.listeners[t].push(n):this.listeners[t]=[n],!0):!1}async scaleFactor(){return b("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return b("plugin:window|inner_position",{label:this.label}).then(({x:t,y:n})=>new xe(t,n))}async outerPosition(){return b("plugin:window|outer_position",{label:this.label}).then(({x:t,y:n})=>new xe(t,n))}async innerSize(){return b("plugin:window|inner_size",{label:this.label}).then(({width:t,height:n})=>new ht(t,n))}async outerSize(){return b("plugin:window|outer_size",{label:this.label}).then(({width:t,height:n})=>new ht(t,n))}async isFullscreen(){return b("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return b("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return b("plugin:window|is_maximized",{label:this.label})}async isFocused(){return b("plugin:window|is_focused",{label:this.label})}async isDecorated(){return b("plugin:window|is_decorated",{label:this.label})}async isResizable(){return b("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return b("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return b("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return b("plugin:window|is_closable",{label:this.label})}async isVisible(){return b("plugin:window|is_visible",{label:this.label})}async title(){return b("plugin:window|title",{label:this.label})}async theme(){return b("plugin:window|theme",{label:this.label})}async center(){return b("plugin:window|center",{label:this.label})}async requestUserAttention(t){let n=null;return t&&(t===1?n={type:"Critical"}:n={type:"Informational"}),b("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(t){return b("plugin:window|set_resizable",{label:this.label,value:t})}async setMaximizable(t){return b("plugin:window|set_maximizable",{label:this.label,value:t})}async setMinimizable(t){return b("plugin:window|set_minimizable",{label:this.label,value:t})}async setClosable(t){return b("plugin:window|set_closable",{label:this.label,value:t})}async setTitle(t){return b("plugin:window|set_title",{label:this.label,value:t})}async maximize(){return b("plugin:window|maximize",{label:this.label})}async unmaximize(){return b("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return b("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return b("plugin:window|minimize",{label:this.label})}async unminimize(){return b("plugin:window|unminimize",{label:this.label})}async show(){return b("plugin:window|show",{label:this.label})}async hide(){return b("plugin:window|hide",{label:this.label})}async close(){return b("plugin:window|close",{label:this.label})}async setDecorations(t){return b("plugin:window|set_decorations",{label:this.label,value:t})}async setShadow(t){return b("plugin:window|set_shadow",{label:this.label,value:t})}async setEffects(t){return b("plugin:window|set_effects",{label:this.label,value:t})}async clearEffects(){return b("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(t){return b("plugin:window|set_always_on_top",{label:this.label,value:t})}async setAlwaysOnBottom(t){return b("plugin:window|set_always_on_bottom",{label:this.label,value:t})}async setContentProtected(t){return b("plugin:window|set_content_protected",{label:this.label,value:t})}async setSize(t){if(!t||t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return b("plugin:window|set_size",{label:this.label,value:{type:t.type,data:{width:t.width,height:t.height}}})}async setMinSize(t){if(t&&t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return b("plugin:window|set_min_size",{label:this.label,value:t?{type:t.type,data:{width:t.width,height:t.height}}:null})}async setMaxSize(t){if(t&&t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return b("plugin:window|set_max_size",{label:this.label,value:t?{type:t.type,data:{width:t.width,height:t.height}}:null})}async setPosition(t){if(!t||t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return b("plugin:window|set_position",{label:this.label,value:{type:t.type,data:{x:t.x,y:t.y}}})}async setFullscreen(t){return b("plugin:window|set_fullscreen",{label:this.label,value:t})}async setFocus(){return b("plugin:window|set_focus",{label:this.label})}async setIcon(t){return b("plugin:window|set_icon",{label:this.label,value:typeof t=="string"?t:Array.from(t)})}async setSkipTaskbar(t){return b("plugin:window|set_skip_taskbar",{label:this.label,value:t})}async setCursorGrab(t){return b("plugin:window|set_cursor_grab",{label:this.label,value:t})}async setCursorVisible(t){return b("plugin:window|set_cursor_visible",{label:this.label,value:t})}async setCursorIcon(t){return b("plugin:window|set_cursor_icon",{label:this.label,value:t})}async setCursorPosition(t){if(!t||t.type!=="Logical"&&t.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return b("plugin:window|set_cursor_position",{label:this.label,value:{type:t.type,data:{x:t.x,y:t.y}}})}async setIgnoreCursorEvents(t){return b("plugin:window|set_ignore_cursor_events",{label:this.label,value:t})}async startDragging(){return b("plugin:window|start_dragging",{label:this.label})}async setProgressBar(t){return b("plugin:window|set_progress_bar",{label:this.label,value:t})}async onResized(t){return this.listen("tauri://resize",n=>{n.payload=to(n.payload),t(n)})}async onMoved(t){return this.listen("tauri://move",n=>{n.payload=eo(n.payload),t(n)})}async onCloseRequested(t){return this.listen("tauri://close-requested",n=>{let i=new xs(n);Promise.resolve(t(i)).then(()=>{if(!i.isPreventDefault())return this.close()})})}async onFocusChanged(t){let n=await this.listen("tauri://focus",o=>{t({...o,payload:!0})}),i=await this.listen("tauri://blur",o=>{t({...o,payload:!1})});return()=>{n(),i()}}async onScaleChanged(t){return this.listen("tauri://scale-change",t)}async onMenuClicked(t){return this.listen("tauri://menu",t)}async onFileDropEvent(t){let n=await this.listen("tauri://file-drop",r=>{t({...r,payload:{type:"drop",paths:r.payload}})}),i=await this.listen("tauri://file-drop-hover",r=>{t({...r,payload:{type:"hover",paths:r.payload}})}),o=await this.listen("tauri://file-drop-cancelled",r=>{t({...r,payload:{type:"cancel"}})});return()=>{n(),i(),o()}}async onThemeChanged(t){return this.listen("tauri://theme-changed",t)}},Ml=(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",e))(Ml||{}),Il=(e=>(e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive",e))(Il||{});function wi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:eo(e.position),size:to(e.size)}}function eo(e){return new xe(e.x,e.y)}function to(e){return new ht(e.width,e.height)}async function Do(){return b("plugin:window|current_monitor").then(wi)}async function Ho(){return b("plugin:window|primary_monitor").then(wi)}async function Uo(){return b("plugin:window|available_monitors").then(e=>e.map(wi))}function ms(e,t,n){const i=e.slice();return i[105]=t[n],i}function ws(e,t,n){const i=e.slice();return i[108]=t[n],i}function vs(e,t,n){const i=e.slice();return i[111]=t[n],i}function ys(e,t,n){const i=e.slice();return i[114]=t[n],i}function ks(e,t,n){const i=e.slice();return i[117]=t[n],i}function zs(e){let t,n,i,o,r,_,h=ye(Object.keys(e[1])),g=[];for(let d=0;de[59].call(i))},m(d,I){w(d,t,I),w(d,n,I),w(d,i,I),l(i,o);for(let z=0;ze[83].call(Qe)),a(ut,"class","input"),a(ut,"type","number"),a(ct,"class","input"),a(ct,"type","number"),a(Je,"class","flex gap-2"),a(dt,"class","input grow"),a(dt,"id","title"),a(_n,"class","btn"),a(_n,"type","submit"),a(Lt,"class","flex gap-1"),a(gn,"class","flex flex-col gap-1"),a(Ze,"class","input"),e[26]===void 0&&pt(()=>e[87].call(Ze)),a(Xe,"class","input"),a(Xe,"type","number"),a(Xe,"min","0"),a(Xe,"max","100"),a(Xt,"class","flex gap-2"),a(mn,"class","flex flex-col gap-1")},m(u,f){w(u,t,f),w(u,n,f),w(u,i,f),l(i,o),l(i,r),l(i,_),l(_,h),T(h,e[43]),l(_,g),l(_,d),w(u,I,f),w(u,z,f),w(u,Y,f),w(u,E,f),l(E,A),l(E,M),l(E,N),l(E,ae),l(E,H),l(E,W),l(E,V),w(u,G,f),w(u,P,f),l(P,F),l(F,re),l(F,R),R.checked=e[6],l(P,x),l(P,te),l(te,y),l(te,U),U.checked=e[2],l(P,j),l(P,$),l($,ue),l($,K),K.checked=e[3],l(P,_e),l(P,ke),l(ke,de),l(ke,oe),oe.checked=e[4],l(P,J),l(P,he),l(he,q),l(he,ne),ne.checked=e[5],l(P,Z),l(P,v),l(v,X),l(v,S),S.checked=e[7],l(P,fe),l(P,Ee),l(Ee,me),l(Ee,pe),pe.checked=e[8],l(P,Me),l(P,Se),l(Se,Ie),l(Se,be),be.checked=e[9],l(P,ge),l(P,ze),l(ze,Ce),l(ze,ce),ce.checked=e[10],l(P,Le),l(P,le),l(le,Oe),l(le,Ne),Ne.checked=e[11],w(u,Pe,f),w(u,ie,f),w(u,L,f),w(u,Q,f),l(Q,C),l(C,Te),l(Te,Sn),l(Te,We),T(We,e[18]),l(C,Cn),l(C,Tt),l(Tt,Pn),l(Tt,Re),T(Re,e[19]),l(Q,Tn),l(Q,$e),l($e,At),l(At,An),l(At,De),T(De,e[12]),l($e,Mn),l($e,Mt),l(Mt,In),l(Mt,He),T(He,e[13]),l(Q,On),l(Q,et),l(et,It),l(It,Nn),l(It,je),T(je,e[14]),l(et,Wn),l(et,Ot),l(Ot,Rn),l(Ot,Ve),T(Ve,e[15]),l(Q,Dn),l(Q,tt),l(tt,Nt),l(Nt,Hn),l(Nt,Ue),T(Ue,e[16]),l(tt,Un),l(tt,Wt),l(Wt,qn),l(Wt,qe),T(qe,e[17]),w(u,nn,f),w(u,ln,f),w(u,sn,f),w(u,Ae,f),l(Ae,nt),l(nt,Ge),l(Ge,O),l(Ge,on),l(Ge,bt),l(bt,an),l(bt,Rt),l(Ge,rn),l(Ge,_t),l(_t,un),l(_t,Dt),l(nt,cn),l(nt,Be),l(Be,wt),l(Be,dn),l(Be,vt),l(vt,fn),l(vt,Ht),l(Be,hn),l(Be,kt),l(kt,pn),l(kt,Ut),l(Ae,Bn),l(Ae,qt),l(qt,lt),l(lt,Fn),l(lt,vi),l(lt,jn),l(jn,yi),l(jn,Wl),l(lt,ki),l(lt,Gn),l(Gn,zi),l(Gn,Rl),l(qt,Li),l(qt,it),l(it,Yn),l(it,Ei),l(it,Kn),l(Kn,Si),l(Kn,Dl),l(it,Ci),l(it,Qn),l(Qn,Pi),l(Qn,Hl),l(Ae,Ti),l(Ae,Bt),l(Bt,st),l(st,xn),l(st,Ai),l(st,$n),l($n,Mi),l($n,Ul),l(st,Ii),l(st,tl),l(tl,Oi),l(tl,ql),l(Bt,Ni),l(Bt,ot),l(ot,ll),l(ot,Wi),l(ot,il),l(il,Ri),l(il,Bl),l(ot,Di),l(ot,ol),l(ol,Hi),l(ol,Fl),l(Ae,Ui),l(Ae,Ft),l(Ft,at),l(at,rl),l(at,qi),l(at,ul),l(ul,Bi),l(ul,jl),l(at,Fi),l(at,dl),l(dl,ji),l(dl,Vl),l(Ft,Vi),l(Ft,rt),l(rt,hl),l(rt,Gi),l(rt,pl),l(pl,Xi),l(pl,Gl),l(rt,Yi),l(rt,gl),l(gl,Ki),l(gl,Xl),w(u,Yl,f),w(u,Kl,f),w(u,Jl,f),w(u,bn,f),w(u,Ql,f),w(u,Ke,f),l(Ke,ml),l(ml,jt),jt.checked=e[20],l(ml,Ji),l(Ke,Qi),l(Ke,wl),l(wl,Vt),Vt.checked=e[21],l(wl,Zi),l(Ke,xi),l(Ke,vl),l(vl,Gt),Gt.checked=e[25],l(vl,$i),w(u,Zl,f),w(u,Je,f),l(Je,yl),l(yl,es),l(yl,Qe);for(let D=0;De[89].call(r)),a(d,"class","input"),e[37]===void 0&&pt(()=>e[90].call(d)),a(E,"class","input"),a(E,"type","number"),a(n,"class","flex"),Jt(W,"max-width","120px"),a(W,"class","input"),a(W,"type","number"),a(W,"placeholder","R"),Jt(G,"max-width","120px"),a(G,"class","input"),a(G,"type","number"),a(G,"placeholder","G"),Jt(F,"max-width","120px"),a(F,"class","input"),a(F,"type","number"),a(F,"placeholder","B"),Jt(R,"max-width","120px"),a(R,"class","input"),a(R,"type","number"),a(R,"placeholder","A"),a(H,"class","flex"),a(M,"class","flex"),a(y,"class","btn"),Jt(y,"width","80px"),a(te,"class","flex"),a(de,"class","btn"),Jt(de,"width","80px"),a(j,"class","flex"),a(t,"class","flex flex-col gap-1")},m(v,X){w(v,t,X),l(t,n),l(n,i),l(i,o),l(i,r);for(let S=0;S=1,I,z,Y,E=d&&zs(e),A=e[1][e[0]]&&Es(e);return{c(){t=s("div"),n=s("div"),i=s("input"),o=c(),r=s("button"),r.textContent="New window",_=c(),h=s("br"),g=c(),E&&E.c(),I=c(),A&&A.c(),a(i,"class","input grow"),a(i,"type","text"),a(i,"placeholder","New Window label.."),a(r,"class","btn"),a(n,"class","flex gap-1"),a(t,"class","flex flex-col children:grow gap-2")},m(M,N){w(M,t,N),l(t,n),l(n,i),T(i,e[28]),l(n,o),l(n,r),l(t,_),l(t,h),l(t,g),E&&E.m(t,null),l(t,I),A&&A.m(t,null),z||(Y=[k(i,"input",e[58]),k(r,"click",e[53])],z=!0)},p(M,N){N[0]&268435456&&i.value!==M[28]&&T(i,M[28]),N[0]&2&&(d=Object.keys(M[1]).length>=1),d?E?E.p(M,N):(E=zs(M),E.c(),E.m(t,I)):E&&(E.d(1),E=null),M[1][M[0]]?A?A.p(M,N):(A=Es(M),A.c(),A.m(t,null)):A&&(A.d(1),A=null)},i:ee,o:ee,d(M){M&&m(t),E&&E.d(),A&&A.d(),z=!1,Fe(Y)}}}function Fo(e,t,n){const i=mi();let o=i.label;const r={[i.label]:i},_=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"],h=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],g=navigator.appVersion.includes("Windows"),d=navigator.appVersion.includes("Macintosh");let I=g?h:Object.keys(Ml).map(O=>Ml[O]).filter(O=>!h.includes(O));const z=Object.keys(Il).map(O=>Il[O]),Y=Object.keys(Al).map(O=>Al[O]);let{onMessage:E}=t;const A=document.querySelector("main");let M,N=!0,ae=!0,H=!0,W=!0,V=!1,G=!0,P=!1,F=!1,re=!0,R=!1,x=null,te=null,y=null,U=null,j=null,$=null,ue=null,K=null,_e=1,ke=new xe(ue,K),de=new xe(ue,K),oe=new ht(x,te),J=new ht(x,te),he,q,ne=!1,Z=!0,v=null,X=null,S="default",fe=!1,Ee="Awesome Tauri Example!",me=[],pe,Me,Se,Ie,be,ge,ze,Ce="none",ce=0,Le;function le(){r[o].setTitle(Ee)}function Oe(){r[o].hide(),setTimeout(r[o].show,2e3)}function Ne(){r[o].minimize(),setTimeout(r[o].unminimize,2e3)}function Pe(){if(!M)return;const O=new Nl(M);n(1,r[M]=O,r),O.once("tauri://error",function(){E("Error creating new webview")})}function ie(){r[o].innerSize().then(O=>{n(32,oe=O),n(12,x=oe.width),n(13,te=oe.height)}),r[o].outerSize().then(O=>{n(33,J=O)})}function L(){r[o].innerPosition().then(O=>{n(30,ke=O)}),r[o].outerPosition().then(O=>{n(31,de=O),n(18,ue=de.x),n(19,K=de.y)})}async function Q(O){O&&(he&&he(),q&&q(),q=await O.listen("tauri://move",L),he=await O.listen("tauri://resize",ie))}async function C(){await r[o].minimize(),await r[o].requestUserAttention(_i.Critical),await new Promise(O=>setTimeout(O,3e3)),await r[o].requestUserAttention(null)}async function Te(){me.includes(pe)||n(35,me=[...me,pe]);const O={effects:me,state:Me,radius:Se};Number.isInteger(Ie)&&Number.isInteger(be)&&Number.isInteger(ge)&&Number.isInteger(ze)&&(O.color=[Ie,be,ge,ze]),A.classList.remove("bg-primary"),A.classList.remove("dark:bg-darkPrimary"),await r[o].clearEffects(),await r[o].setEffects(O)}async function Sn(){n(35,me=[]),await r[o].clearEffects(),A.classList.add("bg-primary"),A.classList.add("dark:bg-darkPrimary")}function We(){M=this.value,n(28,M)}function Cn(){o=vn(this),n(0,o),n(1,r)}function Tt(){Le=this.value,n(43,Le)}const Pn=()=>r[o].center();function Re(){V=this.checked,n(6,V)}function Tn(){N=this.checked,n(2,N)}function $e(){ae=this.checked,n(3,ae)}function At(){H=this.checked,n(4,H)}function An(){W=this.checked,n(5,W)}function De(){G=this.checked,n(7,G)}function Mn(){P=this.checked,n(8,P)}function Mt(){F=this.checked,n(9,F)}function In(){re=this.checked,n(10,re)}function He(){R=this.checked,n(11,R)}function On(){ue=B(this.value),n(18,ue)}function et(){K=B(this.value),n(19,K)}function It(){x=B(this.value),n(12,x)}function Nn(){te=B(this.value),n(13,te)}function je(){y=B(this.value),n(14,y)}function Wn(){U=B(this.value),n(15,U)}function Ot(){j=B(this.value),n(16,j)}function Rn(){$=B(this.value),n(17,$)}function Ve(){ne=this.checked,n(20,ne)}function Dn(){Z=this.checked,n(21,Z)}function tt(){fe=this.checked,n(25,fe)}function Nt(){S=vn(this),n(24,S),n(44,_)}function Hn(){v=B(this.value),n(22,v)}function Ue(){X=B(this.value),n(23,X)}function Un(){Ee=this.value,n(34,Ee)}function Wt(){Ce=vn(this),n(26,Ce),n(49,Y)}function qn(){ce=B(this.value),n(27,ce)}function qe(){pe=vn(this),n(36,pe),n(47,I)}function nn(){Me=vn(this),n(37,Me),n(48,z)}function ln(){Se=B(this.value),n(38,Se)}function sn(){Ie=B(this.value),n(39,Ie)}function Ae(){be=B(this.value),n(40,be)}function nt(){ge=B(this.value),n(41,ge)}function Ge(){ze=B(this.value),n(42,ze)}return e.$$set=O=>{"onMessage"in O&&n(57,E=O.onMessage)},e.$$.update=()=>{var O,on,bt,an,gt,Rt,rn,_t,un,mt,Dt,cn,Be,wt,dn,vt,fn,yt,Ht,hn,kt,pn,zt,Ut;e.$$.dirty[0]&3&&(r[o],L(),ie()),e.$$.dirty[0]&7&&((O=r[o])==null||O.setResizable(N)),e.$$.dirty[0]&11&&((on=r[o])==null||on.setMaximizable(ae)),e.$$.dirty[0]&19&&((bt=r[o])==null||bt.setMinimizable(H)),e.$$.dirty[0]&35&&((an=r[o])==null||an.setClosable(W)),e.$$.dirty[0]&67&&(V?(gt=r[o])==null||gt.maximize():(Rt=r[o])==null||Rt.unmaximize()),e.$$.dirty[0]&131&&((rn=r[o])==null||rn.setDecorations(G)),e.$$.dirty[0]&259&&((_t=r[o])==null||_t.setAlwaysOnTop(P)),e.$$.dirty[0]&515&&((un=r[o])==null||un.setAlwaysOnBottom(F)),e.$$.dirty[0]&1027&&((mt=r[o])==null||mt.setContentProtected(re)),e.$$.dirty[0]&2051&&((Dt=r[o])==null||Dt.setFullscreen(R)),e.$$.dirty[0]&12291&&x&&te&&((cn=r[o])==null||cn.setSize(new ht(x,te))),e.$$.dirty[0]&49155&&(y&&U?(Be=r[o])==null||Be.setMinSize(new Ln(y,U)):(wt=r[o])==null||wt.setMinSize(null)),e.$$.dirty[0]&196611&&(j>800&&$>400?(dn=r[o])==null||dn.setMaxSize(new Ln(j,$)):(vt=r[o])==null||vt.setMaxSize(null)),e.$$.dirty[0]&786435&&ue!==null&&K!==null&&((fn=r[o])==null||fn.setPosition(new xe(ue,K))),e.$$.dirty[0]&3&&((yt=r[o])==null||yt.scaleFactor().then(Bn=>n(29,_e=Bn))),e.$$.dirty[0]&3&&Q(r[o]),e.$$.dirty[0]&1048579&&((Ht=r[o])==null||Ht.setCursorGrab(ne)),e.$$.dirty[0]&2097155&&((hn=r[o])==null||hn.setCursorVisible(Z)),e.$$.dirty[0]&16777219&&((kt=r[o])==null||kt.setCursorIcon(S)),e.$$.dirty[0]&12582915&&v!==null&&X!==null&&((pn=r[o])==null||pn.setCursorPosition(new xe(v,X))),e.$$.dirty[0]&33554435&&((zt=r[o])==null||zt.setIgnoreCursorEvents(fe)),e.$$.dirty[0]&201326595&&((Ut=r[o])==null||Ut.setProgressBar({status:Ce,progress:ce}))},[o,r,N,ae,H,W,V,G,P,F,re,R,x,te,y,U,j,$,ue,K,ne,Z,v,X,S,fe,Ce,ce,M,_e,ke,de,oe,J,Ee,me,pe,Me,Se,Ie,be,ge,ze,Le,_,g,d,I,z,Y,le,Oe,Ne,Pe,C,Te,Sn,E,We,Cn,Tt,Pn,Re,Tn,$e,At,An,De,Mn,Mt,In,He,On,et,It,Nn,je,Wn,Ot,Rn,Ve,Dn,tt,Nt,Hn,Ue,Un,Wt,qn,qe,nn,ln,sn,Ae,nt,Ge]}class jo extends tn{constructor(t){super(),en(this,t,Fo,Bo,Pt,{onMessage:57},null,[-1,-1,-1,-1])}}function Vo(e){let t;return{c(){t=s("div"),t.innerHTML='
Not available for Linux
',a(t,"class","flex flex-col gap-2")},m(n,i){w(n,t,i)},p:ee,i:ee,o:ee,d(n){n&&m(t)}}}function Go(e,t,n){let{onMessage:i}=t;const o=window.constraints={audio:!0,video:!0};function r(h){const g=document.querySelector("video"),d=h.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${d[0].label}`),window.stream=h,g.srcObject=h}function _(h){if(h.name==="ConstraintNotSatisfiedError"){const g=o.video;i(`The resolution ${g.width.exact}x${g.height.exact} px is not supported by your device.`)}else h.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${h.name}`,h)}return Tl(async()=>{try{const h=await navigator.mediaDevices.getUserMedia(o);r(h)}catch(h){_(h)}}),Us(()=>{window.stream.getTracks().forEach(function(h){h.stop()})}),e.$$set=h=>{"onMessage"in h&&n(0,i=h.onMessage)},[i]}class Xo extends tn{constructor(t){super(),en(this,t,Go,Vo,Pt,{onMessage:0})}}function Yo(e){let t,n,i,o,r,_;return{c(){t=s("div"),n=s("button"),n.textContent="Show",i=c(),o=s("button"),o.textContent="Hide",a(n,"class","btn"),a(n,"id","show"),a(n,"title","Hides and shows the app after 2 seconds"),a(o,"class","btn"),a(o,"id","hide")},m(h,g){w(h,t,g),l(t,n),l(t,i),l(t,o),r||(_=[k(n,"click",e[0]),k(o,"click",e[1])],r=!0)},p:ee,i:ee,o:ee,d(h){h&&m(t),r=!1,Fe(_)}}}function Ko(e,t,n){let{onMessage:i}=t;function o(){r().then(()=>{setTimeout(()=>{Ys().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function r(){return Ks().then(()=>i("Hide app")).catch(i)}return e.$$set=_=>{"onMessage"in _&&n(2,i=_.onMessage)},[o,r,i]}class Jo extends tn{constructor(t){super(),en(this,t,Ko,Yo,Pt,{onMessage:2})}}function As(e,t,n){const i=e.slice();return i[25]=t[n],i}function Ms(e,t,n){const i=e.slice();return i[28]=t[n],i}function Qo(e){let t;return{c(){t=s("span"),a(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&m(t)}}}function Zo(e){let t;return{c(){t=s("span"),a(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&m(t)}}}function xo(e){let t,n;return{c(){t=p(`Switch to Dark mode + `),n=s("div"),a(n,"class","i-ph-moon")},m(i,o){w(i,t,o),w(i,n,o)},d(i){i&&(m(t),m(n))}}}function $o(e){let t,n;return{c(){t=p(`Switch to Light mode + `),n=s("div"),a(n,"class","i-ph-sun")},m(i,o){w(i,t,o),w(i,n,o)},d(i){i&&(m(t),m(n))}}}function ea(e){let t,n,i,o,r,_,h;function g(){return e[14](e[28])}return{c(){t=s("a"),n=s("div"),i=c(),o=s("p"),o.textContent=`${e[28].label}`,a(n,"class",e[28].icon+" mr-2"),a(t,"href","##"),a(t,"class",r="nv "+(e[1]===e[28]?"nv_selected":""))},m(d,I){w(d,t,I),l(t,n),l(t,i),l(t,o),_||(h=k(t,"click",g),_=!0)},p(d,I){e=d,I&2&&r!==(r="nv "+(e[1]===e[28]?"nv_selected":""))&&a(t,"class",r)},d(d){d&&m(t),_=!1,h()}}}function Is(e){let t,n=e[28]&&ea(e);return{c(){n&&n.c(),t=hi()},m(i,o){n&&n.m(i,o),w(i,t,o)},p(i,o){i[28]&&n.p(i,o)},d(i){i&&m(t),n&&n.d(i)}}}function Os(e){let t,n=e[25].html+"",i;return{c(){t=new co(!1),i=hi(),t.a=i},m(o,r){t.m(n,o,r),w(o,i,r)},p(o,r){r&16&&n!==(n=o[25].html+"")&&t.p(n)},d(o){o&&(m(i),t.d())}}}function ta(e){let t,n,i,o,r,_,h,g,d,I,z,Y,E,A,M,N,ae,H,W,V,G,P,F,re,R,x,te,y,U,j,$,ue,K=e[1].label+"",_e,ke,de,oe,J,he,q,ne,Z,v,X,S,fe,Ee,me,pe,Me,Se;function Ie(L,Q){return L[0]?Zo:Qo}let be=Ie(e),ge=be(e);function ze(L,Q){return L[2]?$o:xo}let Ce=ze(e),ce=Ce(e),Le=ye(e[5]),le=[];for(let L=0;L`,ae=c(),H=s("a"),H.innerHTML=`GitHub + `,W=c(),V=s("a"),V.innerHTML=`Source + `,G=c(),P=s("br"),F=c(),re=s("div"),R=c(),x=s("br"),te=c(),y=s("div");for(let L=0;L',Ee=c(),me=s("div");for(let L=0;L{fi(C,1)}),_o()}Oe?(J=fs(Oe,Ne(L)),bs(J.$$.fragment),ci(J.$$.fragment,1),di(J,oe,null)):J=null}if(Q&16){Pe=ye(L[4]);let C;for(C=0;C{y.ctrlKey&&y.key==="b"&&b("toggle_menu")});const o=navigator.userAgent.toLowerCase(),r=o.includes("android")||o.includes("iphone"),_=[{label:"Welcome",component:Ao,icon:"i-ph-hand-waving"},{label:"Communication",component:No,icon:"i-codicon-radio-tower"},!r&&{label:"App",component:Jo,icon:"i-codicon-hubot"},{label:"Window",component:jo,icon:"i-codicon-window"},{label:"WebRTC",component:Xo,icon:"i-ph-broadcast"}];let h=_[0];function g(y){n(1,h=y)}let d;Tl(()=>{n(2,d=localStorage&&localStorage.getItem("theme")=="dark"),Ws(d)});function I(){n(2,d=!d),Ws(d)}let z=vo([]);ao(e,z,y=>n(4,i=y));function Y(y){z.update(U=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof y=="string"?y:JSON.stringify(y,null,1))+"
"},...U])}function E(y){z.update(U=>[{html:`
[${new Date().toLocaleTimeString()}]: `+y+"
"},...U])}function A(){z.update(()=>[])}let M,N,ae;function H(y){ae=y.clientY;const U=window.getComputedStyle(M);N=parseInt(U.height,10);const j=ue=>{const K=ue.clientY-ae,_e=N-K;n(3,M.style.height=`${_e{document.removeEventListener("mouseup",$),document.removeEventListener("mousemove",j)};document.addEventListener("mouseup",$),document.addEventListener("mousemove",j)}let W=!1,V,G,P=!1,F=0,re=0;const R=(y,U,j)=>Math.min(Math.max(U,y),j);Tl(()=>{n(13,V=document.querySelector("#sidebar")),G=document.querySelector("#sidebarToggle"),document.addEventListener("click",y=>{G.contains(y.target)?n(0,W=!W):W&&!V.contains(y.target)&&n(0,W=!1)}),document.addEventListener("touchstart",y=>{if(G.contains(y.target))return;const U=y.touches[0].clientX;(0{if(P){const U=y.touches[0].clientX;re=U;const j=(U-F)/10;V.style.setProperty("--translate-x",`-${R(0,W?0-j:18.75-j,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(P){const y=(re-F)/10;n(0,W=W?y>-(18.75/2):y>18.75/2)}P=!1})});const x=y=>{g(y),n(0,W=!1)};function te(y){ri[y?"unshift":"push"](()=>{M=y,n(3,M)})}return e.$$.update=()=>{if(e.$$.dirty&1){const y=document.querySelector("#sidebar");y&&na(y,W)}},[W,h,d,M,i,_,g,I,z,Y,E,A,H,V,x,te]}class ia extends tn{constructor(t){super(),en(this,t,la,ta,Pt,{})}}new ia({target:document.querySelector("#app")}); diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 09c80f2b8859..62a76a73e5e7 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -40,9 +40,9 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" dependencies = [ "aead", "aes", @@ -54,9 +54,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8f9420f797f2d9e935edf629310eb938a0d839f984e25327f3c7eed22300c" +checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" dependencies = [ "memchr", ] @@ -93,30 +93,29 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" +checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" dependencies = [ "utf8parse", ] @@ -132,9 +131,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.2" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -142,9 +141,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.72" +version = "1.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" [[package]] name = "api" @@ -173,7 +172,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" dependencies = [ - "event-listener", + "event-listener 2.5.3", "futures-core", ] @@ -184,20 +183,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] [[package]] name = "async-executor" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" +checksum = "4b0c4a4f319e45986f347ee47fef8bf5e81c9abc3f6f58dc2391439f30df65f0" dependencies = [ "async-lock", "async-task", "concurrent-queue", - "fastrand 1.9.0", + "fastrand 2.0.1", "futures-lite", "slab", ] @@ -228,7 +227,7 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.23", + "rustix 0.37.26", "slab", "socket2 0.4.9", "waker-fn", @@ -240,53 +239,70 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" dependencies = [ - "event-listener", + "event-listener 2.5.3", ] [[package]] name = "async-process" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9d28b1d97e08915212e2e45310d47854eafa69600756fc735fb788f75199c9" +checksum = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" dependencies = [ "async-io", "async-lock", - "autocfg", + "async-signal", "blocking", "cfg-if", - "event-listener", + "event-listener 3.0.0", "futures-lite", - "rustix 0.37.23", - "signal-hook", + "rustix 0.38.20", "windows-sys 0.48.0", ] [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", +] + +[[package]] +name = "async-signal" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2a5415b7abcdc9cd7d63d6badba5288b2ca017e3fbd4173b8f405449f1a2399" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.20", + "signal-hook-registry", + "slab", + "windows-sys 0.48.0", ] [[package]] name = "async-task" -version = "4.4.0" +version = "4.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" +checksum = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" [[package]] name = "async-trait" -version = "0.1.73" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -315,9 +331,9 @@ dependencies = [ [[package]] name = "atomic-waker" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" @@ -327,9 +343,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -342,9 +358,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "bitflags" @@ -354,9 +370,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] name = "block" @@ -375,24 +391,25 @@ dependencies = [ [[package]] name = "blocking" -version = "1.3.1" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" +checksum = "8c36a4d0d48574b3dd360b4b7d95cc651d2b6557b6402848a27d4b228a473e2a" dependencies = [ "async-channel", "async-lock", "async-task", - "atomic-waker", - "fastrand 1.9.0", + "fastrand 2.0.1", + "futures-io", "futures-lite", - "log", + "piper", + "tracing", ] [[package]] name = "brotli" -version = "3.3.4" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" +checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -401,9 +418,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "2.3.4" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" +checksum = "da74e2b81409b1b743f8f0c62cc6254afefb8b8e50bbfe3735550f7aeefa3448" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -411,27 +428,27 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" dependencies = [ "serde", ] @@ -468,14 +485,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" dependencies = [ "serde", - "toml", + "toml 0.7.8", ] [[package]] name = "cc" -version = "1.0.82" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "305fe645edc1442a0fa8b6726ba61d422798d37a52e12eaecf4b022ebbb88f01" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "libc", ] @@ -499,9 +516,9 @@ dependencies = [ [[package]] name = "cfg-expr" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b40ccee03b5175c18cde8f37e7d2a33bcef6f8ec8f7cc0d81090d1bb380949c9" +checksum = "03915af431787e6ffdcc74c645077518c6b6e01f80b761e0fbbfa288536311b3" dependencies = [ "smallvec", "target-lexicon", @@ -515,15 +532,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "num-traits", "serde", - "winapi", + "windows-targets 0.48.5", ] [[package]] @@ -544,18 +561,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.21" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c27cdf28c0f604ba3f512b0c9a409f8de8513e4816705deb0498b627e7c3a3fd" +checksum = "d04704f56c2cde07f43e8e2c154b43f216dc5c92fc98ada720177362f953b956" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.3.21" +version = "4.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a9f1ab5e9f01a9b81f202e8562eb9a10de70abf9eaeac1be465c28b75aa4aa" +checksum = "0e231faeaca65ebd1ea3c737966bf858971cd38c3849107aa3ea7de90a804e45" dependencies = [ "anstream", "anstyle", @@ -565,9 +582,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "cocoa" @@ -603,15 +620,14 @@ dependencies = [ [[package]] name = "cocoa-foundation" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "931d3837c286f56e3c58423ce4eba12d08db2374461a785c86f672b08b5650d6" +checksum = "8c6234cbb2e4c785b456c0644748b1ac416dd045799740356f8363dfe00c93f7" dependencies = [ "bitflags 1.3.2", "block", "core-foundation", "core-graphics-types", - "foreign-types 0.3.2", "libc", "objc", ] @@ -640,9 +656,9 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" +checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" dependencies = [ "crossbeam-utils", ] @@ -778,7 +794,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -788,7 +804,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37e366bff8cd32dd8754b0991fb66b279dc48f598c3a18914852a6673deef583" dependencies = [ "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -821,7 +837,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -832,15 +848,16 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] name = "deranged" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7684a49fb1af197853ef7b2ee694bc1f5b4179556f1e5710e1760c5db6f5e929" +checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" dependencies = [ + "powerfmt", "serde", ] @@ -928,15 +945,15 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "embed-resource" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7f1e82a60222fc67bfd50d752a9c89da5cce4c39ed39decc84a443b07bbd69a" +checksum = "f54cc3e827ee1c3812239a9a41dede7b4d7d5d5464faa32d71bd7cba28ce2cb2" dependencies = [ "cc", "rustc_version", - "toml", + "toml 0.8.2", "vswhom", - "winreg 0.11.0", + "winreg 0.51.0", ] [[package]] @@ -947,18 +964,18 @@ checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] [[package]] name = "enumflags2" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c041f5090df68b32bcd905365fd51769c8b9d553fe87fde0b683534f10c01bd2" +checksum = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" dependencies = [ "enumflags2_derive", "serde", @@ -966,13 +983,13 @@ dependencies = [ [[package]] name = "enumflags2_derive" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" +checksum = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -983,30 +1000,30 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "ac3e13f66a2f95e32a39eaa81f6b95d42878ca0e1db0c7543723dfe12557e860" dependencies = [ - "errno-dragonfly", "libc", "windows-sys 0.48.0", ] [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "event-listener" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" -dependencies = [ - "cc", - "libc", -] +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "2.5.3" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "29e56284f00d94c1bc7fd3c77027b4623c88c1f53d8d2394c6199f2921dea325" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] [[package]] name = "fastrand" @@ -1019,9 +1036,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" +checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" [[package]] name = "fdeflate" @@ -1044,9 +1061,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" dependencies = [ "crc32fast", "miniz_oxide", @@ -1085,7 +1102,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -1174,7 +1191,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -1358,9 +1375,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "gio" @@ -1516,9 +1533,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.20" +version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" +checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ "bytes", "fnv", @@ -1541,9 +1558,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "hashbrown" -version = "0.14.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" [[package]] name = "heck" @@ -1553,9 +1570,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" [[package]] name = "hex" @@ -1643,16 +1660,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.57" +version = "0.1.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" +checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "windows 0.48.0", + "windows-core", ] [[package]] @@ -1716,12 +1733,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.0.0" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d" +checksum = "8adf3ddd720272c6ea8bf59463c04e0f93d0bbf7c5439b691bca2987e0270897" dependencies = [ "equivalent", - "hashbrown 0.14.0", + "hashbrown 0.14.2", "serde", ] @@ -1769,17 +1786,6 @@ version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix 0.38.8", - "windows-sys 0.48.0", -] - [[package]] name = "itoa" version = "0.4.8" @@ -1848,9 +1854,9 @@ dependencies = [ [[package]] name = "json-patch" -version = "1.0.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658" +checksum = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6" dependencies = [ "serde", "serde_json", @@ -1914,9 +1920,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.147" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "libloading" @@ -1945,15 +1951,15 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "da2479e8c062e40bf0066ffa0bc823de0a9368974af99c9f6df941d2c231e03f" [[package]] name = "lock_api" -version = "0.4.10" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ "autocfg", "scopeguard", @@ -2026,9 +2032,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "memchr" -version = "2.5.0" +version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" [[package]] name = "memoffset" @@ -2131,15 +2137,14 @@ checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.7.1", - "static_assertions", ] [[package]] @@ -2181,9 +2186,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg", ] @@ -2249,9 +2254,9 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -2312,9 +2317,9 @@ dependencies = [ [[package]] name = "parking" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" [[package]] name = "parking_lot" @@ -2328,13 +2333,13 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", + "redox_syscall 0.4.1", "smallvec", "windows-targets 0.48.5", ] @@ -2449,7 +2454,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -2481,9 +2486,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -2491,6 +2496,17 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + [[package]] name = "pkg-config" version = "0.3.27" @@ -2513,9 +2529,9 @@ dependencies = [ [[package]] name = "png" -version = "0.17.9" +version = "0.17.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59871cc5b6cce7eaccca5a802b4173377a1c2ba90654246789a8fa2334426d11" +checksum = "dd75bf2d8dd3702b9707cdbc56a5b9ef42cec752eb8b3bafc01234558442aa64" dependencies = [ "bitflags 1.3.2", "crc32fast", @@ -2552,6 +2568,12 @@ dependencies = [ "universal-hash", ] +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -2571,7 +2593,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" dependencies = [ "once_cell", - "toml_edit", + "toml_edit 0.19.15", ] [[package]] @@ -2606,9 +2628,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -2624,9 +2646,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.32" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f3b39ccfb720540debaa0164757101c08ecb8d326b15358ce76a62c7e85965" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -2736,6 +2758,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -2749,14 +2780,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.3" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.6", - "regex-syntax 0.7.4", + "regex-automata 0.4.3", + "regex-syntax 0.8.2", ] [[package]] @@ -2770,13 +2801,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax 0.8.2", ] [[package]] @@ -2787,15 +2818,15 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.18" +version = "0.11.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde824a14b7c14f85caff81225f411faacc04a2013f41670f41443742b1c1c55" +checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" dependencies = [ "base64", "bytes", @@ -2816,6 +2847,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", + "system-configuration", "tokio", "tokio-util", "tower-service", @@ -2824,7 +2856,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "winreg 0.10.1", + "winreg 0.50.0", ] [[package]] @@ -2844,9 +2876,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.23" +version = "0.37.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "84f3f8f960ed3b5a59055428714943298bf3fa2d4a1d53135084e0544829d995" dependencies = [ "bitflags 1.3.2", "errno", @@ -2858,14 +2890,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.8" +version = "0.38.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +checksum = "67ce50cb2e16c2903e30d1cbccfd8387a74b9d4c938b6a4c5ec6cc7556f7a8a0" dependencies = [ - "bitflags 2.4.0", + "bitflags 2.4.1", "errno", "libc", - "linux-raw-sys 0.4.5", + "linux-raw-sys 0.4.10", "windows-sys 0.48.0", ] @@ -2930,35 +2962,35 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.18" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0293b4b29daaf487284529cc2f5675b8e57c61f70167ba415a463651fd6a918" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] name = "serde" -version = "1.0.183" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32ac8da02677876d532745a130fc9d8e6edfa81a269b107c5b00829b91d8eb3c" +checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.183" +version = "1.0.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafe972d60b0b9bee71a91b92fee2d4fb3c9d7e8f6b179aa99f27203d99a4816" +checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] name = "serde_json" -version = "1.0.104" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "itoa 1.0.9", "ryu", @@ -2973,7 +3005,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -2999,15 +3031,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.2.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1402f54f9a3b9e2efe71c1cea24e648acce55887983553eeb858cf3115acfd49" +checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23" dependencies = [ "base64", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_json", "serde_with_macros", @@ -3016,14 +3048,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.2.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9197f1ad0e3c173a0222d3c4404fb04c3afe87e962bcb327af73e8301fa203c7" +checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -3060,9 +3092,9 @@ dependencies = [ [[package]] name = "sha1" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", @@ -3071,9 +3103,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.7" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", @@ -3082,23 +3114,13 @@ dependencies = [ [[package]] name = "sharded-slab" -version = "0.1.4" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" dependencies = [ "lazy_static", ] -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -3116,24 +3138,24 @@ checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] [[package]] name = "smallvec" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb4feee49fdd9f707ef802e22365a35de4b7b299de4763d44bfea899442ff9" +checksum = "942b4a808e05215192e39f4ab80813e599068285906cc91aa64f923db842bd5a" [[package]] name = "socket2" @@ -3147,9 +3169,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" dependencies = [ "libc", "windows-sys 0.48.0", @@ -3266,25 +3288,46 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.28" +version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04361975b3f5e348b2189d8dc55bc942f278b2d482a6a0365de5bdd62d351567" +checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "system-deps" -version = "6.1.1" +version = "6.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30c2de8a4d8f4b823d634affc9cd2a74ec98c53a756f317e529a48046cbf71f3" +checksum = "94af52f9402f94aac4948a2518b43359be8d9ce6cd9efc1c4de3b2f7b7e897d6" dependencies = [ "cfg-expr", "heck", "pkg-config", - "toml", + "toml 0.8.2", "version-compare", ] @@ -3350,9 +3393,9 @@ dependencies = [ [[package]] name = "target-lexicon" -version = "0.12.11" +version = "0.12.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" +checksum = "14c39fd04924ca3a864207c66fc2cd7d22d7c016007f9ce846cbb9326331930a" [[package]] name = "tauri" @@ -3412,6 +3455,7 @@ version = "2.0.0-alpha.10" dependencies = [ "anyhow", "cargo_toml", + "dirs-next", "heck", "json-patch", "plist", @@ -3558,19 +3602,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5993dc129e544393574288923d1ec447c857f3f644187f4fbf7d9a875fbfc4fb" dependencies = [ "embed-resource", - "toml", + "toml 0.7.8", ] [[package]] name = "tempfile" -version = "3.7.1" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ "cfg-if", - "fastrand 2.0.0", + "fastrand 2.0.1", "redox_syscall 0.3.5", - "rustix 0.38.8", + "rustix 0.38.20", "windows-sys 0.48.0", ] @@ -3593,22 +3637,22 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -3623,12 +3667,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.25" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" +checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa 1.0.9", + "powerfmt", "serde", "time-core", "time-macros", @@ -3636,15 +3681,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" dependencies = [ "time-core", ] @@ -3679,9 +3724,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.31.0" +version = "1.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40de3a2ba249dcb097e01be5e67a5ff53cf250397715a071a81543e8a832a920" +checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653" dependencies = [ "backtrace", "bytes", @@ -3689,15 +3734,15 @@ dependencies = [ "mio", "num_cpus", "pin-project-lite", - "socket2 0.5.3", + "socket2 0.5.4", "windows-sys 0.48.0", ] [[package]] name = "tokio-util" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +checksum = "1d68074620f57a0b21594d9735eb2e98ab38b17f80d3fcb189fca266771ca60d" dependencies = [ "bytes", "futures-core", @@ -3709,14 +3754,26 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit", + "toml_edit 0.19.15", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.20.2", ] [[package]] @@ -3730,11 +3787,24 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.0.2", + "serde", + "serde_spanned", + "toml_datetime", + "winnow", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.0.0", + "indexmap 2.0.2", "serde", "serde_spanned", "toml_datetime", @@ -3749,11 +3819,10 @@ checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] name = "tracing" -version = "0.1.37" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3761,20 +3830,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.26" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] name = "tracing-core" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -3811,9 +3880,9 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b0e5bec13da15e62330e9bcf8b9fd42489b5acfe29ac8fec7ed659dbee21d9" +checksum = "6b164327e17101c78ba3dfdf879b977027ef1bd7855668ac30063de21fc02447" dependencies = [ "cocoa 0.25.0", "core-graphics 0.23.1", @@ -3845,9 +3914,9 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uds_windows" @@ -3867,9 +3936,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -3898,9 +3967,9 @@ dependencies = [ [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -3922,9 +3991,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" +checksum = "88ad59a7560b41a70d191093a945f0b87bc1deeda46fb237479708a1d6b6cdfc" dependencies = [ "getrandom 0.2.10", ] @@ -3969,15 +4038,15 @@ dependencies = [ [[package]] name = "waker-fn" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" +checksum = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -4025,7 +4094,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", "wasm-bindgen-shared", ] @@ -4059,7 +4128,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4072,9 +4141,9 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-streams" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bbae3363c08332cadccd13b67db371814cd214c2524020932f0804b8cf7c078" +checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" dependencies = [ "futures-util", "js-sys", @@ -4095,9 +4164,9 @@ dependencies = [ [[package]] name = "webkit2gtk" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ba4cce9085e0fb02575cfd45c328740dde78253cba516b1e8be2ca0f57bd8bf" +checksum = "6f8db2963d7f1bd4ac2a208ab925881b4779dd20fee853b09a0bbf69289827c2" dependencies = [ "bitflags 1.3.2", "cairo-rs", @@ -4119,9 +4188,9 @@ dependencies = [ [[package]] name = "webkit2gtk-sys" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4489eb24e8cf0a3d0555fd3a8f7adec2a5ece34c1e7b7c9a62da7822fd40a59" +checksum = "864ebc9a39649baf49e46c713cd8b741cca14dd59d24cd77bc611ba9419fa18d" dependencies = [ "bitflags 1.3.2", "cairo-sys-rs", @@ -4158,7 +4227,7 @@ checksum = "ac1345798ecd8122468840bcdf1b95e5dc6d2206c5e4b0eafa078d061f59c9bc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -4194,9 +4263,9 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" dependencies = [ "winapi", ] @@ -4209,14 +4278,14 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "window-shadows" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d30320647cfc3dc45554c8ad825b84831def81f967a2f7589931328ff9b16d" +checksum = "67ff424735b1ac21293b0492b069394b0a189c8a463fb015a16dea7c2e221c08" dependencies = [ - "cocoa 0.24.1", + "cocoa 0.25.0", "objc", "raw-window-handle", - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -4292,7 +4361,7 @@ checksum = "fb2b158efec5af20d8846836622f50a87e6556b9153a42772fa047f773c0e555" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -4314,7 +4383,7 @@ checksum = "0546e63e1ce64c04403d2311fa0e3ab5ae3a367bd524b4a38d8d8d18c70cfa76" dependencies = [ "proc-macro2", "quote", - "syn 2.0.28", + "syn 2.0.38", ] [[package]] @@ -4323,21 +4392,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "422ee0e5f0e2cc372bb6addbfff9a8add712155cd743df9c15f6ab000f31432d" -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", -] - [[package]] name = "windows-sys" version = "0.45.0" @@ -4478,37 +4532,38 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.10" +version = "0.5.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5504cc7644f4b593cbc05c4a55bf9bd4e94b867c3c0bd440934174d50482427d" +checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" dependencies = [ "memchr", ] [[package]] name = "winreg" -version = "0.10.1" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "winapi", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] name = "winreg" -version = "0.11.0" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a1a57ff50e9b408431e8f97d5456f2807f8eb2a2cd79b06068fc87f8ecf189" +checksum = "937f3df7948156640f46aacef17a70db0de5917bda9c92b0f751f3a955b588fc" dependencies = [ "cfg-if", - "winapi", + "windows-sys 0.48.0", ] [[package]] name = "wry" -version = "0.33.0" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf906b43b8042615c85a978dceb4d4b72214d27b850b54abc3edeb7c5a67abab" +checksum = "2cb3bc6ed7e3d905a5a963a3e4e9ee5ede76408e50de42d68e523ee75ab1c78a" dependencies = [ "base64", "block", @@ -4593,7 +4648,7 @@ dependencies = [ "byteorder", "derivative", "enumflags2", - "event-listener", + "event-listener 2.5.3", "futures-core", "futures-sink", "futures-util", diff --git a/examples/multiwindow/index.html b/examples/multiwindow/index.html index 3e89ee93a83c..d415b1ae3322 100644 --- a/examples/multiwindow/index.html +++ b/examples/multiwindow/index.html @@ -14,17 +14,17 @@