diff --git a/.changes/move-updater.md b/.changes/move-updater.md new file mode 100644 index 00000000000..e4d682392c9 --- /dev/null +++ b/.changes/move-updater.md @@ -0,0 +1,7 @@ +--- +"api": patch +"tauri": patch +"tauri-utils": patch +--- + +Moved the `updater` feature to its own plugin in the plugins-workspace repository. diff --git a/.github/workflows/artifacts-updater.yml b/.github/workflows/artifacts-updater.yml deleted file mode 100644 index 1811669bb21..00000000000 --- a/.github/workflows/artifacts-updater.yml +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright 2019-2023 Tauri Programme within The Commons Conservancy -# SPDX-License-Identifier: Apache-2.0 -# SPDX-License-Identifier: MIT - -name: updater test artifacts -on: - schedule: - - cron: '0 0 * * *' - pull_request: - paths: - - '.github/workflows/artifacts-updater.yml' - - 'examples/updater/**' - workflow_dispatch: - -env: - RUST_BACKTRACE: 1 - CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency. - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build-artifacts: - runs-on: ${{ matrix.platform }} - - strategy: - fail-fast: false - matrix: - platform: [ubuntu-latest, macos-latest, windows-latest] - - steps: - - uses: actions/checkout@v2 - - 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.1 libayatana-appindicator3-dev - - - uses: Swatinem/rust-cache@v2 - with: - workspaces: | - core -> ../target - tooling/cli - - - name: build and install cli.rs - run: cargo install --path tooling/cli --force - - name: Check whether code signing should be enabled - id: enablecodesigning - env: - ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }} - run: | - echo "Enable code signing: ${{ env.ENABLE_CODE_SIGNING != '' }}" - echo "::set-output name=enabled::${{ env.ENABLE_CODE_SIGNING != '' }}" - - # run only on tauri-apps/tauri repo (require secrets) - - name: build sample artifacts + code signing (updater) - if: steps.enablecodesigning.outputs.enabled == 'true' - working-directory: ./examples/updater - run: | - yarn install - cargo tauri build --verbose - env: - # Notarization (disabled) - # FIXME: enable only on `dev` push maybe? as it take some times... - # - # APPLE_ID: ${{ secrets.APPLE_ID }} - # APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} - - # Apple code signing testing - APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} - APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} - APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} - # Updater signature is exposed here to make sure it works in PR's - TAURI_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg== - TAURI_KEY_PASSWORD: - # run on PRs and forks - - name: build sample artifacts (updater) - if: steps.enablecodesigning.outputs.enabled != 'true' - working-directory: ./examples/updater - run: | - yarn install - cargo tauri build --verbose - env: - TAURI_PRIVATE_KEY: dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg== - TAURI_KEY_PASSWORD: - # upload assets - - uses: actions/upload-artifact@v2 - if: matrix.platform == 'ubuntu-latest' - with: - name: linux-updater-artifacts - path: ./examples/updater/src-tauri/target/release/bundle/appimage/updater-example_*.AppImage.* - - uses: actions/upload-artifact@v2 - if: matrix.platform == 'windows-latest' - with: - name: windows-updater-artifacts - path: ./examples/updater/src-tauri/target/release/bundle/msi/* - - uses: actions/upload-artifact@v2 - if: matrix.platform == 'macos-latest' - with: - name: macos-updater-artifacts - path: ./examples/updater/src-tauri/target/release/bundle/macos/updater-example.app.tar.* diff --git a/.scripts/update-lockfiles.sh b/.scripts/update-lockfiles.sh index 68d52b0c028..c9d9bc2da2f 100755 --- a/.scripts/update-lockfiles.sh +++ b/.scripts/update-lockfiles.sh @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: MIT -declare -a examples=("api" "sidecar" "updater" "resources" "tauri-dynamic-lib" "workspace") +declare -a examples=("api" "sidecar" "resources" "tauri-dynamic-lib" "workspace") declare -a tooling=("bench" "cli" "webdriver") for example in "${examples[@]}" diff --git a/Cargo.toml b/Cargo.toml index af5d14713f1..438e14c32e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,13 +12,11 @@ members = [ # integration tests "core/tests/restart", - "core/tests/app-updater", ] exclude = [ # examples that can be compiled with the tauri CLI "examples/api/src-tauri", - "examples/updater/src-tauri", "examples/resources/src-tauri", "examples/sidecar/src-tauri", "examples/web/core", diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index dc5f2f1c031..e66a43597fd 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -2206,12 +2206,7 @@ impl TauriConfig { #[allow(dead_code)] pub fn all_features() -> Vec<&'static str> { let mut features = AllowlistConfig::all_features(); - features.extend(vec![ - "updater", - "system-tray", - "macos-private-api", - "isolation", - ]); + features.extend(vec!["system-tray", "macos-private-api", "isolation"]); features } @@ -2219,9 +2214,6 @@ impl TauriConfig { #[allow(dead_code)] pub fn features(&self) -> Vec<&str> { let mut features = self.allowlist.to_features(); - if self.updater.active { - features.push("updater"); - } if self.system_tray.is_some() { features.push("system-tray"); } diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 3ee8cdb8d58..71f8a0bae3f 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -60,12 +60,10 @@ flate2 = "1.0" http = "0.2" dirs-next = "2.0" percent-encoding = "2.2" -base64 = { version = "0.21", optional = true } reqwest = { version = "0.11", default-features = false, features = [ "json", "stream" ] } bytes = { version = "1", features = [ "serde" ] } raw-window-handle = "0.5" -minisign-verify = { version = "0.2", optional = true } -time = { version = "0.3", features = [ "parsing", "formatting" ], optional = true } +time = { version = "0.3", optional = true } glob = "0.3" data-url = { version = "0.2", optional = true } serialize-to-javascript = "=0.1.1" @@ -110,14 +108,12 @@ once_cell = "1" tauri-build = { path = "../tauri-build/", version = "2.0.0-alpha.1" } [dev-dependencies] -mockito = "0.31" proptest = "1.0.0" quickcheck = "1.0.3" quickcheck_macros = "1.0.0" serde = { version = "1.0", features = [ "derive" ] } serde_json = "1.0" tauri = { path = ".", default-features = false, features = [ "wry" ] } -tokio-test = "0.4.2" tokio = { version = "1", features = [ "full" ] } cargo_toml = "0.11" winnow = "=0.4.1" @@ -130,13 +126,7 @@ objc-exception = [ "tauri-runtime-wry/objc-exception" ] linux-protocol-headers = [ "tauri-runtime-wry/linux-headers", "webkit2gtk/v2_36" ] isolation = [ "tauri-utils/isolation", "tauri-macros/isolation" ] custom-protocol = [ "tauri-macros/custom-protocol" ] -updater = [ - "minisign-verify", - "time", - "base64", - "dialog-ask", - "fs-extract-api" -] +updater = [ "time" ] fs-extract-api = [ "zip" ] native-tls = [ "reqwest/native-tls" ] native-tls-vendored = [ "reqwest/native-tls-vendored" ] diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 30f1121db4b..060ce6b7645 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,3 +1,3 @@ -"use strict";var __TAURI_IIFE__=(()=>{var D=Object.defineProperty;var j=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var K=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var n in e)D(t,n,{get:e[n],enumerable:!0})},Q=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of q(e))!K.call(t,l)&&l!==n&&D(t,l,{get:()=>e[l],enumerable:!(o=j(e,l))||o.enumerable});return t};var Z=t=>Q(D({},"__esModule",{value:!0}),t);var Oe={};m(Oe,{event:()=>S,invoke:()=>ze,path:()=>R,tauri:()=>C,updater:()=>I,window:()=>z});var S={};m(S,{TauriEvent:()=>w,emit:()=>P,listen:()=>A,once:()=>T});var C={};m(C,{convertFileSrc:()=>J,invoke:()=>r,transformCallback:()=>g});function Y(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function g(t,e=!1){let n=Y(),o=`_${n}`;return Object.defineProperty(window,o,{value:l=>(e&&Reflect.deleteProperty(window,o),t?.(l)),writable:!1,configurable:!0}),n}async function r(t,e={}){return new Promise((n,o)=>{let l=g(u=>{n(u),Reflect.deleteProperty(window,`_${s}`)},!0),s=g(u=>{o(u),Reflect.deleteProperty(window,`_${l}`)},!0);window.__TAURI_IPC__({cmd:t,callback:l,error:s,...e})})}function J(t,e="asset"){let n=encodeURIComponent(t);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${n}`:`${e}://localhost/${n}`}async function i(t){return r("tauri",t)}async function O(t,e){return i({__tauriModule:"Event",message:{cmd:"unlisten",event:t,eventId:e}})}async function b(t,e,n){await i({__tauriModule:"Event",message:{cmd:"emit",event:t,windowLabel:e,payload:n}})}async function h(t,e,n){return i({__tauriModule:"Event",message:{cmd:"listen",event:t,windowLabel:e,handler:g(n)}}).then(o=>async()=>O(t,o))}async function _(t,e,n){return h(t,e,o=>{n(o),O(t,o.id).catch(()=>{})})}var w=(d=>(d.WINDOW_RESIZED="tauri://resize",d.WINDOW_MOVED="tauri://move",d.WINDOW_CLOSE_REQUESTED="tauri://close-requested",d.WINDOW_CREATED="tauri://window-created",d.WINDOW_DESTROYED="tauri://destroyed",d.WINDOW_FOCUS="tauri://focus",d.WINDOW_BLUR="tauri://blur",d.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",d.WINDOW_THEME_CHANGED="tauri://theme-changed",d.WINDOW_FILE_DROP="tauri://file-drop",d.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",d.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",d.MENU="tauri://menu",d.CHECK_UPDATE="tauri://update",d.UPDATE_AVAILABLE="tauri://update-available",d.INSTALL_UPDATE="tauri://update-install",d.STATUS_UPDATE="tauri://update-status",d.DOWNLOAD_PROGRESS="tauri://update-download-progress",d))(w||{});async function A(t,e){return h(t,null,e)}async function T(t,e){return _(t,null,e)}async function P(t,e){return b(t,void 0,e)}var R={};m(R,{BaseDirectory:()=>k,appCacheDir:()=>ne,appConfigDir:()=>B,appDataDir:()=>ee,appLocalDataDir:()=>te,appLogDir:()=>fe,audioDir:()=>ie,basename:()=>Te,cacheDir:()=>ae,configDir:()=>re,dataDir:()=>oe,delimiter:()=>We,desktopDir:()=>se,dirname:()=>Ce,documentDir:()=>le,downloadDir:()=>ue,executableDir:()=>de,extname:()=>Ae,fontDir:()=>ce,homeDir:()=>me,isAbsolute:()=>Se,join:()=>De,localDataDir:()=>pe,normalize:()=>Me,pictureDir:()=>ye,publicDir:()=>ge,resolve:()=>Ee,resolveResource:()=>be,resourceDir:()=>he,runtimeDir:()=>_e,sep:()=>ve,templateDir:()=>we,videoDir:()=>Pe});function U(){return navigator.appVersion.includes("Win")}var k=(a=>(a[a.Audio=1]="Audio",a[a.Cache=2]="Cache",a[a.Config=3]="Config",a[a.Data=4]="Data",a[a.LocalData=5]="LocalData",a[a.Document=6]="Document",a[a.Download=7]="Download",a[a.Picture=8]="Picture",a[a.Public=9]="Public",a[a.Video=10]="Video",a[a.Resource=11]="Resource",a[a.Temp=12]="Temp",a[a.AppConfig=13]="AppConfig",a[a.AppData=14]="AppData",a[a.AppLocalData=15]="AppLocalData",a[a.AppCache=16]="AppCache",a[a.AppLog=17]="AppLog",a[a.Desktop=18]="Desktop",a[a.Executable=19]="Executable",a[a.Font=20]="Font",a[a.Home=21]="Home",a[a.Runtime=22]="Runtime",a[a.Template=23]="Template",a))(k||{});async function B(){return r("plugin:path|resolve_directory",{directory:13})}async function ee(){return r("plugin:path|resolve_directory",{directory:14})}async function te(){return r("plugin:path|resolve_directory",{directory:15})}async function ne(){return r("plugin:path|resolve_directory",{directory:16})}async function ie(){return r("plugin:path|resolve_directory",{directory:1})}async function ae(){return r("plugin:path|resolve_directory",{directory:2})}async function re(){return r("plugin:path|resolve_directory",{directory:3})}async function oe(){return r("plugin:path|resolve_directory",{directory:4})}async function se(){return r("plugin:path|resolve_directory",{directory:18})}async function le(){return r("plugin:path|resolve_directory",{directory:6})}async function ue(){return r("plugin:path|resolve_directory",{directory:7})}async function de(){return r("plugin:path|resolve_directory",{directory:19})}async function ce(){return r("plugin:path|resolve_directory",{directory:20})}async function me(){return r("plugin:path|resolve_directory",{directory:21})}async function pe(){return r("plugin:path|resolve_directory",{directory:5})}async function ye(){return r("plugin:path|resolve_directory",{directory:8})}async function ge(){return r("plugin:path|resolve_directory",{directory:9})}async function he(){return r("plugin:path|resolve_directory",{directory:11})}async function be(t){return r("plugin:path|resolve_directory",{directory:11,path:t})}async function _e(){return r("plugin:path|resolve_directory",{directory:22})}async function we(){return r("plugin:path|resolve_directory",{directory:23})}async function Pe(){return r("plugin:path|resolve_directory",{directory:10})}async function fe(){return r("plugin:path|resolve_directory",{directory:17})}var ve=U()?"\\":"/",We=U()?";":":";async function Ee(...t){return r("plugin:path|resolve",{paths:t})}async function Me(t){return r("plugin:path|normalize",{path:t})}async function De(...t){return r("plugin:path|join",{paths:t})}async function Ce(t){return r("plugin:path|dirname",{path:t})}async function Ae(t){return r("plugin:path|extname",{path:t})}async function Te(t,e){return r("plugin:path|basename",{path:t,ext:e})}async function Se(t){return r("plugin:path|isAbsolute",{path:t})}var I={};m(I,{checkUpdate:()=>Re,installUpdate:()=>Ue,onUpdaterEvent:()=>L});async function L(t){return A("tauri://update-status",e=>{t(e?.payload)})}async function Ue(){let t;function e(){t&&t(),t=void 0}return new Promise((n,o)=>{function l(s){if(s.error){e(),o(s.error);return}s.status==="DONE"&&(e(),n())}L(l).then(s=>{t=s}).catch(s=>{throw e(),s}),P("tauri://update-install").catch(s=>{throw e(),s})})}async function Re(){let t;function e(){t&&t(),t=void 0}return new Promise((n,o)=>{function l(u){e(),n({manifest:u,shouldUpdate:!0})}function s(u){if(u.error){e(),o(u.error);return}u.status==="UPTODATE"&&(e(),n({shouldUpdate:!1}))}T("tauri://update-available",u=>{l(u?.payload)}).catch(u=>{throw e(),u}),L(s).then(u=>{t=u}).catch(u=>{throw e(),u}),P("tauri://update").catch(u=>{throw e(),u})})}var z={};m(z,{CloseRequestedEvent:()=>M,LogicalPosition:()=>v,LogicalSize:()=>f,PhysicalPosition:()=>y,PhysicalSize:()=>p,UserAttentionType:()=>V,WebviewWindow:()=>c,WebviewWindowHandle:()=>W,WindowManager:()=>E,appWindow:()=>x,availableMonitors:()=>Fe,currentMonitor:()=>Ie,getAll:()=>H,getCurrent:()=>Le,primaryMonitor:()=>xe});var f=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},p=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new f(this.width/e,this.height/e)}},v=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},y=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new v(this.x/e,this.y/e)}},V=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(V||{});function Le(){return new c(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function H(){return window.__TAURI_METADATA__.__windows.map(t=>new c(t.label,{skip:!0}))}var N=["tauri://created","tauri://error"],W=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(n),1)}):h(e,this.label,n)}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(n),1)}):_(e,this.label,n)}async emit(e,n){if(N.includes(e)){for(let o of this.listeners[e]||[])o({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return b(e,this.label,n)}_handleTauriEvent(e,n){return N.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}},E=class extends W{async scaleFactor(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:n})=>new y(e,n))}async outerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:n})=>new y(e,n))}async innerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:n})=>new p(e,n))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:n})=>new p(e,n))}async isFullscreen(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:n}}}})}async setResizable(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload: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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload: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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload: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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload: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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=$(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=G(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let o=new M(n);Promise.resolve(e(o)).then(()=>{if(!o.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),o=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{n(),o()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",s=>{e({...s,payload:{type:"drop",paths:s.payload}})}),o=await this.listen("tauri://file-drop-hover",s=>{e({...s,payload:{type:"hover",paths:s.payload}})}),l=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{n(),o(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},M=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}},c=class extends E{constructor(e,n={}){super(e),n?.skip||i({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...n}}}}).then(async()=>this.emit("tauri://created")).catch(async o=>this.emit("tauri://error",o))}static getByLabel(e){return H().some(n=>n.label===e)?new c(e,{skip:!0}):null}},x;"__TAURI_METADATA__"in window?x=new c(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. -Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),x=new c("main",{skip:!0}));function F(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:G(t.position),size:$(t.size)}}function G(t){return new y(t.x,t.y)}function $(t){return new p(t.width,t.height)}async function Ie(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(F)}async function xe(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(F)}async function Fe(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(t=>t.map(F))}var ze=r;return Z(Oe);})(); +"use strict";var __TAURI_IIFE__=(()=>{var M=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var p=(n,e)=>{for(var t in e)M(n,t,{get:e[t],enumerable:!0})},$=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of V(e))!H.call(n,s)&&s!==t&&M(n,s,{get:()=>e[s],enumerable:!(o=U(e,s))||o.enumerable});return n};var G=n=>$(M({},"__esModule",{value:!0}),n);var Ie={};p(Ie,{event:()=>D,invoke:()=>Se,path:()=>A,tauri:()=>E,window:()=>x});var D={};p(D,{TauriEvent:()=>C,emit:()=>J,listen:()=>Z,once:()=>Y});var E={};p(E,{convertFileSrc:()=>q,invoke:()=>r,transformCallback:()=>y});function j(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function y(n,e=!1){let t=j(),o=`_${t}`;return Object.defineProperty(window,o,{value:s=>(e&&Reflect.deleteProperty(window,o),n?.(s)),writable:!1,configurable:!0}),t}async function r(n,e={}){return new Promise((t,o)=>{let s=y(W=>{t(W),Reflect.deleteProperty(window,`_${c}`)},!0),c=y(W=>{o(W),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:n,callback:s,error:c,...e})})}function q(n,e="asset"){let t=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${t}`:`${e}://localhost/${t}`}async function i(n){return r("tauri",n)}async function S(n,e){return i({__tauriModule:"Event",message:{cmd:"unlisten",event:n,eventId:e}})}async function h(n,e,t){await i({__tauriModule:"Event",message:{cmd:"emit",event:n,windowLabel:e,payload:t}})}async function g(n,e,t){return i({__tauriModule:"Event",message:{cmd:"listen",event:n,windowLabel:e,handler:y(t)}}).then(o=>async()=>S(n,o))}async function b(n,e,t){return g(n,e,o=>{t(o),S(n,o.id).catch(()=>{})})}var C=(l=>(l.WINDOW_RESIZED="tauri://resize",l.WINDOW_MOVED="tauri://move",l.WINDOW_CLOSE_REQUESTED="tauri://close-requested",l.WINDOW_CREATED="tauri://window-created",l.WINDOW_DESTROYED="tauri://destroyed",l.WINDOW_FOCUS="tauri://focus",l.WINDOW_BLUR="tauri://blur",l.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",l.WINDOW_THEME_CHANGED="tauri://theme-changed",l.WINDOW_FILE_DROP="tauri://file-drop",l.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",l.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",l.MENU="tauri://menu",l))(C||{});async function Z(n,e){return g(n,null,e)}async function Y(n,e){return b(n,null,e)}async function J(n,e){return h(n,void 0,e)}var A={};p(A,{BaseDirectory:()=>I,appCacheDir:()=>ee,appConfigDir:()=>K,appDataDir:()=>X,appLocalDataDir:()=>B,appLogDir:()=>we,audioDir:()=>te,basename:()=>De,cacheDir:()=>ne,configDir:()=>ie,dataDir:()=>ae,delimiter:()=>ve,desktopDir:()=>re,dirname:()=>Ee,documentDir:()=>oe,downloadDir:()=>se,executableDir:()=>le,extname:()=>Ce,fontDir:()=>ce,homeDir:()=>ue,isAbsolute:()=>Te,join:()=>Me,localDataDir:()=>de,normalize:()=>We,pictureDir:()=>me,publicDir:()=>pe,resolve:()=>fe,resolveResource:()=>ge,resourceDir:()=>ye,runtimeDir:()=>he,sep:()=>Pe,templateDir:()=>be,videoDir:()=>_e});function T(){return navigator.appVersion.includes("Win")}var I=(a=>(a[a.Audio=1]="Audio",a[a.Cache=2]="Cache",a[a.Config=3]="Config",a[a.Data=4]="Data",a[a.LocalData=5]="LocalData",a[a.Document=6]="Document",a[a.Download=7]="Download",a[a.Picture=8]="Picture",a[a.Public=9]="Public",a[a.Video=10]="Video",a[a.Resource=11]="Resource",a[a.Temp=12]="Temp",a[a.AppConfig=13]="AppConfig",a[a.AppData=14]="AppData",a[a.AppLocalData=15]="AppLocalData",a[a.AppCache=16]="AppCache",a[a.AppLog=17]="AppLog",a[a.Desktop=18]="Desktop",a[a.Executable=19]="Executable",a[a.Font=20]="Font",a[a.Home=21]="Home",a[a.Runtime=22]="Runtime",a[a.Template=23]="Template",a))(I||{});async function K(){return r("plugin:path|resolve_directory",{directory:13})}async function X(){return r("plugin:path|resolve_directory",{directory:14})}async function B(){return r("plugin:path|resolve_directory",{directory:15})}async function ee(){return r("plugin:path|resolve_directory",{directory:16})}async function te(){return r("plugin:path|resolve_directory",{directory:1})}async function ne(){return r("plugin:path|resolve_directory",{directory:2})}async function ie(){return r("plugin:path|resolve_directory",{directory:3})}async function ae(){return r("plugin:path|resolve_directory",{directory:4})}async function re(){return r("plugin:path|resolve_directory",{directory:18})}async function oe(){return r("plugin:path|resolve_directory",{directory:6})}async function se(){return r("plugin:path|resolve_directory",{directory:7})}async function le(){return r("plugin:path|resolve_directory",{directory:19})}async function ce(){return r("plugin:path|resolve_directory",{directory:20})}async function ue(){return r("plugin:path|resolve_directory",{directory:21})}async function de(){return r("plugin:path|resolve_directory",{directory:5})}async function me(){return r("plugin:path|resolve_directory",{directory:8})}async function pe(){return r("plugin:path|resolve_directory",{directory:9})}async function ye(){return r("plugin:path|resolve_directory",{directory:11})}async function ge(n){return r("plugin:path|resolve_directory",{directory:11,path:n})}async function he(){return r("plugin:path|resolve_directory",{directory:22})}async function be(){return r("plugin:path|resolve_directory",{directory:23})}async function _e(){return r("plugin:path|resolve_directory",{directory:10})}async function we(){return r("plugin:path|resolve_directory",{directory:17})}var Pe=T()?"\\":"/",ve=T()?";":":";async function fe(...n){return r("plugin:path|resolve",{paths:n})}async function We(n){return r("plugin:path|normalize",{path:n})}async function Me(...n){return r("plugin:path|join",{paths:n})}async function Ee(n){return r("plugin:path|dirname",{path:n})}async function Ce(n){return r("plugin:path|extname",{path:n})}async function De(n,e){return r("plugin:path|basename",{path:n,ext:e})}async function Te(n){return r("plugin:path|isAbsolute",{path:n})}var x={};p(x,{CloseRequestedEvent:()=>f,LogicalPosition:()=>w,LogicalSize:()=>_,PhysicalPosition:()=>m,PhysicalSize:()=>d,UserAttentionType:()=>k,WebviewWindow:()=>u,WebviewWindowHandle:()=>P,WindowManager:()=>v,appWindow:()=>z,availableMonitors:()=>xe,currentMonitor:()=>ze,getAll:()=>F,getCurrent:()=>Ae,primaryMonitor:()=>Re});var _=class{constructor(e,t){this.type="Logical";this.width=e,this.height=t}},d=class{constructor(e,t){this.type="Physical";this.width=e,this.height=t}toLogical(e){return new _(this.width/e,this.height/e)}},w=class{constructor(e,t){this.type="Logical";this.x=e,this.y=t}},m=class{constructor(e,t){this.type="Physical";this.x=e,this.y=t}toLogical(e){return new w(this.x/e,this.y/e)}},k=(t=>(t[t.Critical=1]="Critical",t[t.Informational=2]="Informational",t))(k||{});function Ae(){return new u(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function F(){return window.__TAURI_METADATA__.__windows.map(n=>new u(n.label,{skip:!0}))}var L=["tauri://created","tauri://error"],P=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(t),1)}):g(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(t),1)}):b(e,this.label,t)}async emit(e,t){if(L.includes(e)){for(let o of this.listeners[e]||[])o({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return h(e,this.label,t)}_handleTauriEvent(e,t){return L.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},v=class extends P{async scaleFactor(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new m(e,t))}async outerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new m(e,t))}async innerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new d(e,t))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new d(e,t))}async isFullscreen(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload: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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload: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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload: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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload: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 i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",t=>{t.payload=N(t.payload),e(t)})}async onMoved(e){return this.listen("tauri://move",t=>{t.payload=O(t.payload),e(t)})}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let o=new f(t);Promise.resolve(e(o)).then(()=>{if(!o.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",s=>{e({...s,payload:!0})}),o=await this.listen("tauri://blur",s=>{e({...s,payload:!1})});return()=>{t(),o()}}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",c=>{e({...c,payload:{type:"drop",paths:c.payload}})}),o=await this.listen("tauri://file-drop-hover",c=>{e({...c,payload:{type:"hover",paths:c.payload}})}),s=await this.listen("tauri://file-drop-cancelled",c=>{e({...c,payload:{type:"cancel"}})});return()=>{t(),o(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},f=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}},u=class extends v{constructor(e,t={}){super(e),t?.skip||i({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async o=>this.emit("tauri://error",o))}static getByLabel(e){return F().some(t=>t.label===e)?new u(e,{skip:!0}):null}},z;"__TAURI_METADATA__"in window?z=new u(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. +Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),z=new u("main",{skip:!0}));function R(n){return n===null?null:{name:n.name,scaleFactor:n.scaleFactor,position:O(n.position),size:N(n.size)}}function O(n){return new m(n.x,n.y)}function N(n){return new d(n.width,n.height)}async function ze(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(R)}async function Re(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(R)}async function xe(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(n=>n.map(R))}var Se=r;return G(Ie);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index d12f2ece1c2..4cfc1b0cd57 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -45,9 +45,6 @@ use crate::runtime::menu::{Menu, MenuId, MenuIdRef}; use crate::runtime::RuntimeHandle; -#[cfg(updater)] -use crate::updater; - #[cfg(target_os = "macos")] use crate::ActivationPolicy; @@ -232,12 +229,6 @@ impl GlobalWindowEvent { } } -#[cfg(updater)] -#[derive(Debug, Clone, Default)] -pub(crate) struct UpdaterSettings { - pub(crate) target: Option, -} - /// The asset resolver is a helper to access the [`tauri_utils::assets::Assets`] interface. #[derive(Debug, Clone)] pub struct AssetResolver { @@ -259,15 +250,11 @@ impl AssetResolver { pub struct AppHandle { pub(crate) runtime_handle: R::Handle, pub(crate) manager: WindowManager, - /// The updater configuration. - #[cfg(updater)] - pub(crate) updater_settings: UpdaterSettings, } impl AppHandle { - // currently only used on the updater - #[allow(dead_code)] - pub(crate) fn create_proxy(&self) -> R::EventLoopProxy { + /// Creates a proxy to send events through the event loop. + pub fn create_proxy(&self) -> R::EventLoopProxy { self.runtime_handle.create_proxy() } } @@ -306,8 +293,6 @@ impl Clone for AppHandle { Self { runtime_handle: self.runtime_handle.clone(), manager: self.manager.clone(), - #[cfg(updater)] - updater_settings: self.updater_settings.clone(), } } } @@ -511,29 +496,6 @@ impl App { macro_rules! shared_app_impl { ($app: ty) => { impl $app { - #[cfg(updater)] - #[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))] - /// Gets the updater builder to manually check if an update is available. - /// - /// # Examples - /// - /// ```no_run - /// tauri::Builder::default() - /// .setup(|app| { - /// let handle = app.handle(); - /// tauri::async_runtime::spawn(async move { - #[cfg_attr( - feature = "updater", - doc = r#" let response = handle.updater().check().await;"# - )] - /// }); - /// Ok(()) - /// }); - /// ``` - pub fn updater(&self) -> updater::UpdateBuilder { - updater::builder(self.app_handle()) - } - /// Gets a handle to the first system tray. /// /// Prefer [`Self::tray_handle_by_id`] when multiple system trays are created. @@ -788,21 +750,6 @@ impl App { } } -#[cfg(updater)] -impl App { - fn run_updater(&self) { - // check if updater is active or not - if self.manager.config().tauri.updater.active { - // we only listen for `tauri://update` - // once we receive the call, we check if an update is available or not - // if there is a new update we emit `tauri://update-available` with details - // this is the user responsibilities to display dialog and ask if user want to install - // to install the update you need to invoke the Event `tauri://update-install` - updater::listener(self.handle()); - } - } -} - /// Builds a Tauri application. /// /// # Examples @@ -866,10 +813,6 @@ pub struct Builder { #[cfg(all(desktop, feature = "system-tray"))] system_tray_event_listeners: Vec>, - /// The updater configuration. - #[cfg(updater)] - updater_settings: UpdaterSettings, - /// The device event filter. device_event_filter: DeviceEventFilter, } @@ -898,8 +841,6 @@ impl Builder { system_tray: None, #[cfg(all(desktop, feature = "system-tray"))] system_tray_event_listeners: Vec::new(), - #[cfg(updater)] - updater_settings: Default::default(), device_event_filter: Default::default(), } } @@ -1307,42 +1248,6 @@ impl Builder { self } - /// Sets the current platform's target name for the updater. - /// - /// See [`UpdateBuilder::target`](crate::updater::UpdateBuilder#method.target) for more information. - /// - /// # Examples - /// - /// - Use a macOS Universal binary target name: - /// - /// ``` - /// let mut builder = tauri::Builder::default(); - /// #[cfg(target_os = "macos")] - /// { - /// builder = builder.updater_target("darwin-universal"); - /// } - /// ``` - /// - /// - Append debug information to the target: - /// - /// ``` - /// let kind = if cfg!(debug_assertions) { "debug" } else { "release" }; - /// tauri::Builder::default() - /// .updater_target(format!("{}-{kind}", tauri::updater::target().unwrap())); - /// ``` - /// - /// - Use the platform's target triple: - /// - /// ``` - /// tauri::Builder::default() - /// .updater_target(tauri::utils::platform::target_triple().unwrap()); - /// ``` - #[cfg(updater)] - pub fn updater_target>(mut self, target: T) -> Self { - self.updater_settings.target.replace(target.into()); - self - } - /// Change the device event filter mode. /// /// Since the DeviceEvent capture can lead to high CPU usage for unfocused windows, [`tao`] @@ -1431,8 +1336,6 @@ impl Builder { handle: AppHandle { runtime_handle, manager, - #[cfg(updater)] - updater_settings: self.updater_settings, }, }; @@ -1550,8 +1453,6 @@ fn setup(app: &mut App) -> crate::Result<()> { (setup)(app).map_err(|e| crate::Error::Setup(e.into()))?; } - #[cfg(updater)] - app.run_updater(); Ok(()) } diff --git a/core/tauri/src/error.rs b/core/tauri/src/error.rs index 8040085898f..bd5ecda30ea 100644 --- a/core/tauri/src/error.rs +++ b/core/tauri/src/error.rs @@ -61,10 +61,6 @@ pub enum Error { /// IO error. #[error("{0}")] Io(#[from] std::io::Error), - /// Failed to decode base64. - #[cfg(feature = "updater")] - #[error("Failed to decode base64 string: {0}")] - Base64Decode(#[from] base64::DecodeError), /// Failed to load window icon. #[error("invalid icon: {0}")] InvalidIcon(std::io::Error), @@ -77,11 +73,6 @@ pub enum Error { /// Encountered an error in the setup hook, #[error("error encountered during setup hook: {0}")] Setup(SetupError), - /// Tauri updater error. - #[cfg(updater)] - #[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))] - #[error("Updater: {0}")] - TauriUpdater(#[from] crate::updater::Error), /// Error initializing plugin. #[error("failed to initialize plugin `{0}`: {1}")] PluginInitialization(String, String), diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 22aff414c58..f5d97b6a5e7 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -199,9 +199,6 @@ pub mod process; /// The allowlist scopes. pub mod scope; mod state; -#[cfg(updater)] -#[cfg_attr(doc_cfg, doc(cfg(feature = "updater")))] -pub mod updater; pub use tauri_utils as utils; @@ -377,20 +374,6 @@ pub enum UpdaterEvent { Error(String), } -#[cfg(updater)] -impl UpdaterEvent { - pub(crate) fn status_message(self) -> &'static str { - match self { - Self::Pending => updater::EVENT_STATUS_PENDING, - Self::Downloaded => updater::EVENT_STATUS_DOWNLOADED, - Self::Updated => updater::EVENT_STATUS_SUCCESS, - Self::AlreadyUpToDate => updater::EVENT_STATUS_UPTODATE, - Self::Error(_) => updater::EVENT_STATUS_ERROR, - _ => unreachable!(), - } - } -} - /// The user event type. #[derive(Debug, Clone)] pub enum EventLoopMessage { diff --git a/core/tauri/src/updater/core.rs b/core/tauri/src/updater/core.rs deleted file mode 100644 index a69621392af..00000000000 --- a/core/tauri/src/updater/core.rs +++ /dev/null @@ -1,1653 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use super::error::{Error, Result}; -#[cfg(desktop)] -use crate::api::file::{ArchiveFormat, Extract, Move}; -use crate::{AppHandle, Manager, Runtime}; -use base64::Engine; -use futures_util::StreamExt; -use http::{ - header::{HeaderName, HeaderValue}, - HeaderMap, Method, StatusCode, -}; -use minisign_verify::{PublicKey, Signature}; -use reqwest::ClientBuilder; -use semver::Version; -use serde::{de::Error as DeError, Deserialize, Deserializer, Serialize}; -use tauri_utils::{platform::current_exe, Env}; -use time::OffsetDateTime; -use url::Url; - -#[cfg(desktop)] -use std::io::Seek; -use std::{ - collections::HashMap, - env, - fmt::{self}, - io::{Cursor, Read}, - path::{Path, PathBuf}, - str::{from_utf8, FromStr}, - time::Duration, -}; - -#[cfg(any(target_os = "linux", windows))] -use std::ffi::OsStr; - -#[cfg(all(desktop, not(target_os = "windows")))] -use crate::api::file::Compression; - -#[cfg(target_os = "windows")] -use std::{ - fs::read_dir, - process::{exit, Command}, -}; - -type ShouldInstall = dyn FnOnce(&Version, &RemoteRelease) -> bool + Send; - -#[derive(Debug, Deserialize, Serialize)] -#[serde(untagged)] -pub enum RemoteReleaseInner { - Dynamic(ReleaseManifestPlatform), - Static { - platforms: HashMap, - }, -} - -/// Information about a release returned by the remote update server. -/// -/// This type can have one of two shapes: Server Format (Dynamic Format) and Static Format. -#[derive(Debug)] -pub struct RemoteRelease { - /// Version to install. - version: Version, - /// Release notes. - notes: Option, - /// Release date. - pub_date: Option, - /// Release data. - data: RemoteReleaseInner, -} - -impl<'de> Deserialize<'de> for RemoteRelease { - fn deserialize(deserializer: D) -> std::result::Result - where - D: Deserializer<'de>, - { - #[derive(Deserialize)] - struct InnerRemoteRelease { - #[serde(alias = "name", deserialize_with = "parse_version")] - version: Version, - notes: Option, - pub_date: Option, - platforms: Option>, - // dynamic platform response - url: Option, - signature: Option, - #[cfg(target_os = "windows")] - #[serde(default)] - with_elevated_task: bool, - } - - let release = InnerRemoteRelease::deserialize(deserializer)?; - - let pub_date = if let Some(date) = release.pub_date { - Some( - OffsetDateTime::parse(&date, &time::format_description::well_known::Rfc3339) - .map_err(|e| DeError::custom(format!("invalid value for `pub_date`: {e}")))?, - ) - } else { - None - }; - - Ok(RemoteRelease { - version: release.version, - notes: release.notes, - pub_date, - data: if let Some(platforms) = release.platforms { - RemoteReleaseInner::Static { platforms } - } else { - RemoteReleaseInner::Dynamic(ReleaseManifestPlatform { - url: release.url.ok_or_else(|| { - DeError::custom("the `url` field was not set on the updater response") - })?, - signature: release.signature.ok_or_else(|| { - DeError::custom("the `signature` field was not set on the updater response") - })?, - #[cfg(target_os = "windows")] - with_elevated_task: release.with_elevated_task, - }) - }, - }) - } -} - -#[derive(Debug, Deserialize, Serialize)] -pub struct ReleaseManifestPlatform { - /// Download URL for the platform - pub url: Url, - /// Signature for the platform - pub signature: String, - #[cfg(target_os = "windows")] - #[serde(default)] - /// Optional: Windows only try to use elevated task - pub with_elevated_task: bool, -} - -fn parse_version<'de, D>(deserializer: D) -> std::result::Result -where - D: serde::Deserializer<'de>, -{ - let str = String::deserialize(deserializer)?; - - Version::from_str(str.trim_start_matches('v')).map_err(serde::de::Error::custom) -} - -impl RemoteRelease { - /// The release version. - pub fn version(&self) -> &Version { - &self.version - } - - /// The release notes. - pub fn notes(&self) -> Option<&String> { - self.notes.as_ref() - } - - /// The release date. - pub fn pub_date(&self) -> Option<&OffsetDateTime> { - self.pub_date.as_ref() - } - - /// The release's download URL for the given target. - pub fn download_url(&self, target: &str) -> Result<&Url> { - match self.data { - RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.url), - RemoteReleaseInner::Static { ref platforms } => platforms - .get(target) - .map_or(Err(Error::TargetNotFound(target.to_string())), |p| { - Ok(&p.url) - }), - } - } - - /// The release's signature for the given target. - pub fn signature(&self, target: &str) -> Result<&String> { - match self.data { - RemoteReleaseInner::Dynamic(ref platform) => Ok(&platform.signature), - RemoteReleaseInner::Static { ref platforms } => platforms - .get(target) - .map_or(Err(Error::TargetNotFound(target.to_string())), |platform| { - Ok(&platform.signature) - }), - } - } - - #[cfg(target_os = "windows")] - /// Optional: Windows only try to use elevated task - pub fn with_elevated_task(&self, target: &str) -> Result { - match self.data { - RemoteReleaseInner::Dynamic(ref platform) => Ok(platform.with_elevated_task), - RemoteReleaseInner::Static { ref platforms } => platforms - .get(target) - .map_or(Err(Error::TargetNotFound(target.to_string())), |platform| { - Ok(platform.with_elevated_task) - }), - } - } -} - -pub struct UpdateBuilder { - /// Application handle. - pub app: AppHandle, - /// Current version we are running to compare with announced version - pub current_version: Version, - /// The URLs to checks updates. We suggest at least one fallback on a different domain. - pub urls: Vec, - /// The platform the updater will check and install the update. Default is from `get_updater_target` - pub target: Option, - /// The current executable path. Default is automatically extracted. - pub executable_path: Option, - should_install: Option>, - timeout: Option, - headers: HeaderMap, -} - -impl fmt::Debug for UpdateBuilder { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("UpdateBuilder") - .field("app", &self.app) - .field("current_version", &self.current_version) - .field("urls", &self.urls) - .field("target", &self.target) - .field("executable_path", &self.executable_path) - .field("timeout", &self.timeout) - .field("headers", &self.headers) - .finish() - } -} - -// Create new updater instance and return an Update -impl UpdateBuilder { - pub fn new(app: AppHandle) -> Self { - UpdateBuilder { - app, - urls: Vec::new(), - target: None, - executable_path: None, - // safe to unwrap: CARGO_PKG_VERSION is also a valid semver value - current_version: env!("CARGO_PKG_VERSION").parse().unwrap(), - should_install: None, - timeout: None, - headers: Default::default(), - } - } - - #[allow(dead_code)] - pub fn url(mut self, url: String) -> Self { - self.urls.push( - percent_encoding::percent_decode(url.as_bytes()) - .decode_utf8_lossy() - .to_string(), - ); - self - } - - /// Add multiple URLS at once inside a Vec for future reference - pub fn urls(mut self, urls: &[String]) -> Self { - let mut formatted_vec: Vec = Vec::new(); - for url in urls { - formatted_vec.push( - percent_encoding::percent_decode(url.as_bytes()) - .decode_utf8_lossy() - .to_string(), - ); - } - self.urls = formatted_vec; - self - } - - /// Set the current app version, used to compare against the latest available version. - /// The `cargo_crate_version!` macro can be used to pull the version from your `Cargo.toml` - pub fn current_version(mut self, ver: Version) -> Self { - self.current_version = ver; - self - } - - /// Set the target name. Represents the string that is looked up on the updater API or response JSON. - pub fn target(mut self, target: impl Into) -> Self { - self.target.replace(target.into()); - self - } - - /// Set the executable path - #[allow(dead_code)] - pub fn executable_path>(mut self, executable_path: A) -> Self { - self.executable_path = Some(PathBuf::from(executable_path.as_ref())); - self - } - - pub fn should_install bool + Send + 'static>( - mut self, - f: F, - ) -> Self { - self.should_install.replace(Box::new(f)); - self - } - - pub fn timeout(mut self, timeout: Duration) -> Self { - self.timeout.replace(timeout); - self - } - - /// Add a `Header` to the request. - pub fn header(mut self, key: K, value: V) -> Result - where - HeaderName: TryFrom, - >::Error: Into, - HeaderValue: TryFrom, - >::Error: Into, - { - let key: std::result::Result = key.try_into().map_err(Into::into); - let value: std::result::Result = value.try_into().map_err(Into::into); - self.headers.insert(key?, value?); - Ok(self) - } - - pub async fn build(mut self) -> Result> { - let mut remote_release: Option = None; - - // make sure we have at least one url - if self.urls.is_empty() { - return Err(Error::Builder( - "Unable to check update, `url` is required.".into(), - )); - }; - - // If no executable path provided, we use current_exe from tauri_utils - let executable_path = self.executable_path.unwrap_or(current_exe()?); - - let arch = get_updater_arch().ok_or(Error::UnsupportedArch)?; - // `target` is the `{{target}}` variable we replace in the endpoint - // `json_target` is the value we search if the updater server returns a JSON with the `platforms` object - let (target, json_target) = if let Some(target) = self.target { - (target.clone(), target) - } else { - let target = get_updater_target().ok_or(Error::UnsupportedOs)?; - (target.to_string(), format!("{target}-{arch}")) - }; - - // Get the extract_path from the provided executable_path - let extract_path = extract_path_from_executable(&self.app.state::(), &executable_path); - - // Set SSL certs for linux if they aren't available. - // We do not require to recheck in the download_and_install as we use - // ENV variables, we can expect them to be set for the second call. - #[cfg(target_os = "linux")] - { - if env::var_os("SSL_CERT_FILE").is_none() { - env::set_var("SSL_CERT_FILE", "/etc/ssl/certs/ca-certificates.crt"); - } - if env::var_os("SSL_CERT_DIR").is_none() { - env::set_var("SSL_CERT_DIR", "/etc/ssl/certs"); - } - } - - // we want JSON only - let mut headers = self.headers; - headers.insert("Accept", HeaderValue::from_str("application/json").unwrap()); - - // Allow fallback if more than 1 urls is provided - let mut last_error: Option = None; - for url in &self.urls { - // replace {{current_version}}, {{target}} and {{arch}} in the provided URL - // this is useful if we need to query example - // https://releases.myapp.com/update/{{target}}/{{arch}}/{{current_version}} - // will be translated into -> - // https://releases.myapp.com/update/darwin/aarch64/1.0.0 - // The main objective is if the update URL is defined via the Cargo.toml - // the URL will be generated dynamically - let fixed_link = url - .replace("{{current_version}}", &self.current_version.to_string()) - .replace("{{target}}", &target) - .replace("{{arch}}", arch); - - let client = ClientBuilder::new().build()?; - let mut request = client - .request(Method::GET, &fixed_link) - .headers(headers.clone()); - if let Some(timeout) = self.timeout { - request = request.timeout(timeout); - } - - // If we got a success, we stop the loop - // and we set our remote_release variable - if let Ok(res) = request.send().await { - let status = res.status(); - // got status code 2XX - if status.is_success() { - // if we got 204 - if status == StatusCode::NO_CONTENT { - // return with `UpToDate` error - // we should catch on the client - return Err(Error::UpToDate); - }; - let data = res.bytes().await?; - // Convert the remote result to our local struct - let built_release = serde_json::from_slice(&data).map_err(Into::into); - // make sure all went well and the remote data is compatible - // with what we need locally - match built_release { - Ok(release) => { - last_error = None; - remote_release = Some(release); - break; - } - Err(err) => last_error = Some(err), - } - } // if status code is not 2XX we keep loopin' our urls - } - } - - // Last error is cleaned on success -- shouldn't be triggered if - // we have a successful call - if let Some(error) = last_error { - return Err(error); - } - - // Extracted remote metadata - let final_release = remote_release.ok_or(Error::ReleaseNotFound)?; - - // is the announced version greater than our current one? - let should_update = if let Some(comparator) = self.should_install.take() { - comparator(&self.current_version, &final_release) - } else { - final_release.version() > &self.current_version - }; - - headers.remove("Accept"); - - // create our new updater - Ok(Update { - app: self.app, - target, - extract_path, - should_update, - version: final_release.version().to_string(), - date: final_release.pub_date().cloned(), - current_version: self.current_version, - download_url: final_release.download_url(&json_target)?.to_owned(), - body: final_release.notes().cloned(), - signature: final_release.signature(&json_target)?.to_owned(), - #[cfg(target_os = "windows")] - with_elevated_task: final_release.with_elevated_task(&json_target)?, - timeout: self.timeout, - headers, - }) - } -} - -pub fn builder(app: AppHandle) -> UpdateBuilder { - UpdateBuilder::new(app) -} - -#[derive(Debug)] -pub struct Update { - /// Application handle. - pub app: AppHandle, - /// Update description - pub body: Option, - /// Should we update or not - pub should_update: bool, - /// Version announced - pub version: String, - /// Running version - pub current_version: Version, - /// Update publish date - pub date: Option, - /// Target - #[allow(dead_code)] - target: String, - /// Extract path - extract_path: PathBuf, - /// Download URL announced - download_url: Url, - /// Signature announced - signature: String, - #[cfg(target_os = "windows")] - /// Optional: Windows only try to use elevated task - /// Default to false - with_elevated_task: bool, - /// Request timeout - timeout: Option, - /// Request headers - headers: HeaderMap, -} - -impl Clone for Update { - fn clone(&self) -> Self { - Self { - app: self.app.clone(), - body: self.body.clone(), - should_update: self.should_update, - version: self.version.clone(), - current_version: self.current_version.clone(), - date: self.date, - target: self.target.clone(), - extract_path: self.extract_path.clone(), - download_url: self.download_url.clone(), - signature: self.signature.clone(), - #[cfg(target_os = "windows")] - with_elevated_task: self.with_elevated_task, - timeout: self.timeout, - headers: self.headers.clone(), - } - } -} - -impl Update { - // Download and install our update - // @todo(lemarier): Split into download and install (two step) but need to be thread safe - pub(crate) async fn download_and_install), D: FnOnce()>( - &self, - pub_key: String, - on_chunk: C, - on_download_finish: D, - ) -> Result { - // make sure we can install the update on linux - // We fail here because later we can add more linux support - // actually if we use APPIMAGE, our extract path should already - // be set with our APPIMAGE env variable, we don't need to do - // anything with it yet - #[cfg(target_os = "linux")] - if self.app.state::().appimage.is_none() { - return Err(Error::UnsupportedLinuxPackage); - } - - // set our headers - let mut headers = self.headers.clone(); - headers.insert( - "Accept", - HeaderValue::from_str("application/octet-stream").unwrap(), - ); - headers.insert( - "User-Agent", - HeaderValue::from_str("tauri/updater").unwrap(), - ); - - let client = ClientBuilder::new().build()?; - // Create our request - let mut req = client - .request(Method::GET, self.download_url.clone()) - .headers(headers); - if let Some(timeout) = self.timeout { - req = req.timeout(timeout); - } - - let response = req.send().await?; - - // make sure it's success - if !response.status().is_success() { - return Err(Error::DownloadFailed(response.status())); - } - - let content_length: Option = response - .headers() - .get("Content-Length") - .and_then(|value| value.to_str().ok()) - .and_then(|value| value.parse().ok()); - - let mut buffer = Vec::new(); - - let mut stream = response.bytes_stream(); - while let Some(chunk) = stream.next().await { - let chunk = chunk?; - let bytes = chunk.as_ref().to_vec(); - on_chunk(bytes.len(), content_length); - buffer.extend(bytes); - } - - on_download_finish(); - - // create memory buffer from our archive (Seek + Read) - let mut archive_buffer = Cursor::new(buffer); - - // We need an announced signature by the server - // if there is no signature, bail out. - verify_signature(&mut archive_buffer, &self.signature, &pub_key)?; - - // TODO: implement updater in mobile - #[cfg(desktop)] - { - // we copy the files depending of the operating system - // we run the setup, appimage re-install or overwrite the - // macos .app - #[cfg(target_os = "windows")] - copy_files_and_run( - archive_buffer, - &self.extract_path, - self.with_elevated_task, - &self.app.config(), - )?; - #[cfg(not(target_os = "windows"))] - copy_files_and_run(archive_buffer, &self.extract_path)?; - } - - // We are done! - Ok(()) - } -} - -// Linux (AppImage) - -// ### Expected structure: -// ├── [AppName]_[version]_amd64.AppImage.tar.gz # GZ generated by tauri-bundler -// │ └──[AppName]_[version]_amd64.AppImage # Application AppImage -// └── ... - -// We should have an AppImage already installed to be able to copy and install -// the extract_path is the current AppImage path -// tmp_dir is where our new AppImage is found -#[cfg(target_os = "linux")] -fn copy_files_and_run(archive_buffer: R, extract_path: &Path) -> Result { - use std::os::unix::fs::{MetadataExt, PermissionsExt}; - - let extract_path_metadata = extract_path.metadata()?; - - let tmp_dir_locations = vec![ - Box::new(|| Some(env::temp_dir())) as Box Option>, - Box::new(dirs_next::cache_dir), - Box::new(|| Some(extract_path.parent().unwrap().to_path_buf())), - ]; - - for tmp_dir_location in tmp_dir_locations { - if let Some(tmp_dir_location) = tmp_dir_location() { - let tmp_dir = tempfile::Builder::new() - .prefix("tauri_current_app") - .tempdir_in(tmp_dir_location)?; - let tmp_dir_metadata = tmp_dir.path().metadata()?; - - if extract_path_metadata.dev() == tmp_dir_metadata.dev() { - let mut perms = tmp_dir_metadata.permissions(); - perms.set_mode(0o700); - std::fs::set_permissions(tmp_dir.path(), perms)?; - - let tmp_app_image = &tmp_dir.path().join("current_app.AppImage"); - - // create a backup of our current app image - Move::from_source(extract_path).to_dest(tmp_app_image)?; - - // extract the buffer to the tmp_dir - // we extract our signed archive into our final directory without any temp file - let mut extractor = - Extract::from_cursor(archive_buffer, ArchiveFormat::Tar(Some(Compression::Gz))); - - return extractor - .with_files(|entry| { - let path = entry.path()?; - if path.extension() == Some(OsStr::new("AppImage")) { - // if something went wrong during the extraction, we should restore previous app - if let Err(err) = entry.extract(extract_path) { - Move::from_source(tmp_app_image).to_dest(extract_path)?; - return Err(crate::api::Error::Extract(err.to_string())); - } - // early finish we have everything we need here - return Ok(true); - } - Ok(false) - }) - .map_err(Into::into); - } - } - } - - Err(Error::TempDirNotOnSameMountPoint) -} - -// Windows -// -// ### Expected structure: -// ├── [AppName]_[version]_x64.msi.zip # ZIP generated by tauri-bundler -// │ └──[AppName]_[version]_x64.msi # Application MSI -// ├── [AppName]_[version]_x64-setup.exe.zip # ZIP generated by tauri-bundler -// │ └──[AppName]_[version]_x64-setup.exe # NSIS installer -// └── ... -// -// ## MSI -// Update server can provide a MSI for Windows. (Generated with tauri-bundler from *Wix*) -// To replace current version of the application. In later version we'll offer -// incremental update to push specific binaries. -// -// ## EXE -// Update server can provide a custom EXE (installer) who can run any task. -#[cfg(target_os = "windows")] -#[allow(clippy::unnecessary_wraps)] -fn copy_files_and_run( - archive_buffer: R, - _extract_path: &Path, - with_elevated_task: bool, - config: &crate::Config, -) -> Result { - // FIXME: We need to create a memory buffer with the MSI and then run it. - // (instead of extracting the MSI to a temp path) - // - // The tricky part is the MSI need to be exposed and spawned so the memory allocation - // shouldn't drop but we should be able to pass the reference so we can drop it once the installation - // is done, otherwise we have a huge memory leak. - - let tmp_dir = tempfile::Builder::new().tempdir()?.into_path(); - - // extract the buffer to the tmp_dir - // we extract our signed archive into our final directory without any temp file - let mut extractor = Extract::from_cursor(archive_buffer, ArchiveFormat::Zip); - - // extract the msi - extractor.extract_into(&tmp_dir)?; - - let paths = read_dir(&tmp_dir)?; - - for path in paths { - let found_path = path?.path(); - // we support 2 type of files exe & msi for now - // If it's an `exe` we expect an installer not a runtime. - if found_path.extension() == Some(OsStr::new("exe")) { - // Run the EXE - let mut installer = Command::new(found_path); - if crate::utils::config::WindowsUpdateInstallMode::Quiet - == config.tauri.updater.windows.install_mode - { - installer.arg("/S"); - } - installer.args(&config.tauri.updater.windows.installer_args); - - installer.spawn().expect("installer failed to start"); - - exit(0); - } else if found_path.extension() == Some(OsStr::new("msi")) { - if with_elevated_task { - if let Some(bin_name) = current_exe() - .ok() - .and_then(|pb| pb.file_name().map(|s| s.to_os_string())) - .and_then(|s| s.into_string().ok()) - { - let product_name = bin_name.replace(".exe", ""); - - // Check if there is a task that enables the updater to skip the UAC prompt - let update_task_name = format!("Update {product_name} - Skip UAC"); - if let Ok(output) = Command::new("schtasks") - .arg("/QUERY") - .arg("/TN") - .arg(update_task_name.clone()) - .output() - { - if output.status.success() { - // Rename the MSI to the match file name the Skip UAC task is expecting it to be - let temp_msi = tmp_dir.with_file_name(bin_name).with_extension("msi"); - Move::from_source(&found_path) - .to_dest(&temp_msi) - .expect("Unable to move update MSI"); - let exit_status = Command::new("schtasks") - .arg("/RUN") - .arg("/TN") - .arg(update_task_name) - .status() - .expect("failed to start updater task"); - - if exit_status.success() { - // Successfully launched task that skips the UAC prompt - exit(0); - } - } - // Failed to run update task. Following UAC Path - } - } - } - - // we need to wrap the current exe path in quotes for Start-Process - let mut current_exe_arg = std::ffi::OsString::new(); - current_exe_arg.push("\""); - current_exe_arg.push(current_exe()?); - current_exe_arg.push("\""); - - let mut msi_path_arg = std::ffi::OsString::new(); - msi_path_arg.push("\"\"\""); - msi_path_arg.push(&found_path); - msi_path_arg.push("\"\"\""); - - let mut msiexec_args = config - .tauri - .updater - .windows - .install_mode - .clone() - .msiexec_args() - .iter() - .map(|p| p.to_string()) - .collect::>(); - msiexec_args.extend(config.tauri.updater.windows.installer_args.clone()); - - // run the installer and relaunch the application - let system_root = std::env::var("SYSTEMROOT"); - let powershell_path = system_root.as_ref().map_or_else( - |_| "powershell.exe".to_string(), - |p| format!("{p}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"), - ); - let powershell_install_res = Command::new(powershell_path) - .args(["-NoProfile", "-windowstyle", "hidden"]) - .args([ - "Start-Process", - "-Wait", - "-FilePath", - "$env:SYSTEMROOT\\System32\\msiexec.exe", - "-ArgumentList", - ]) - .arg("/i,") - .arg(msi_path_arg) - .arg(format!(", {}, /promptrestart;", msiexec_args.join(", "))) - .arg("Start-Process") - .arg(current_exe_arg) - .spawn(); - if powershell_install_res.is_err() { - // fallback to running msiexec directly - relaunch won't be available - // we use this here in case powershell fails in an older machine somehow - let msiexec_path = system_root.as_ref().map_or_else( - |_| "msiexec.exe".to_string(), - |p| format!("{p}\\System32\\msiexec.exe"), - ); - let _ = Command::new(msiexec_path) - .arg("/i") - .arg(found_path) - .args(msiexec_args) - .arg("/promptrestart") - .spawn(); - } - - exit(0); - } - } - - Ok(()) -} - -// MacOS -// ### Expected structure: -// ├── [AppName]_[version]_x64.app.tar.gz # GZ generated by tauri-bundler -// │ └──[AppName].app # Main application -// │ └── Contents # Application contents... -// │ └── ... -// └── ... -#[cfg(target_os = "macos")] -fn copy_files_and_run(archive_buffer: R, extract_path: &Path) -> Result { - let mut extracted_files: Vec = Vec::new(); - - // extract the buffer to the tmp_dir - // we extract our signed archive into our final directory without any temp file - let mut extractor = - Extract::from_cursor(archive_buffer, ArchiveFormat::Tar(Some(Compression::Gz))); - // the first file in the tar.gz will always be - // /Contents - let tmp_dir = tempfile::Builder::new() - .prefix("tauri_current_app") - .tempdir()?; - - // create backup of our current app - Move::from_source(extract_path).to_dest(tmp_dir.path())?; - - // extract all the files - extractor.with_files(|entry| { - let path = entry.path()?; - // skip the first folder (should be the app name) - let collected_path: PathBuf = path.iter().skip(1).collect(); - let extraction_path = extract_path.join(collected_path); - - // if something went wrong during the extraction, we should restore previous app - if let Err(err) = entry.extract(&extraction_path) { - for file in &extracted_files { - // delete all the files we extracted - if file.is_dir() { - std::fs::remove_dir(file)?; - } else { - std::fs::remove_file(file)?; - } - } - Move::from_source(tmp_dir.path()).to_dest(extract_path)?; - return Err(crate::api::Error::Extract(err.to_string())); - } - - extracted_files.push(extraction_path); - - Ok(false) - })?; - - let _ = std::process::Command::new("touch") - .arg(extract_path) - .status(); - - Ok(()) -} - -pub(crate) fn get_updater_target() -> Option<&'static str> { - if cfg!(target_os = "linux") { - Some("linux") - } else if cfg!(target_os = "macos") { - Some("darwin") - } else if cfg!(target_os = "windows") { - Some("windows") - } else { - None - } -} - -pub(crate) fn get_updater_arch() -> Option<&'static str> { - if cfg!(target_arch = "x86") { - Some("i686") - } else if cfg!(target_arch = "x86_64") { - Some("x86_64") - } else if cfg!(target_arch = "arm") { - Some("armv7") - } else if cfg!(target_arch = "aarch64") { - Some("aarch64") - } else { - None - } -} - -/// Get the extract_path from the provided executable_path -#[allow(unused_variables)] -pub fn extract_path_from_executable(env: &Env, executable_path: &Path) -> PathBuf { - // Return the path of the current executable by default - // Example C:\Program Files\My App\ - let extract_path = executable_path - .parent() - .map(PathBuf::from) - .expect("Can't determine extract path"); - - // MacOS example binary is in /Applications/TestApp.app/Contents/MacOS/myApp - // We need to get /Applications/.app - // todo(lemarier): Need a better way here - // Maybe we could search for <*.app> to get the right path - #[cfg(target_os = "macos")] - if extract_path - .display() - .to_string() - .contains("Contents/MacOS") - { - return extract_path - .parent() - .map(PathBuf::from) - .expect("Unable to find the extract path") - .parent() - .map(PathBuf::from) - .expect("Unable to find the extract path"); - } - - // We should use APPIMAGE exposed env variable - // This is where our APPIMAGE should sit and should be replaced - #[cfg(target_os = "linux")] - if let Some(app_image_path) = &env.appimage { - return PathBuf::from(app_image_path); - } - - extract_path -} - -// Convert base64 to string and prevent failing -fn base64_to_string(base64_string: &str) -> Result { - let decoded_string = &base64::engine::general_purpose::STANDARD.decode(base64_string)?; - let result = from_utf8(decoded_string) - .map_err(|_| Error::SignatureUtf8(base64_string.into()))? - .to_string(); - Ok(result) -} - -// Validate signature -// need to be public because its been used -// by our tests in the bundler -// -// NOTE: The buffer position is not reset. -pub fn verify_signature( - archive_reader: &mut R, - release_signature: &str, - pub_key: &str, -) -> Result -where - R: Read, -{ - // we need to convert the pub key - let pub_key_decoded = base64_to_string(pub_key)?; - let public_key = PublicKey::decode(&pub_key_decoded)?; - let signature_base64_decoded = base64_to_string(release_signature)?; - let signature = Signature::decode(&signature_base64_decoded)?; - - // read all bytes until EOF in the buffer - let mut data = Vec::new(); - archive_reader.read_to_end(&mut data)?; - - // Validate signature or bail out - public_key.verify(&data, &signature, true)?; - Ok(true) -} - -#[cfg(test)] -mod test { - use super::*; - #[cfg(target_os = "macos")] - use std::fs::File; - - macro_rules! block { - ($e:expr) => { - tokio_test::block_on($e) - }; - } - - fn generate_sample_raw_json() -> String { - r#"{ - "version": "v2.0.0", - "notes": "Test version !", - "pub_date": "2020-06-22T19:25:57Z", - "platforms": { - "darwin-aarch64": { - "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUldUTE5QWWxkQnlZOVJZVGdpKzJmRWZ0SkRvWS9TdFpqTU9xcm1mUmJSSG5OWVlwSklrWkN1SFpWbmh4SDlBcTU3SXpjbm0xMmRjRkphbkpVeGhGcTdrdzlrWGpGVWZQSWdzPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNTkyOTE1MDU3CWZpbGU6L1VzZXJzL3J1bm5lci9ydW5uZXJzLzIuMjYzLjAvd29yay90YXVyaS90YXVyaS90YXVyaS9leGFtcGxlcy9jb21tdW5pY2F0aW9uL3NyYy10YXVyaS90YXJnZXQvZGVidWcvYnVuZGxlL29zeC9hcHAuYXBwLnRhci5negp4ZHFlUkJTVnpGUXdDdEhydTE5TGgvRlVPeVhjTnM5RHdmaGx3c0ZPWjZXWnFwVDRNWEFSbUJTZ1ZkU1IwckJGdmlwSzJPd00zZEZFN2hJOFUvL1FDZz09Cg==", - "url": "https://github.com/tauri-apps/updater-test/releases/download/v1.0.0/app.app.tar.gz" - }, - "darwin-x86_64": { - "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUldUTE5QWWxkQnlZOVJZVGdpKzJmRWZ0SkRvWS9TdFpqTU9xcm1mUmJSSG5OWVlwSklrWkN1SFpWbmh4SDlBcTU3SXpjbm0xMmRjRkphbkpVeGhGcTdrdzlrWGpGVWZQSWdzPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNTkyOTE1MDU3CWZpbGU6L1VzZXJzL3J1bm5lci9ydW5uZXJzLzIuMjYzLjAvd29yay90YXVyaS90YXVyaS90YXVyaS9leGFtcGxlcy9jb21tdW5pY2F0aW9uL3NyYy10YXVyaS90YXJnZXQvZGVidWcvYnVuZGxlL29zeC9hcHAuYXBwLnRhci5negp4ZHFlUkJTVnpGUXdDdEhydTE5TGgvRlVPeVhjTnM5RHdmaGx3c0ZPWjZXWnFwVDRNWEFSbUJTZ1ZkU1IwckJGdmlwSzJPd00zZEZFN2hJOFUvL1FDZz09Cg==", - "url": "https://github.com/tauri-apps/updater-test/releases/download/v1.0.0/app.app.tar.gz" - }, - "linux-x86_64": { - "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUldUTE5QWWxkQnlZOWZSM29hTFNmUEdXMHRoOC81WDFFVVFRaXdWOUdXUUdwT0NlMldqdXkyaWVieXpoUmdZeXBJaXRqSm1YVmczNXdRL1Brc0tHb1NOTzhrL1hadFcxdmdnPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNTkyOTE3MzQzCWZpbGU6L2hvbWUvcnVubmVyL3dvcmsvdGF1cmkvdGF1cmkvdGF1cmkvZXhhbXBsZXMvY29tbXVuaWNhdGlvbi9zcmMtdGF1cmkvdGFyZ2V0L2RlYnVnL2J1bmRsZS9hcHBpbWFnZS9hcHAuQXBwSW1hZ2UudGFyLmd6CmRUTUM2bWxnbEtTbUhOZGtERUtaZnpUMG5qbVo5TGhtZWE1SFNWMk5OOENaVEZHcnAvVW0zc1A2ajJEbWZUbU0yalRHT0FYYjJNVTVHOHdTQlYwQkF3PT0K", - "url": "https://github.com/tauri-apps/updater-test/releases/download/v1.0.0/app.AppImage.tar.gz" - }, - "windows-x86_64": { - "signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUldUTE5QWWxkQnlZOVJHMWlvTzRUSlQzTHJOMm5waWpic0p0VVI2R0hUNGxhQVMxdzBPRndlbGpXQXJJakpTN0toRURtVzBkcm15R0VaNTJuS1lZRWdzMzZsWlNKUVAzZGdJPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNTkyOTE1NTIzCWZpbGU6RDpcYVx0YXVyaVx0YXVyaVx0YXVyaVxleGFtcGxlc1xjb21tdW5pY2F0aW9uXHNyYy10YXVyaVx0YXJnZXRcZGVidWdcYXBwLng2NC5tc2kuemlwCitXa1lQc3A2MCs1KzEwZnVhOGxyZ2dGMlZqbjBaVUplWEltYUdyZ255eUF6eVF1dldWZzFObStaVEQ3QU1RS1lzcjhDVU4wWFovQ1p1QjJXbW1YZUJ3PT0K", - "url": "https://github.com/tauri-apps/updater-test/releases/download/v1.0.0/app.x64.msi.zip" - } - } - }"#.into() - } - - fn generate_sample_platform_json( - version: &str, - public_signature: &str, - download_url: &str, - ) -> String { - format!( - r#" - {{ - "name": "v{version}", - "notes": "This is the latest version! Once updated you shouldn't see this prompt.", - "pub_date": "2020-06-25T14:14:19Z", - "signature": "{public_signature}", - "url": "{download_url}" - }} - "# - ) - } - - fn generate_sample_with_elevated_task_platform_json( - version: &str, - public_signature: &str, - download_url: &str, - with_elevated_task: bool, - ) -> String { - format!( - r#" - {{ - "name": "v{version}", - "notes": "This is the latest version! Once updated you shouldn't see this prompt.", - "pub_date": "2020-06-25T14:14:19Z", - "signature": "{public_signature}", - "url": "{download_url}", - "with_elevated_task": {with_elevated_task} - }} - "# - ) - } - - #[test] - fn simple_http_updater() { - let _m = mockito::mock("GET", "/") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(generate_sample_raw_json()) - .create(); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .current_version("0.0.0".parse().unwrap()) - .url(mockito::server_url()) - .build()); - - let updater = check_update.expect("Can't check update"); - - assert!(updater.should_update); - } - - #[test] - fn simple_http_updater_raw_json() { - let _m = mockito::mock("GET", "/") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(generate_sample_raw_json()) - .create(); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .current_version("0.0.0".parse().unwrap()) - .url(mockito::server_url()) - .build()); - - let updater = check_update.expect("Can't check update"); - - assert!(updater.should_update); - } - - #[test] - fn simple_http_updater_raw_json_windows_x86_64() { - let _m = mockito::mock("GET", "/") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(generate_sample_raw_json()) - .create(); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .current_version("0.0.0".parse().unwrap()) - .target("windows-x86_64") - .url(mockito::server_url()) - .build()); - - let updater = check_update.expect("Can't check update"); - - assert!(updater.should_update); - assert_eq!(updater.version, "2.0.0"); - assert_eq!(updater.signature, "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUldUTE5QWWxkQnlZOVJHMWlvTzRUSlQzTHJOMm5waWpic0p0VVI2R0hUNGxhQVMxdzBPRndlbGpXQXJJakpTN0toRURtVzBkcm15R0VaNTJuS1lZRWdzMzZsWlNKUVAzZGdJPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNTkyOTE1NTIzCWZpbGU6RDpcYVx0YXVyaVx0YXVyaVx0YXVyaVxleGFtcGxlc1xjb21tdW5pY2F0aW9uXHNyYy10YXVyaVx0YXJnZXRcZGVidWdcYXBwLng2NC5tc2kuemlwCitXa1lQc3A2MCs1KzEwZnVhOGxyZ2dGMlZqbjBaVUplWEltYUdyZ255eUF6eVF1dldWZzFObStaVEQ3QU1RS1lzcjhDVU4wWFovQ1p1QjJXbW1YZUJ3PT0K"); - assert_eq!( - updater.download_url.to_string(), - "https://github.com/tauri-apps/updater-test/releases/download/v1.0.0/app.x64.msi.zip" - ); - } - - #[test] - fn simple_http_updater_raw_json_uptodate() { - let _m = mockito::mock("GET", "/") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(generate_sample_raw_json()) - .create(); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .current_version("10.0.0".parse().unwrap()) - .url(mockito::server_url()) - .build()); - - let updater = check_update.expect("Can't check update"); - - assert!(!updater.should_update); - } - - #[test] - fn simple_http_updater_without_version() { - let _m = mockito::mock("GET", "/darwin-aarch64/1.0.0") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(generate_sample_platform_json( - "2.0.0", - "SampleTauriKey", - "https://tauri.app", - )) - .create(); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .current_version("1.0.0".parse().unwrap()) - .url(format!( - "{}/darwin-aarch64/{{{{current_version}}}}", - mockito::server_url() - )) - .build()); - - let updater = check_update.expect("Can't check update"); - - assert!(updater.should_update); - } - - #[test] - fn simple_http_updater_percent_decode() { - let _m = mockito::mock("GET", "/darwin-aarch64/1.0.0") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(generate_sample_platform_json( - "2.0.0", - "SampleTauriKey", - "https://tauri.app", - )) - .create(); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .current_version("1.0.0".parse().unwrap()) - .url( - url::Url::parse(&format!( - "{}/darwin-aarch64/{{{{current_version}}}}", - mockito::server_url() - )) - .unwrap() - .to_string() - ) - .build()); - - let updater = check_update.expect("Can't check update"); - - assert!(updater.should_update); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .current_version("1.0.0".parse().unwrap()) - .urls(&[url::Url::parse(&format!( - "{}/darwin-aarch64/{{{{current_version}}}}", - mockito::server_url() - )) - .unwrap() - .to_string()]) - .build()); - - let updater = check_update.expect("Can't check update"); - - assert!(updater.should_update); - } - - #[test] - fn simple_http_updater_with_elevated_task() { - let _m = mockito::mock("GET", "/windows-x86_64/1.0.0") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(generate_sample_with_elevated_task_platform_json( - "2.0.0", - "SampleTauriKey", - "https://tauri.app", - true, - )) - .create(); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .current_version("1.0.0".parse().unwrap()) - .url(format!( - "{}/windows-x86_64/{{{{current_version}}}}", - mockito::server_url() - )) - .build()); - - let updater = check_update.expect("Can't check update"); - - assert!(updater.should_update); - } - - #[test] - fn http_updater_uptodate() { - let _m = mockito::mock("GET", "/darwin-aarch64/10.0.0") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(generate_sample_platform_json( - "2.0.0", - "SampleTauriKey", - "https://tauri.app", - )) - .create(); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .current_version("10.0.0".parse().unwrap()) - .url(format!( - "{}/darwin-aarch64/{{{{current_version}}}}", - mockito::server_url() - )) - .build()); - - let updater = check_update.expect("Can't check update"); - - assert!(!updater.should_update); - } - - #[test] - fn http_updater_fallback_urls() { - let _m = mockito::mock("GET", "/") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(generate_sample_raw_json()) - .create(); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .url("http://badurl.www.tld/1".into()) - .url(mockito::server_url()) - .current_version("0.0.1".parse().unwrap()) - .build()); - - let updater = check_update.expect("Can't check remote update"); - - assert!(updater.should_update); - } - - #[test] - fn http_updater_fallback_urls_with_array() { - let _m = mockito::mock("GET", "/") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(generate_sample_raw_json()) - .create(); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .urls(&["http://badurl.www.tld/1".into(), mockito::server_url(),]) - .current_version("0.0.1".parse().unwrap()) - .build()); - - let updater = check_update.expect("Can't check remote update"); - - assert!(updater.should_update); - } - - #[test] - fn http_updater_invalid_remote_data() { - let invalid_signature = r#"{ - "version": "v0.0.3", - "notes": "Blablaa", - "pub_date": "2020-02-20T15:41:00Z", - "url": "https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz", - "signature": true - }"#; - let invalid_version = r#"{ - "version": 5, - "notes": "Blablaa", - "pub_date": "2020-02-20T15:41:00Z", - "url": "https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz", - "signature": "x" - }"#; - let invalid_name = r#"{ - "name": false, - "notes": "Blablaa", - "pub_date": "2020-02-20T15:41:00Z", - "url": "https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz", - "signature": "x" - }"#; - let invalid_date = r#"{ - "version": "1.0.0", - "notes": "Blablaa", - "pub_date": 345645646, - "url": "https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz", - "signature": "x" - }"#; - let invalid_notes = r#"{ - "version": "v0.0.3", - "notes": ["bla", "bla"], - "pub_date": "2020-02-20T15:41:00Z", - "url": "https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz", - "signature": "x" - }"#; - let invalid_url = r#"{ - "version": "v0.0.3", - "notes": "Blablaa", - "pub_date": "2020-02-20T15:41:00Z", - "url": ["https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz", "https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz"], - "signature": "x" - }"#; - let invalid_platform_signature = r#"{ - "version": "v0.0.3", - "notes": "Blablaa", - "pub_date": "2020-02-20T15:41:00Z", - "platforms": { - "test-target": { - "url": "https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz", - "signature": { - "test-target": "x" - } - } - } - }"#; - let invalid_platform_url = r#"{ - "version": "v0.0.3", - "notes": "Blablaa", - "pub_date": "2020-02-20T15:41:00Z", - "platforms": { - "test-target": { - "url": { - "first": "https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz" - } - "signature": "x" - } - } - }"#; - - let test_cases = [ - ( - invalid_signature, - Box::new(|e| matches!(e, Error::InvalidResponseType("signature", "string", _))) - as Box bool>, - ), - ( - invalid_version, - Box::new(|e| matches!(e, Error::InvalidResponseType("version", "string", _))) - as Box bool>, - ), - ( - invalid_name, - Box::new(|e| matches!(e, Error::InvalidResponseType("name", "string", _))) - as Box bool>, - ), - ( - invalid_date, - Box::new(|e| matches!(e, Error::InvalidResponseType("pub_date", "string", _))) - as Box bool>, - ), - ( - invalid_notes, - Box::new(|e| matches!(e, Error::InvalidResponseType("notes", "string", _))) - as Box bool>, - ), - ( - invalid_url, - Box::new(|e| matches!(e, Error::InvalidResponseType("url", "string", _))) - as Box bool>, - ), - ( - invalid_platform_signature, - Box::new(|e| matches!(e, Error::InvalidResponseType("signature", "string", _))) - as Box bool>, - ), - ( - invalid_platform_url, - Box::new(|e| matches!(e, Error::InvalidResponseType("url", "string", _))) - as Box bool>, - ), - ]; - - for (response, validator) in test_cases { - let _m = mockito::mock("GET", "/") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(response) - .create(); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .url(mockito::server_url()) - .current_version("0.0.1".parse().unwrap()) - .target("test-target") - .build()); - if let Err(e) = check_update { - validator(e); - } else { - panic!("unexpected Ok response"); - } - } - } - - #[test] - fn http_updater_missing_remote_data() { - let missing_signature = r#"{ - "version": "v0.0.3", - "notes": "Blablaa", - "pub_date": "2020-02-20T15:41:00Z", - "url": "https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz" - }"#; - let missing_version = r#"{ - "notes": "Blablaa", - "pub_date": "2020-02-20T15:41:00Z", - "url": "https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz", - "signature": "x" - }"#; - let missing_url = r#"{ - "version": "v0.0.3", - "notes": "Blablaa", - "pub_date": "2020-02-20T15:41:00Z", - "signature": "x" - }"#; - let missing_target = r#"{ - "version": "v0.0.3", - "notes": "Blablaa", - "pub_date": "2020-02-20T15:41:00Z", - "platforms": { - "unknown-target": { - "url": "https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz", - "signature": "x" - } - } - }"#; - let missing_platform_signature = r#"{ - "version": "v0.0.3", - "notes": "Blablaa", - "pub_date": "2020-02-20T15:41:00Z", - "platforms": { - "test-target": { - "url": "https://github.com/tauri-apps/updater-test/releases/download/v0.0.1/update3.tar.gz" - } - } - }"#; - let missing_platform_url = r#"{ - "version": "v0.0.3", - "notes": "Blablaa", - "pub_date": "2020-02-20T15:41:00Z", - "platforms": { - "test-target": { - "signature": "x" - } - } - }"#; - - fn missing_field_error(field: &str) -> String { - format!("the `{field}` field was not set on the updater response") - } - - let test_cases = [ - (missing_signature, missing_field_error("signature")), - (missing_version, "missing field `version`".to_string()), - (missing_url, missing_field_error("url")), - ( - missing_target, - Error::TargetNotFound("test-target".into()).to_string(), - ), - ( - missing_platform_signature, - "missing field `signature`".to_string(), - ), - (missing_platform_url, "missing field `url`".to_string()), - ]; - - for (response, error) in test_cases { - let _m = mockito::mock("GET", "/") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(response) - .create(); - - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .url(mockito::server_url()) - .current_version("0.0.1".parse().unwrap()) - .target("test-target") - .build()); - if let Err(e) = check_update { - println!("ERROR: {e}, expected: {error}"); - assert!(e.to_string().contains(&error)); - } else { - panic!("unexpected Ok response"); - } - } - } - - // run complete process on mac only for now as we don't have - // server (api) that we can use to test - #[test] - #[cfg(target_os = "macos")] - fn http_updater_complete_process() { - #[cfg(target_os = "macos")] - let archive_file = "archive.macos.tar.gz"; - #[cfg(target_os = "linux")] - let archive_file = "archive.linux.tar.gz"; - #[cfg(target_os = "windows")] - let archive_file = "archive.windows.zip"; - - let good_archive_url = format!("{}/{archive_file}", mockito::server_url()); - - let mut signature_file = File::open(format!( - "./test/updater/fixture/archives/{archive_file}.sig" - )) - .expect("Unable to open signature"); - let mut signature = String::new(); - signature_file - .read_to_string(&mut signature) - .expect("Unable to read signature as string"); - - let mut pubkey_file = File::open("./test/updater/fixture/good_signature/update.key.pub") - .expect("Unable to open pubkey"); - let mut pubkey = String::new(); - pubkey_file - .read_to_string(&mut pubkey) - .expect("Unable to read signature as string"); - - // add sample file - let _m = mockito::mock("GET", format!("/{archive_file}").as_str()) - .with_status(200) - .with_header("content-type", "application/octet-stream") - .with_body_from_file(format!("./test/updater/fixture/archives/{archive_file}")) - .create(); - - // sample mock for update file - let _m = mockito::mock("GET", "/") - .with_status(200) - .with_header("content-type", "application/json") - .with_body(generate_sample_platform_json( - "2.0.1", - signature.as_ref(), - good_archive_url.as_ref(), - )) - .create(); - - // Build a tmpdir so we can test our extraction inside - // We dont want to overwrite our current executable or the directory - // Otherwise tests are failing... - let executable_path = current_exe().expect("Can't extract executable path"); - let parent_path = executable_path - .parent() - .expect("Can't find the parent path"); - - let tmp_dir = tempfile::Builder::new() - .prefix("tauri_updater_test") - .tempdir_in(parent_path); - - assert!(tmp_dir.is_ok()); - let tmp_dir_unwrap = tmp_dir.expect("Can't find tmp_dir"); - let tmp_dir_path = tmp_dir_unwrap.path(); - - #[cfg(target_os = "linux")] - let my_executable = &tmp_dir_path.join("updater-example_0.1.0_amd64.AppImage"); - #[cfg(target_os = "macos")] - let my_executable = &tmp_dir_path.join("my_app"); - #[cfg(target_os = "windows")] - let my_executable = &tmp_dir_path.join("my_app.exe"); - - // configure the updater - let app = crate::test::mock_app(); - let check_update = block!(builder(app.handle()) - .url(mockito::server_url()) - // It should represent the executable path, that's why we add my_app.exe in our - // test path -- in production you shouldn't have to provide it - .executable_path(my_executable) - // make sure we force an update - .current_version("1.0.0".parse().unwrap()) - .build()); - - #[cfg(target_os = "linux")] - { - env::set_var("APPIMAGE", my_executable); - } - - // unwrap our results - let updater = check_update.expect("Can't check remote update"); - - // make sure we need to update - assert!(updater.should_update); - // make sure we can read announced version - assert_eq!(updater.version, "2.0.1"); - - // download, install and validate signature - let install_process = block!(updater.download_and_install(pubkey, |_, _| (), || ())); - assert!(install_process.is_ok()); - - // make sure the extraction went well (it should have skipped the main app.app folder) - // as we can't extract in /Applications directly - #[cfg(target_os = "macos")] - let bin_file = tmp_dir_path.join("Contents").join("MacOS").join("app"); - #[cfg(target_os = "linux")] - // linux should extract at same place as the executable path - let bin_file = my_executable; - #[cfg(target_os = "windows")] - let bin_file = tmp_dir_path.join("with").join("long").join("path.json"); - - assert!(bin_file.exists()); - } -} diff --git a/core/tauri/src/updater/error.rs b/core/tauri/src/updater/error.rs deleted file mode 100644 index a8874e7607e..00000000000 --- a/core/tauri/src/updater/error.rs +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use http::StatusCode; -use thiserror::Error; - -/// All errors that can occur while running the updater. -#[derive(Debug, Error)] -#[non_exhaustive] -pub enum Error { - /// IO Errors. - #[error("`{0}`")] - Io(#[from] std::io::Error), - /// Semver Errors. - #[error("Unable to compare version: {0}")] - Semver(#[from] semver::Error), - /// JSON (Serde) Errors. - #[error("JSON error: {0}")] - SerdeJson(#[from] serde_json::Error), - /// Minisign is used for signature validation. - #[error("Verify signature error: {0}")] - Minisign(#[from] minisign_verify::Error), - /// Error with Minisign base64 decoding. - #[error("Signature decoding error: {0}")] - Base64(#[from] base64::DecodeError), - /// UTF8 Errors in signature. - #[error("The signature {0} could not be decoded, please check if it is a valid base64 string. The signature must be the contents of the `.sig` file generated by the Tauri bundler, as a string.")] - SignatureUtf8(String), - /// Tauri utils, mainly extract and file move. - #[error("Tauri API error: {0}")] - TauriApi(#[from] crate::api::Error), - /// Network error. - #[error("Download request failed with status: {0}")] - DownloadFailed(StatusCode), - /// Network error. - #[error("Network error: {0}")] - Network(#[from] reqwest::Error), - /// Failed to serialize header value as string. - #[error(transparent)] - Utf8(#[from] std::string::FromUtf8Error), - /// Could not fetch a valid response from the server. - #[error("Could not fetch a valid release JSON from the remote")] - ReleaseNotFound, - /// Error building updater. - #[error("Unable to prepare the updater: {0}")] - Builder(String), - /// Error building updater. - #[error("Unable to extract the new version: {0}")] - Extract(String), - /// Updater cannot be executed on this Linux package. Currently the updater is enabled only on AppImages. - #[error("Cannot run updater on this Linux package. Currently only an AppImage can be updated.")] - UnsupportedLinuxPackage, - /// Operating system is not supported. - #[error("unsupported OS, expected one of `linux`, `darwin` or `windows`.")] - UnsupportedOs, - /// Unsupported app architecture. - #[error( - "Unsupported application architecture, expected one of `x86`, `x86_64`, `arm` or `aarch64`." - )] - UnsupportedArch, - /// The platform was not found on the updater JSON response. - #[error("the platform `{0}` was not found on the response `platforms` object")] - TargetNotFound(String), - /// Triggered when there is NO error and the two versions are equals. - /// On client side, it's important to catch this error. - #[error("No updates available")] - UpToDate, - /// The updater responded with an invalid signature type. - #[error("the updater response field `{0}` type is invalid, expected {1} but found {2}")] - InvalidResponseType(&'static str, &'static str, serde_json::Value), - /// HTTP error. - #[error(transparent)] - Http(#[from] http::Error), - /// Temp dir is not on same mount mount. This prevents our updater to rename the AppImage to a temp file. - #[cfg(target_os = "linux")] - #[error("temp directory is not on the same mount point as the AppImage")] - TempDirNotOnSameMountPoint, -} - -pub type Result = std::result::Result; diff --git a/core/tauri/src/updater/mod.rs b/core/tauri/src/updater/mod.rs deleted file mode 100644 index 9a89ff034c5..00000000000 --- a/core/tauri/src/updater/mod.rs +++ /dev/null @@ -1,499 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -//! The Tauri updater. -//! -//! The updater is focused on making Tauri's application updates **as safe and transparent as updates to a website**. -//! -//! For a full guide on setting up the updater, see . -//! -//! Check [`UpdateBuilder`] to see how to manually trigger and customize the updater at runtime. -//! -//! ## Events -//! -//! To listen to the updater events, for example to check for error messages, you need to use [`RunEvent::Updater`](crate::RunEvent) in [`App::run`](crate::App#method.run). -//! -//! ```no_run -//! let app = tauri::Builder::default() -//! // on an actual app, remove the string argument -//! .build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json")) -//! .expect("error while building tauri application"); -//! app.run(|_app_handle, event| match event { -//! tauri::RunEvent::Updater(updater_event) => { -//! match updater_event { -//! tauri::UpdaterEvent::UpdateAvailable { body, date, version } => { -//! println!("update available {} {:?} {}", body, date, version); -//! } -//! // Emitted when the download is about to be started. -//! tauri::UpdaterEvent::Pending => { -//! println!("update is pending!"); -//! } -//! tauri::UpdaterEvent::DownloadProgress { chunk_length, content_length } => { -//! println!("downloaded {} of {:?}", chunk_length, content_length); -//! } -//! // Emitted when the download has finished and the update is about to be installed. -//! tauri::UpdaterEvent::Downloaded => { -//! println!("update has been downloaded!"); -//! } -//! // Emitted when the update was installed. You can then ask to restart the app. -//! tauri::UpdaterEvent::Updated => { -//! println!("app has been updated"); -//! } -//! // Emitted when the app already has the latest version installed and an update is not needed. -//! tauri::UpdaterEvent::AlreadyUpToDate => { -//! println!("app is already up to date"); -//! } -//! // Emitted when there is an error with the updater. We suggest to listen to this event even if the default dialog is enabled. -//! tauri::UpdaterEvent::Error(error) => { -//! println!("failed to update: {}", error); -//! } -//! _ => (), -//! } -//! } -//! _ => {} -//! }); -//! ``` - -mod core; -mod error; - -use std::time::Duration; - -use http::header::{HeaderName, HeaderValue}; -use semver::Version; -use time::OffsetDateTime; - -pub use self::{core::RemoteRelease, error::Error}; -/// Alias for [`std::result::Result`] using our own [`Error`]. -pub type Result = std::result::Result; - -use crate::{runtime::EventLoopProxy, AppHandle, EventLoopMessage, Manager, Runtime, UpdaterEvent}; - -/// Check for new updates -pub const EVENT_CHECK_UPDATE: &str = "tauri://update"; -/// New update available -pub const EVENT_UPDATE_AVAILABLE: &str = "tauri://update-available"; -/// Used to initialize an update *should run check-update first (once you received the update available event)* -pub const EVENT_INSTALL_UPDATE: &str = "tauri://update-install"; -/// Send updater status or error even if dialog is enabled, you should -/// always listen for this event. It'll send you the install progress -/// and any error triggered during update check and install -pub const EVENT_STATUS_UPDATE: &str = "tauri://update-status"; -/// The name of the event that is emitted on download progress. -pub const EVENT_DOWNLOAD_PROGRESS: &str = "tauri://update-download-progress"; -/// this is the status emitted when the download start -pub const EVENT_STATUS_PENDING: &str = "PENDING"; -/// When you got this status, something went wrong -/// you can find the error message inside the `error` field. -pub const EVENT_STATUS_ERROR: &str = "ERROR"; -/// The update has been downloaded. -pub const EVENT_STATUS_DOWNLOADED: &str = "DOWNLOADED"; -/// When you receive this status, you should ask the user to restart -pub const EVENT_STATUS_SUCCESS: &str = "DONE"; -/// When you receive this status, this is because the application is running last version -pub const EVENT_STATUS_UPTODATE: &str = "UPTODATE"; - -/// Gets the target string used on the updater. -pub fn target() -> Option { - if let (Some(target), Some(arch)) = (core::get_updater_target(), core::get_updater_arch()) { - Some(format!("{target}-{arch}")) - } else { - None - } -} - -#[derive(Clone, serde::Serialize)] -struct StatusEvent { - status: String, - error: Option, -} - -#[derive(Clone, serde::Serialize)] -#[serde(rename_all = "camelCase")] -struct DownloadProgressEvent { - chunk_length: usize, - content_length: Option, -} - -#[derive(Clone, serde::Serialize)] -struct UpdateManifest { - version: String, - date: Option, - body: String, -} - -/// An update check builder. -#[derive(Debug)] -pub struct UpdateBuilder { - inner: core::UpdateBuilder, - events: bool, -} - -impl UpdateBuilder { - /// Do not use the event system to emit information or listen to install the update. - pub fn skip_events(mut self) -> Self { - self.events = false; - self - } - - /// Sets the current platform's target name for the updater. - /// - /// The target is injected in the endpoint URL by replacing `{{target}}`. - /// Note that this does not affect the `{{arch}}` variable. - /// - /// If the updater response JSON includes the `platforms` field, - /// that object must contain a value for the target key. - /// - /// By default Tauri uses `$OS_NAME` as the replacement for `{{target}}` - /// and `$OS_NAME-$ARCH` as the key in the `platforms` object, - /// where `$OS_NAME` is the current operating system name "linux", "windows" or "darwin") - /// and `$ARCH` is one of the supported architectures ("i686", "x86_64", "armv7" or "aarch64"). - /// - /// See [`Builder::updater_target`](crate::Builder#method.updater_target) for a way to set the target globally. - /// - /// # Examples - /// - /// ## Use a macOS Universal binary target name - /// - /// In this example, we set the updater target only on macOS. - /// On other platforms, we set the default target. - /// Note that `{{target}}` will be replaced with `darwin-universal`, - /// but `{{arch}}` is still the running platform's architecture. - /// - /// ```no_run - /// tauri::Builder::default() - /// .setup(|app| { - /// let handle = app.handle(); - /// tauri::async_runtime::spawn(async move { - /// let builder = tauri::updater::builder(handle).target(if cfg!(target_os = "macos") { - /// "darwin-universal".to_string() - /// } else { - /// tauri::updater::target().unwrap() - /// }); - /// match builder.check().await { - /// Ok(update) => {} - /// Err(error) => {} - /// } - /// }); - /// Ok(()) - /// }); - /// ``` - /// - /// ## Append debug information to the target - /// - /// This allows you to provide updates for both debug and release applications. - /// - /// ```no_run - /// tauri::Builder::default() - /// .setup(|app| { - /// let handle = app.handle(); - /// tauri::async_runtime::spawn(async move { - /// let kind = if cfg!(debug_assertions) { "debug" } else { "release" }; - /// let builder = tauri::updater::builder(handle).target(format!("{}-{kind}", tauri::updater::target().unwrap())); - /// match builder.check().await { - /// Ok(update) => {} - /// Err(error) => {} - /// } - /// }); - /// Ok(()) - /// }); - /// ``` - /// - /// ## Use the platform's target triple - /// - /// ```no_run - /// tauri::Builder::default() - /// .setup(|app| { - /// let handle = app.handle(); - /// tauri::async_runtime::spawn(async move { - /// let builder = tauri::updater::builder(handle).target(tauri::utils::platform::target_triple().unwrap()); - /// match builder.check().await { - /// Ok(update) => {} - /// Err(error) => {} - /// } - /// }); - /// Ok(()) - /// }); - /// ``` - pub fn target(mut self, target: impl Into) -> Self { - self.inner = self.inner.target(target); - self - } - - /// Sets a closure that is invoked to compare the current version and the latest version returned by the updater server. - /// The first argument is the current version, and the second one is the latest version. - /// - /// The closure must return `true` if the update should be installed. - /// - /// # Examples - /// - /// - Always install the version returned by the server: - /// - /// ```no_run - /// tauri::Builder::default() - /// .setup(|app| { - /// tauri::updater::builder(app.handle()).should_install(|_current, _latest| true); - /// Ok(()) - /// }); - /// ``` - pub fn should_install bool + Send + 'static>( - mut self, - f: F, - ) -> Self { - self.inner = self.inner.should_install(f); - self - } - - /// Sets the timeout for the requests to the updater endpoints. - pub fn timeout(mut self, timeout: Duration) -> Self { - self.inner = self.inner.timeout(timeout); - self - } - - /// Add a `Header` to the request. - pub fn header(mut self, key: K, value: V) -> Result - where - HeaderName: TryFrom, - >::Error: Into, - HeaderValue: TryFrom, - >::Error: Into, - { - self.inner = self.inner.header(key, value)?; - Ok(self) - } - - /// Check if an update is available. - /// - /// # Examples - /// - /// ```no_run - /// tauri::Builder::default() - /// .setup(|app| { - /// let handle = app.handle(); - /// tauri::async_runtime::spawn(async move { - /// match tauri::updater::builder(handle).check().await { - /// Ok(update) => { - /// if update.is_update_available() { - /// update.download_and_install().await.unwrap(); - /// } - /// } - /// Err(e) => { - /// println!("failed to get update: {}", e); - /// } - /// } - /// }); - /// Ok(()) - /// }); - /// ``` - pub async fn check(self) -> Result> { - let handle = self.inner.app.clone(); - let events = self.events; - // check updates - match self.inner.build().await { - Ok(update) => { - if events { - // send notification if we need to update - if update.should_update { - let body = update.body.clone().unwrap_or_else(|| String::from("")); - - // Emit `tauri://update-available` - let _ = handle.emit_all( - EVENT_UPDATE_AVAILABLE, - UpdateManifest { - body: body.clone(), - date: update.date.map(|d| d.to_string()), - version: update.version.clone(), - }, - ); - let _ = handle.create_proxy().send_event(EventLoopMessage::Updater( - UpdaterEvent::UpdateAvailable { - body, - date: update.date, - version: update.version.clone(), - }, - )); - - // Listen for `tauri://update-install` - let update_ = update.clone(); - handle.once_global(EVENT_INSTALL_UPDATE, move |_msg| { - crate::async_runtime::spawn(async move { - let _ = download_and_install(update_).await; - }); - }); - } else { - send_status_update(&handle, UpdaterEvent::AlreadyUpToDate); - } - } - Ok(UpdateResponse { update }) - } - Err(e) => { - if self.events { - send_status_update(&handle, UpdaterEvent::Error(e.to_string())); - } - Err(e) - } - } - } -} - -/// The response of an updater check. -pub struct UpdateResponse { - update: core::Update, -} - -impl Clone for UpdateResponse { - fn clone(&self) -> Self { - Self { - update: self.update.clone(), - } - } -} - -impl UpdateResponse { - /// Whether the updater found a newer release or not. - pub fn is_update_available(&self) -> bool { - self.update.should_update - } - - /// The current version of the application as read by the updater. - pub fn current_version(&self) -> &Version { - &self.update.current_version - } - - /// The latest version of the application found by the updater. - pub fn latest_version(&self) -> &str { - &self.update.version - } - - /// The update date. - pub fn date(&self) -> Option<&OffsetDateTime> { - self.update.date.as_ref() - } - - /// The update description. - pub fn body(&self) -> Option<&String> { - self.update.body.as_ref() - } - - /// Downloads and installs the update. - pub async fn download_and_install(self) -> Result<()> { - download_and_install(self.update).await - } -} - -/// Updater listener -/// This function should be run on the main thread once. -pub(crate) fn listener(handle: AppHandle) { - // Wait to receive the event `"tauri://update"` - let handle_ = handle.clone(); - handle.listen_global(EVENT_CHECK_UPDATE, move |_msg| { - let handle_ = handle_.clone(); - crate::async_runtime::spawn(async move { - let _ = builder(handle_.clone()).check().await; - }); - }); -} - -pub(crate) async fn download_and_install(update: core::Update) -> Result<()> { - // Start installation - // emit {"status": "PENDING"} - send_status_update(&update.app, UpdaterEvent::Pending); - - let handle = update.app.clone(); - let handle_ = handle.clone(); - - // Launch updater download process - // macOS we display the `Ready to restart dialog` asking to restart - // Windows is closing the current App and launch the downloaded MSI when ready (the process stop here) - // Linux we replace the AppImage by launching a new install, it start a new AppImage instance, so we're closing the previous. (the process stop here) - let update_result = update - .download_and_install( - update.app.config().tauri.updater.pubkey.clone(), - move |chunk_length, content_length| { - send_download_progress_event(&handle, chunk_length, content_length); - }, - move || { - send_status_update(&handle_, UpdaterEvent::Downloaded); - }, - ) - .await; - - if let Err(err) = &update_result { - // emit {"status": "ERROR", "error": "The error message"} - send_status_update(&update.app, UpdaterEvent::Error(err.to_string())); - } else { - // emit {"status": "DONE"} - send_status_update(&update.app, UpdaterEvent::Updated); - } - update_result -} - -/// Initializes the [`UpdateBuilder`] using the app configuration. -pub fn builder(handle: AppHandle) -> UpdateBuilder { - let updater_config = &handle.config().tauri.updater; - let package_info = handle.package_info().clone(); - - // prepare our endpoints - let endpoints = updater_config - .endpoints - .as_ref() - .expect("Something wrong with endpoints") - .iter() - .map(|e| e.to_string()) - .collect::>(); - - let mut builder = self::core::builder(handle.clone()) - .urls(&endpoints[..]) - .current_version(package_info.version); - if let Some(target) = &handle.updater_settings.target { - builder = builder.target(target); - } - UpdateBuilder { - inner: builder, - events: true, - } -} - -// Send a status update via `tauri://update-download-progress` event. -fn send_download_progress_event( - handle: &AppHandle, - chunk_length: usize, - content_length: Option, -) { - let _ = handle.emit_all( - EVENT_DOWNLOAD_PROGRESS, - DownloadProgressEvent { - chunk_length, - content_length, - }, - ); - let _ = - handle - .create_proxy() - .send_event(EventLoopMessage::Updater(UpdaterEvent::DownloadProgress { - chunk_length, - content_length, - })); -} - -// Send a status update via `tauri://update-status` event. -fn send_status_update(handle: &AppHandle, message: UpdaterEvent) { - let _ = handle.emit_all( - EVENT_STATUS_UPDATE, - if let UpdaterEvent::Error(error) = &message { - StatusEvent { - error: Some(error.clone()), - status: message.clone().status_message().into(), - } - } else { - StatusEvent { - error: None, - status: message.clone().status_message().into(), - } - }, - ); - let _ = handle - .create_proxy() - .send_event(EventLoopMessage::Updater(message)); -} diff --git a/core/tests/app-updater/.gitignore b/core/tests/app-updater/.gitignore deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/core/tests/app-updater/Cargo.toml b/core/tests/app-updater/Cargo.toml deleted file mode 100644 index 641afabe83a..00000000000 --- a/core/tests/app-updater/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "app-updater" -version = "0.1.0" -edition = "2021" - -[build-dependencies] -tauri-build = { path = "../../tauri-build", features = [] } - -[dependencies] -serde = { version = "1", features = ["derive"] } -serde_json = "1" -tiny_http = "0.11" -tauri = { path = "../../tauri", features = ["updater"] } -time = { version = "0.3", features = ["formatting"] } - -[features] -default = ["custom-protocol"] -custom-protocol = ["tauri/custom-protocol"] diff --git a/core/tests/app-updater/build.rs b/core/tests/app-updater/build.rs deleted file mode 100644 index b055ec37c77..00000000000 --- a/core/tests/app-updater/build.rs +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -fn main() { - tauri_build::build() -} diff --git a/core/tests/app-updater/src/main.rs b/core/tests/app-updater/src/main.rs deleted file mode 100644 index 55b184eaee6..00000000000 --- a/core/tests/app-updater/src/main.rs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] - -fn main() { - let mut context = tauri::generate_context!(); - if std::env::var("TARGET").unwrap_or_default() == "nsis" { - // /D sets the default installation directory ($INSTDIR), - // overriding InstallDir and InstallDirRegKey. - // It must be the last parameter used in the command line and must not contain any quotes, even if the path contains spaces. - // Only absolute paths are supported. - // NOTE: we only need this because this is an integration test and we don't want to install the app in the programs folder - context.config_mut().tauri.updater.windows.installer_args = vec![format!( - "/D={}", - tauri::utils::platform::current_exe() - .unwrap() - .parent() - .unwrap() - .display() - )]; - } - tauri::Builder::default() - .setup(|app| { - let handle = app.handle(); - tauri::async_runtime::spawn(async move { - match handle.updater().check().await { - Ok(update) => { - if let Err(e) = update.download_and_install().await { - println!("{e}"); - std::process::exit(1); - } - std::process::exit(0); - } - Err(e) => { - println!("{e}"); - std::process::exit(1); - } - } - }); - Ok(()) - }) - .run(context) - .expect("error while running tauri application"); -} diff --git a/core/tests/app-updater/tauri.conf.json b/core/tests/app-updater/tauri.conf.json deleted file mode 100644 index 3863847978a..00000000000 --- a/core/tests/app-updater/tauri.conf.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "../../../core/tauri-config-schema/schema.json", - "build": { - "distDir": [], - "devPath": [] - }, - "tauri": { - "bundle": { - "active": true, - "targets": "all", - "identifier": "com.tauri.updater", - "icon": [ - "../../../examples/.icons/32x32.png", - "../../../examples/.icons/128x128.png", - "../../../examples/.icons/128x128@2x.png", - "../../../examples/.icons/icon.icns", - "../../../examples/.icons/icon.ico" - ], - "category": "DeveloperTool", - "windows": { - "wix": { - "skipWebviewInstall": true - } - } - }, - "allowlist": { - "all": false - }, - "updater": { - "active": true, - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK", - "endpoints": [ - "http://localhost:3007" - ], - "windows": { - "installMode": "quiet" - } - } - } -} \ No newline at end of file diff --git a/core/tests/app-updater/tests/update.rs b/core/tests/app-updater/tests/update.rs deleted file mode 100644 index ba95b908f5c..00000000000 --- a/core/tests/app-updater/tests/update.rs +++ /dev/null @@ -1,322 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -#![allow(dead_code, unused_imports)] - -use std::{ - collections::HashMap, - fs::File, - path::{Path, PathBuf}, - process::Command, -}; - -use serde::Serialize; - -const UPDATER_PRIVATE_KEY: &str = "dW50cnVzdGVkIGNvbW1lbnQ6IHJzaWduIGVuY3J5cHRlZCBzZWNyZXQga2V5ClJXUlRZMEl5YTBGV3JiTy9lRDZVd3NkL0RoQ1htZmExNDd3RmJaNmRMT1ZGVjczWTBKZ0FBQkFBQUFBQUFBQUFBQUlBQUFBQWdMekUzVkE4K0tWQ1hjeGt1Vkx2QnRUR3pzQjVuV0ZpM2czWXNkRm9hVUxrVnB6TUN3K1NheHJMREhQbUVWVFZRK3NIL1VsMDBHNW5ET1EzQno0UStSb21nRW4vZlpTaXIwZFh5ZmRlL1lSN0dKcHdyOUVPclVvdzFhVkxDVnZrbHM2T1o4Tk1NWEU9Cg=="; - -#[derive(Serialize)] -struct PackageConfig { - version: &'static str, -} - -#[derive(Serialize)] -struct Config { - package: PackageConfig, -} - -#[derive(Serialize)] -struct PlatformUpdate { - signature: String, - url: &'static str, - with_elevated_task: bool, -} - -#[derive(Serialize)] -struct Update { - version: &'static str, - date: String, - platforms: HashMap, -} - -fn get_cli_bin_path(cli_dir: &Path, debug: bool) -> Option { - let mut cli_bin_path = cli_dir.join(format!( - "target/{}/cargo-tauri", - if debug { "debug" } else { "release" } - )); - if cfg!(windows) { - cli_bin_path.set_extension("exe"); - } - if cli_bin_path.exists() { - Some(cli_bin_path) - } else { - None - } -} - -fn build_app( - cli_bin_path: &Path, - cwd: &Path, - config: &Config, - bundle_updater: bool, - target: BundleTarget, -) { - let mut command = Command::new(cli_bin_path); - command - .args(["build", "--debug", "--verbose"]) - .arg("--config") - .arg(serde_json::to_string(config).unwrap()) - .current_dir(cwd); - - #[cfg(target_os = "linux")] - command.args(["--bundles", target.name()]); - #[cfg(target_os = "macos")] - command.args(["--bundles", target.name()]); - - if bundle_updater { - #[cfg(windows)] - command.args(["--bundles", "msi", "nsis"]); - - command - .env("TAURI_PRIVATE_KEY", UPDATER_PRIVATE_KEY) - .env("TAURI_KEY_PASSWORD", "") - .args(["--bundles", "updater"]); - } else { - #[cfg(windows)] - command.args(["--bundles", target.name()]); - } - - let status = command - .status() - .expect("failed to run Tauri CLI to bundle app"); - - if !status.code().map(|c| c == 0).unwrap_or(true) { - panic!("failed to bundle app {:?}", status.code()); - } -} - -#[derive(Copy, Clone)] -enum BundleTarget { - AppImage, - - App, - - Msi, - Nsis, -} - -impl BundleTarget { - fn name(self) -> &'static str { - match self { - Self::AppImage => "appimage", - Self::App => "app", - Self::Msi => "msi", - Self::Nsis => "nsis", - } - } -} - -impl Default for BundleTarget { - fn default() -> Self { - #[cfg(any(target_os = "macos", target_os = "ios"))] - return Self::App; - #[cfg(target_os = "linux")] - return Self::App; - #[cfg(windows)] - return Self::Nsis; - } -} - -#[cfg(target_os = "linux")] -fn bundle_paths(root_dir: &Path, version: &str) -> Vec<(BundleTarget, PathBuf)> { - vec![( - BundleTarget::AppImage, - root_dir.join(format!( - "target/debug/bundle/appimage/app-updater_{version}_amd64.AppImage" - )), - )] -} - -#[cfg(target_os = "macos")] -fn bundle_paths(root_dir: &Path, _version: &str) -> Vec<(BundleTarget, PathBuf)> { - vec![( - BundleTarget::App, - root_dir.join("target/debug/bundle/macos/app-updater.app"), - )] -} - -#[cfg(target_os = "ios")] -fn bundle_paths(root_dir: &Path, _version: &str) -> Vec<(BundleTarget, PathBuf)> { - vec![( - BundleTarget::App, - root_dir.join("target/debug/bundle/ios/app-updater.ipa"), - )] -} - -#[cfg(target_os = "android")] -fn bundle_path(root_dir: &Path, _version: &str) -> PathBuf { - root_dir.join("target/debug/bundle/android/app-updater.apk") -} - -#[cfg(windows)] -fn bundle_paths(root_dir: &Path, version: &str) -> Vec<(BundleTarget, PathBuf)> { - vec![ - ( - BundleTarget::Nsis, - root_dir.join(format!( - "target/debug/bundle/nsis/app-updater_{version}_x64-setup.exe" - )), - ), - ( - BundleTarget::Msi, - root_dir.join(format!( - "target/debug/bundle/msi/app-updater_{version}_x64_en-US.msi" - )), - ), - ] -} - -#[test] -#[ignore] -fn update_app() { - let target = tauri::updater::target().expect("running updater test in an unsupported platform"); - let manifest_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR")); - let root_dir = manifest_dir.join("../../.."); - let cli_dir = root_dir.join("tooling/cli"); - - let cli_bin_path = if let Some(p) = get_cli_bin_path(&cli_dir, false) { - p - } else if let Some(p) = get_cli_bin_path(&cli_dir, true) { - p - } else { - let status = Command::new("cargo") - .arg("build") - .current_dir(&cli_dir) - .status() - .expect("failed to run cargo"); - if !status.success() { - panic!("failed to build CLI"); - } - get_cli_bin_path(&cli_dir, true).expect("cargo did not build the Tauri CLI") - }; - - let mut config = Config { - package: PackageConfig { version: "1.0.0" }, - }; - - // bundle app update - build_app( - &cli_bin_path, - &manifest_dir, - &config, - true, - Default::default(), - ); - - let updater_zip_ext = if cfg!(windows) { "zip" } else { "tar.gz" }; - - for (bundle_target, out_bundle_path) in bundle_paths(&root_dir, "1.0.0") { - let bundle_updater_ext = out_bundle_path - .extension() - .unwrap() - .to_str() - .unwrap() - .replace("exe", "nsis"); - let signature_path = - out_bundle_path.with_extension(format!("{bundle_updater_ext}.{updater_zip_ext}.sig")); - let signature = std::fs::read_to_string(&signature_path) - .unwrap_or_else(|_| panic!("failed to read signature file {}", signature_path.display())); - let out_updater_path = - out_bundle_path.with_extension(format!("{}.{}", bundle_updater_ext, updater_zip_ext)); - let updater_path = root_dir.join(format!( - "target/debug/{}", - out_updater_path.file_name().unwrap().to_str().unwrap() - )); - std::fs::rename(&out_updater_path, &updater_path).expect("failed to rename bundle"); - - let target = target.clone(); - std::thread::spawn(move || { - // start the updater server - let server = - tiny_http::Server::http("localhost:3007").expect("failed to start updater server"); - - loop { - if let Ok(request) = server.recv() { - match request.url() { - "/" => { - let mut platforms = HashMap::new(); - - platforms.insert( - target.clone(), - PlatformUpdate { - signature: signature.clone(), - url: "http://localhost:3007/download", - with_elevated_task: false, - }, - ); - let body = serde_json::to_vec(&Update { - version: "1.0.0", - date: time::OffsetDateTime::now_utc() - .format(&time::format_description::well_known::Rfc3339) - .unwrap(), - platforms, - }) - .unwrap(); - let len = body.len(); - let response = tiny_http::Response::new( - tiny_http::StatusCode(200), - Vec::new(), - std::io::Cursor::new(body), - Some(len), - None, - ); - let _ = request.respond(response); - } - "/download" => { - let _ = request.respond(tiny_http::Response::from_file( - File::open(&updater_path).unwrap_or_else(|_| { - panic!("failed to open updater bundle {}", updater_path.display()) - }), - )); - // close server - return; - } - _ => (), - } - } - } - }); - - config.package.version = "0.1.0"; - - // bundle initial app version - build_app(&cli_bin_path, &manifest_dir, &config, false, bundle_target); - - let mut binary_cmd = if cfg!(windows) { - Command::new(root_dir.join("target/debug/app-updater.exe")) - } else if cfg!(target_os = "macos") { - Command::new( - bundle_paths(&root_dir, "0.1.0") - .first() - .unwrap() - .1 - .join("Contents/MacOS/app-updater"), - ) - } else if std::env::var("CI").map(|v| v == "true").unwrap_or_default() { - let mut c = Command::new("xvfb-run"); - c.arg("--auto-servernum") - .arg(&bundle_paths(&root_dir, "0.1.0").first().unwrap().1); - c - } else { - Command::new(&bundle_paths(&root_dir, "0.1.0").first().unwrap().1) - }; - - binary_cmd.env("TARGET", bundle_target.name()); - - let status = binary_cmd.status().expect("failed to run app"); - - if !status.success() { - panic!("failed to run app"); - } - } -} diff --git a/examples/api/src-tauri/Cargo.toml b/examples/api/src-tauri/Cargo.toml index 0618b55ffae..d06d48f3854 100644 --- a/examples/api/src-tauri/Cargo.toml +++ b/examples/api/src-tauri/Cargo.toml @@ -39,8 +39,7 @@ features = [ "icon-png", "isolation", "macos-private-api", - "system-tray", - "updater" + "system-tray" ] [target."cfg(target_os = \"windows\")".dependencies] diff --git a/examples/api/src-tauri/tauri.conf.json b/examples/api/src-tauri/tauri.conf.json index d7dcf01a208..f247a49e1f3 100644 --- a/examples/api/src-tauri/tauri.conf.json +++ b/examples/api/src-tauri/tauri.conf.json @@ -81,13 +81,6 @@ } } }, - "updater": { - "active": true, - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK", - "endpoints": [ - "https://tauri-update-server.vercel.app/update/{{target}}/{{current_version}}" - ] - }, "allowlist": { "all": true, "fs": { diff --git a/examples/updater/README.md b/examples/updater/README.md deleted file mode 100644 index 1eb77687d7e..00000000000 --- a/examples/updater/README.md +++ /dev/null @@ -1,29 +0,0 @@ -# Updater Example - -This example showcases the App Updater feature. - -## Running the example - -- Compile Tauri -go to root of the Tauri repo and run: -Linux / Mac: -``` -# choose to install node cli (1) -bash .scripts/setup.sh -``` - -Windows: -``` -./.scripts/setup.ps1 -``` - -- Run the app in development mode (Run inside of this folder `examples/updater/`) -```bash -$ cargo tauri dev -``` - -- Build an run the release app (Run inside of this folder `examples/updater/`) -```bash -$ cargo tauri build -$ ./src-tauri/target/release/app -``` diff --git a/examples/updater/entitlements.plist b/examples/updater/entitlements.plist deleted file mode 100644 index 39a04014aaf..00000000000 --- a/examples/updater/entitlements.plist +++ /dev/null @@ -1,7 +0,0 @@ - - - - - com.apple.security.automation.apple-events - - diff --git a/examples/updater/index.html b/examples/updater/index.html deleted file mode 100644 index 30db0bd4eb9..00000000000 --- a/examples/updater/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - Welcome to Tauri! - - -

Welcome to Tauri!

- - diff --git a/examples/updater/package.json b/examples/updater/package.json deleted file mode 100644 index 9c9182bc728..00000000000 --- a/examples/updater/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "updater", - "version": "1.0.0", - "scripts": { - "tauri": "node ../../tooling/cli/node/tauri.js" - } -} diff --git a/examples/updater/src-tauri/.gitignore b/examples/updater/src-tauri/.gitignore deleted file mode 100644 index aba21e242c9..00000000000 --- a/examples/updater/src-tauri/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Generated by Cargo -# will have compiled files and executables -/target/ diff --git a/examples/updater/src-tauri/Cargo.lock b/examples/updater/src-tauri/Cargo.lock deleted file mode 100644 index 72ed107a7de..00000000000 --- a/examples/updater/src-tauri/Cargo.lock +++ /dev/null @@ -1,3436 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "anyhow" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" - -[[package]] -name = "atk" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd" -dependencies = [ - "atk-sys", - "bitflags", - "glib", - "libc", -] - -[[package]] -name = "atk-sys" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58aeb089fb698e06db8089971c7ee317ab9644bade33383f63631437b03aafb6" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps 6.0.3", -] - -[[package]] -name = "attohttpc" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcf00bc6d5abb29b5f97e3c61a90b6d3caa12f3faf897d4a3e3607c050a35a7" -dependencies = [ - "flate2", - "http", - "log", - "native-tls", - "serde", - "serde_json", - "serde_urlencoded", - "url", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "block" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" - -[[package]] -name = "block-buffer" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" -dependencies = [ - "generic-array", -] - -[[package]] -name = "brotli" -version = "3.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1a0b1dbcc8ae29329621f8d4f0d835787c1c38bb1401979b49d13b0b305ff68" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6561fd3f895a11e8f72af2cb7d22e08366bebc2b6b57f7744c4bda27034744" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "bstr" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45ea9b00a7b3f2988e9a65ad3917e62123c38dba709b666506207be96d1790b" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "bumpalo" -version = "3.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" - -[[package]] -name = "bytemuck" -version = "1.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaa3a8d9a1ca92e282c96a32d6511b695d7d994d1d102ba85d279f9b2756947f" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" - -[[package]] -name = "cairo-rs" -version = "0.15.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c76ee391b03d35510d9fa917357c7f1855bd9a6659c95a1b392e33f49b3369bc" -dependencies = [ - "bitflags", - "cairo-sys-rs", - "glib", - "libc", - "thiserror", -] - -[[package]] -name = "cairo-sys-rs" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8" -dependencies = [ - "glib-sys", - "libc", - "system-deps 6.0.3", -] - -[[package]] -name = "cargo_toml" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f1204fe51a1e56042b8ec31d6407547ecd18f596b66f470dadb9abd9be9c843" -dependencies = [ - "serde", - "toml", -] - -[[package]] -name = "cc" -version = "1.0.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" - -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - -[[package]] -name = "cfb" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f" -dependencies = [ - "byteorder", - "fnv", - "uuid", -] - -[[package]] -name = "cfg-expr" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3431df59f28accaf4cb4eed4a9acc66bea3f3c3753aa6cdc2f024174ef232af7" -dependencies = [ - "smallvec", -] - -[[package]] -name = "cfg-expr" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0357a6402b295ca3a86bc148e84df46c02e41f41fef186bda662557ef6328aa" -dependencies = [ - "smallvec", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cocoa" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f425db7937052c684daec3bd6375c8abe2d146dca4b8b143d6db777c39138f3a" -dependencies = [ - "bitflags", - "block", - "cocoa-foundation", - "core-foundation", - "core-graphics", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "cocoa-foundation" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ade49b65d560ca58c403a479bb396592b155c0185eada742ee323d1d68d6318" -dependencies = [ - "bitflags", - "block", - "core-foundation", - "core-graphics-types", - "foreign-types", - "libc", - "objc", -] - -[[package]] -name = "color_quant" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" - -[[package]] -name = "combine" -version = "4.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" -dependencies = [ - "bytes", - "memchr", -] - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "core-foundation" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - -[[package]] -name = "core-graphics" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" -dependencies = [ - "bitflags", - "core-foundation", - "core-graphics-types", - "foreign-types", - "libc", -] - -[[package]] -name = "core-graphics-types" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a68b68b3446082644c91ac778bf50cd4104bfb002b5a6a7c44cca5a2c70788b" -dependencies = [ - "bitflags", - "core-foundation", - "foreign-types", - "libc", -] - -[[package]] -name = "cpufeatures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "cssparser" -version = "0.27.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "754b69d351cdc2d8ee09ae203db831e005560fc6030da058f86ad60c92a9cb0a" -dependencies = [ - "cssparser-macros", - "dtoa-short", - "itoa 0.4.8", - "matches", - "phf 0.8.0", - "proc-macro2", - "quote", - "smallvec", - "syn", -] - -[[package]] -name = "cssparser-macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfae75de57f2b2e85e8768c3ea840fd159c8f33e2b6522c7835b7abac81be16e" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "ctor" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "cty" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" - -[[package]] -name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" -dependencies = [ - "darling_core", - "quote", - "syn", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.4.0", - "syn", -] - -[[package]] -name = "digest" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" -dependencies = [ - "block-buffer", - "crypto-common", -] - -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if", - "dirs-sys-next", -] - -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "dispatch" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" - -[[package]] -name = "dtoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" - -[[package]] -name = "dtoa-short" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde03329ae10e79ede66c9ce4dc930aa8599043b0743008548680f25b91502d6" -dependencies = [ - "dtoa", -] - -[[package]] -name = "dunce" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" - -[[package]] -name = "embed_plist" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" - -[[package]] -name = "encoding_rs" -version = "0.8.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "fastrand" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" -dependencies = [ - "instant", -] - -[[package]] -name = "field-offset" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e1c54951450cbd39f3dbcf1005ac413b49487dabf18a720ad2383eccfeffb92" -dependencies = [ - "memoffset", - "rustc_version 0.3.3", -] - -[[package]] -name = "filetime" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "windows-sys", -] - -[[package]] -name = "flate2" -version = "1.0.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futf" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df420e2e84819663797d1ec6544b13c5be84629e7bb00dc960d6917db2987843" -dependencies = [ - "mac", - "new_debug_unreachable", -] - -[[package]] -name = "futures-channel" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" - -[[package]] -name = "futures-executor" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" - -[[package]] -name = "futures-macro" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-task" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" - -[[package]] -name = "futures-util" -version = "0.3.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" -dependencies = [ - "futures-core", - "futures-macro", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "gdk" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6e05c1f572ab0e1f15be94217f0dc29088c248b14f792a5ff0af0d84bcda9e8" -dependencies = [ - "bitflags", - "cairo-rs", - "gdk-pixbuf", - "gdk-sys", - "gio", - "glib", - "libc", - "pango", -] - -[[package]] -name = "gdk-pixbuf" -version = "0.15.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad38dd9cc8b099cceecdf41375bb6d481b1b5a7cd5cd603e10a69a9383f8619a" -dependencies = [ - "bitflags", - "gdk-pixbuf-sys", - "gio", - "glib", - "libc", -] - -[[package]] -name = "gdk-pixbuf-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140b2f5378256527150350a8346dbdb08fadc13453a7a2d73aecd5fab3c402a7" -dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps 6.0.3", -] - -[[package]] -name = "gdk-sys" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e7a08c1e8f06f4177fb7e51a777b8c1689f743a7bc11ea91d44d2226073a88" -dependencies = [ - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "pkg-config", - "system-deps 6.0.3", -] - -[[package]] -name = "gdkx11-sys" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b7f8c7a84b407aa9b143877e267e848ff34106578b64d1e0a24bf550716178" -dependencies = [ - "gdk-sys", - "glib-sys", - "libc", - "system-deps 6.0.3", - "x11", -] - -[[package]] -name = "generator" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d266041a359dfa931b370ef684cceb84b166beb14f7f0421f4a6a3d0c446d12e" -dependencies = [ - "cc", - "libc", - "log", - "rustversion", - "windows 0.39.0", -] - -[[package]] -name = "generic-array" -version = "0.14.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "gio" -version = "0.15.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68fdbc90312d462781a395f7a16d96a2b379bb6ef8cd6310a2df272771c4283b" -dependencies = [ - "bitflags", - "futures-channel", - "futures-core", - "futures-io", - "gio-sys", - "glib", - "libc", - "once_cell", - "thiserror", -] - -[[package]] -name = "gio-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32157a475271e2c4a023382e9cab31c4584ee30a97da41d3c4e9fdd605abcf8d" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps 6.0.3", - "winapi", -] - -[[package]] -name = "glib" -version = "0.15.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d" -dependencies = [ - "bitflags", - "futures-channel", - "futures-core", - "futures-executor", - "futures-task", - "glib-macros", - "glib-sys", - "gobject-sys", - "libc", - "once_cell", - "smallvec", - "thiserror", -] - -[[package]] -name = "glib-macros" -version = "0.15.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25a68131a662b04931e71891fb14aaf65ee4b44d08e8abc10f49e77418c86c64" -dependencies = [ - "anyhow", - "heck 0.4.0", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "glib-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" -dependencies = [ - "libc", - "system-deps 6.0.3", -] - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "globset" -version = "0.4.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "029d74589adefde59de1a0c4f4732695c32805624aec7b68d91503d4dba79afc" -dependencies = [ - "aho-corasick", - "bstr", - "fnv", - "log", - "regex", -] - -[[package]] -name = "gobject-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" -dependencies = [ - "glib-sys", - "libc", - "system-deps 6.0.3", -] - -[[package]] -name = "gtk" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e3004a2d5d6d8b5057d2b57b3712c9529b62e82c77f25c1fecde1fd5c23bd0" -dependencies = [ - "atk", - "bitflags", - "cairo-rs", - "field-offset", - "futures-channel", - "gdk", - "gdk-pixbuf", - "gio", - "glib", - "gtk-sys", - "gtk3-macros", - "libc", - "once_cell", - "pango", - "pkg-config", -] - -[[package]] -name = "gtk-sys" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5bc2f0587cba247f60246a0ca11fe25fb733eabc3de12d1965fc07efab87c84" -dependencies = [ - "atk-sys", - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "system-deps 6.0.3", -] - -[[package]] -name = "gtk3-macros" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f518afe90c23fba585b2d7697856f9e6a7bbc62f65588035e66f6afb01a2e9" -dependencies = [ - "anyhow", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "heck" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" - -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - -[[package]] -name = "html5ever" -version = "0.25.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c13fb08e5d4dfc151ee5e88bae63f7773d61852f3bdc73c9f4b9e1bde03148" -dependencies = [ - "log", - "mac", - "markup5ever", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "http" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" -dependencies = [ - "bytes", - "fnv", - "itoa 1.0.5", -] - -[[package]] -name = "http-range" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" - -[[package]] -name = "ico" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3804960be0bb5e4edb1e1ad67afd321a9ecfd875c3e65c099468fd2717d7cae" -dependencies = [ - "byteorder", - "png", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "ignore" -version = "0.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" -dependencies = [ - "crossbeam-utils", - "globset", - "lazy_static", - "log", - "memchr", - "regex", - "same-file", - "thread_local", - "walkdir", - "winapi-util", -] - -[[package]] -name = "image" -version = "0.24.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69b7ea949b537b0fd0af141fff8c77690f2ce96f4f41f042ccb6c69c6c965945" -dependencies = [ - "bytemuck", - "byteorder", - "color_quant", - "num-rational", - "num-traits", -] - -[[package]] -name = "indexmap" -version = "1.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "infer" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a898e4b7951673fce96614ce5751d13c40fc5674bc2d759288e46c3ab62598b3" -dependencies = [ - "cfb", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - -[[package]] -name = "itoa" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" - -[[package]] -name = "javascriptcore-rs" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf053e7843f2812ff03ef5afe34bb9c06ffee120385caad4f6b9967fcd37d41c" -dependencies = [ - "bitflags", - "glib", - "javascriptcore-rs-sys", -] - -[[package]] -name = "javascriptcore-rs-sys" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "905fbb87419c5cde6e3269537e4ea7d46431f3008c5d057e915ef3f115e7793c" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps 5.0.0", -] - -[[package]] -name = "jni" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "039022cdf4d7b1cf548d31f60ae783138e5fd42013f6271049d7df7afadef96c" -dependencies = [ - "cesu8", - "combine", - "jni-sys", - "log", - "thiserror", - "walkdir", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" - -[[package]] -name = "js-sys" -version = "0.3.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "json-patch" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e712e62827c382a77b87f590532febb1f8b2fdbc3eefa1ee37fe7281687075ef" -dependencies = [ - "serde", - "serde_json", - "thiserror", - "treediff", -] - -[[package]] -name = "kuchiki" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" -dependencies = [ - "cssparser", - "html5ever", - "matches", - "selectors", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.139" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" - -[[package]] -name = "line-wrap" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30344350a2a51da54c1d53be93fade8a237e545dbcc4bdbe635413f2117cab9" -dependencies = [ - "safemem", -] - -[[package]] -name = "lock_api" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "loom" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" -dependencies = [ - "cfg-if", - "generator", - "scoped-tls", - "serde", - "serde_json", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" - -[[package]] -name = "malloc_buf" -version = "0.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" -dependencies = [ - "libc", -] - -[[package]] -name = "markup5ever" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" -dependencies = [ - "log", - "phf 0.8.0", - "phf_codegen", - "string_cache", - "string_cache_codegen", - "tendril", -] - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata", -] - -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - -[[package]] -name = "memchr" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" - -[[package]] -name = "memoffset" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" -dependencies = [ - "autocfg", -] - -[[package]] -name = "minisign-verify" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" - -[[package]] -name = "miniz_oxide" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" -dependencies = [ - "adler", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "ndk" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2032c77e030ddee34a6787a64166008da93f6a352b629261d0fee232b8742dd4" -dependencies = [ - "bitflags", - "jni-sys", - "ndk-sys", - "num_enum", - "thiserror", -] - -[[package]] -name = "ndk-context" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" - -[[package]] -name = "ndk-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5a6ae77c8ee183dcbbba6150e2e6b9f3f4196a7666c02a715a95692ec1fa97" -dependencies = [ - "jni-sys", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - -[[package]] -name = "nodrop" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "num_threads" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" -dependencies = [ - "libc", -] - -[[package]] -name = "objc" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" -dependencies = [ - "malloc_buf", - "objc_exception", -] - -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - -[[package]] -name = "objc_exception" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad970fb455818ad6cba4c122ad012fae53ae8b4795f86378bce65e4f6bab2ca4" -dependencies = [ - "cc", -] - -[[package]] -name = "objc_id" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" -dependencies = [ - "objc", -] - -[[package]] -name = "once_cell" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" - -[[package]] -name = "openssl" -version = "0.10.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "518915b97df115dd36109bfa429a48b8f737bd05508cf9588977b599648926d2" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "666416d899cf077260dac8698d60a60b435a46d57e82acb1be3d0dad87284e5b" -dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "pango" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e4045548659aee5313bde6c582b0d83a627b7904dd20dc2d9ef0895d414e4f" -dependencies = [ - "bitflags", - "glib", - "libc", - "once_cell", - "pango-sys", -] - -[[package]] -name = "pango-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2a00081cde4661982ed91d80ef437c20eacaf6aa1a5962c0279ae194662c3aa" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps 6.0.3", -] - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-sys", -] - -[[package]] -name = "percent-encoding" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" - -[[package]] -name = "pest" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4257b4a04d91f7e9e6290be5d3da4804dd5784fafde3a497d73eb2b4a158c30a" -dependencies = [ - "thiserror", - "ucd-trie", -] - -[[package]] -name = "phf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" -dependencies = [ - "phf_macros 0.8.0", - "phf_shared 0.8.0", - "proc-macro-hack", -] - -[[package]] -name = "phf" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" -dependencies = [ - "phf_macros 0.10.0", - "phf_shared 0.10.0", - "proc-macro-hack", -] - -[[package]] -name = "phf_codegen" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", -] - -[[package]] -name = "phf_generator" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" -dependencies = [ - "phf_shared 0.8.0", - "rand 0.7.3", -] - -[[package]] -name = "phf_generator" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5285893bb5eb82e6aaf5d59ee909a06a16737a8970984dd7746ba9283498d6" -dependencies = [ - "phf_shared 0.10.0", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6fde18ff429ffc8fe78e2bf7f8b7a5a5a6e2a8b58bc5a9ac69198bbda9189c" -dependencies = [ - "phf_generator 0.8.0", - "phf_shared 0.8.0", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "phf_macros" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "phf_shared" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" - -[[package]] -name = "plist" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5329b8f106a176ab0dce4aae5da86bfcb139bb74fb00882859e03745011f3635" -dependencies = [ - "base64 0.13.1", - "indexmap", - "line-wrap", - "quick-xml", - "serde", - "time", -] - -[[package]] -name = "png" -version = "0.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d708eaf860a19b19ce538740d2b4bdeeb8337fa53f7738455e706623ad5c638" -dependencies = [ - "bitflags", - "crc32fast", - "flate2", - "miniz_oxide", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "proc-macro-crate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" -dependencies = [ - "once_cell", - "thiserror", - "toml", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - -[[package]] -name = "proc-macro2" -version = "1.0.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quick-xml" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", - "rand_pcg", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.8", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "raw-window-handle" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" -dependencies = [ - "cty", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - -[[package]] -name = "redox_users" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom 0.2.8", - "redox_syscall", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] - -[[package]] -name = "rfd" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0149778bd99b6959285b0933288206090c50e2327f47a9c463bfdbf45c8823ea" -dependencies = [ - "block", - "dispatch", - "glib-sys", - "gobject-sys", - "gtk-sys", - "js-sys", - "lazy_static", - "log", - "objc", - "objc-foundation", - "objc_id", - "raw-window-handle", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows 0.37.0", -] - -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver 1.0.16", -] - -[[package]] -name = "rustversion" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" - -[[package]] -name = "ryu" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" - -[[package]] -name = "safemem" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "security-framework" -version = "2.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "selectors" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df320f1889ac4ba6bc0cdc9c9af7af4bd64bb927bccdf32d81140dc1f9be12fe" -dependencies = [ - "bitflags", - "cssparser", - "derive_more", - "fxhash", - "log", - "matches", - "phf 0.8.0", - "phf_codegen", - "precomputed-hash", - "servo_arc", - "smallvec", - "thin-slice", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser", -] - -[[package]] -name = "semver" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" -dependencies = [ - "serde", -] - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "serde" -version = "1.0.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" -dependencies = [ - "itoa 1.0.5", - "ryu", - "serde", -] - -[[package]] -name = "serde_repr" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a5ec9fa74a20ebbe5d9ac23dac1fc96ba0ecfe9f50f2843b52e537b10fbcb4e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa 1.0.5", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" -dependencies = [ - "serde", - "serde_with_macros", -] - -[[package]] -name = "serde_with_macros" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serialize-to-javascript" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9823f2d3b6a81d98228151fdeaf848206a7855a7a042bbf9bf870449a66cafb" -dependencies = [ - "serde", - "serde_json", - "serialize-to-javascript-impl", -] - -[[package]] -name = "serialize-to-javascript-impl" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74064874e9f6a15f04c1f3cb627902d0e6b410abbf36668afa873c61889f1763" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "servo_arc" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d98238b800e0d1576d8b6e3de32827c2d74bee68bb97748dcf5071fb53965432" -dependencies = [ - "nodrop", - "stable_deref_trait", -] - -[[package]] -name = "sha2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sharded-slab" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "900fba806f70c630b0a382d0d825e17a0f19fcd059a2ade1ff237bcddf446b31" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "siphasher" -version = "0.3.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" - -[[package]] -name = "slab" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" - -[[package]] -name = "soup2" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b4d76501d8ba387cf0fefbe055c3e0a59891d09f0f995ae4e4b16f6b60f3c0" -dependencies = [ - "bitflags", - "gio", - "glib", - "libc", - "once_cell", - "soup2-sys", -] - -[[package]] -name = "soup2-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009ef427103fcb17f802871647a7fa6c60cbb654b4c4e4c0ac60a31c5f6dc9cf" -dependencies = [ - "bitflags", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps 5.0.0", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "state" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe866e1e51e8260c9eed836a042a5e7f6726bb2b411dffeaa712e19c388f23b" -dependencies = [ - "loom", -] - -[[package]] -name = "string_cache" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213494b7a2b503146286049378ce02b482200519accc31872ee8be91fa820a08" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot", - "phf_shared 0.10.0", - "precomputed-hash", - "serde", -] - -[[package]] -name = "string_cache_codegen" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" -dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro2", - "quote", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "syn" -version = "1.0.107" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "system-deps" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18db855554db7bd0e73e06cf7ba3df39f97812cb11d3f75e71c39bf45171797e" -dependencies = [ - "cfg-expr 0.9.1", - "heck 0.3.3", - "pkg-config", - "toml", - "version-compare 0.0.11", -] - -[[package]] -name = "system-deps" -version = "6.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2955b1fe31e1fa2fbd1976b71cc69a606d7d4da16f6de3333d0c92d51419aeff" -dependencies = [ - "cfg-expr 0.11.0", - "heck 0.4.0", - "pkg-config", - "toml", - "version-compare 0.1.1", -] - -[[package]] -name = "tao" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "704522803dda895767f69198af8351b0a3f4fe2e293c3ca54cce0ecba05a97f2" -dependencies = [ - "bitflags", - "cairo-rs", - "cc", - "cocoa", - "core-foundation", - "core-graphics", - "crossbeam-channel", - "dispatch", - "gdk", - "gdk-pixbuf", - "gdk-sys", - "gdkx11-sys", - "gio", - "glib", - "glib-sys", - "gtk", - "image", - "instant", - "jni", - "lazy_static", - "libc", - "log", - "ndk", - "ndk-context", - "ndk-sys", - "objc", - "once_cell", - "parking_lot", - "png", - "raw-window-handle", - "scopeguard", - "serde", - "tao-macros", - "unicode-segmentation", - "uuid", - "windows 0.39.0", - "windows-implement", - "x11-dl", -] - -[[package]] -name = "tao-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6fcd8245d45a39ffc8715183d92ae242750eb57b285eb3bcd63dfd512afd09" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tar" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" -dependencies = [ - "filetime", - "libc", - "xattr", -] - -[[package]] -name = "tauri" -version = "1.2.4" -dependencies = [ - "anyhow", - "attohttpc", - "base64 0.21.0", - "cocoa", - "dirs-next", - "embed_plist", - "encoding_rs", - "flate2", - "futures-util", - "glib", - "glob", - "gtk", - "heck 0.4.0", - "http", - "ignore", - "minisign-verify", - "objc", - "once_cell", - "percent-encoding", - "rand 0.8.5", - "raw-window-handle", - "rfd", - "semver 1.0.16", - "serde", - "serde_json", - "serde_repr", - "serialize-to-javascript", - "state", - "tar", - "tauri-macros", - "tauri-runtime", - "tauri-runtime-wry", - "tauri-utils", - "tempfile", - "thiserror", - "time", - "tokio", - "url", - "uuid", - "webkit2gtk", - "webview2-com", - "windows 0.39.0", - "zip", -] - -[[package]] -name = "tauri-build" -version = "1.2.1" -dependencies = [ - "anyhow", - "cargo_toml", - "heck 0.4.0", - "json-patch", - "quote", - "semver 1.0.16", - "serde", - "serde_json", - "tauri-codegen", - "tauri-utils", - "tauri-winres", -] - -[[package]] -name = "tauri-codegen" -version = "1.2.1" -dependencies = [ - "base64 0.21.0", - "brotli", - "ico", - "json-patch", - "plist", - "png", - "proc-macro2", - "quote", - "semver 1.0.16", - "serde", - "serde_json", - "sha2", - "tauri-utils", - "thiserror", - "time", - "uuid", - "walkdir", -] - -[[package]] -name = "tauri-macros" -version = "1.2.1" -dependencies = [ - "heck 0.4.0", - "proc-macro2", - "quote", - "syn", - "tauri-codegen", - "tauri-utils", -] - -[[package]] -name = "tauri-runtime" -version = "0.12.1" -dependencies = [ - "gtk", - "http", - "http-range", - "rand 0.8.5", - "raw-window-handle", - "serde", - "serde_json", - "tauri-utils", - "thiserror", - "url", - "uuid", - "webview2-com", - "windows 0.39.0", -] - -[[package]] -name = "tauri-runtime-wry" -version = "0.12.2" -dependencies = [ - "cocoa", - "gtk", - "percent-encoding", - "rand 0.8.5", - "raw-window-handle", - "tauri-runtime", - "tauri-utils", - "uuid", - "webkit2gtk", - "webview2-com", - "windows 0.39.0", - "wry", -] - -[[package]] -name = "tauri-utils" -version = "1.2.1" -dependencies = [ - "brotli", - "ctor", - "glob", - "heck 0.4.0", - "html5ever", - "infer", - "json-patch", - "kuchiki", - "memchr", - "phf 0.10.1", - "proc-macro2", - "quote", - "semver 1.0.16", - "serde", - "serde_json", - "serde_with", - "thiserror", - "url", - "walkdir", - "windows 0.39.0", -] - -[[package]] -name = "tauri-winres" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b7a78dc04f75fb5ab815e66ac561c81e92a968a40f29e7c21afd152d694fad8" -dependencies = [ - "toml", - "version_check", -] - -[[package]] -name = "tempfile" -version = "3.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" -dependencies = [ - "cfg-if", - "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", -] - -[[package]] -name = "tendril" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24a120c5fc464a3458240ee02c299ebcb9d67b5249c8848b09d639dca8d7bb0" -dependencies = [ - "futf", - "mac", - "utf-8", -] - -[[package]] -name = "thin-slice" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" - -[[package]] -name = "thiserror" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "thread_local" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" -dependencies = [ - "once_cell", -] - -[[package]] -name = "time" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d634a985c4d4238ec39cacaed2e7ae552fbd3c476b552c1deac3021b7d7eaf0c" -dependencies = [ - "itoa 1.0.5", - "libc", - "num_threads", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" - -[[package]] -name = "tokio" -version = "1.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" -dependencies = [ - "autocfg", - "bytes", - "memchr", - "num_cpus", - "pin-project-lite", - "windows-sys", -] - -[[package]] -name = "toml" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" -dependencies = [ - "serde", -] - -[[package]] -name = "tracing" -version = "0.1.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" -dependencies = [ - "cfg-if", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tracing-core" -version = "0.1.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ddad33d2d10b1ed7eb9d1f518a5674713876e97e5bb9b7345a7984fbb4f922" -dependencies = [ - "lazy_static", - "log", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6176eae26dd70d0c919749377897b54a9276bd7061339665dd68777926b5a70" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[package]] -name = "treediff" -version = "4.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52984d277bdf2a751072b5df30ec0377febdb02f7696d64c2d7d54630bac4303" -dependencies = [ - "serde_json", -] - -[[package]] -name = "typenum" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" - -[[package]] -name = "ucd-trie" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e79c4d996edb816c91e4308506774452e55e95c3c9de07b6729e17e15a5ef81" - -[[package]] -name = "unicode-bidi" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" - -[[package]] -name = "unicode-ident" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" - -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" - -[[package]] -name = "updater-example" -version = "0.1.0" -dependencies = [ - "serde", - "serde_json", - "tauri", - "tauri-build", -] - -[[package]] -name = "url" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "uuid" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422ee0de9031b5b948b97a8fc04e3aa35230001a722ddd27943e0be31564ce4c" -dependencies = [ - "getrandom 0.2.8", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version-compare" -version = "0.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c18c859eead79d8b95d09e4678566e8d70105c4e7b251f707a03df32442661b" - -[[package]] -name = "version-compare" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579a42fc0b8e0c63b76519a339be31bed574929511fa53c1a3acae26eb258f29" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "walkdir" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" -dependencies = [ - "same-file", - "winapi", - "winapi-util", -] - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" - -[[package]] -name = "web-sys" -version = "0.3.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webkit2gtk" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8f859735e4a452aeb28c6c56a852967a8a76c8eb1cc32dbf931ad28a13d6370" -dependencies = [ - "bitflags", - "cairo-rs", - "gdk", - "gdk-sys", - "gio", - "gio-sys", - "glib", - "glib-sys", - "gobject-sys", - "gtk", - "gtk-sys", - "javascriptcore-rs", - "libc", - "once_cell", - "soup2", - "webkit2gtk-sys", -] - -[[package]] -name = "webkit2gtk-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d76ca6ecc47aeba01ec61e480139dda143796abcae6f83bcddf50d6b5b1dcf3" -dependencies = [ - "atk-sys", - "bitflags", - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "gtk-sys", - "javascriptcore-rs-sys", - "libc", - "pango-sys", - "pkg-config", - "soup2-sys", - "system-deps 6.0.3", -] - -[[package]] -name = "webview2-com" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a769c9f1a64a8734bde70caafac2b96cada12cd4aefa49196b3a386b8b4178" -dependencies = [ - "webview2-com-macros", - "webview2-com-sys", - "windows 0.39.0", - "windows-implement", -] - -[[package]] -name = "webview2-com-macros" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaebe196c01691db62e9e4ca52c5ef1e4fd837dcae27dae3ada599b5a8fd05ac" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "webview2-com-sys" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac48ef20ddf657755fdcda8dfed2a7b4fc7e4581acce6fe9b88c3d64f29dee7" -dependencies = [ - "regex", - "serde", - "serde_json", - "thiserror", - "windows 0.39.0", - "windows-bindgen", - "windows-metadata", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" -dependencies = [ - "windows_aarch64_msvc 0.37.0", - "windows_i686_gnu 0.37.0", - "windows_i686_msvc 0.37.0", - "windows_x86_64_gnu 0.37.0", - "windows_x86_64_msvc 0.37.0", -] - -[[package]] -name = "windows" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" -dependencies = [ - "windows-implement", - "windows_aarch64_msvc 0.39.0", - "windows_i686_gnu 0.39.0", - "windows_i686_msvc 0.39.0", - "windows_x86_64_gnu 0.39.0", - "windows_x86_64_msvc 0.39.0", -] - -[[package]] -name = "windows-bindgen" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68003dbd0e38abc0fb85b939240f4bce37c43a5981d3df37ccbaaa981b47cb41" -dependencies = [ - "windows-metadata", - "windows-tokens", -] - -[[package]] -name = "windows-implement" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba01f98f509cb5dc05f4e5fc95e535f78260f15fea8fe1a8abdd08f774f1cee7" -dependencies = [ - "syn", - "windows-tokens", -] - -[[package]] -name = "windows-metadata" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee5e275231f07c6e240d14f34e1b635bf1faa1c76c57cfd59a5cdb9848e4278" - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", -] - -[[package]] -name = "windows-tokens" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f838de2fe15fe6bac988e74b798f26499a8b21a9d97edec321e79b28d1d7f597" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec7711666096bd4096ffa835238905bb33fb87267910e154b18b44eaabb340f2" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" - -[[package]] -name = "windows_i686_gnu" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" - -[[package]] -name = "windows_i686_gnu" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763fc57100a5f7042e3057e7e8d9bdd7860d330070251a73d003563a3bb49e1b" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" - -[[package]] -name = "windows_i686_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" - -[[package]] -name = "windows_i686_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bc7cbfe58828921e10a9f446fcaaf649204dcfe6c1ddd712c5eebae6bda1106" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6868c165637d653ae1e8dc4d82c25d4f97dd6605eaa8d784b5c6e0ab2a252b65" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4d40883ae9cae962787ca76ba76390ffa29214667a111db9e0a1ad8377e809" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" - -[[package]] -name = "wry" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c846dc4dda988e959869dd0802cd27417c9696e584593e49178aeee28890d25" -dependencies = [ - "base64 0.13.1", - "block", - "cocoa", - "core-graphics", - "crossbeam-channel", - "dunce", - "gdk", - "gio", - "glib", - "gtk", - "html5ever", - "http", - "kuchiki", - "libc", - "log", - "objc", - "objc_id", - "once_cell", - "serde", - "serde_json", - "sha2", - "soup2", - "tao", - "thiserror", - "url", - "webkit2gtk", - "webkit2gtk-sys", - "webview2-com", - "windows 0.39.0", - "windows-implement", -] - -[[package]] -name = "x11" -version = "2.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2638d5b9c17ac40575fb54bb461a4b1d2a8d1b4ffcc4ff237d254ec59ddeb82" -dependencies = [ - "libc", - "pkg-config", -] - -[[package]] -name = "x11-dl" -version = "2.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1536d6965a5d4e573c7ef73a2c15ebcd0b2de3347bdf526c34c297c00ac40f0" -dependencies = [ - "lazy_static", - "libc", - "pkg-config", -] - -[[package]] -name = "xattr" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" -dependencies = [ - "libc", -] - -[[package]] -name = "zip" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "537ce7411d25e54e8ae21a7ce0b15840e7bfcff15b51d697ec3266cc76bdf080" -dependencies = [ - "byteorder", - "crc32fast", - "crossbeam-utils", -] diff --git a/examples/updater/src-tauri/Cargo.toml b/examples/updater/src-tauri/Cargo.toml deleted file mode 100644 index 07e5cd91e40..00000000000 --- a/examples/updater/src-tauri/Cargo.toml +++ /dev/null @@ -1,30 +0,0 @@ -[package] -name = "updater-example" -version = "0.1.0" -description = "A very simple Tauri Application" -edition = "2021" -rust-version = "1.65" -license = "Apache-2.0 OR MIT" - -[build-dependencies] -tauri-build = { path = "../../../core/tauri-build", features = ["codegen"] } - -[dependencies] -serde_json = "1.0" -serde = { version = "1.0", features = [ "derive" ] } -tauri = { path = "../../../core/tauri", features = ["updater"] } - -[features] -custom-protocol = [ "tauri/custom-protocol" ] - -[[bin]] -name = "updater-example" -path = "src/main.rs" - -# default to small, optimized release binaries -[profile.release] -panic = "abort" -codegen-units = 1 -lto = true -incremental = false -opt-level = "s" diff --git a/examples/updater/src-tauri/build.rs b/examples/updater/src-tauri/build.rs deleted file mode 100644 index b055ec37c77..00000000000 --- a/examples/updater/src-tauri/build.rs +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -fn main() { - tauri_build::build() -} diff --git a/examples/updater/src-tauri/src/main.rs b/examples/updater/src-tauri/src/main.rs deleted file mode 100644 index 6068a4d841d..00000000000 --- a/examples/updater/src-tauri/src/main.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] - -#[tauri::command] -fn my_custom_command(argument: String) { - println!("{}", argument); -} - -fn main() { - tauri::Builder::default() - .invoke_handler(tauri::generate_handler![my_custom_command]) - .run(tauri::generate_context!()) - .expect("error while running tauri application"); -} diff --git a/examples/updater/src-tauri/tauri.conf.json b/examples/updater/src-tauri/tauri.conf.json deleted file mode 100644 index c2ef3cff785..00000000000 --- a/examples/updater/src-tauri/tauri.conf.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "$schema": "../../../core/tauri-config-schema/schema.json", - "build": { - "distDir": ["../index.html"], - "devPath": ["../index.html"], - "beforeDevCommand": "", - "beforeBuildCommand": "" - }, - "package": { - "productName": "Updater", - "version": "0.1.0" - }, - "tauri": { - "bundle": { - "active": true, - "targets": "all", - "identifier": "com.tauri.updater", - "icon": [ - "../../.icons/32x32.png", - "../../.icons/128x128.png", - "../../.icons/128x128@2x.png", - "../../.icons/icon.icns", - "../../.icons/icon.ico" - ], - "resources": [], - "externalBin": [], - "copyright": "", - "category": "DeveloperTool", - "shortDescription": "", - "longDescription": "", - "deb": { - "depends": [] - }, - "macOS": { - "signingIdentity": null, - "entitlements": "../entitlements.plist", - "frameworks": [], - "exceptionDomain": "" - }, - "windows": { - "certificateThumbprint": null, - "digestAlgorithm": null, - "timestampUrl": null, - "wix": { - "enableElevatedUpdateTask": false - } - } - }, - "allowlist": { - "all": false - }, - "windows": [ - { - "title": "Welcome to Tauri!", - "width": 800, - "height": 600, - "resizable": true, - "fullscreen": false - } - ], - "security": { - "csp": "default-src 'self'" - }, - "updater": { - "active": true, - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK", - "endpoints": [ - "https://tauri-update-server.vercel.app/update/{{target}}/{{current_version}}" - ] - } - } -} diff --git a/examples/updater/yarn.lock b/examples/updater/yarn.lock deleted file mode 100644 index fb57ccd13af..00000000000 --- a/examples/updater/yarn.lock +++ /dev/null @@ -1,4 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - diff --git a/examples/web/core/tauri/tauri.conf.json b/examples/web/core/tauri/tauri.conf.json index dd0a5b0b93a..4306d1bacce 100644 --- a/examples/web/core/tauri/tauri.conf.json +++ b/examples/web/core/tauri/tauri.conf.json @@ -49,9 +49,6 @@ "security": { "csp": null }, - "updater": { - "active": false - }, "windows": [ { "fullscreen": false, @@ -62,4 +59,4 @@ } ] } -} +} \ No newline at end of file diff --git a/examples/workspace/src-tauri/tauri.conf.json b/examples/workspace/src-tauri/tauri.conf.json index 12001208111..707379b2648 100644 --- a/examples/workspace/src-tauri/tauri.conf.json +++ b/examples/workspace/src-tauri/tauri.conf.json @@ -1,7 +1,11 @@ { "build": { - "distDir": ["../index.html"], - "devPath": ["../index.html"] + "distDir": [ + "../index.html" + ], + "devPath": [ + "../index.html" + ] }, "package": { "productName": "workspace" @@ -46,9 +50,6 @@ "security": { "csp": null }, - "updater": { - "active": false - }, "windows": [ { "fullscreen": false, @@ -59,4 +60,4 @@ } ] } -} +} \ No newline at end of file diff --git a/tooling/api/docs/js-api.json b/tooling/api/docs/js-api.json index cf55ac41ad9..baa77f8e568 100644 --- a/tooling/api/docs/js-api.json +++ b/tooling/api/docs/js-api.json @@ -1 +1 @@ -{"id":0,"name":"@tauri-apps/api","kind":1,"flags":{},"originalName":"","children":[{"id":1,"name":"event","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"The event system allows you to emit events to the backend and listen to events from it.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.event`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":3,"name":"TauriEvent","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":17,"name":"CHECK_UPDATE","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L34"}],"type":{"type":"literal","value":"tauri://update"}},{"id":21,"name":"DOWNLOAD_PROGRESS","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L38"}],"type":{"type":"literal","value":"tauri://update-download-progress"}},{"id":19,"name":"INSTALL_UPDATE","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L36"}],"type":{"type":"literal","value":"tauri://update-install"}},{"id":16,"name":"MENU","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L33"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":20,"name":"STATUS_UPDATE","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L37"}],"type":{"type":"literal","value":"tauri://update-status"}},{"id":18,"name":"UPDATE_AVAILABLE","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L35"}],"type":{"type":"literal","value":"tauri://update-available"}},{"id":10,"name":"WINDOW_BLUR","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":27,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L27"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":6,"name":"WINDOW_CLOSE_REQUESTED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":23,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L23"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":7,"name":"WINDOW_CREATED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L24"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":8,"name":"WINDOW_DESTROYED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L25"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":13,"name":"WINDOW_FILE_DROP","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":30,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L30"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":15,"name":"WINDOW_FILE_DROP_CANCELLED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L32"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":14,"name":"WINDOW_FILE_DROP_HOVER","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":31,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L31"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":9,"name":"WINDOW_FOCUS","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":26,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L26"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":5,"name":"WINDOW_MOVED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L22"}],"type":{"type":"literal","value":"tauri://move"}},{"id":4,"name":"WINDOW_RESIZED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":21,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L21"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":11,"name":"WINDOW_SCALE_FACTOR_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":28,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L28"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":12,"name":"WINDOW_THEME_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L29"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[17,21,19,16,20,18,10,6,7,8,13,15,14,9,5,4,11,12]}],"sources":[{"fileName":"event.ts","line":20,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L20"}]},{"id":645,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":646,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"helpers/event.ts","line":12,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/helpers/event.ts#L12"}],"type":{"type":"reference","id":2,"name":"EventName"}},{"id":648,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"helpers/event.ts","line":16,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/helpers/event.ts#L16"}],"type":{"type":"intrinsic","name":"number"}},{"id":649,"name":"payload","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"helpers/event.ts","line":18,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/helpers/event.ts#L18"}],"type":{"type":"reference","id":650,"name":"T"}},{"id":647,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"helpers/event.ts","line":14,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/helpers/event.ts#L14"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[646,648,649,647]}],"sources":[{"fileName":"helpers/event.ts","line":10,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/helpers/event.ts#L10"}],"typeParameters":[{"id":650,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":651,"name":"EventCallback","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/helpers/event.ts#L21"}],"typeParameters":[{"id":655,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":652,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/helpers/event.ts#L21"}],"signatures":[{"id":653,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":654,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":645,"typeArguments":[{"type":"reference","id":655,"name":"T"}],"name":"Event"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":2,"name":"EventName","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"event.ts","line":15,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L15"}],"type":{"type":"union","types":[{"type":"template-literal","head":"","tail":[[{"type":"reference","id":3,"name":"TauriEvent"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","qualifiedName":"Record","package":"typescript"}]}]}},{"id":656,"name":"UnlistenFn","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":23,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/helpers/event.ts#L23"}],"type":{"type":"reflection","declaration":{"id":657,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":23,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/helpers/event.ts#L23"}],"signatures":[{"id":658,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":32,"name":"emit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":112,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L112"}],"signatures":[{"id":33,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { emit } from '@tauri-apps/api/event';\nawait emit('frontend-loaded', { loggedIn: true, token: 'authToken' });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":34,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":35,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":22,"name":"listen","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":62,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L62"}],"signatures":[{"id":23,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { listen } from '@tauri-apps/api/event';\nconst unlisten = await listen('error', (event) => {\n console.log(`Got error in window ${event.windowLabel}, payload: ${event.payload}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":24,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":25,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":26,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","id":651,"typeArguments":[{"type":"reference","id":24,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":27,"name":"once","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":93,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L93"}],"signatures":[{"id":28,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { once } from '@tauri-apps/api/event';\ninterface LoadedPayload {\n loggedIn: boolean,\n token: string\n}\nconst unlisten = await once('loaded', (event) => {\n console.log(`App is loaded, loggedIn: ${event.payload.loggedIn}, token: ${event.payload.token}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":29,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":30,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":31,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":651,"typeArguments":[{"type":"reference","id":29,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[3]},{"title":"Interfaces","children":[645]},{"title":"Type Aliases","children":[651,2,656]},{"title":"Functions","children":[32,22,27]}],"sources":[{"fileName":"event.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/event.ts#L12"}]},{"id":36,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":48,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":171,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/mocks.ts#L171"}],"signatures":[{"id":49,"name":"clearMocks","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Clears mocked functions/data injected by the other functions in this module.\nWhen using a test runner that doesn't provide a fresh window object for each test, calling this function will reset tauri specific properties.\n\n# Example\n\n"},{"kind":"code","text":"```js\nimport { mockWindows, clearMocks } from \"@tauri-apps/api/mocks\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked windows\", () => {\n mockWindows(\"main\", \"second\", \"third\");\n\n expect(window).toHaveProperty(\"__TAURI_METADATA__\")\n})\n\ntest(\"no mocked windows\", () => {\n expect(window).not.toHaveProperty(\"__TAURI_METADATA__\")\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"intrinsic","name":"void"}}]},{"id":37,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":65,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/mocks.ts#L65"}],"signatures":[{"id":38,"name":"mockIPC","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Intercepts all IPC requests with the given mock handler.\n\nThis function can be used when testing tauri frontend applications or when running the frontend in a Node.js context during static site generation.\n\n# Examples\n\nTesting setup using vitest:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n switch (cmd) {\n case \"add\":\n return (args.a as number) + (args.b as number);\n default:\n break;\n }\n });\n\n expect(invoke('add', { a: 12, b: 15 })).resolves.toBe(27);\n})\n```"},{"kind":"text","text":"\n\nThe callback function can also return a Promise:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n if(cmd === \"get_data\") {\n return fetch(\"https://example.com/data.json\")\n .then((response) => response.json())\n }\n });\n\n expect(invoke('get_data')).resolves.toBe({ foo: 'bar' });\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":39,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":40,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":66,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/mocks.ts#L66"}],"signatures":[{"id":41,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":42,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":43,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":44,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":135,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/mocks.ts#L135"}],"signatures":[{"id":45,"name":"mockWindows","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Mocks one or many window labels.\nIn non-tauri context it is required to call this function *before* using the "},{"kind":"code","text":"`@tauri-apps/api/window`"},{"kind":"text","text":" module.\n\nThis function only mocks the *presence* of windows,\nwindow properties (e.g. width and height) can be mocked like regular IPC calls using the "},{"kind":"code","text":"`mockIPC`"},{"kind":"text","text":" function.\n\n# Examples\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\nimport { getCurrent } from \"@tauri-apps/api/window\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nconst win = getCurrent();\n\nwin.label // \"main\"\n```"},{"kind":"text","text":"\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nmockIPC((cmd, args) => {\n if (cmd === \"tauri\") {\n if (\n args?.__tauriModule === \"Window\" &&\n args?.message?.cmd === \"manage\" &&\n args?.message?.data?.cmd?.type === \"close\"\n ) {\n console.log('closing window!');\n }\n }\n});\n\nconst { getCurrent } = await import(\"@tauri-apps/api/window\");\n\nconst win = getCurrent();\nawait win.close(); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":46,"name":"current","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":47,"name":"additionalWindows","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"Label of additional windows the app has."}]},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Functions","children":[48,37,44]}],"sources":[{"fileName":"mocks.ts","line":5,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/mocks.ts#L5"}]},{"id":50,"name":"path","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"The path module provides utilities for working with file and directory paths.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.path`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":".\n\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.path`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.path) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"path\": {\n \"all\": true, // enable all Path APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":51,"name":"BaseDirectory","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":67,"name":"AppCache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L48"}],"type":{"type":"literal","value":16}},{"id":64,"name":"AppConfig","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":45,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L45"}],"type":{"type":"literal","value":13}},{"id":65,"name":"AppData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":46,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L46"}],"type":{"type":"literal","value":14}},{"id":66,"name":"AppLocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L47"}],"type":{"type":"literal","value":15}},{"id":68,"name":"AppLog","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L49"}],"type":{"type":"literal","value":17}},{"id":52,"name":"Audio","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L33"}],"type":{"type":"literal","value":1}},{"id":53,"name":"Cache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L34"}],"type":{"type":"literal","value":2}},{"id":54,"name":"Config","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L35"}],"type":{"type":"literal","value":3}},{"id":55,"name":"Data","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L36"}],"type":{"type":"literal","value":4}},{"id":69,"name":"Desktop","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L51"}],"type":{"type":"literal","value":18}},{"id":57,"name":"Document","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L38"}],"type":{"type":"literal","value":6}},{"id":58,"name":"Download","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L39"}],"type":{"type":"literal","value":7}},{"id":70,"name":"Executable","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L52"}],"type":{"type":"literal","value":19}},{"id":71,"name":"Font","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L53"}],"type":{"type":"literal","value":20}},{"id":72,"name":"Home","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L54"}],"type":{"type":"literal","value":21}},{"id":56,"name":"LocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L37"}],"type":{"type":"literal","value":5}},{"id":59,"name":"Picture","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L40"}],"type":{"type":"literal","value":8}},{"id":60,"name":"Public","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L41"}],"type":{"type":"literal","value":9}},{"id":62,"name":"Resource","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L43"}],"type":{"type":"literal","value":11}},{"id":73,"name":"Runtime","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L55"}],"type":{"type":"literal","value":22}},{"id":63,"name":"Temp","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":44,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L44"}],"type":{"type":"literal","value":12}},{"id":74,"name":"Template","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L56"}],"type":{"type":"literal","value":23}},{"id":61,"name":"Video","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L42"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[67,64,65,66,68,52,53,54,55,69,57,58,70,71,72,56,59,60,62,73,63,74,61]}],"sources":[{"fileName":"path.ts","line":32,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L32"}]},{"id":123,"name":"delimiter","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides the platform-specific path segment delimiter:\n- "},{"kind":"code","text":"`;`"},{"kind":"text","text":" on Windows\n- "},{"kind":"code","text":"`:`"},{"kind":"text","text":" on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":555,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L555"}],"type":{"type":"union","types":[{"type":"literal","value":";"},{"type":"literal","value":":"}]},"defaultValue":"..."},{"id":122,"name":"sep","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides the platform-specific path segment separator:\n- "},{"kind":"code","text":"`\\` on Windows\n- `"},{"kind":"text","text":"/` on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":546,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L546"}],"type":{"type":"union","types":[{"type":"literal","value":"\\"},{"type":"literal","value":"/"}]},"defaultValue":"..."},{"id":81,"name":"appCacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":121,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L121"}],"signatures":[{"id":82,"name":"appCacheDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's cache files.\nResolves to "},{"kind":"code","text":"`${cacheDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appCacheDir } from '@tauri-apps/api/path';\nconst appCacheDirPath = await appCacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":75,"name":"appConfigDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":70,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L70"}],"signatures":[{"id":76,"name":"appConfigDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's config files.\nResolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appConfigDir } from '@tauri-apps/api/path';\nconst appConfigDirPath = await appConfigDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":77,"name":"appDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L87"}],"signatures":[{"id":78,"name":"appDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's data files.\nResolves to "},{"kind":"code","text":"`${dataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":79,"name":"appLocalDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":104,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L104"}],"signatures":[{"id":80,"name":"appLocalDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's local data files.\nResolves to "},{"kind":"code","text":"`${localDataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLocalDataDir } from '@tauri-apps/api/path';\nconst appLocalDataDirPath = await appLocalDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":83,"name":"appLogDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":533,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L533"}],"signatures":[{"id":84,"name":"appLogDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's log files.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`${homeDir}/Library/Logs/{bundleIdentifier}`"},{"kind":"text","text":"\n- **Windows:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLogDir } from '@tauri-apps/api/path';\nconst appLogDirPath = await appLogDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":85,"name":"audioDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":143,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L143"}],"signatures":[{"id":86,"name":"audioDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's audio directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_MUSIC_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Music`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Music}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { audioDir } from '@tauri-apps/api/path';\nconst audioDirPath = await audioDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":139,"name":"basename","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":647,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L647"}],"signatures":[{"id":140,"name":"basename","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the last portion of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { basename, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst base = await basename(resourcePath);\nassert(base === 'app.conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":141,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":142,"name":"ext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional file extension to be removed from the returned path."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":87,"name":"cacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":165,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L165"}],"signatures":[{"id":88,"name":"cacheDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's cache directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CACHE_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.cache`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Caches`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { cacheDir } from '@tauri-apps/api/path';\nconst cacheDirPath = await cacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":89,"name":"configDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":187,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L187"}],"signatures":[{"id":90,"name":"configDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's config directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CONFIG_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.config`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { configDir } from '@tauri-apps/api/path';\nconst configDirPath = await configDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":91,"name":"dataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":209,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L209"}],"signatures":[{"id":92,"name":"dataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dataDir } from '@tauri-apps/api/path';\nconst dataDirPath = await dataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":93,"name":"desktopDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":231,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L231"}],"signatures":[{"id":94,"name":"desktopDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's desktop directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DESKTOP_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Desktop`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Desktop}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { desktopDir } from '@tauri-apps/api/path';\nconst desktopPath = await desktopDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":133,"name":"dirname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":613,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L613"}],"signatures":[{"id":134,"name":"dirname","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the directory name of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dirname, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst dir = await dirname(appDataDirPath);\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":135,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":95,"name":"documentDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":253,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L253"}],"signatures":[{"id":96,"name":"documentDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's document directory."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { documentDir } from '@tauri-apps/api/path';\nconst documentDirPath = await documentDir();\n```"},{"kind":"text","text":"\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOCUMENTS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Documents`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Documents}`"},{"kind":"text","text":"."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":97,"name":"downloadDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":275,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L275"}],"signatures":[{"id":98,"name":"downloadDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's download directory.\n\n#### Platform-specific\n\n- **Linux**: Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOWNLOAD_DIR`"},{"kind":"text","text":".\n- **macOS**: Resolves to "},{"kind":"code","text":"`$HOME/Downloads`"},{"kind":"text","text":".\n- **Windows**: Resolves to "},{"kind":"code","text":"`{FOLDERID_Downloads}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { downloadDir } from '@tauri-apps/api/path';\nconst downloadDirPath = await downloadDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":99,"name":"executableDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":297,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L297"}],"signatures":[{"id":100,"name":"executableDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's executable directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_BIN_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$XDG_DATA_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/bin`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { executableDir } from '@tauri-apps/api/path';\nconst executableDirPath = await executableDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":136,"name":"extname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":629,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L629"}],"signatures":[{"id":137,"name":"extname","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the extension of the "},{"kind":"code","text":"`path`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { extname, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst ext = await extname(resourcePath);\nassert(ext === 'conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":138,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":101,"name":"fontDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":319,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L319"}],"signatures":[{"id":102,"name":"fontDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's font directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME/fonts`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share/fonts`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Fonts`"},{"kind":"text","text":".\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { fontDir } from '@tauri-apps/api/path';\nconst fontDirPath = await fontDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":103,"name":"homeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":341,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L341"}],"signatures":[{"id":104,"name":"homeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's home directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Profile}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { homeDir } from '@tauri-apps/api/path';\nconst homeDirPath = await homeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":143,"name":"isAbsolute","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":661,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L661"}],"signatures":[{"id":144,"name":"isAbsolute","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns whether the path is absolute or not."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isAbsolute } from '@tauri-apps/api/path';\nassert(await isAbsolute('/home/tauri'));\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":145,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":130,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":598,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L598"}],"signatures":[{"id":131,"name":"join","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Joins all given "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments together using the platform-specific separator as a delimiter, then normalizes the resulting path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { join, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await join(appDataDirPath, 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":132,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":105,"name":"localDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":363,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L363"}],"signatures":[{"id":106,"name":"localDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's local data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { localDataDir } from '@tauri-apps/api/path';\nconst localDataDirPath = await localDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":127,"name":"normalize","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":583,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L583"}],"signatures":[{"id":128,"name":"normalize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Normalizes the given "},{"kind":"code","text":"`path`"},{"kind":"text","text":", resolving "},{"kind":"code","text":"`'..'`"},{"kind":"text","text":" and "},{"kind":"code","text":"`'.'`"},{"kind":"text","text":" segments and resolve symbolic links."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { normalize, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await normalize(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":129,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":107,"name":"pictureDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":385,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L385"}],"signatures":[{"id":108,"name":"pictureDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's picture directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PICTURES_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Pictures`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Pictures}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { pictureDir } from '@tauri-apps/api/path';\nconst pictureDirPath = await pictureDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":109,"name":"publicDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":407,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L407"}],"signatures":[{"id":110,"name":"publicDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's public directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PUBLICSHARE_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Public`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Public}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { publicDir } from '@tauri-apps/api/path';\nconst publicDirPath = await publicDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":124,"name":"resolve","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":568,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L568"}],"signatures":[{"id":125,"name":"resolve","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resolves a sequence of "},{"kind":"code","text":"`paths`"},{"kind":"text","text":" or "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments into an absolute path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolve, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await resolve(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":126,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":113,"name":"resolveResource","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":444,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L444"}],"signatures":[{"id":114,"name":"resolveResource","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resolve the path to a resource file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('script.sh');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The full path to the resource."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":115,"name":"resourcePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The path to the resource.\nMust follow the same syntax as defined in "},{"kind":"code","text":"`tauri.conf.json > tauri > bundle > resources`"},{"kind":"text","text":", i.e. keeping subfolders and parent dir components ("},{"kind":"code","text":"`../`"},{"kind":"text","text":")."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":111,"name":"resourceDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":424,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L424"}],"signatures":[{"id":112,"name":"resourceDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the application's resource directory.\nTo resolve a resource path, see the [[resolveResource | "},{"kind":"code","text":"`resolveResource API`"},{"kind":"text","text":"]]."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resourceDir } from '@tauri-apps/api/path';\nconst resourceDirPath = await resourceDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":116,"name":"runtimeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":467,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L467"}],"signatures":[{"id":117,"name":"runtimeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's runtime directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_RUNTIME_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { runtimeDir } from '@tauri-apps/api/path';\nconst runtimeDirPath = await runtimeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":118,"name":"templateDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":489,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L489"}],"signatures":[{"id":119,"name":"templateDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's template directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_TEMPLATES_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Templates}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { templateDir } from '@tauri-apps/api/path';\nconst templateDirPath = await templateDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":120,"name":"videoDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":511,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L511"}],"signatures":[{"id":121,"name":"videoDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's video directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_VIDEOS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Movies`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Videos}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { videoDir } from '@tauri-apps/api/path';\nconst videoDirPath = await videoDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[51]},{"title":"Variables","children":[123,122]},{"title":"Functions","children":[81,75,77,79,83,85,139,87,89,91,93,133,95,97,99,136,101,103,143,130,105,127,107,109,124,113,111,116,118,120]}],"sources":[{"fileName":"path.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/path.ts#L26"}]},{"id":146,"name":"tauri","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Invoke your custom commands.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.tauri`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":147,"name":"InvokeArgs","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":63,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/tauri.ts#L63"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":160,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":129,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/tauri.ts#L129"}],"signatures":[{"id":161,"name":"convertFileSrc","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Convert a device file path to an URL that can be loaded by the webview.\nNote that "},{"kind":"code","text":"`asset:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://asset.localhost`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.security.csp`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#securityconfig.csp) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":".\nExample CSP value: "},{"kind":"code","text":"`\"csp\": \"default-src 'self'; img-src 'self' asset: https://asset.localhost\"`"},{"kind":"text","text":" to use the asset protocol on image sources.\n\nAdditionally, "},{"kind":"code","text":"`asset`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.allowlist.protocol`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.protocol)\nin "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" and its access scope must be defined on the "},{"kind":"code","text":"`assetScope`"},{"kind":"text","text":" array on the same "},{"kind":"code","text":"`protocol`"},{"kind":"text","text":" object."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir, join } from '@tauri-apps/api/path';\nimport { convertFileSrc } from '@tauri-apps/api/tauri';\nconst appDataDirPath = await appDataDir();\nconst filePath = await join(appDataDirPath, 'assets/video.mp4');\nconst assetUrl = convertFileSrc(filePath);\n\nconst video = document.getElementById('my-video');\nconst source = document.createElement('source');\nsource.type = 'video/mp4';\nsource.src = assetUrl;\nvideo.appendChild(source);\nvideo.load();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"the URL that can be used as source on the webview."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":162,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":163,"name":"protocol","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The protocol to use. Defaults to "},{"kind":"code","text":"`asset`"},{"kind":"text","text":". You only need to set this when using a custom protocol."}]},"type":{"type":"intrinsic","name":"string"},"defaultValue":"'asset'"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":155,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":79,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/tauri.ts#L79"}],"signatures":[{"id":156,"name":"invoke","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sends a message to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { invoke } from '@tauri-apps/api/tauri';\nawait invoke('login', { user: 'tauri', password: 'poiwe3h4r5ip3yrhtew9ty' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving or rejecting to the backend response."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":157,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":158,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":159,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":147,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":157,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":148,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":149,"name":"transformCallback","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Transforms a callback function to a string identifier that can be passed to the backend.\nThe backend uses the identifier to "},{"kind":"code","text":"`eval()`"},{"kind":"text","text":" the callback."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A unique identifier associated with the callback function."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":150,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":151,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":152,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":153,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":154,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Type Aliases","children":[147]},{"title":"Functions","children":[160,155,148]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/tauri.ts#L13"}]},{"id":164,"name":"updater","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Customize the auto updater flow.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.updater`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":169,"name":"UpdateManifest","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":172,"name":"body","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L34"}],"type":{"type":"intrinsic","name":"string"}},{"id":171,"name":"date","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L33"}],"type":{"type":"intrinsic","name":"string"}},{"id":170,"name":"version","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L32"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[172,171,170]}],"sources":[{"fileName":"updater.ts","line":31,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L31"}]},{"id":173,"name":"UpdateResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":174,"name":"manifest","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"updater.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L41"}],"type":{"type":"reference","id":169,"name":"UpdateManifest"}},{"id":175,"name":"shouldUpdate","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L42"}],"type":{"type":"intrinsic","name":"boolean"}}],"groups":[{"title":"Properties","children":[174,175]}],"sources":[{"fileName":"updater.ts","line":40,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L40"}]},{"id":166,"name":"UpdateStatusResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":167,"name":"error","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"updater.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L24"}],"type":{"type":"intrinsic","name":"string"}},{"id":168,"name":"status","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L25"}],"type":{"type":"reference","id":165,"name":"UpdateStatus"}}],"groups":[{"title":"Properties","children":[167,168]}],"sources":[{"fileName":"updater.ts","line":23,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L23"}]},{"id":165,"name":"UpdateStatus","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"updater.ts","line":18,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L18"}],"type":{"type":"union","types":[{"type":"literal","value":"PENDING"},{"type":"literal","value":"ERROR"},{"type":"literal","value":"DONE"},{"type":"literal","value":"UPTODATE"}]}},{"id":184,"name":"checkUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":146,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L146"}],"signatures":[{"id":185,"name":"checkUpdate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Checks if an update is available."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { checkUpdate } from '@tauri-apps/api/updater';\nconst update = await checkUpdate();\n// now run installUpdate() if needed\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Promise resolving to the update status."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":173,"name":"UpdateResult"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":182,"name":"installUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L87"}],"signatures":[{"id":183,"name":"installUpdate","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Install the update if there's one available."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { checkUpdate, installUpdate } from '@tauri-apps/api/updater';\nconst update = await checkUpdate();\nif (update.shouldUpdate) {\n console.log(`Installing update ${update.manifest?.version}, ${update.manifest?.date}, ${update.manifest.body}`);\n await installUpdate();\n}\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":176,"name":"onUpdaterEvent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":63,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L63"}],"signatures":[{"id":177,"name":"onUpdaterEvent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an updater event."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { onUpdaterEvent } from \"@tauri-apps/api/updater\";\nconst unlisten = await onUpdaterEvent(({ error, status }) => {\n console.log('Updater event', error, status);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":178,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":179,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"updater.ts","line":64,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L64"}],"signatures":[{"id":180,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":181,"name":"status","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":166,"name":"UpdateStatusResult"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Interfaces","children":[169,173,166]},{"title":"Type Aliases","children":[165]},{"title":"Functions","children":[184,182,176]}],"sources":[{"fileName":"updater.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/updater.ts#L12"}]},{"id":186,"name":"window","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Provides APIs to create windows, communicate with other windows and manipulate the current window.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.window`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":".\n\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.window`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.window) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"window\": {\n \"all\": true, // enable all window APIs\n \"create\": true, // enable window creation\n \"center\": true,\n \"requestUserAttention\": true,\n \"setResizable\": true,\n \"setTitle\": true,\n \"maximize\": true,\n \"unmaximize\": true,\n \"minimize\": true,\n \"unminimize\": true,\n \"show\": true,\n \"hide\": true,\n \"close\": true,\n \"setDecorations\": true,\n \"setShadow\": true,\n \"setAlwaysOnTop\": true,\n \"setContentProtected\": true,\n \"setSize\": true,\n \"setMinSize\": true,\n \"setMaxSize\": true,\n \"setPosition\": true,\n \"setFullscreen\": true,\n \"setFocus\": true,\n \"setIcon\": true,\n \"setSkipTaskbar\": true,\n \"setCursorGrab\": true,\n \"setCursorVisible\": true,\n \"setCursorIcon\": true,\n \"setCursorPosition\": true,\n \"setIgnoreCursorEvents\": true,\n \"startDragging\": true,\n \"print\": true\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security.\n\n## Window events\n\nEvents can be listened to using "},{"kind":"code","text":"`appWindow.listen`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nappWindow.listen(\"my-window-event\", ({ event, payload }) => { });\n```"}]},"children":[{"id":587,"name":"UserAttentionType","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[{"kind":"text","text":"Attention type to request on a window."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":588,"name":"Critical","kind":16,"kindString":"Enumeration Member","flags":{},"comment":{"summary":[{"kind":"text","text":"#### Platform-specific\n- **macOS:** Bounces the dock icon until the application is in focus.\n- **Windows:** Flashes both the window and the taskbar button until the application is in focus."}]},"sources":[{"fileName":"window.ts","line":226,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L226"}],"type":{"type":"literal","value":1}},{"id":589,"name":"Informational","kind":16,"kindString":"Enumeration Member","flags":{},"comment":{"summary":[{"kind":"text","text":"#### Platform-specific\n- **macOS:** Bounces the dock icon once.\n- **Windows:** Flashes the taskbar button until the application is in focus."}]},"sources":[{"fileName":"window.ts","line":232,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L232"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[588,589]}],"sources":[{"fileName":"window.ts","line":220,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L220"}]},{"id":532,"name":"CloseRequestedEvent","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":533,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":1971,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1971"}],"signatures":[{"id":534,"name":"new CloseRequestedEvent","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":535,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":645,"typeArguments":[{"type":"literal","value":null}],"name":"Event"}}],"type":{"type":"reference","id":532,"name":"CloseRequestedEvent"}}]},{"id":539,"name":"_preventDefault","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"window.ts","line":1969,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1969"}],"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"},{"id":536,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"window.ts","line":1964,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1964"}],"type":{"type":"reference","id":2,"name":"EventName"}},{"id":538,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"window.ts","line":1968,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1968"}],"type":{"type":"intrinsic","name":"number"}},{"id":537,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"window.ts","line":1966,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1966"}],"type":{"type":"intrinsic","name":"string"}},{"id":542,"name":"isPreventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1981,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1981"}],"signatures":[{"id":543,"name":"isPreventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"boolean"}}]},{"id":540,"name":"preventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1977,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1977"}],"signatures":[{"id":541,"name":"preventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[533]},{"title":"Properties","children":[539,536,538,537]},{"title":"Methods","children":[542,540]}],"sources":[{"fileName":"window.ts","line":1962,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1962"}]},{"id":568,"name":"LogicalPosition","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A position represented in logical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":569,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L164"}],"signatures":[{"id":570,"name":"new LogicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":571,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":572,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":568,"name":"LogicalPosition"}}]},{"id":573,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L160"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":574,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L161"}],"type":{"type":"intrinsic","name":"number"}},{"id":575,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":162,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L162"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[569]},{"title":"Properties","children":[573,574,575]}],"sources":[{"fileName":"window.ts","line":159,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L159"}]},{"id":549,"name":"LogicalSize","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A size represented in logical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":550,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":118,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L118"}],"signatures":[{"id":551,"name":"new LogicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":552,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":553,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":549,"name":"LogicalSize"}}]},{"id":556,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L116"}],"type":{"type":"intrinsic","name":"number"}},{"id":554,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":114,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L114"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":555,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L115"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[550]},{"title":"Properties","children":[556,554,555]}],"sources":[{"fileName":"window.ts","line":113,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L113"}]},{"id":576,"name":"PhysicalPosition","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A position represented in physical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":577,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":180,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L180"}],"signatures":[{"id":578,"name":"new PhysicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":579,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":580,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":576,"name":"PhysicalPosition"}}]},{"id":581,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L176"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":582,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L177"}],"type":{"type":"intrinsic","name":"number"}},{"id":583,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":178,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L178"}],"type":{"type":"intrinsic","name":"number"}},{"id":584,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L195"}],"signatures":[{"id":585,"name":"toLogical","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Converts the physical position to a logical one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\nconst position = await appWindow.innerPosition();\nconst logical = position.toLogical(factor);\n```"}]}]},"parameters":[{"id":586,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":568,"name":"LogicalPosition"}}]}],"groups":[{"title":"Constructors","children":[577]},{"title":"Properties","children":[581,582,583]},{"title":"Methods","children":[584]}],"sources":[{"fileName":"window.ts","line":175,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L175"}]},{"id":557,"name":"PhysicalSize","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A size represented in physical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":558,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":134,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L134"}],"signatures":[{"id":559,"name":"new PhysicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":560,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":561,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":557,"name":"PhysicalSize"}}]},{"id":564,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L132"}],"type":{"type":"intrinsic","name":"number"}},{"id":562,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L130"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":563,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L131"}],"type":{"type":"intrinsic","name":"number"}},{"id":565,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L149"}],"signatures":[{"id":566,"name":"toLogical","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Converts the physical size to a logical one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\nconst size = await appWindow.innerSize();\nconst logical = size.toLogical(factor);\n```"}]}]},"parameters":[{"id":567,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":549,"name":"LogicalSize"}}]}],"groups":[{"title":"Constructors","children":[558]},{"title":"Properties","children":[564,562,563]},{"title":"Methods","children":[565]}],"sources":[{"fileName":"window.ts","line":129,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L129"}]},{"id":189,"name":"WebviewWindow","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"Create new webview windows and get a handle to existing ones.\n\nWindows are identified by a *label* a unique identifier that can be used to reference it later.\nIt may only contain alphanumeric characters "},{"kind":"code","text":"`a-zA-Z`"},{"kind":"text","text":" plus the following special characters "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\n// loading embedded asset:\nconst webview = new WebviewWindow('theUniqueLabel', {\n url: 'path/to/page.html'\n});\n// alternatively, load a remote URL:\nconst webview = new WebviewWindow('theUniqueLabel', {\n url: 'https://github.com/tauri-apps/tauri'\n});\n\nwebview.once('tauri://created', function () {\n // webview window successfully created\n});\nwebview.once('tauri://error', function (e) {\n // an error happened creating the webview window\n});\n\n// emit an event to the backend\nawait webview.emit(\"some event\", \"data\");\n// listen to an event from the backend\nconst unlisten = await webview.listen(\"event name\", e => {});\nunlisten();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":193,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":2039,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2039"}],"signatures":[{"id":194,"name":"new WebviewWindow","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new WebviewWindow."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { WebviewWindow } from '@tauri-apps/api/window';\nconst webview = new WebviewWindow('my-label', {\n url: 'https://github.com/tauri-apps/tauri'\n});\nwebview.once('tauri://created', function () {\n // webview window successfully created\n});\nwebview.once('tauri://error', function (e) {\n // an error happened creating the webview window\n});\n```"},{"kind":"text","text":"\n\n*"}]},{"tag":"@returns","content":[{"kind":"text","text":"The WebviewWindow instance to communicate with the webview."}]}]},"parameters":[{"id":195,"name":"label","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The unique webview window label. Must be alphanumeric: "},{"kind":"code","text":"`a-zA-Z-/:_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":196,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":615,"name":"WindowOptions"},"defaultValue":"{}"}],"type":{"type":"reference","id":189,"name":"WebviewWindow"},"overwrites":{"type":"reference","name":"WindowManager.constructor"}}],"overwrites":{"type":"reference","name":"WindowManager.constructor"}},{"id":329,"name":"label","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The window label. It is a unique identifier for the window, can be used to reference it later."}]},"sources":[{"fileName":"window.ts","line":316,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L316"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","name":"WindowManager.label"}},{"id":330,"name":"listeners","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Local event listeners."}]},"sources":[{"fileName":"window.ts","line":318,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L318"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"reference","id":651,"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"EventCallback"}}],"name":"Record","qualifiedName":"Record","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listeners"}},{"id":223,"name":"center","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":780,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L780"}],"signatures":[{"id":224,"name":"center","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Centers the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.center();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.center"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.center"}},{"id":248,"name":"close","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1081,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1081"}],"signatures":[{"id":249,"name":"close","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Closes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.close();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.close"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.close"}},{"id":341,"name":"emit","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":400,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L400"}],"signatures":[{"id":342,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend, tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.emit('window-loaded', { loggedIn: true, token: 'authToken' });\n```"}]}]},"parameters":[{"id":343,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":344,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Event payload."}]},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.emit"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.emit"}},{"id":246,"name":"hide","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1056,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1056"}],"signatures":[{"id":247,"name":"hide","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window visibility to false."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.hide();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.hide"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.hide"}},{"id":199,"name":"innerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":470,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L470"}],"signatures":[{"id":200,"name":"innerPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The position of the top-left hand corner of the window's client area relative to the top-left hand corner of the desktop."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst position = await appWindow.innerPosition();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's inner position."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":576,"name":"PhysicalPosition"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.innerPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.innerPosition"}},{"id":203,"name":"innerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":521,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L521"}],"signatures":[{"id":204,"name":"innerSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The physical size of the window's client area.\nThe client area is the content of the window, excluding the title bar and borders."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst size = await appWindow.innerSize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's inner size."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":557,"name":"PhysicalSize"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.innerSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.innerSize"}},{"id":213,"name":"isDecorated","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":647,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L647"}],"signatures":[{"id":214,"name":"isDecorated","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current decorated state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst decorated = await appWindow.isDecorated();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is decorated or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isDecorated"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isDecorated"}},{"id":207,"name":"isFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":572,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L572"}],"signatures":[{"id":208,"name":"isFullscreen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current fullscreen state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst fullscreen = await appWindow.isFullscreen();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is in fullscreen mode or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isFullscreen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isFullscreen"}},{"id":211,"name":"isMaximized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":622,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L622"}],"signatures":[{"id":212,"name":"isMaximized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current maximized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst maximized = await appWindow.isMaximized();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is maximized or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isMaximized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isMaximized"}},{"id":209,"name":"isMinimized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":597,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L597"}],"signatures":[{"id":210,"name":"isMinimized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current minimized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst minimized = await appWindow.isMinimized();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.3.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isMinimized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isMinimized"}},{"id":215,"name":"isResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":672,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L672"}],"signatures":[{"id":216,"name":"isResizable","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current resizable state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst resizable = await appWindow.isResizable();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is resizable or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isResizable"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isResizable"}},{"id":217,"name":"isVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":697,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L697"}],"signatures":[{"id":218,"name":"isVisible","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current visible state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst visible = await appWindow.isVisible();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is visible or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isVisible"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isVisible"}},{"id":331,"name":"listen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":345,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L345"}],"signatures":[{"id":332,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event emitted by the backend that is tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst unlisten = await appWindow.listen('state-changed', (event) => {\n console.log(`Got error: ${payload}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]}]},"typeParameter":[{"id":333,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":334,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":335,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":651,"typeArguments":[{"type":"reference","id":333,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.listen"}},{"id":234,"name":"maximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":906,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L906"}],"signatures":[{"id":235,"name":"maximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Maximizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.maximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.maximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.maximize"}},{"id":240,"name":"minimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":981,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L981"}],"signatures":[{"id":241,"name":"minimize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Minimizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.minimize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.minimize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.minimize"}},{"id":308,"name":"onCloseRequested","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1770,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1770"}],"signatures":[{"id":309,"name":"onCloseRequested","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window close requested. Emitted when the user requests to closes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nimport { confirm } from '@tauri-apps/api/dialog';\nconst unlisten = await appWindow.onCloseRequested(async (event) => {\n const confirmed = await confirm('Are you sure?');\n if (!confirmed) {\n // user did not confirm closing the window; let's prevent it\n event.preventDefault();\n }\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":310,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":311,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"window.ts","line":1771,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1771"}],"signatures":[{"id":312,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":313,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":532,"name":"CloseRequestedEvent"}}],"type":{"type":"union","types":[{"type":"intrinsic","name":"void"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}]}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onCloseRequested"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onCloseRequested"}},{"id":323,"name":"onFileDropEvent","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1904,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1904"}],"signatures":[{"id":324,"name":"onFileDropEvent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to a file drop event.\nThe listener is triggered when the user hovers the selected files on the window,\ndrops the files or cancels the operation."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onFileDropEvent((event) => {\n if (event.payload.type === 'hover') {\n console.log('User hovering', event.payload.paths);\n } else if (event.payload.type === 'drop') {\n console.log('User dropped', event.payload.paths);\n } else {\n console.log('File drop cancelled');\n }\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":325,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":651,"typeArguments":[{"type":"reference","id":606,"name":"FileDropEvent"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onFileDropEvent"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onFileDropEvent"}},{"id":314,"name":"onFocusChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1803,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1803"}],"signatures":[{"id":315,"name":"onFocusChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window focus change."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onFocusChanged(({ payload: focused }) => {\n console.log('Focus changed, window is focused? ' + focused);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":316,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":651,"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onFocusChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onFocusChanged"}},{"id":320,"name":"onMenuClicked","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1873,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1873"}],"signatures":[{"id":321,"name":"onMenuClicked","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to the window menu item click. The payload is the item id."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onMenuClicked(({ payload: menuId }) => {\n console.log('Menu clicked: ' + menuId);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":322,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":651,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onMenuClicked"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onMenuClicked"}},{"id":305,"name":"onMoved","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1738,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1738"}],"signatures":[{"id":306,"name":"onMoved","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window move."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onMoved(({ payload: position }) => {\n console.log('Window moved', position);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":307,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":651,"typeArguments":[{"type":"reference","id":576,"name":"PhysicalPosition"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onMoved"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onMoved"}},{"id":302,"name":"onResized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1712,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1712"}],"signatures":[{"id":303,"name":"onResized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window resize."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onResized(({ payload: size }) => {\n console.log('Window resized', size);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":304,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":651,"typeArguments":[{"type":"reference","id":557,"name":"PhysicalSize"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onResized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onResized"}},{"id":317,"name":"onScaleChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1845,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1845"}],"signatures":[{"id":318,"name":"onScaleChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window scale change. Emitted when the window's scale factor has changed.\nThe following user actions can cause DPI changes:\n- Changing the display's resolution.\n- Changing the display's scale factor (e.g. in Control Panel on Windows).\n- Moving the window to a display with a different scale factor."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onScaleChanged(({ payload }) => {\n console.log('Scale changed', payload.scaleFactor, payload.size);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":319,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":651,"typeArguments":[{"type":"reference","id":603,"name":"ScaleFactorChanged"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onScaleChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onScaleChanged"}},{"id":326,"name":"onThemeChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1954,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1954"}],"signatures":[{"id":327,"name":"onThemeChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to the system theme change."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onThemeChanged(({ payload: theme }) => {\n console.log('New theme: ' + theme);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":328,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":651,"typeArguments":[{"type":"reference","id":596,"name":"Theme"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onThemeChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onThemeChanged"}},{"id":336,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":378,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L378"}],"signatures":[{"id":337,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event emitted by the backend that is tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst unlisten = await appWindow.once('initialized', (event) => {\n console.log(`Window initialized!`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]}]},"typeParameter":[{"id":338,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":339,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":340,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":651,"typeArguments":[{"type":"reference","id":338,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":656,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.once"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.once"}},{"id":201,"name":"outerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":495,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L495"}],"signatures":[{"id":202,"name":"outerPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The position of the top-left hand corner of the window relative to the top-left hand corner of the desktop."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst position = await appWindow.outerPosition();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's outer position."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":576,"name":"PhysicalPosition"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.outerPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.outerPosition"}},{"id":205,"name":"outerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":547,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L547"}],"signatures":[{"id":206,"name":"outerSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The physical size of the entire window.\nThese dimensions include the title bar and borders. If you don't want that (and you usually don't), use inner_size instead."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst size = await appWindow.outerSize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's outer size."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":557,"name":"PhysicalSize"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.outerSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.outerSize"}},{"id":225,"name":"requestUserAttention","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":816,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L816"}],"signatures":[{"id":226,"name":"requestUserAttention","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Requests user attention to the window, this has no effect if the application\nis already focused. How requesting for user attention manifests is platform dependent,\nsee "},{"kind":"code","text":"`UserAttentionType`"},{"kind":"text","text":" for details.\n\nProviding "},{"kind":"code","text":"`null`"},{"kind":"text","text":" will unset the request for user attention. Unsetting the request for\nuser attention might not be done automatically by the WM when the window receives input.\n\n#### Platform-specific\n\n- **macOS:** "},{"kind":"code","text":"`null`"},{"kind":"text","text":" has no effect.\n- **Linux:** Urgency levels have the same effect."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.requestUserAttention();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":227,"name":"requestType","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":587,"name":"UserAttentionType"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.requestUserAttention"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.requestUserAttention"}},{"id":197,"name":"scaleFactor","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":445,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L445"}],"signatures":[{"id":198,"name":"scaleFactor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The scale factor that can be used to map physical pixels to logical pixels."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's monitor scale factor."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.scaleFactor"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.scaleFactor"}},{"id":256,"name":"setAlwaysOnTop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1171,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1171"}],"signatures":[{"id":257,"name":"setAlwaysOnTop","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setAlwaysOnTop(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":258,"name":"alwaysOnTop","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows or not."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setAlwaysOnTop"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setAlwaysOnTop"}},{"id":259,"name":"setContentProtected","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1199,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1199"}],"signatures":[{"id":260,"name":"setContentProtected","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Prevents the window contents from being captured by other apps."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setContentProtected(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"parameters":[{"id":261,"name":"protected_","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setContentProtected"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setContentProtected"}},{"id":285,"name":"setCursorGrab","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1519,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1519"}],"signatures":[{"id":286,"name":"setCursorGrab","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Grabs the cursor, preventing it from leaving the window.\n\nThere's no guarantee that the cursor will be hidden. You should\nhide it by yourself if you want so.\n\n#### Platform-specific\n\n- **Linux:** Unsupported.\n- **macOS:** This locks the cursor in a fixed location, which looks visually awkward."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorGrab(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":287,"name":"grab","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"code","text":"`true`"},{"kind":"text","text":" to grab the cursor icon, "},{"kind":"code","text":"`false`"},{"kind":"text","text":" to release it."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorGrab"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorGrab"}},{"id":291,"name":"setCursorIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1579,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1579"}],"signatures":[{"id":292,"name":"setCursorIcon","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Modifies the cursor icon of the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorIcon('help');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":293,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor icon."}]},"type":{"type":"reference","id":187,"name":"CursorIcon"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorIcon"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorIcon"}},{"id":294,"name":"setCursorPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1606,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1606"}],"signatures":[{"id":295,"name":"setCursorPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Changes the position of the cursor in window coordinates."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalPosition } from '@tauri-apps/api/window';\nawait appWindow.setCursorPosition(new LogicalPosition(600, 300));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":296,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor position."}]},"type":{"type":"union","types":[{"type":"reference","id":576,"name":"PhysicalPosition"},{"type":"reference","id":568,"name":"LogicalPosition"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorPosition"}},{"id":288,"name":"setCursorVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1552,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1552"}],"signatures":[{"id":289,"name":"setCursorVisible","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Modifies the cursor's visibility.\n\n#### Platform-specific\n\n- **Windows:** The cursor is only hidden within the confines of the window.\n- **macOS:** The cursor is hidden as long as the window has input focus, even if the cursor is\n outside of the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorVisible(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":290,"name":"visible","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`false`"},{"kind":"text","text":", this will hide the cursor. If "},{"kind":"code","text":"`true`"},{"kind":"text","text":", this will show the cursor."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorVisible"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorVisible"}},{"id":250,"name":"setDecorations","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1107,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1107"}],"signatures":[{"id":251,"name":"setDecorations","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setDecorations(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":252,"name":"decorations","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setDecorations"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setDecorations"}},{"id":277,"name":"setFocus","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1417,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1417"}],"signatures":[{"id":278,"name":"setFocus","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Bring the window to front and focus."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setFocus();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setFocus"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setFocus"}},{"id":274,"name":"setFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1391,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1391"}],"signatures":[{"id":275,"name":"setFullscreen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window fullscreen state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setFullscreen(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":276,"name":"fullscreen","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should go to fullscreen or not."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setFullscreen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setFullscreen"}},{"id":279,"name":"setIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1450,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1450"}],"signatures":[{"id":280,"name":"setIcon","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window icon."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setIcon('/tauri/awesome.png');\n```"},{"kind":"text","text":"\n\nNote that you need the "},{"kind":"code","text":"`icon-ico`"},{"kind":"text","text":" or "},{"kind":"code","text":"`icon-png`"},{"kind":"text","text":" Cargo features to use this API.\nTo enable it, change your Cargo.toml file:\n"},{"kind":"code","text":"```toml\n[dependencies]\ntauri = { version = \"...\", features = [\"...\", \"icon-png\"] }\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":281,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Icon bytes or path to the icon file."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setIcon"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setIcon"}},{"id":297,"name":"setIgnoreCursorEvents","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1650,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1650"}],"signatures":[{"id":298,"name":"setIgnoreCursorEvents","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Changes the cursor events behavior."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setIgnoreCursorEvents(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":299,"name":"ignore","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"code","text":"`true`"},{"kind":"text","text":" to ignore the cursor events; "},{"kind":"code","text":"`false`"},{"kind":"text","text":" to process them as usual."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setIgnoreCursorEvents"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setIgnoreCursorEvents"}},{"id":268,"name":"setMaxSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1306,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1306"}],"signatures":[{"id":269,"name":"setMaxSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window maximum inner size. If the "},{"kind":"code","text":"`size`"},{"kind":"text","text":" argument is undefined, the constraint is unset."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalSize } from '@tauri-apps/api/window';\nawait appWindow.setMaxSize(new LogicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":270,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size, or "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to unset the constraint."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"literal","value":null},{"type":"reference","id":557,"name":"PhysicalSize"},{"type":"reference","id":549,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setMaxSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setMaxSize"}},{"id":265,"name":"setMinSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1264,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1264"}],"signatures":[{"id":266,"name":"setMinSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window minimum inner size. If the "},{"kind":"code","text":"`size`"},{"kind":"text","text":" argument is not provided, the constraint is unset."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, PhysicalSize } from '@tauri-apps/api/window';\nawait appWindow.setMinSize(new PhysicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":267,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size, or "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to unset the constraint."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"literal","value":null},{"type":"reference","id":557,"name":"PhysicalSize"},{"type":"reference","id":549,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setMinSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setMinSize"}},{"id":271,"name":"setPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1348,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1348"}],"signatures":[{"id":272,"name":"setPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window outer position."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalPosition } from '@tauri-apps/api/window';\nawait appWindow.setPosition(new LogicalPosition(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":273,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new position, in logical or physical pixels."}]},"type":{"type":"union","types":[{"type":"reference","id":576,"name":"PhysicalPosition"},{"type":"reference","id":568,"name":"LogicalPosition"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setPosition"}},{"id":228,"name":"setResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":853,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L853"}],"signatures":[{"id":229,"name":"setResizable","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Updates the window resizable flag."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setResizable(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":230,"name":"resizable","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setResizable"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setResizable"}},{"id":253,"name":"setShadow","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1144,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1144"}],"signatures":[{"id":254,"name":"setShadow","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether or not the window should have shadow.\n\n#### Platform-specific\n\n- **Windows:**\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" has no effect on decorated window, shadows are always ON.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" will make ndecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setShadow(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0"}]}]},"parameters":[{"id":255,"name":"enable","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setShadow"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setShadow"}},{"id":262,"name":"setSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1226,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1226"}],"signatures":[{"id":263,"name":"setSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resizes the window with a new inner size."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalSize } from '@tauri-apps/api/window';\nawait appWindow.setSize(new LogicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":264,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size."}]},"type":{"type":"union","types":[{"type":"reference","id":557,"name":"PhysicalSize"},{"type":"reference","id":549,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setSize"}},{"id":282,"name":"setSkipTaskbar","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1484"}],"signatures":[{"id":283,"name":"setSkipTaskbar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window icon should be hidden from the taskbar or not.\n\n#### Platform-specific\n\n- **macOS:** Unsupported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setSkipTaskbar(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":284,"name":"skip","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"true to hide window icon, false to show it."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setSkipTaskbar"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setSkipTaskbar"}},{"id":231,"name":"setTitle","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":880,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L880"}],"signatures":[{"id":232,"name":"setTitle","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window title."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setTitle('Tauri');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":233,"name":"title","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new title"}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setTitle"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setTitle"}},{"id":244,"name":"show","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1031,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1031"}],"signatures":[{"id":245,"name":"show","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window visibility to true."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.show();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.show"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.show"}},{"id":300,"name":"startDragging","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1676,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1676"}],"signatures":[{"id":301,"name":"startDragging","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Starts dragging the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.startDragging();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.startDragging"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.startDragging"}},{"id":221,"name":"theme","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":752,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L752"}],"signatures":[{"id":222,"name":"theme","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current theme.\n\n#### Platform-specific\n\n- **macOS:** Theme was introduced on macOS 10.14. Returns "},{"kind":"code","text":"`light`"},{"kind":"text","text":" on macOS 10.13 and below."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst theme = await appWindow.theme();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window theme."}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":596,"name":"Theme"}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.theme"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.theme"}},{"id":219,"name":"title","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":722,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L722"}],"signatures":[{"id":220,"name":"title","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current title."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst title = await appWindow.title();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.3.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.title"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.title"}},{"id":238,"name":"toggleMaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":956,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L956"}],"signatures":[{"id":239,"name":"toggleMaximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Toggles the window maximized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.toggleMaximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.toggleMaximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.toggleMaximize"}},{"id":236,"name":"unmaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":931,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L931"}],"signatures":[{"id":237,"name":"unmaximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unmaximizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.unmaximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.unmaximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.unmaximize"}},{"id":242,"name":"unminimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1006,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L1006"}],"signatures":[{"id":243,"name":"unminimize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unminimizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.unminimize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.unminimize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.unminimize"}},{"id":190,"name":"getByLabel","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"window.ts","line":2071,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2071"}],"signatures":[{"id":191,"name":"getByLabel","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the WebviewWindow for the webview associated with the given label."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { WebviewWindow } from '@tauri-apps/api/window';\nconst mainWindow = WebviewWindow.getByLabel('main');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The WebviewWindow instance to communicate with the webview or null if the webview doesn't exist."}]}]},"parameters":[{"id":192,"name":"label","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The webview window label."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":189,"name":"WebviewWindow"}]}}]}],"groups":[{"title":"Constructors","children":[193]},{"title":"Properties","children":[329,330]},{"title":"Methods","children":[223,248,341,246,199,203,213,207,211,209,215,217,331,234,240,308,323,314,320,305,302,317,326,336,201,205,225,197,256,259,285,291,294,288,250,277,274,279,297,268,265,271,228,253,262,282,231,244,300,221,219,238,236,242,190]}],"sources":[{"fileName":"window.ts","line":2019,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2019"}],"extendedTypes":[{"type":"reference","name":"WindowManager"}]},{"id":598,"name":"Monitor","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Allows you to retrieve information about a given monitor."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":599,"name":"name","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Human-readable name of the monitor"}]},"sources":[{"fileName":"window.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L81"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}},{"id":601,"name":"position","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"the Top-left corner position of the monitor relative to the larger full screen area."}]},"sources":[{"fileName":"window.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L85"}],"type":{"type":"reference","id":576,"name":"PhysicalPosition"}},{"id":602,"name":"scaleFactor","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The scale factor that can be used to map physical pixels to logical pixels."}]},"sources":[{"fileName":"window.ts","line":87,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L87"}],"type":{"type":"intrinsic","name":"number"}},{"id":600,"name":"size","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The monitor's resolution."}]},"sources":[{"fileName":"window.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L83"}],"type":{"type":"reference","id":557,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[599,601,602,600]}],"sources":[{"fileName":"window.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L79"}]},{"id":603,"name":"ScaleFactorChanged","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"The payload for the "},{"kind":"code","text":"`scaleChange`"},{"kind":"text","text":" event."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":604,"name":"scaleFactor","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The new window scale factor."}]},"sources":[{"fileName":"window.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L97"}],"type":{"type":"intrinsic","name":"number"}},{"id":605,"name":"size","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The new window size"}]},"sources":[{"fileName":"window.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L99"}],"type":{"type":"reference","id":557,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[604,605]}],"sources":[{"fileName":"window.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L95"}]},{"id":615,"name":"WindowOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Configuration for the window to create."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":642,"name":"acceptFirstMouse","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether clicking an inactive window also clicks through to the webview on macOS."}]},"sources":[{"fileName":"window.ts","line":2195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2195"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":634,"name":"alwaysOnTop","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows or not."}]},"sources":[{"fileName":"window.ts","line":2153,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2153"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":617,"name":"center","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Show window in the center of the screen.."}]},"sources":[{"fileName":"window.ts","line":2115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2115"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":635,"name":"contentProtected","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Prevents the window contents from being captured by other apps."}]},"sources":[{"fileName":"window.ts","line":2155,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2155"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":633,"name":"decorations","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars or not."}]},"sources":[{"fileName":"window.ts","line":2151,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2151"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":638,"name":"fileDropEnabled","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the file drop is enabled or not on the webview. By default it is enabled.\n\nDisabling it is required to use drag and drop on the frontend on Windows."}]},"sources":[{"fileName":"window.ts","line":2177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2177"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":629,"name":"focus","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window will be initially focused or not."}]},"sources":[{"fileName":"window.ts","line":2139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2139"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":628,"name":"fullscreen","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is in fullscreen mode or not."}]},"sources":[{"fileName":"window.ts","line":2137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2137"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":621,"name":"height","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial height."}]},"sources":[{"fileName":"window.ts","line":2123,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2123"}],"type":{"type":"intrinsic","name":"number"}},{"id":641,"name":"hiddenTitle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`true`"},{"kind":"text","text":", sets the window title to be hidden on macOS."}]},"sources":[{"fileName":"window.ts","line":2191,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2191"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":625,"name":"maxHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum height. Only applies if "},{"kind":"code","text":"`maxWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2131"}],"type":{"type":"intrinsic","name":"number"}},{"id":624,"name":"maxWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum width. Only applies if "},{"kind":"code","text":"`maxHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2129"}],"type":{"type":"intrinsic","name":"number"}},{"id":631,"name":"maximized","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be maximized upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2147,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2147"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":623,"name":"minHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum height. Only applies if "},{"kind":"code","text":"`minWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2127,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2127"}],"type":{"type":"intrinsic","name":"number"}},{"id":622,"name":"minWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum width. Only applies if "},{"kind":"code","text":"`minHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2125,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2125"}],"type":{"type":"intrinsic","name":"number"}},{"id":626,"name":"resizable","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is resizable or not."}]},"sources":[{"fileName":"window.ts","line":2133,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2133"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":637,"name":"shadow","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window has shadow.\n\n#### Platform-specific\n\n- **Windows:**\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" has no effect on decorated window, shadows are always ON.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" will make ndecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0"}]}]},"sources":[{"fileName":"window.ts","line":2171,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2171"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":636,"name":"skipTaskbar","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window icon should be added to the taskbar."}]},"sources":[{"fileName":"window.ts","line":2157,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2157"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":643,"name":"tabbingIdentifier","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Defines the window [tabbing identifier](https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier) on macOS.\n\nWindows with the same tabbing identifier will be grouped together.\nIf the tabbing identifier is not set, automatic tabbing will be disabled."}]},"sources":[{"fileName":"window.ts","line":2202,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2202"}],"type":{"type":"intrinsic","name":"string"}},{"id":639,"name":"theme","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial window theme. Defaults to the system theme.\n\nOnly implemented on Windows and macOS 10.14+."}]},"sources":[{"fileName":"window.ts","line":2183,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2183"}],"type":{"type":"reference","id":596,"name":"Theme"}},{"id":627,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Window title."}]},"sources":[{"fileName":"window.ts","line":2135,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2135"}],"type":{"type":"intrinsic","name":"string"}},{"id":640,"name":"titleBarStyle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The style of the macOS title bar."}]},"sources":[{"fileName":"window.ts","line":2187,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2187"}],"type":{"type":"reference","id":597,"name":"TitleBarStyle"}},{"id":630,"name":"transparent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is transparent or not.\nNote that on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" this requires the "},{"kind":"code","text":"`macos-private-api`"},{"kind":"text","text":" feature flag, enabled under "},{"kind":"code","text":"`tauri.conf.json > tauri > macOSPrivateApi`"},{"kind":"text","text":".\nWARNING: Using private APIs on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" prevents your application from being accepted to the "},{"kind":"code","text":"`App Store`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"window.ts","line":2145,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2145"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":616,"name":"url","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Remote URL or local file path to open.\n\n- URL such as "},{"kind":"code","text":"`https://github.com/tauri-apps`"},{"kind":"text","text":" is opened directly on a Tauri window.\n- data: URL such as "},{"kind":"code","text":"`data:text/html,...`"},{"kind":"text","text":" is only supported with the "},{"kind":"code","text":"`window-data-url`"},{"kind":"text","text":" Cargo feature for the "},{"kind":"code","text":"`tauri`"},{"kind":"text","text":" dependency.\n- local file path or route such as "},{"kind":"code","text":"`/path/to/page.html`"},{"kind":"text","text":" or "},{"kind":"code","text":"`/users`"},{"kind":"text","text":" is appended to the application URL (the devServer URL on development, or "},{"kind":"code","text":"`tauri://localhost/`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://tauri.localhost/`"},{"kind":"text","text":" on production)."}]},"sources":[{"fileName":"window.ts","line":2113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2113"}],"type":{"type":"intrinsic","name":"string"}},{"id":644,"name":"userAgent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The user agent for the webview."}]},"sources":[{"fileName":"window.ts","line":2206,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2206"}],"type":{"type":"intrinsic","name":"string"}},{"id":632,"name":"visible","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be immediately visible upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2149"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":620,"name":"width","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial width."}]},"sources":[{"fileName":"window.ts","line":2121,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2121"}],"type":{"type":"intrinsic","name":"number"}},{"id":618,"name":"x","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial vertical position. Only applies if "},{"kind":"code","text":"`y`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2117,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2117"}],"type":{"type":"intrinsic","name":"number"}},{"id":619,"name":"y","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial horizontal position. Only applies if "},{"kind":"code","text":"`x`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2119"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[642,634,617,635,633,638,629,628,621,641,625,624,631,623,622,626,637,636,643,639,627,640,630,616,644,632,620,618,619]}],"sources":[{"fileName":"window.ts","line":2105,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2105"}]},{"id":187,"name":"CursorIcon","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":235,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L235"}],"type":{"type":"union","types":[{"type":"literal","value":"default"},{"type":"literal","value":"crosshair"},{"type":"literal","value":"hand"},{"type":"literal","value":"arrow"},{"type":"literal","value":"move"},{"type":"literal","value":"text"},{"type":"literal","value":"wait"},{"type":"literal","value":"help"},{"type":"literal","value":"progress"},{"type":"literal","value":"notAllowed"},{"type":"literal","value":"contextMenu"},{"type":"literal","value":"cell"},{"type":"literal","value":"verticalText"},{"type":"literal","value":"alias"},{"type":"literal","value":"copy"},{"type":"literal","value":"noDrop"},{"type":"literal","value":"grab"},{"type":"literal","value":"grabbing"},{"type":"literal","value":"allScroll"},{"type":"literal","value":"zoomIn"},{"type":"literal","value":"zoomOut"},{"type":"literal","value":"eResize"},{"type":"literal","value":"nResize"},{"type":"literal","value":"neResize"},{"type":"literal","value":"nwResize"},{"type":"literal","value":"sResize"},{"type":"literal","value":"seResize"},{"type":"literal","value":"swResize"},{"type":"literal","value":"wResize"},{"type":"literal","value":"ewResize"},{"type":"literal","value":"nsResize"},{"type":"literal","value":"neswResize"},{"type":"literal","value":"nwseResize"},{"type":"literal","value":"colResize"},{"type":"literal","value":"rowResize"}]}},{"id":606,"name":"FileDropEvent","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"The file drop event types."}]},"sources":[{"fileName":"window.ts","line":103,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L103"}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":607,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":609,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":21,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L104"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":608,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L104"}],"type":{"type":"literal","value":"hover"}}],"groups":[{"title":"Properties","children":[609,608]}],"sources":[{"fileName":"window.ts","line":104,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L104"}]}},{"type":"reflection","declaration":{"id":610,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":612,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L105"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":611,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L105"}],"type":{"type":"literal","value":"drop"}}],"groups":[{"title":"Properties","children":[612,611]}],"sources":[{"fileName":"window.ts","line":105,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L105"}]}},{"type":"reflection","declaration":{"id":613,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":614,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":106,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L106"}],"type":{"type":"literal","value":"cancel"}}],"groups":[{"title":"Properties","children":[614]}],"sources":[{"fileName":"window.ts","line":106,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L106"}]}}]}},{"id":596,"name":"Theme","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L71"}],"type":{"type":"union","types":[{"type":"literal","value":"light"},{"type":"literal","value":"dark"}]}},{"id":597,"name":"TitleBarStyle","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":72,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L72"}],"type":{"type":"union","types":[{"type":"literal","value":"visible"},{"type":"literal","value":"transparent"},{"type":"literal","value":"overlay"}]}},{"id":548,"name":"appWindow","kind":32,"kindString":"Variable","flags":{},"comment":{"summary":[{"kind":"text","text":"The WebviewWindow for the current window."}]},"sources":[{"fileName":"window.ts","line":2081,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2081"}],"type":{"type":"reference","id":189,"name":"WebviewWindow"}},{"id":594,"name":"availableMonitors","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2288,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2288"}],"signatures":[{"id":595,"name":"availableMonitors","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the list of all the monitors available on the system."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { availableMonitors } from '@tauri-apps/api/window';\nconst monitors = availableMonitors();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"array","elementType":{"type":"reference","id":598,"name":"Monitor"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":590,"name":"currentMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2239,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2239"}],"signatures":[{"id":591,"name":"currentMonitor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the monitor on which the window currently resides.\nReturns "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if current monitor can't be detected."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { currentMonitor } from '@tauri-apps/api/window';\nconst monitor = currentMonitor();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"reference","id":598,"name":"Monitor"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":546,"name":"getAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":293,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L293"}],"signatures":[{"id":547,"name":"getAll","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets a list of instances of "},{"kind":"code","text":"`WebviewWindow`"},{"kind":"text","text":" for all available webview windows."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"array","elementType":{"type":"reference","id":189,"name":"WebviewWindow"}}}]},{"id":544,"name":"getCurrent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":281,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L281"}],"signatures":[{"id":545,"name":"getCurrent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Get an instance of "},{"kind":"code","text":"`WebviewWindow`"},{"kind":"text","text":" for the current webview window."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","id":189,"name":"WebviewWindow"}}]},{"id":592,"name":"primaryMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2264,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L2264"}],"signatures":[{"id":593,"name":"primaryMonitor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the primary monitor of the system.\nReturns "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if it can't identify any monitor as a primary one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { primaryMonitor } from '@tauri-apps/api/window';\nconst monitor = primaryMonitor();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"reference","id":598,"name":"Monitor"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[587]},{"title":"Classes","children":[532,568,549,576,557,189]},{"title":"Interfaces","children":[598,603,615]},{"title":"Type Aliases","children":[187,606,596,597]},{"title":"Variables","children":[548]},{"title":"Functions","children":[594,590,546,544,592]}],"sources":[{"fileName":"window.ts","line":66,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/29ce9ce2c/tooling/api/src/window.ts#L66"}]}],"groups":[{"title":"Modules","children":[1,36,50,146,164,186]}]} \ No newline at end of file +{"id":0,"name":"@tauri-apps/api","kind":1,"flags":{},"originalName":"","children":[{"id":1,"name":"event","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"The event system allows you to emit events to the backend and listen to events from it.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.event`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":3,"name":"TauriEvent","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":16,"name":"MENU","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L33"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":10,"name":"WINDOW_BLUR","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":27,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L27"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":6,"name":"WINDOW_CLOSE_REQUESTED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":23,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L23"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":7,"name":"WINDOW_CREATED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L24"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":8,"name":"WINDOW_DESTROYED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L25"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":13,"name":"WINDOW_FILE_DROP","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":30,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L30"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":15,"name":"WINDOW_FILE_DROP_CANCELLED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L32"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":14,"name":"WINDOW_FILE_DROP_HOVER","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":31,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L31"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":9,"name":"WINDOW_FOCUS","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":26,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L26"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":5,"name":"WINDOW_MOVED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L22"}],"type":{"type":"literal","value":"tauri://move"}},{"id":4,"name":"WINDOW_RESIZED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":21,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L21"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":11,"name":"WINDOW_SCALE_FACTOR_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":28,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L28"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":12,"name":"WINDOW_THEME_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L29"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[16,10,6,7,8,13,15,14,9,5,4,11,12]}],"sources":[{"fileName":"event.ts","line":20,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L20"}]},{"id":618,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":619,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"helpers/event.ts","line":12,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L12"}],"type":{"type":"reference","id":2,"name":"EventName"}},{"id":621,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"helpers/event.ts","line":16,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L16"}],"type":{"type":"intrinsic","name":"number"}},{"id":622,"name":"payload","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"helpers/event.ts","line":18,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L18"}],"type":{"type":"reference","id":623,"name":"T"}},{"id":620,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"helpers/event.ts","line":14,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L14"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[619,621,622,620]}],"sources":[{"fileName":"helpers/event.ts","line":10,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L10"}],"typeParameters":[{"id":623,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":624,"name":"EventCallback","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L21"}],"typeParameters":[{"id":628,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":625,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L21"}],"signatures":[{"id":626,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":627,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":618,"typeArguments":[{"type":"reference","id":628,"name":"T"}],"name":"Event"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":2,"name":"EventName","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"event.ts","line":15,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L15"}],"type":{"type":"union","types":[{"type":"template-literal","head":"","tail":[[{"type":"reference","id":3,"name":"TauriEvent"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","qualifiedName":"Record","package":"typescript"}]}]}},{"id":629,"name":"UnlistenFn","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":23,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L23"}],"type":{"type":"reflection","declaration":{"id":630,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":23,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L23"}],"signatures":[{"id":631,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":27,"name":"emit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":107,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L107"}],"signatures":[{"id":28,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { emit } from '@tauri-apps/api/event';\nawait emit('frontend-loaded', { loggedIn: true, token: 'authToken' });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":29,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":30,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":17,"name":"listen","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":57,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L57"}],"signatures":[{"id":18,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { listen } from '@tauri-apps/api/event';\nconst unlisten = await listen('error', (event) => {\n console.log(`Got error in window ${event.windowLabel}, payload: ${event.payload}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":19,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":20,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":21,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":19,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":22,"name":"once","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":88,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L88"}],"signatures":[{"id":23,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { once } from '@tauri-apps/api/event';\ninterface LoadedPayload {\n loggedIn: boolean,\n token: string\n}\nconst unlisten = await once('loaded', (event) => {\n console.log(`App is loaded, loggedIn: ${event.payload.loggedIn}, token: ${event.payload.token}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":24,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":25,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":26,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":24,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[3]},{"title":"Interfaces","children":[618]},{"title":"Type Aliases","children":[624,2,629]},{"title":"Functions","children":[27,17,22]}],"sources":[{"fileName":"event.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L12"}]},{"id":31,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":43,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":171,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/mocks.ts#L171"}],"signatures":[{"id":44,"name":"clearMocks","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Clears mocked functions/data injected by the other functions in this module.\nWhen using a test runner that doesn't provide a fresh window object for each test, calling this function will reset tauri specific properties.\n\n# Example\n\n"},{"kind":"code","text":"```js\nimport { mockWindows, clearMocks } from \"@tauri-apps/api/mocks\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked windows\", () => {\n mockWindows(\"main\", \"second\", \"third\");\n\n expect(window).toHaveProperty(\"__TAURI_METADATA__\")\n})\n\ntest(\"no mocked windows\", () => {\n expect(window).not.toHaveProperty(\"__TAURI_METADATA__\")\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"intrinsic","name":"void"}}]},{"id":32,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":65,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/mocks.ts#L65"}],"signatures":[{"id":33,"name":"mockIPC","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Intercepts all IPC requests with the given mock handler.\n\nThis function can be used when testing tauri frontend applications or when running the frontend in a Node.js context during static site generation.\n\n# Examples\n\nTesting setup using vitest:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n switch (cmd) {\n case \"add\":\n return (args.a as number) + (args.b as number);\n default:\n break;\n }\n });\n\n expect(invoke('add', { a: 12, b: 15 })).resolves.toBe(27);\n})\n```"},{"kind":"text","text":"\n\nThe callback function can also return a Promise:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n if(cmd === \"get_data\") {\n return fetch(\"https://example.com/data.json\")\n .then((response) => response.json())\n }\n });\n\n expect(invoke('get_data')).resolves.toBe({ foo: 'bar' });\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":34,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":35,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":66,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/mocks.ts#L66"}],"signatures":[{"id":36,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":37,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":38,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":39,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":135,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/mocks.ts#L135"}],"signatures":[{"id":40,"name":"mockWindows","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Mocks one or many window labels.\nIn non-tauri context it is required to call this function *before* using the "},{"kind":"code","text":"`@tauri-apps/api/window`"},{"kind":"text","text":" module.\n\nThis function only mocks the *presence* of windows,\nwindow properties (e.g. width and height) can be mocked like regular IPC calls using the "},{"kind":"code","text":"`mockIPC`"},{"kind":"text","text":" function.\n\n# Examples\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\nimport { getCurrent } from \"@tauri-apps/api/window\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nconst win = getCurrent();\n\nwin.label // \"main\"\n```"},{"kind":"text","text":"\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nmockIPC((cmd, args) => {\n if (cmd === \"tauri\") {\n if (\n args?.__tauriModule === \"Window\" &&\n args?.message?.cmd === \"manage\" &&\n args?.message?.data?.cmd?.type === \"close\"\n ) {\n console.log('closing window!');\n }\n }\n});\n\nconst { getCurrent } = await import(\"@tauri-apps/api/window\");\n\nconst win = getCurrent();\nawait win.close(); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":41,"name":"current","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":42,"name":"additionalWindows","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"Label of additional windows the app has."}]},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Functions","children":[43,32,39]}],"sources":[{"fileName":"mocks.ts","line":5,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/mocks.ts#L5"}]},{"id":45,"name":"path","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"The path module provides utilities for working with file and directory paths.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.path`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":".\n\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.path`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.path) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"path\": {\n \"all\": true, // enable all Path APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":46,"name":"BaseDirectory","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":62,"name":"AppCache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L48"}],"type":{"type":"literal","value":16}},{"id":59,"name":"AppConfig","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":45,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L45"}],"type":{"type":"literal","value":13}},{"id":60,"name":"AppData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":46,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L46"}],"type":{"type":"literal","value":14}},{"id":61,"name":"AppLocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L47"}],"type":{"type":"literal","value":15}},{"id":63,"name":"AppLog","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L49"}],"type":{"type":"literal","value":17}},{"id":47,"name":"Audio","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L33"}],"type":{"type":"literal","value":1}},{"id":48,"name":"Cache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L34"}],"type":{"type":"literal","value":2}},{"id":49,"name":"Config","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L35"}],"type":{"type":"literal","value":3}},{"id":50,"name":"Data","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L36"}],"type":{"type":"literal","value":4}},{"id":64,"name":"Desktop","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L51"}],"type":{"type":"literal","value":18}},{"id":52,"name":"Document","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L38"}],"type":{"type":"literal","value":6}},{"id":53,"name":"Download","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L39"}],"type":{"type":"literal","value":7}},{"id":65,"name":"Executable","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L52"}],"type":{"type":"literal","value":19}},{"id":66,"name":"Font","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L53"}],"type":{"type":"literal","value":20}},{"id":67,"name":"Home","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L54"}],"type":{"type":"literal","value":21}},{"id":51,"name":"LocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L37"}],"type":{"type":"literal","value":5}},{"id":54,"name":"Picture","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L40"}],"type":{"type":"literal","value":8}},{"id":55,"name":"Public","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L41"}],"type":{"type":"literal","value":9}},{"id":57,"name":"Resource","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L43"}],"type":{"type":"literal","value":11}},{"id":68,"name":"Runtime","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L55"}],"type":{"type":"literal","value":22}},{"id":58,"name":"Temp","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":44,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L44"}],"type":{"type":"literal","value":12}},{"id":69,"name":"Template","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L56"}],"type":{"type":"literal","value":23}},{"id":56,"name":"Video","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L42"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[62,59,60,61,63,47,48,49,50,64,52,53,65,66,67,51,54,55,57,68,58,69,56]}],"sources":[{"fileName":"path.ts","line":32,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L32"}]},{"id":118,"name":"delimiter","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides the platform-specific path segment delimiter:\n- "},{"kind":"code","text":"`;`"},{"kind":"text","text":" on Windows\n- "},{"kind":"code","text":"`:`"},{"kind":"text","text":" on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":555,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L555"}],"type":{"type":"union","types":[{"type":"literal","value":";"},{"type":"literal","value":":"}]},"defaultValue":"..."},{"id":117,"name":"sep","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides the platform-specific path segment separator:\n- "},{"kind":"code","text":"`\\` on Windows\n- `"},{"kind":"text","text":"/` on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":546,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L546"}],"type":{"type":"union","types":[{"type":"literal","value":"\\"},{"type":"literal","value":"/"}]},"defaultValue":"..."},{"id":76,"name":"appCacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":121,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L121"}],"signatures":[{"id":77,"name":"appCacheDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's cache files.\nResolves to "},{"kind":"code","text":"`${cacheDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appCacheDir } from '@tauri-apps/api/path';\nconst appCacheDirPath = await appCacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":70,"name":"appConfigDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":70,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L70"}],"signatures":[{"id":71,"name":"appConfigDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's config files.\nResolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appConfigDir } from '@tauri-apps/api/path';\nconst appConfigDirPath = await appConfigDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":72,"name":"appDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L87"}],"signatures":[{"id":73,"name":"appDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's data files.\nResolves to "},{"kind":"code","text":"`${dataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":74,"name":"appLocalDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":104,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L104"}],"signatures":[{"id":75,"name":"appLocalDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's local data files.\nResolves to "},{"kind":"code","text":"`${localDataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLocalDataDir } from '@tauri-apps/api/path';\nconst appLocalDataDirPath = await appLocalDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":78,"name":"appLogDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":533,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L533"}],"signatures":[{"id":79,"name":"appLogDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's log files.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`${homeDir}/Library/Logs/{bundleIdentifier}`"},{"kind":"text","text":"\n- **Windows:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLogDir } from '@tauri-apps/api/path';\nconst appLogDirPath = await appLogDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":80,"name":"audioDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":143,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L143"}],"signatures":[{"id":81,"name":"audioDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's audio directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_MUSIC_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Music`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Music}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { audioDir } from '@tauri-apps/api/path';\nconst audioDirPath = await audioDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":134,"name":"basename","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":647,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L647"}],"signatures":[{"id":135,"name":"basename","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the last portion of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { basename, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst base = await basename(resourcePath);\nassert(base === 'app.conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":136,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":137,"name":"ext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional file extension to be removed from the returned path."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":82,"name":"cacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":165,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L165"}],"signatures":[{"id":83,"name":"cacheDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's cache directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CACHE_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.cache`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Caches`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { cacheDir } from '@tauri-apps/api/path';\nconst cacheDirPath = await cacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":84,"name":"configDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":187,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L187"}],"signatures":[{"id":85,"name":"configDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's config directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CONFIG_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.config`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { configDir } from '@tauri-apps/api/path';\nconst configDirPath = await configDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":86,"name":"dataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":209,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L209"}],"signatures":[{"id":87,"name":"dataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dataDir } from '@tauri-apps/api/path';\nconst dataDirPath = await dataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":88,"name":"desktopDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":231,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L231"}],"signatures":[{"id":89,"name":"desktopDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's desktop directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DESKTOP_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Desktop`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Desktop}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { desktopDir } from '@tauri-apps/api/path';\nconst desktopPath = await desktopDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":128,"name":"dirname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":613,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L613"}],"signatures":[{"id":129,"name":"dirname","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the directory name of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dirname, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst dir = await dirname(appDataDirPath);\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":130,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":90,"name":"documentDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":253,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L253"}],"signatures":[{"id":91,"name":"documentDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's document directory."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { documentDir } from '@tauri-apps/api/path';\nconst documentDirPath = await documentDir();\n```"},{"kind":"text","text":"\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOCUMENTS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Documents`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Documents}`"},{"kind":"text","text":"."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":92,"name":"downloadDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":275,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L275"}],"signatures":[{"id":93,"name":"downloadDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's download directory.\n\n#### Platform-specific\n\n- **Linux**: Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOWNLOAD_DIR`"},{"kind":"text","text":".\n- **macOS**: Resolves to "},{"kind":"code","text":"`$HOME/Downloads`"},{"kind":"text","text":".\n- **Windows**: Resolves to "},{"kind":"code","text":"`{FOLDERID_Downloads}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { downloadDir } from '@tauri-apps/api/path';\nconst downloadDirPath = await downloadDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":94,"name":"executableDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":297,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L297"}],"signatures":[{"id":95,"name":"executableDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's executable directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_BIN_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$XDG_DATA_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/bin`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { executableDir } from '@tauri-apps/api/path';\nconst executableDirPath = await executableDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":131,"name":"extname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":629,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L629"}],"signatures":[{"id":132,"name":"extname","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the extension of the "},{"kind":"code","text":"`path`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { extname, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst ext = await extname(resourcePath);\nassert(ext === 'conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":133,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":96,"name":"fontDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":319,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L319"}],"signatures":[{"id":97,"name":"fontDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's font directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME/fonts`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share/fonts`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Fonts`"},{"kind":"text","text":".\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { fontDir } from '@tauri-apps/api/path';\nconst fontDirPath = await fontDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":98,"name":"homeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":341,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L341"}],"signatures":[{"id":99,"name":"homeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's home directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Profile}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { homeDir } from '@tauri-apps/api/path';\nconst homeDirPath = await homeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":138,"name":"isAbsolute","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":661,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L661"}],"signatures":[{"id":139,"name":"isAbsolute","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns whether the path is absolute or not."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isAbsolute } from '@tauri-apps/api/path';\nassert(await isAbsolute('/home/tauri'));\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":140,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":125,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":598,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L598"}],"signatures":[{"id":126,"name":"join","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Joins all given "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments together using the platform-specific separator as a delimiter, then normalizes the resulting path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { join, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await join(appDataDirPath, 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":127,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":100,"name":"localDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":363,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L363"}],"signatures":[{"id":101,"name":"localDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's local data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { localDataDir } from '@tauri-apps/api/path';\nconst localDataDirPath = await localDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":122,"name":"normalize","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":583,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L583"}],"signatures":[{"id":123,"name":"normalize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Normalizes the given "},{"kind":"code","text":"`path`"},{"kind":"text","text":", resolving "},{"kind":"code","text":"`'..'`"},{"kind":"text","text":" and "},{"kind":"code","text":"`'.'`"},{"kind":"text","text":" segments and resolve symbolic links."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { normalize, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await normalize(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":124,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":102,"name":"pictureDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":385,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L385"}],"signatures":[{"id":103,"name":"pictureDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's picture directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PICTURES_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Pictures`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Pictures}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { pictureDir } from '@tauri-apps/api/path';\nconst pictureDirPath = await pictureDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":104,"name":"publicDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":407,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L407"}],"signatures":[{"id":105,"name":"publicDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's public directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PUBLICSHARE_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Public`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Public}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { publicDir } from '@tauri-apps/api/path';\nconst publicDirPath = await publicDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":119,"name":"resolve","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":568,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L568"}],"signatures":[{"id":120,"name":"resolve","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resolves a sequence of "},{"kind":"code","text":"`paths`"},{"kind":"text","text":" or "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments into an absolute path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolve, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await resolve(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":121,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":108,"name":"resolveResource","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":444,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L444"}],"signatures":[{"id":109,"name":"resolveResource","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resolve the path to a resource file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('script.sh');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The full path to the resource."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":110,"name":"resourcePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The path to the resource.\nMust follow the same syntax as defined in "},{"kind":"code","text":"`tauri.conf.json > tauri > bundle > resources`"},{"kind":"text","text":", i.e. keeping subfolders and parent dir components ("},{"kind":"code","text":"`../`"},{"kind":"text","text":")."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":106,"name":"resourceDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":424,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L424"}],"signatures":[{"id":107,"name":"resourceDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the application's resource directory.\nTo resolve a resource path, see the [[resolveResource | "},{"kind":"code","text":"`resolveResource API`"},{"kind":"text","text":"]]."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resourceDir } from '@tauri-apps/api/path';\nconst resourceDirPath = await resourceDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":111,"name":"runtimeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":467,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L467"}],"signatures":[{"id":112,"name":"runtimeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's runtime directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_RUNTIME_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { runtimeDir } from '@tauri-apps/api/path';\nconst runtimeDirPath = await runtimeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":113,"name":"templateDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":489,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L489"}],"signatures":[{"id":114,"name":"templateDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's template directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_TEMPLATES_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Templates}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { templateDir } from '@tauri-apps/api/path';\nconst templateDirPath = await templateDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":115,"name":"videoDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":511,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L511"}],"signatures":[{"id":116,"name":"videoDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's video directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_VIDEOS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Movies`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Videos}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { videoDir } from '@tauri-apps/api/path';\nconst videoDirPath = await videoDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[46]},{"title":"Variables","children":[118,117]},{"title":"Functions","children":[76,70,72,74,78,80,134,82,84,86,88,128,90,92,94,131,96,98,138,125,100,122,102,104,119,108,106,111,113,115]}],"sources":[{"fileName":"path.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L26"}]},{"id":141,"name":"tauri","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Invoke your custom commands.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.tauri`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":142,"name":"InvokeArgs","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":63,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/tauri.ts#L63"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":155,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":129,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/tauri.ts#L129"}],"signatures":[{"id":156,"name":"convertFileSrc","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Convert a device file path to an URL that can be loaded by the webview.\nNote that "},{"kind":"code","text":"`asset:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://asset.localhost`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.security.csp`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#securityconfig.csp) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":".\nExample CSP value: "},{"kind":"code","text":"`\"csp\": \"default-src 'self'; img-src 'self' asset: https://asset.localhost\"`"},{"kind":"text","text":" to use the asset protocol on image sources.\n\nAdditionally, "},{"kind":"code","text":"`asset`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.allowlist.protocol`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.protocol)\nin "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" and its access scope must be defined on the "},{"kind":"code","text":"`assetScope`"},{"kind":"text","text":" array on the same "},{"kind":"code","text":"`protocol`"},{"kind":"text","text":" object."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir, join } from '@tauri-apps/api/path';\nimport { convertFileSrc } from '@tauri-apps/api/tauri';\nconst appDataDirPath = await appDataDir();\nconst filePath = await join(appDataDirPath, 'assets/video.mp4');\nconst assetUrl = convertFileSrc(filePath);\n\nconst video = document.getElementById('my-video');\nconst source = document.createElement('source');\nsource.type = 'video/mp4';\nsource.src = assetUrl;\nvideo.appendChild(source);\nvideo.load();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"the URL that can be used as source on the webview."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":157,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":158,"name":"protocol","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The protocol to use. Defaults to "},{"kind":"code","text":"`asset`"},{"kind":"text","text":". You only need to set this when using a custom protocol."}]},"type":{"type":"intrinsic","name":"string"},"defaultValue":"'asset'"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":150,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":79,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/tauri.ts#L79"}],"signatures":[{"id":151,"name":"invoke","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sends a message to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { invoke } from '@tauri-apps/api/tauri';\nawait invoke('login', { user: 'tauri', password: 'poiwe3h4r5ip3yrhtew9ty' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving or rejecting to the backend response."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":152,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":153,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":154,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":142,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":152,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":143,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":144,"name":"transformCallback","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Transforms a callback function to a string identifier that can be passed to the backend.\nThe backend uses the identifier to "},{"kind":"code","text":"`eval()`"},{"kind":"text","text":" the callback."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A unique identifier associated with the callback function."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":145,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":146,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":147,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":148,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":149,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Type Aliases","children":[142]},{"title":"Functions","children":[155,150,143]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/tauri.ts#L13"}]},{"id":159,"name":"window","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Provides APIs to create windows, communicate with other windows and manipulate the current window.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.window`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":".\n\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.window`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.window) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"window\": {\n \"all\": true, // enable all window APIs\n \"create\": true, // enable window creation\n \"center\": true,\n \"requestUserAttention\": true,\n \"setResizable\": true,\n \"setTitle\": true,\n \"maximize\": true,\n \"unmaximize\": true,\n \"minimize\": true,\n \"unminimize\": true,\n \"show\": true,\n \"hide\": true,\n \"close\": true,\n \"setDecorations\": true,\n \"setShadow\": true,\n \"setAlwaysOnTop\": true,\n \"setContentProtected\": true,\n \"setSize\": true,\n \"setMinSize\": true,\n \"setMaxSize\": true,\n \"setPosition\": true,\n \"setFullscreen\": true,\n \"setFocus\": true,\n \"setIcon\": true,\n \"setSkipTaskbar\": true,\n \"setCursorGrab\": true,\n \"setCursorVisible\": true,\n \"setCursorIcon\": true,\n \"setCursorPosition\": true,\n \"setIgnoreCursorEvents\": true,\n \"startDragging\": true,\n \"print\": true\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security.\n\n## Window events\n\nEvents can be listened to using "},{"kind":"code","text":"`appWindow.listen`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nappWindow.listen(\"my-window-event\", ({ event, payload }) => { });\n```"}]},"children":[{"id":560,"name":"UserAttentionType","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[{"kind":"text","text":"Attention type to request on a window."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":561,"name":"Critical","kind":16,"kindString":"Enumeration Member","flags":{},"comment":{"summary":[{"kind":"text","text":"#### Platform-specific\n- **macOS:** Bounces the dock icon until the application is in focus.\n- **Windows:** Flashes both the window and the taskbar button until the application is in focus."}]},"sources":[{"fileName":"window.ts","line":226,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L226"}],"type":{"type":"literal","value":1}},{"id":562,"name":"Informational","kind":16,"kindString":"Enumeration Member","flags":{},"comment":{"summary":[{"kind":"text","text":"#### Platform-specific\n- **macOS:** Bounces the dock icon once.\n- **Windows:** Flashes the taskbar button until the application is in focus."}]},"sources":[{"fileName":"window.ts","line":232,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L232"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[561,562]}],"sources":[{"fileName":"window.ts","line":220,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L220"}]},{"id":505,"name":"CloseRequestedEvent","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":506,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":1971,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1971"}],"signatures":[{"id":507,"name":"new CloseRequestedEvent","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":508,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":618,"typeArguments":[{"type":"literal","value":null}],"name":"Event"}}],"type":{"type":"reference","id":505,"name":"CloseRequestedEvent"}}]},{"id":512,"name":"_preventDefault","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"window.ts","line":1969,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1969"}],"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"},{"id":509,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"window.ts","line":1964,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1964"}],"type":{"type":"reference","id":2,"name":"EventName"}},{"id":511,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"window.ts","line":1968,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1968"}],"type":{"type":"intrinsic","name":"number"}},{"id":510,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"window.ts","line":1966,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1966"}],"type":{"type":"intrinsic","name":"string"}},{"id":515,"name":"isPreventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1981,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1981"}],"signatures":[{"id":516,"name":"isPreventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"boolean"}}]},{"id":513,"name":"preventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1977,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1977"}],"signatures":[{"id":514,"name":"preventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[506]},{"title":"Properties","children":[512,509,511,510]},{"title":"Methods","children":[515,513]}],"sources":[{"fileName":"window.ts","line":1962,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1962"}]},{"id":541,"name":"LogicalPosition","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A position represented in logical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":542,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L164"}],"signatures":[{"id":543,"name":"new LogicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":544,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":545,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":541,"name":"LogicalPosition"}}]},{"id":546,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L160"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":547,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L161"}],"type":{"type":"intrinsic","name":"number"}},{"id":548,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":162,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L162"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[542]},{"title":"Properties","children":[546,547,548]}],"sources":[{"fileName":"window.ts","line":159,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L159"}]},{"id":522,"name":"LogicalSize","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A size represented in logical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":523,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":118,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L118"}],"signatures":[{"id":524,"name":"new LogicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":525,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":526,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":522,"name":"LogicalSize"}}]},{"id":529,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L116"}],"type":{"type":"intrinsic","name":"number"}},{"id":527,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":114,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L114"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":528,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L115"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[523]},{"title":"Properties","children":[529,527,528]}],"sources":[{"fileName":"window.ts","line":113,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L113"}]},{"id":549,"name":"PhysicalPosition","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A position represented in physical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":550,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":180,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L180"}],"signatures":[{"id":551,"name":"new PhysicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":552,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":553,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":549,"name":"PhysicalPosition"}}]},{"id":554,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L176"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":555,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L177"}],"type":{"type":"intrinsic","name":"number"}},{"id":556,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":178,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L178"}],"type":{"type":"intrinsic","name":"number"}},{"id":557,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L195"}],"signatures":[{"id":558,"name":"toLogical","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Converts the physical position to a logical one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\nconst position = await appWindow.innerPosition();\nconst logical = position.toLogical(factor);\n```"}]}]},"parameters":[{"id":559,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":541,"name":"LogicalPosition"}}]}],"groups":[{"title":"Constructors","children":[550]},{"title":"Properties","children":[554,555,556]},{"title":"Methods","children":[557]}],"sources":[{"fileName":"window.ts","line":175,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L175"}]},{"id":530,"name":"PhysicalSize","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A size represented in physical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":531,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":134,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L134"}],"signatures":[{"id":532,"name":"new PhysicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":533,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":534,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":530,"name":"PhysicalSize"}}]},{"id":537,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L132"}],"type":{"type":"intrinsic","name":"number"}},{"id":535,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L130"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":536,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L131"}],"type":{"type":"intrinsic","name":"number"}},{"id":538,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L149"}],"signatures":[{"id":539,"name":"toLogical","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Converts the physical size to a logical one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\nconst size = await appWindow.innerSize();\nconst logical = size.toLogical(factor);\n```"}]}]},"parameters":[{"id":540,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":522,"name":"LogicalSize"}}]}],"groups":[{"title":"Constructors","children":[531]},{"title":"Properties","children":[537,535,536]},{"title":"Methods","children":[538]}],"sources":[{"fileName":"window.ts","line":129,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L129"}]},{"id":162,"name":"WebviewWindow","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"Create new webview windows and get a handle to existing ones.\n\nWindows are identified by a *label* a unique identifier that can be used to reference it later.\nIt may only contain alphanumeric characters "},{"kind":"code","text":"`a-zA-Z`"},{"kind":"text","text":" plus the following special characters "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\n// loading embedded asset:\nconst webview = new WebviewWindow('theUniqueLabel', {\n url: 'path/to/page.html'\n});\n// alternatively, load a remote URL:\nconst webview = new WebviewWindow('theUniqueLabel', {\n url: 'https://github.com/tauri-apps/tauri'\n});\n\nwebview.once('tauri://created', function () {\n // webview window successfully created\n});\nwebview.once('tauri://error', function (e) {\n // an error happened creating the webview window\n});\n\n// emit an event to the backend\nawait webview.emit(\"some event\", \"data\");\n// listen to an event from the backend\nconst unlisten = await webview.listen(\"event name\", e => {});\nunlisten();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":166,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":2039,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2039"}],"signatures":[{"id":167,"name":"new WebviewWindow","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new WebviewWindow."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { WebviewWindow } from '@tauri-apps/api/window';\nconst webview = new WebviewWindow('my-label', {\n url: 'https://github.com/tauri-apps/tauri'\n});\nwebview.once('tauri://created', function () {\n // webview window successfully created\n});\nwebview.once('tauri://error', function (e) {\n // an error happened creating the webview window\n});\n```"},{"kind":"text","text":"\n\n*"}]},{"tag":"@returns","content":[{"kind":"text","text":"The WebviewWindow instance to communicate with the webview."}]}]},"parameters":[{"id":168,"name":"label","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The unique webview window label. Must be alphanumeric: "},{"kind":"code","text":"`a-zA-Z-/:_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":169,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":588,"name":"WindowOptions"},"defaultValue":"{}"}],"type":{"type":"reference","id":162,"name":"WebviewWindow"},"overwrites":{"type":"reference","name":"WindowManager.constructor"}}],"overwrites":{"type":"reference","name":"WindowManager.constructor"}},{"id":302,"name":"label","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The window label. It is a unique identifier for the window, can be used to reference it later."}]},"sources":[{"fileName":"window.ts","line":316,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L316"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","name":"WindowManager.label"}},{"id":303,"name":"listeners","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Local event listeners."}]},"sources":[{"fileName":"window.ts","line":318,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L318"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"reference","id":624,"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"EventCallback"}}],"name":"Record","qualifiedName":"Record","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listeners"}},{"id":196,"name":"center","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":780,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L780"}],"signatures":[{"id":197,"name":"center","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Centers the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.center();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.center"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.center"}},{"id":221,"name":"close","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1081,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1081"}],"signatures":[{"id":222,"name":"close","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Closes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.close();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.close"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.close"}},{"id":314,"name":"emit","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":400,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L400"}],"signatures":[{"id":315,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend, tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.emit('window-loaded', { loggedIn: true, token: 'authToken' });\n```"}]}]},"parameters":[{"id":316,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":317,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Event payload."}]},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.emit"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.emit"}},{"id":219,"name":"hide","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1056,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1056"}],"signatures":[{"id":220,"name":"hide","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window visibility to false."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.hide();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.hide"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.hide"}},{"id":172,"name":"innerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":470,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L470"}],"signatures":[{"id":173,"name":"innerPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The position of the top-left hand corner of the window's client area relative to the top-left hand corner of the desktop."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst position = await appWindow.innerPosition();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's inner position."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":549,"name":"PhysicalPosition"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.innerPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.innerPosition"}},{"id":176,"name":"innerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":521,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L521"}],"signatures":[{"id":177,"name":"innerSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The physical size of the window's client area.\nThe client area is the content of the window, excluding the title bar and borders."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst size = await appWindow.innerSize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's inner size."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":530,"name":"PhysicalSize"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.innerSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.innerSize"}},{"id":186,"name":"isDecorated","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":647,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L647"}],"signatures":[{"id":187,"name":"isDecorated","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current decorated state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst decorated = await appWindow.isDecorated();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is decorated or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isDecorated"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isDecorated"}},{"id":180,"name":"isFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":572,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L572"}],"signatures":[{"id":181,"name":"isFullscreen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current fullscreen state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst fullscreen = await appWindow.isFullscreen();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is in fullscreen mode or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isFullscreen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isFullscreen"}},{"id":184,"name":"isMaximized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":622,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L622"}],"signatures":[{"id":185,"name":"isMaximized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current maximized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst maximized = await appWindow.isMaximized();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is maximized or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isMaximized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isMaximized"}},{"id":182,"name":"isMinimized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":597,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L597"}],"signatures":[{"id":183,"name":"isMinimized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current minimized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst minimized = await appWindow.isMinimized();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.3.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isMinimized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isMinimized"}},{"id":188,"name":"isResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":672,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L672"}],"signatures":[{"id":189,"name":"isResizable","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current resizable state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst resizable = await appWindow.isResizable();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is resizable or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isResizable"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isResizable"}},{"id":190,"name":"isVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":697,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L697"}],"signatures":[{"id":191,"name":"isVisible","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current visible state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst visible = await appWindow.isVisible();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is visible or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isVisible"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isVisible"}},{"id":304,"name":"listen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":345,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L345"}],"signatures":[{"id":305,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event emitted by the backend that is tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst unlisten = await appWindow.listen('state-changed', (event) => {\n console.log(`Got error: ${payload}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]}]},"typeParameter":[{"id":306,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":307,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":308,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":306,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.listen"}},{"id":207,"name":"maximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":906,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L906"}],"signatures":[{"id":208,"name":"maximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Maximizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.maximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.maximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.maximize"}},{"id":213,"name":"minimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":981,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L981"}],"signatures":[{"id":214,"name":"minimize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Minimizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.minimize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.minimize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.minimize"}},{"id":281,"name":"onCloseRequested","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1770,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1770"}],"signatures":[{"id":282,"name":"onCloseRequested","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window close requested. Emitted when the user requests to closes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nimport { confirm } from '@tauri-apps/api/dialog';\nconst unlisten = await appWindow.onCloseRequested(async (event) => {\n const confirmed = await confirm('Are you sure?');\n if (!confirmed) {\n // user did not confirm closing the window; let's prevent it\n event.preventDefault();\n }\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":283,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":284,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"window.ts","line":1771,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1771"}],"signatures":[{"id":285,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":286,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":505,"name":"CloseRequestedEvent"}}],"type":{"type":"union","types":[{"type":"intrinsic","name":"void"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}]}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onCloseRequested"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onCloseRequested"}},{"id":296,"name":"onFileDropEvent","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1904,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1904"}],"signatures":[{"id":297,"name":"onFileDropEvent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to a file drop event.\nThe listener is triggered when the user hovers the selected files on the window,\ndrops the files or cancels the operation."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onFileDropEvent((event) => {\n if (event.payload.type === 'hover') {\n console.log('User hovering', event.payload.paths);\n } else if (event.payload.type === 'drop') {\n console.log('User dropped', event.payload.paths);\n } else {\n console.log('File drop cancelled');\n }\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":298,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":579,"name":"FileDropEvent"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onFileDropEvent"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onFileDropEvent"}},{"id":287,"name":"onFocusChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1803,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1803"}],"signatures":[{"id":288,"name":"onFocusChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window focus change."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onFocusChanged(({ payload: focused }) => {\n console.log('Focus changed, window is focused? ' + focused);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":289,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onFocusChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onFocusChanged"}},{"id":293,"name":"onMenuClicked","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1873,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1873"}],"signatures":[{"id":294,"name":"onMenuClicked","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to the window menu item click. The payload is the item id."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onMenuClicked(({ payload: menuId }) => {\n console.log('Menu clicked: ' + menuId);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":295,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onMenuClicked"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onMenuClicked"}},{"id":278,"name":"onMoved","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1738,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1738"}],"signatures":[{"id":279,"name":"onMoved","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window move."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onMoved(({ payload: position }) => {\n console.log('Window moved', position);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":280,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":549,"name":"PhysicalPosition"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onMoved"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onMoved"}},{"id":275,"name":"onResized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1712,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1712"}],"signatures":[{"id":276,"name":"onResized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window resize."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onResized(({ payload: size }) => {\n console.log('Window resized', size);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":277,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":530,"name":"PhysicalSize"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onResized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onResized"}},{"id":290,"name":"onScaleChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1845,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1845"}],"signatures":[{"id":291,"name":"onScaleChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window scale change. Emitted when the window's scale factor has changed.\nThe following user actions can cause DPI changes:\n- Changing the display's resolution.\n- Changing the display's scale factor (e.g. in Control Panel on Windows).\n- Moving the window to a display with a different scale factor."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onScaleChanged(({ payload }) => {\n console.log('Scale changed', payload.scaleFactor, payload.size);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":292,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":576,"name":"ScaleFactorChanged"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onScaleChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onScaleChanged"}},{"id":299,"name":"onThemeChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1954,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1954"}],"signatures":[{"id":300,"name":"onThemeChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to the system theme change."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onThemeChanged(({ payload: theme }) => {\n console.log('New theme: ' + theme);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":301,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":569,"name":"Theme"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onThemeChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onThemeChanged"}},{"id":309,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":378,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L378"}],"signatures":[{"id":310,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event emitted by the backend that is tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst unlisten = await appWindow.once('initialized', (event) => {\n console.log(`Window initialized!`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]}]},"typeParameter":[{"id":311,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":312,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":313,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":311,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.once"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.once"}},{"id":174,"name":"outerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":495,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L495"}],"signatures":[{"id":175,"name":"outerPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The position of the top-left hand corner of the window relative to the top-left hand corner of the desktop."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst position = await appWindow.outerPosition();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's outer position."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":549,"name":"PhysicalPosition"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.outerPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.outerPosition"}},{"id":178,"name":"outerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":547,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L547"}],"signatures":[{"id":179,"name":"outerSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The physical size of the entire window.\nThese dimensions include the title bar and borders. If you don't want that (and you usually don't), use inner_size instead."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst size = await appWindow.outerSize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's outer size."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":530,"name":"PhysicalSize"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.outerSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.outerSize"}},{"id":198,"name":"requestUserAttention","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":816,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L816"}],"signatures":[{"id":199,"name":"requestUserAttention","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Requests user attention to the window, this has no effect if the application\nis already focused. How requesting for user attention manifests is platform dependent,\nsee "},{"kind":"code","text":"`UserAttentionType`"},{"kind":"text","text":" for details.\n\nProviding "},{"kind":"code","text":"`null`"},{"kind":"text","text":" will unset the request for user attention. Unsetting the request for\nuser attention might not be done automatically by the WM when the window receives input.\n\n#### Platform-specific\n\n- **macOS:** "},{"kind":"code","text":"`null`"},{"kind":"text","text":" has no effect.\n- **Linux:** Urgency levels have the same effect."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.requestUserAttention();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":200,"name":"requestType","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":560,"name":"UserAttentionType"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.requestUserAttention"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.requestUserAttention"}},{"id":170,"name":"scaleFactor","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":445,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L445"}],"signatures":[{"id":171,"name":"scaleFactor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The scale factor that can be used to map physical pixels to logical pixels."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's monitor scale factor."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.scaleFactor"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.scaleFactor"}},{"id":229,"name":"setAlwaysOnTop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1171,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1171"}],"signatures":[{"id":230,"name":"setAlwaysOnTop","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setAlwaysOnTop(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":231,"name":"alwaysOnTop","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows or not."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setAlwaysOnTop"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setAlwaysOnTop"}},{"id":232,"name":"setContentProtected","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1199,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1199"}],"signatures":[{"id":233,"name":"setContentProtected","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Prevents the window contents from being captured by other apps."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setContentProtected(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"parameters":[{"id":234,"name":"protected_","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setContentProtected"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setContentProtected"}},{"id":258,"name":"setCursorGrab","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1519,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1519"}],"signatures":[{"id":259,"name":"setCursorGrab","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Grabs the cursor, preventing it from leaving the window.\n\nThere's no guarantee that the cursor will be hidden. You should\nhide it by yourself if you want so.\n\n#### Platform-specific\n\n- **Linux:** Unsupported.\n- **macOS:** This locks the cursor in a fixed location, which looks visually awkward."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorGrab(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":260,"name":"grab","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"code","text":"`true`"},{"kind":"text","text":" to grab the cursor icon, "},{"kind":"code","text":"`false`"},{"kind":"text","text":" to release it."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorGrab"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorGrab"}},{"id":264,"name":"setCursorIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1579,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1579"}],"signatures":[{"id":265,"name":"setCursorIcon","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Modifies the cursor icon of the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorIcon('help');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":266,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor icon."}]},"type":{"type":"reference","id":160,"name":"CursorIcon"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorIcon"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorIcon"}},{"id":267,"name":"setCursorPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1606,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1606"}],"signatures":[{"id":268,"name":"setCursorPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Changes the position of the cursor in window coordinates."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalPosition } from '@tauri-apps/api/window';\nawait appWindow.setCursorPosition(new LogicalPosition(600, 300));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":269,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor position."}]},"type":{"type":"union","types":[{"type":"reference","id":549,"name":"PhysicalPosition"},{"type":"reference","id":541,"name":"LogicalPosition"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorPosition"}},{"id":261,"name":"setCursorVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1552,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1552"}],"signatures":[{"id":262,"name":"setCursorVisible","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Modifies the cursor's visibility.\n\n#### Platform-specific\n\n- **Windows:** The cursor is only hidden within the confines of the window.\n- **macOS:** The cursor is hidden as long as the window has input focus, even if the cursor is\n outside of the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorVisible(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":263,"name":"visible","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`false`"},{"kind":"text","text":", this will hide the cursor. If "},{"kind":"code","text":"`true`"},{"kind":"text","text":", this will show the cursor."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorVisible"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorVisible"}},{"id":223,"name":"setDecorations","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1107,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1107"}],"signatures":[{"id":224,"name":"setDecorations","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setDecorations(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":225,"name":"decorations","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setDecorations"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setDecorations"}},{"id":250,"name":"setFocus","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1417,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1417"}],"signatures":[{"id":251,"name":"setFocus","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Bring the window to front and focus."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setFocus();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setFocus"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setFocus"}},{"id":247,"name":"setFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1391,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1391"}],"signatures":[{"id":248,"name":"setFullscreen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window fullscreen state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setFullscreen(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":249,"name":"fullscreen","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should go to fullscreen or not."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setFullscreen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setFullscreen"}},{"id":252,"name":"setIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1450,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1450"}],"signatures":[{"id":253,"name":"setIcon","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window icon."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setIcon('/tauri/awesome.png');\n```"},{"kind":"text","text":"\n\nNote that you need the "},{"kind":"code","text":"`icon-ico`"},{"kind":"text","text":" or "},{"kind":"code","text":"`icon-png`"},{"kind":"text","text":" Cargo features to use this API.\nTo enable it, change your Cargo.toml file:\n"},{"kind":"code","text":"```toml\n[dependencies]\ntauri = { version = \"...\", features = [\"...\", \"icon-png\"] }\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":254,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Icon bytes or path to the icon file."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setIcon"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setIcon"}},{"id":270,"name":"setIgnoreCursorEvents","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1650,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1650"}],"signatures":[{"id":271,"name":"setIgnoreCursorEvents","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Changes the cursor events behavior."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setIgnoreCursorEvents(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":272,"name":"ignore","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"code","text":"`true`"},{"kind":"text","text":" to ignore the cursor events; "},{"kind":"code","text":"`false`"},{"kind":"text","text":" to process them as usual."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setIgnoreCursorEvents"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setIgnoreCursorEvents"}},{"id":241,"name":"setMaxSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1306,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1306"}],"signatures":[{"id":242,"name":"setMaxSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window maximum inner size. If the "},{"kind":"code","text":"`size`"},{"kind":"text","text":" argument is undefined, the constraint is unset."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalSize } from '@tauri-apps/api/window';\nawait appWindow.setMaxSize(new LogicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":243,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size, or "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to unset the constraint."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"literal","value":null},{"type":"reference","id":530,"name":"PhysicalSize"},{"type":"reference","id":522,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setMaxSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setMaxSize"}},{"id":238,"name":"setMinSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1264,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1264"}],"signatures":[{"id":239,"name":"setMinSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window minimum inner size. If the "},{"kind":"code","text":"`size`"},{"kind":"text","text":" argument is not provided, the constraint is unset."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, PhysicalSize } from '@tauri-apps/api/window';\nawait appWindow.setMinSize(new PhysicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":240,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size, or "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to unset the constraint."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"literal","value":null},{"type":"reference","id":530,"name":"PhysicalSize"},{"type":"reference","id":522,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setMinSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setMinSize"}},{"id":244,"name":"setPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1348,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1348"}],"signatures":[{"id":245,"name":"setPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window outer position."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalPosition } from '@tauri-apps/api/window';\nawait appWindow.setPosition(new LogicalPosition(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":246,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new position, in logical or physical pixels."}]},"type":{"type":"union","types":[{"type":"reference","id":549,"name":"PhysicalPosition"},{"type":"reference","id":541,"name":"LogicalPosition"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setPosition"}},{"id":201,"name":"setResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":853,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L853"}],"signatures":[{"id":202,"name":"setResizable","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Updates the window resizable flag."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setResizable(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":203,"name":"resizable","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setResizable"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setResizable"}},{"id":226,"name":"setShadow","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1144,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1144"}],"signatures":[{"id":227,"name":"setShadow","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether or not the window should have shadow.\n\n#### Platform-specific\n\n- **Windows:**\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" has no effect on decorated window, shadows are always ON.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" will make ndecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setShadow(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0"}]}]},"parameters":[{"id":228,"name":"enable","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setShadow"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setShadow"}},{"id":235,"name":"setSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1226,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1226"}],"signatures":[{"id":236,"name":"setSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resizes the window with a new inner size."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalSize } from '@tauri-apps/api/window';\nawait appWindow.setSize(new LogicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":237,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size."}]},"type":{"type":"union","types":[{"type":"reference","id":530,"name":"PhysicalSize"},{"type":"reference","id":522,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setSize"}},{"id":255,"name":"setSkipTaskbar","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1484"}],"signatures":[{"id":256,"name":"setSkipTaskbar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window icon should be hidden from the taskbar or not.\n\n#### Platform-specific\n\n- **macOS:** Unsupported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setSkipTaskbar(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":257,"name":"skip","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"true to hide window icon, false to show it."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setSkipTaskbar"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setSkipTaskbar"}},{"id":204,"name":"setTitle","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":880,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L880"}],"signatures":[{"id":205,"name":"setTitle","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window title."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setTitle('Tauri');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":206,"name":"title","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new title"}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setTitle"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setTitle"}},{"id":217,"name":"show","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1031,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1031"}],"signatures":[{"id":218,"name":"show","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window visibility to true."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.show();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.show"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.show"}},{"id":273,"name":"startDragging","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1676,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1676"}],"signatures":[{"id":274,"name":"startDragging","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Starts dragging the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.startDragging();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.startDragging"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.startDragging"}},{"id":194,"name":"theme","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":752,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L752"}],"signatures":[{"id":195,"name":"theme","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current theme.\n\n#### Platform-specific\n\n- **macOS:** Theme was introduced on macOS 10.14. Returns "},{"kind":"code","text":"`light`"},{"kind":"text","text":" on macOS 10.13 and below."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst theme = await appWindow.theme();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window theme."}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":569,"name":"Theme"}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.theme"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.theme"}},{"id":192,"name":"title","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":722,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L722"}],"signatures":[{"id":193,"name":"title","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current title."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst title = await appWindow.title();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.3.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.title"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.title"}},{"id":211,"name":"toggleMaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":956,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L956"}],"signatures":[{"id":212,"name":"toggleMaximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Toggles the window maximized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.toggleMaximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.toggleMaximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.toggleMaximize"}},{"id":209,"name":"unmaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":931,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L931"}],"signatures":[{"id":210,"name":"unmaximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unmaximizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.unmaximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.unmaximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.unmaximize"}},{"id":215,"name":"unminimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1006,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1006"}],"signatures":[{"id":216,"name":"unminimize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unminimizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.unminimize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.unminimize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.unminimize"}},{"id":163,"name":"getByLabel","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"window.ts","line":2071,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2071"}],"signatures":[{"id":164,"name":"getByLabel","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the WebviewWindow for the webview associated with the given label."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { WebviewWindow } from '@tauri-apps/api/window';\nconst mainWindow = WebviewWindow.getByLabel('main');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The WebviewWindow instance to communicate with the webview or null if the webview doesn't exist."}]}]},"parameters":[{"id":165,"name":"label","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The webview window label."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":162,"name":"WebviewWindow"}]}}]}],"groups":[{"title":"Constructors","children":[166]},{"title":"Properties","children":[302,303]},{"title":"Methods","children":[196,221,314,219,172,176,186,180,184,182,188,190,304,207,213,281,296,287,293,278,275,290,299,309,174,178,198,170,229,232,258,264,267,261,223,250,247,252,270,241,238,244,201,226,235,255,204,217,273,194,192,211,209,215,163]}],"sources":[{"fileName":"window.ts","line":2019,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2019"}],"extendedTypes":[{"type":"reference","name":"WindowManager"}]},{"id":571,"name":"Monitor","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Allows you to retrieve information about a given monitor."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":572,"name":"name","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Human-readable name of the monitor"}]},"sources":[{"fileName":"window.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L81"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}},{"id":574,"name":"position","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"the Top-left corner position of the monitor relative to the larger full screen area."}]},"sources":[{"fileName":"window.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L85"}],"type":{"type":"reference","id":549,"name":"PhysicalPosition"}},{"id":575,"name":"scaleFactor","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The scale factor that can be used to map physical pixels to logical pixels."}]},"sources":[{"fileName":"window.ts","line":87,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L87"}],"type":{"type":"intrinsic","name":"number"}},{"id":573,"name":"size","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The monitor's resolution."}]},"sources":[{"fileName":"window.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L83"}],"type":{"type":"reference","id":530,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[572,574,575,573]}],"sources":[{"fileName":"window.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L79"}]},{"id":576,"name":"ScaleFactorChanged","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"The payload for the "},{"kind":"code","text":"`scaleChange`"},{"kind":"text","text":" event."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":577,"name":"scaleFactor","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The new window scale factor."}]},"sources":[{"fileName":"window.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L97"}],"type":{"type":"intrinsic","name":"number"}},{"id":578,"name":"size","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The new window size"}]},"sources":[{"fileName":"window.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L99"}],"type":{"type":"reference","id":530,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[577,578]}],"sources":[{"fileName":"window.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L95"}]},{"id":588,"name":"WindowOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Configuration for the window to create."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":615,"name":"acceptFirstMouse","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether clicking an inactive window also clicks through to the webview on macOS."}]},"sources":[{"fileName":"window.ts","line":2195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2195"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":607,"name":"alwaysOnTop","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows or not."}]},"sources":[{"fileName":"window.ts","line":2153,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2153"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":590,"name":"center","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Show window in the center of the screen.."}]},"sources":[{"fileName":"window.ts","line":2115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2115"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":608,"name":"contentProtected","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Prevents the window contents from being captured by other apps."}]},"sources":[{"fileName":"window.ts","line":2155,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2155"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":606,"name":"decorations","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars or not."}]},"sources":[{"fileName":"window.ts","line":2151,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2151"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":611,"name":"fileDropEnabled","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the file drop is enabled or not on the webview. By default it is enabled.\n\nDisabling it is required to use drag and drop on the frontend on Windows."}]},"sources":[{"fileName":"window.ts","line":2177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2177"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":602,"name":"focus","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window will be initially focused or not."}]},"sources":[{"fileName":"window.ts","line":2139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2139"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":601,"name":"fullscreen","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is in fullscreen mode or not."}]},"sources":[{"fileName":"window.ts","line":2137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2137"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":594,"name":"height","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial height."}]},"sources":[{"fileName":"window.ts","line":2123,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2123"}],"type":{"type":"intrinsic","name":"number"}},{"id":614,"name":"hiddenTitle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`true`"},{"kind":"text","text":", sets the window title to be hidden on macOS."}]},"sources":[{"fileName":"window.ts","line":2191,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2191"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":598,"name":"maxHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum height. Only applies if "},{"kind":"code","text":"`maxWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2131"}],"type":{"type":"intrinsic","name":"number"}},{"id":597,"name":"maxWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum width. Only applies if "},{"kind":"code","text":"`maxHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2129"}],"type":{"type":"intrinsic","name":"number"}},{"id":604,"name":"maximized","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be maximized upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2147,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2147"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":596,"name":"minHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum height. Only applies if "},{"kind":"code","text":"`minWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2127,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2127"}],"type":{"type":"intrinsic","name":"number"}},{"id":595,"name":"minWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum width. Only applies if "},{"kind":"code","text":"`minHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2125,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2125"}],"type":{"type":"intrinsic","name":"number"}},{"id":599,"name":"resizable","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is resizable or not."}]},"sources":[{"fileName":"window.ts","line":2133,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2133"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":610,"name":"shadow","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window has shadow.\n\n#### Platform-specific\n\n- **Windows:**\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" has no effect on decorated window, shadows are always ON.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" will make ndecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0"}]}]},"sources":[{"fileName":"window.ts","line":2171,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2171"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":609,"name":"skipTaskbar","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window icon should be added to the taskbar."}]},"sources":[{"fileName":"window.ts","line":2157,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2157"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":616,"name":"tabbingIdentifier","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Defines the window [tabbing identifier](https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier) on macOS.\n\nWindows with the same tabbing identifier will be grouped together.\nIf the tabbing identifier is not set, automatic tabbing will be disabled."}]},"sources":[{"fileName":"window.ts","line":2202,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2202"}],"type":{"type":"intrinsic","name":"string"}},{"id":612,"name":"theme","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial window theme. Defaults to the system theme.\n\nOnly implemented on Windows and macOS 10.14+."}]},"sources":[{"fileName":"window.ts","line":2183,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2183"}],"type":{"type":"reference","id":569,"name":"Theme"}},{"id":600,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Window title."}]},"sources":[{"fileName":"window.ts","line":2135,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2135"}],"type":{"type":"intrinsic","name":"string"}},{"id":613,"name":"titleBarStyle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The style of the macOS title bar."}]},"sources":[{"fileName":"window.ts","line":2187,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2187"}],"type":{"type":"reference","id":570,"name":"TitleBarStyle"}},{"id":603,"name":"transparent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is transparent or not.\nNote that on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" this requires the "},{"kind":"code","text":"`macos-private-api`"},{"kind":"text","text":" feature flag, enabled under "},{"kind":"code","text":"`tauri.conf.json > tauri > macOSPrivateApi`"},{"kind":"text","text":".\nWARNING: Using private APIs on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" prevents your application from being accepted to the "},{"kind":"code","text":"`App Store`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"window.ts","line":2145,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2145"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":589,"name":"url","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Remote URL or local file path to open.\n\n- URL such as "},{"kind":"code","text":"`https://github.com/tauri-apps`"},{"kind":"text","text":" is opened directly on a Tauri window.\n- data: URL such as "},{"kind":"code","text":"`data:text/html,...`"},{"kind":"text","text":" is only supported with the "},{"kind":"code","text":"`window-data-url`"},{"kind":"text","text":" Cargo feature for the "},{"kind":"code","text":"`tauri`"},{"kind":"text","text":" dependency.\n- local file path or route such as "},{"kind":"code","text":"`/path/to/page.html`"},{"kind":"text","text":" or "},{"kind":"code","text":"`/users`"},{"kind":"text","text":" is appended to the application URL (the devServer URL on development, or "},{"kind":"code","text":"`tauri://localhost/`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://tauri.localhost/`"},{"kind":"text","text":" on production)."}]},"sources":[{"fileName":"window.ts","line":2113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2113"}],"type":{"type":"intrinsic","name":"string"}},{"id":617,"name":"userAgent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The user agent for the webview."}]},"sources":[{"fileName":"window.ts","line":2206,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2206"}],"type":{"type":"intrinsic","name":"string"}},{"id":605,"name":"visible","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be immediately visible upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2149"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":593,"name":"width","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial width."}]},"sources":[{"fileName":"window.ts","line":2121,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2121"}],"type":{"type":"intrinsic","name":"number"}},{"id":591,"name":"x","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial vertical position. Only applies if "},{"kind":"code","text":"`y`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2117,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2117"}],"type":{"type":"intrinsic","name":"number"}},{"id":592,"name":"y","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial horizontal position. Only applies if "},{"kind":"code","text":"`x`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2119"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[615,607,590,608,606,611,602,601,594,614,598,597,604,596,595,599,610,609,616,612,600,613,603,589,617,605,593,591,592]}],"sources":[{"fileName":"window.ts","line":2105,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2105"}]},{"id":160,"name":"CursorIcon","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":235,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L235"}],"type":{"type":"union","types":[{"type":"literal","value":"default"},{"type":"literal","value":"crosshair"},{"type":"literal","value":"hand"},{"type":"literal","value":"arrow"},{"type":"literal","value":"move"},{"type":"literal","value":"text"},{"type":"literal","value":"wait"},{"type":"literal","value":"help"},{"type":"literal","value":"progress"},{"type":"literal","value":"notAllowed"},{"type":"literal","value":"contextMenu"},{"type":"literal","value":"cell"},{"type":"literal","value":"verticalText"},{"type":"literal","value":"alias"},{"type":"literal","value":"copy"},{"type":"literal","value":"noDrop"},{"type":"literal","value":"grab"},{"type":"literal","value":"grabbing"},{"type":"literal","value":"allScroll"},{"type":"literal","value":"zoomIn"},{"type":"literal","value":"zoomOut"},{"type":"literal","value":"eResize"},{"type":"literal","value":"nResize"},{"type":"literal","value":"neResize"},{"type":"literal","value":"nwResize"},{"type":"literal","value":"sResize"},{"type":"literal","value":"seResize"},{"type":"literal","value":"swResize"},{"type":"literal","value":"wResize"},{"type":"literal","value":"ewResize"},{"type":"literal","value":"nsResize"},{"type":"literal","value":"neswResize"},{"type":"literal","value":"nwseResize"},{"type":"literal","value":"colResize"},{"type":"literal","value":"rowResize"}]}},{"id":579,"name":"FileDropEvent","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"The file drop event types."}]},"sources":[{"fileName":"window.ts","line":103,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L103"}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":580,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":582,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":21,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L104"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":581,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L104"}],"type":{"type":"literal","value":"hover"}}],"groups":[{"title":"Properties","children":[582,581]}],"sources":[{"fileName":"window.ts","line":104,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L104"}]}},{"type":"reflection","declaration":{"id":583,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":585,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L105"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":584,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L105"}],"type":{"type":"literal","value":"drop"}}],"groups":[{"title":"Properties","children":[585,584]}],"sources":[{"fileName":"window.ts","line":105,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L105"}]}},{"type":"reflection","declaration":{"id":586,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":587,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":106,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L106"}],"type":{"type":"literal","value":"cancel"}}],"groups":[{"title":"Properties","children":[587]}],"sources":[{"fileName":"window.ts","line":106,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L106"}]}}]}},{"id":569,"name":"Theme","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L71"}],"type":{"type":"union","types":[{"type":"literal","value":"light"},{"type":"literal","value":"dark"}]}},{"id":570,"name":"TitleBarStyle","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":72,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L72"}],"type":{"type":"union","types":[{"type":"literal","value":"visible"},{"type":"literal","value":"transparent"},{"type":"literal","value":"overlay"}]}},{"id":521,"name":"appWindow","kind":32,"kindString":"Variable","flags":{},"comment":{"summary":[{"kind":"text","text":"The WebviewWindow for the current window."}]},"sources":[{"fileName":"window.ts","line":2081,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2081"}],"type":{"type":"reference","id":162,"name":"WebviewWindow"}},{"id":567,"name":"availableMonitors","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2288,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2288"}],"signatures":[{"id":568,"name":"availableMonitors","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the list of all the monitors available on the system."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { availableMonitors } from '@tauri-apps/api/window';\nconst monitors = availableMonitors();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"array","elementType":{"type":"reference","id":571,"name":"Monitor"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":563,"name":"currentMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2239,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2239"}],"signatures":[{"id":564,"name":"currentMonitor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the monitor on which the window currently resides.\nReturns "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if current monitor can't be detected."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { currentMonitor } from '@tauri-apps/api/window';\nconst monitor = currentMonitor();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"reference","id":571,"name":"Monitor"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":519,"name":"getAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":293,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L293"}],"signatures":[{"id":520,"name":"getAll","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets a list of instances of "},{"kind":"code","text":"`WebviewWindow`"},{"kind":"text","text":" for all available webview windows."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"array","elementType":{"type":"reference","id":162,"name":"WebviewWindow"}}}]},{"id":517,"name":"getCurrent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":281,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L281"}],"signatures":[{"id":518,"name":"getCurrent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Get an instance of "},{"kind":"code","text":"`WebviewWindow`"},{"kind":"text","text":" for the current webview window."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","id":162,"name":"WebviewWindow"}}]},{"id":565,"name":"primaryMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2264,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2264"}],"signatures":[{"id":566,"name":"primaryMonitor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the primary monitor of the system.\nReturns "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if it can't identify any monitor as a primary one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { primaryMonitor } from '@tauri-apps/api/window';\nconst monitor = primaryMonitor();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"reference","id":571,"name":"Monitor"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[560]},{"title":"Classes","children":[505,541,522,549,530,162]},{"title":"Interfaces","children":[571,576,588]},{"title":"Type Aliases","children":[160,579,569,570]},{"title":"Variables","children":[521]},{"title":"Functions","children":[567,563,519,517,565]}],"sources":[{"fileName":"window.ts","line":66,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L66"}]}],"groups":[{"title":"Modules","children":[1,31,45,141,159]}]} \ No newline at end of file diff --git a/tooling/api/src/event.ts b/tooling/api/src/event.ts index 9e1508c5485..2942bdf8b9e 100644 --- a/tooling/api/src/event.ts +++ b/tooling/api/src/event.ts @@ -30,12 +30,7 @@ export enum TauriEvent { WINDOW_FILE_DROP = 'tauri://file-drop', WINDOW_FILE_DROP_HOVER = 'tauri://file-drop-hover', WINDOW_FILE_DROP_CANCELLED = 'tauri://file-drop-cancelled', - MENU = 'tauri://menu', - CHECK_UPDATE = 'tauri://update', - UPDATE_AVAILABLE = 'tauri://update-available', - INSTALL_UPDATE = 'tauri://update-install', - STATUS_UPDATE = 'tauri://update-status', - DOWNLOAD_PROGRESS = 'tauri://update-download-progress' + MENU = 'tauri://menu' } /** diff --git a/tooling/api/src/index.ts b/tooling/api/src/index.ts index f37e97b7e11..92d0c220eac 100644 --- a/tooling/api/src/index.ts +++ b/tooling/api/src/index.ts @@ -16,10 +16,9 @@ import * as event from './event' import * as path from './path' import * as tauri from './tauri' -import * as updater from './updater' import * as window from './window' /** @ignore */ const invoke = tauri.invoke -export { invoke, event, path, tauri, updater, window } +export { invoke, event, path, tauri, window } diff --git a/tooling/api/src/updater.ts b/tooling/api/src/updater.ts deleted file mode 100644 index 2b4b9cd71fa..00000000000 --- a/tooling/api/src/updater.ts +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -/** - * Customize the auto updater flow. - * - * This package is also accessible with `window.__TAURI__.updater` when [`build.withGlobalTauri`](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in `tauri.conf.json` is set to `true`. - * @module - */ - -import { once, listen, emit, TauriEvent } from './event' -import { type UnlistenFn } from './helpers/event' - -/** - * @since 1.0.0 - */ -type UpdateStatus = 'PENDING' | 'ERROR' | 'DONE' | 'UPTODATE' - -/** - * @since 1.0.0 - */ -interface UpdateStatusResult { - error?: string - status: UpdateStatus -} - -/** - * @since 1.0.0 - */ -interface UpdateManifest { - version: string - date: string - body: string -} - -/** - * @since 1.0.0 - */ -interface UpdateResult { - manifest?: UpdateManifest - shouldUpdate: boolean -} - -/** - * Listen to an updater event. - * @example - * ```typescript - * import { onUpdaterEvent } from "@tauri-apps/api/updater"; - * const unlisten = await onUpdaterEvent(({ error, status }) => { - * console.log('Updater event', error, status); - * }); - * - * // you need to call unlisten if your handler goes out of scope e.g. the component is unmounted - * unlisten(); - * ``` - * - * @returns A promise resolving to a function to unlisten to the event. - * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. - * - * @since 1.0.2 - */ -async function onUpdaterEvent( - handler: (status: UpdateStatusResult) => void -): Promise { - return listen(TauriEvent.STATUS_UPDATE, (data: { payload: any }) => { - handler(data?.payload as UpdateStatusResult) - }) -} - -/** - * Install the update if there's one available. - * @example - * ```typescript - * import { checkUpdate, installUpdate } from '@tauri-apps/api/updater'; - * const update = await checkUpdate(); - * if (update.shouldUpdate) { - * console.log(`Installing update ${update.manifest?.version}, ${update.manifest?.date}, ${update.manifest.body}`); - * await installUpdate(); - * } - * ``` - * - * @return A promise indicating the success or failure of the operation. - * - * @since 1.0.0 - */ -async function installUpdate(): Promise { - let unlistenerFn: UnlistenFn | undefined - - function cleanListener(): void { - if (unlistenerFn) { - unlistenerFn() - } - unlistenerFn = undefined - } - - return new Promise((resolve, reject) => { - function onStatusChange(statusResult: UpdateStatusResult): void { - if (statusResult.error) { - cleanListener() - reject(statusResult.error) - return - } - - // install complete - if (statusResult.status === 'DONE') { - cleanListener() - resolve() - } - } - - // listen status change - onUpdaterEvent(onStatusChange) - .then((fn) => { - unlistenerFn = fn - }) - .catch((e) => { - cleanListener() - // dispatch the error to our checkUpdate - throw e - }) - - // start the process we dont require much security as it's - // handled by rust - emit(TauriEvent.INSTALL_UPDATE).catch((e) => { - cleanListener() - // dispatch the error to our checkUpdate - throw e - }) - }) -} - -/** - * Checks if an update is available. - * @example - * ```typescript - * import { checkUpdate } from '@tauri-apps/api/updater'; - * const update = await checkUpdate(); - * // now run installUpdate() if needed - * ``` - * - * @return Promise resolving to the update status. - * - * @since 1.0.0 - */ -async function checkUpdate(): Promise { - let unlistenerFn: UnlistenFn | undefined - - function cleanListener(): void { - if (unlistenerFn) { - unlistenerFn() - } - unlistenerFn = undefined - } - - return new Promise((resolve, reject) => { - function onUpdateAvailable(manifest: UpdateManifest): void { - cleanListener() - resolve({ - manifest, - shouldUpdate: true - }) - } - - function onStatusChange(statusResult: UpdateStatusResult): void { - if (statusResult.error) { - cleanListener() - reject(statusResult.error) - return - } - - if (statusResult.status === 'UPTODATE') { - cleanListener() - resolve({ - shouldUpdate: false - }) - } - } - - // wait to receive the latest update - once(TauriEvent.UPDATE_AVAILABLE, (data: { payload: any }) => { - onUpdateAvailable(data?.payload as UpdateManifest) - }).catch((e) => { - cleanListener() - // dispatch the error to our checkUpdate - throw e - }) - - // listen status change - onUpdaterEvent(onStatusChange) - .then((fn) => { - unlistenerFn = fn - }) - .catch((e) => { - cleanListener() - // dispatch the error to our checkUpdate - throw e - }) - - // start the process - emit(TauriEvent.CHECK_UPDATE).catch((e) => { - cleanListener() - // dispatch the error to our checkUpdate - throw e - }) - }) -} - -export type { UpdateStatus, UpdateStatusResult, UpdateManifest, UpdateResult } - -export { onUpdaterEvent, installUpdate, checkUpdate } diff --git a/tooling/bench/tests/cpu_intensive/src-tauri/tauri.conf.json b/tooling/bench/tests/cpu_intensive/src-tauri/tauri.conf.json index 7241cb0e206..c6578efad51 100644 --- a/tooling/bench/tests/cpu_intensive/src-tauri/tauri.conf.json +++ b/tooling/bench/tests/cpu_intensive/src-tauri/tauri.conf.json @@ -47,9 +47,6 @@ ], "security": { "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self'" - }, - "updater": { - "active": false } } -} +} \ No newline at end of file diff --git a/tooling/bench/tests/files_transfer/src-tauri/tauri.conf.json b/tooling/bench/tests/files_transfer/src-tauri/tauri.conf.json index a9765df297d..3fb573e3750 100644 --- a/tooling/bench/tests/files_transfer/src-tauri/tauri.conf.json +++ b/tooling/bench/tests/files_transfer/src-tauri/tauri.conf.json @@ -37,7 +37,9 @@ "all": false, "fs": { "readFile": true, - "scope": ["$HOME/.tauri_3mb.json"] + "scope": [ + "$HOME/.tauri_3mb.json" + ] } }, "windows": [ @@ -51,9 +53,6 @@ ], "security": { "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self'" - }, - "updater": { - "active": false } } -} +} \ No newline at end of file diff --git a/tooling/bench/tests/helloworld/src-tauri/tauri.conf.json b/tooling/bench/tests/helloworld/src-tauri/tauri.conf.json index 7241cb0e206..c6578efad51 100644 --- a/tooling/bench/tests/helloworld/src-tauri/tauri.conf.json +++ b/tooling/bench/tests/helloworld/src-tauri/tauri.conf.json @@ -47,9 +47,6 @@ ], "security": { "csp": "default-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self'" - }, - "updater": { - "active": false } } -} +} \ No newline at end of file diff --git a/tooling/cli/templates/tauri.conf.json b/tooling/cli/templates/tauri.conf.json index 07f87c32650..af2bebd2d74 100644 --- a/tooling/cli/templates/tauri.conf.json +++ b/tooling/cli/templates/tauri.conf.json @@ -43,9 +43,6 @@ "timestampUrl": "" } }, - "updater": { - "active": false - }, "allowlist": { "all": false }, @@ -62,4 +59,4 @@ "csp": null } } -} +} \ No newline at end of file