diff --git a/.changes/move-shell.md b/.changes/move-shell.md new file mode 100644 index 00000000000..a9316c71633 --- /dev/null +++ b/.changes/move-shell.md @@ -0,0 +1,8 @@ +--- +"api": patch +"tauri": patch +"tauri-codegen": patch +"tauri-macros": patch +--- + +Moved the `shell` functionality to its own plugin in the plugins-workspace repository. diff --git a/.changes/process-mod-refactor.md b/.changes/process-mod-refactor.md new file mode 100644 index 00000000000..9da8b61efeb --- /dev/null +++ b/.changes/process-mod-refactor.md @@ -0,0 +1,5 @@ +--- +"tauri": patch +--- + +Moved the `tauri::api::process` module to `tauri::process`. diff --git a/core/tauri-codegen/Cargo.toml b/core/tauri-codegen/Cargo.toml index dd2cfd36545..692d2975cac 100644 --- a/core/tauri-codegen/Cargo.toml +++ b/core/tauri-codegen/Cargo.toml @@ -23,7 +23,6 @@ tauri-utils = { version = "2.0.0-alpha.4", path = "../tauri-utils", features = [ thiserror = "1" walkdir = "2" brotli = { version = "3", optional = true, default-features = false, features = [ "std" ] } -regex = { version = "1.7.1", optional = true } uuid = { version = "1", features = [ "v4" ] } semver = "1" ico = "0.3" @@ -39,6 +38,5 @@ time = { version = "0.3", features = [ "parsing", "formatting" ] } default = [ "compression" ] compression = [ "brotli", "tauri-utils/compression" ] isolation = [ "tauri-utils/isolation" ] -shell-scope = [ "regex" ] config-json5 = [ "tauri-utils/config-json5" ] config-toml = [ "tauri-utils/config-toml" ] diff --git a/core/tauri-codegen/src/context.rs b/core/tauri-codegen/src/context.rs index 643ada6a8fe..4861d4728ca 100644 --- a/core/tauri-codegen/src/context.rs +++ b/core/tauri-codegen/src/context.rs @@ -16,9 +16,6 @@ use tauri_utils::html::{ inject_nonce_token, parse as parse_html, serialize_node as serialize_html_node, }; -#[cfg(feature = "shell-scope")] -use tauri_utils::config::{ShellAllowedArg, ShellAllowedArgs, ShellAllowlistScope}; - use crate::embedded_assets::{AssetOptions, CspHashes, EmbeddedAssets, EmbeddedAssetsError}; /// Necessary data needed by [`context_codegen`] to generate code for a Tauri application context. @@ -424,38 +421,6 @@ pub fn context_codegen(data: ContextData) -> Result quote!(#root::ShellScopeConfig::new().skip_validation()), - ShellAllowlistOpen::Flag(true) => quote!(#root::ShellScopeConfig::new()), - ShellAllowlistOpen::Validate(regex) => match Regex::new(regex) { - Ok(_) => { - quote!(#root::ShellScopeConfig::with_validator(#root::regex::Regex::new(#regex).unwrap())) - } - Err(error) => { - let error = error.to_string(); - quote!({ - compile_error!(#error); - #root::ShellScopeConfig::with_validator(#root::regex::Regex::new(#regex).unwrap()) - }) - } - }, - _ => panic!("unknown shell open format, unable to prepare"), - }; - let shell_scope = quote!(#shell_scope_constructor.set_allowed_commands(#shell_scopes)); - - quote!(context.set_shell_scope(#shell_scope);) - }; - - #[cfg(not(feature = "shell-scope"))] - let with_shell_scope_code = quote!(); - Ok(quote!({ #[allow(unused_mut, clippy::let_and_return)] let mut context = #root::Context::new( @@ -468,7 +433,6 @@ pub fn context_codegen(data: ContextData) -> Result bool>( .unwrap_or_else(|| default.to_string()); config_parent.join(icon_path) } - -#[cfg(feature = "shell-scope")] -fn get_allowed_clis(root: &TokenStream, scope: &ShellAllowlistScope) -> TokenStream { - let commands = scope - .0 - .iter() - .map(|scope| { - let sidecar = &scope.sidecar; - - let name = &scope.name; - let name = quote!(#name.into()); - - let command = scope.command.to_string_lossy(); - let command = quote!(::std::path::PathBuf::from(#command)); - - let args = match &scope.args { - ShellAllowedArgs::Flag(true) => quote!(::std::option::Option::None), - ShellAllowedArgs::Flag(false) => quote!(::std::option::Option::Some(::std::vec![])), - ShellAllowedArgs::List(list) => { - let list = list.iter().map(|arg| match arg { - ShellAllowedArg::Fixed(fixed) => { - quote!(#root::scope::ShellScopeAllowedArg::Fixed(#fixed.into())) - } - ShellAllowedArg::Var { validator } => { - let validator = match regex::Regex::new(validator) { - Ok(regex) => { - let regex = regex.as_str(); - quote!(#root::regex::Regex::new(#regex).unwrap()) - } - Err(error) => { - let error = error.to_string(); - quote!({ - compile_error!(#error); - #root::regex::Regex::new(#validator).unwrap() - }) - } - }; - - quote!(#root::scope::ShellScopeAllowedArg::Var { validator: #validator }) - } - _ => panic!("unknown shell scope arg, unable to prepare"), - }); - - quote!(::std::option::Option::Some(::std::vec![#(#list),*])) - } - _ => panic!("unknown shell scope command, unable to prepare"), - }; - - ( - quote!(#name), - quote!( - #root::scope::ShellScopeAllowedCommand { - command: #command, - args: #args, - sidecar: #sidecar, - } - ), - ) - }) - .collect::>(); - - if commands.is_empty() { - quote!(::std::collections::HashMap::new()) - } else { - let insertions = commands - .iter() - .map(|(name, value)| quote!(hashmap.insert(#name, #value);)); - - quote!({ - let mut hashmap = ::std::collections::HashMap::new(); - #(#insertions)* - hashmap - }) - } -} diff --git a/core/tauri-macros/Cargo.toml b/core/tauri-macros/Cargo.toml index fe68a3f0895..5661af4967f 100644 --- a/core/tauri-macros/Cargo.toml +++ b/core/tauri-macros/Cargo.toml @@ -27,6 +27,5 @@ tauri-utils = { version = "2.0.0-alpha.4", path = "../tauri-utils" } custom-protocol = [ ] compression = [ "tauri-codegen/compression" ] isolation = [ "tauri-codegen/isolation" ] -shell-scope = [ "tauri-codegen/shell-scope" ] config-json5 = [ "tauri-codegen/config-json5", "tauri-utils/config-json5" ] config-toml = [ "tauri-codegen/config-toml", "tauri-utils/config-toml" ] diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 15325f50c19..98c89bba7f4 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -63,14 +63,10 @@ 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" ] } -open = { version = "3.0", optional = true } -shared_child = { version = "1.0", optional = true } -os_pipe = { version = "1.0", optional = true } raw-window-handle = "0.5" minisign-verify = { version = "0.2", optional = true } time = { version = "0.3", features = [ "parsing", "formatting" ], optional = true } os_info = { version = "3", optional = true } -regex = { version = "1.6.0", optional = true } glob = "0.3" data-url = { version = "0.2", optional = true } serialize-to-javascript = "=0.1.1" @@ -141,12 +137,10 @@ updater = [ "dialog-ask", "fs-extract-api" ] -shell-open-api = [ "open", "regex", "tauri-macros/shell-scope" ] fs-extract-api = [ "zip" ] native-tls = [ "reqwest/native-tls" ] native-tls-vendored = [ "reqwest/native-tls-vendored" ] rustls-tls = [ "reqwest/rustls-tls" ] -process-command-api = [ "shared_child", "os_pipe" ] system-tray = [ "tauri-runtime/system-tray", "tauri-runtime-wry/system-tray" ] devtools = [ "tauri-runtime/devtools", "tauri-runtime-wry/devtools" ] dox = [ "tauri-runtime-wry/dox" ] @@ -212,9 +206,9 @@ process-relaunch-dangerous-allow-symlink-macos = [ "tauri-utils/process-relaunch protocol-all = [ "protocol-asset" ] protocol-asset = [ ] shell-all = [ "shell-execute", "shell-sidecar", "shell-open" ] -shell-execute = [ "process-command-api", "regex", "tauri-macros/shell-scope" ] -shell-sidecar = [ "process-command-api", "regex", "tauri-macros/shell-scope" ] -shell-open = [ "shell-open-api" ] +shell-execute = [ ] +shell-sidecar = [ ] +shell-open = [ ] window-all = [ "window-create", "window-center", diff --git a/core/tauri/build.rs b/core/tauri/build.rs index ddbe073ef79..36562810582 100644 --- a/core/tauri/build.rs +++ b/core/tauri/build.rs @@ -108,10 +108,6 @@ fn main() { ); alias_module("shell", &["execute", "sidecar", "open"], api_all); - // helper for the command module macro - let shell_script = has_feature("shell-execute") || has_feature("shell-sidecar"); - alias("shell_script", shell_script); - alias("shell_scope", has_feature("shell-open-api") || shell_script); if !mobile { alias_module( diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index ded52f4db52..d60c4c3b6cc 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,6 +1,5 @@ -"use strict";var __TAURI_IIFE__=(()=>{var D=Object.defineProperty;var Y=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var X=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var t in e)D(n,t,{get:e[t],enumerable:!0})},B=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of J(e))!X.call(n,s)&&s!==t&&D(n,s,{get:()=>e[s],enumerable:!(r=Y(e,s))||r.enumerable});return n};var ee=n=>B(D({},"__esModule",{value:!0}),n);var rt={};c(rt,{app:()=>S,event:()=>k,invoke:()=>it,os:()=>j,path:()=>I,process:()=>R,shell:()=>N,tauri:()=>x,updater:()=>z,window:()=>G});var S={};c(S,{getName:()=>re,getTauriVersion:()=>ae,getVersion:()=>ie,hide:()=>oe,show:()=>se});var x={};c(x,{convertFileSrc:()=>ne,invoke:()=>o,transformCallback:()=>p});function te(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function p(n,e=!1){let t=te(),r=`_${t}`;return Object.defineProperty(window,r,{value:s=>(e&&Reflect.deleteProperty(window,r),n?.(s)),writable:!1,configurable:!0}),t}async function o(n,e={}){return new Promise((t,r)=>{let s=p(d=>{t(d),Reflect.deleteProperty(window,`_${l}`)},!0),l=p(d=>{r(d),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:n,callback:s,error:l,...e})})}function ne(n,e="asset"){let t=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${t}`:`${e}://localhost/${t}`}async function i(n){return o("tauri",n)}async function ie(){return i({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function re(){return i({__tauriModule:"App",message:{cmd:"getAppName"}})}async function ae(){return i({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function se(){return i({__tauriModule:"App",message:{cmd:"show"}})}async function oe(){return i({__tauriModule:"App",message:{cmd:"hide"}})}var k={};c(k,{TauriEvent:()=>v,emit:()=>E,listen:()=>L,once:()=>U});async function $(n,e){return i({__tauriModule:"Event",message:{cmd:"unlisten",event:n,eventId:e}})}async function w(n,e,t){await i({__tauriModule:"Event",message:{cmd:"emit",event:n,windowLabel:e,payload:t}})}async function _(n,e,t){return i({__tauriModule:"Event",message:{cmd:"listen",event:n,windowLabel:e,handler:p(t)}}).then(r=>async()=>$(n,r))}async function P(n,e,t){return _(n,e,r=>{t(r),$(n,r.id).catch(()=>{})})}var v=(u=>(u.WINDOW_RESIZED="tauri://resize",u.WINDOW_MOVED="tauri://move",u.WINDOW_CLOSE_REQUESTED="tauri://close-requested",u.WINDOW_CREATED="tauri://window-created",u.WINDOW_DESTROYED="tauri://destroyed",u.WINDOW_FOCUS="tauri://focus",u.WINDOW_BLUR="tauri://blur",u.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",u.WINDOW_THEME_CHANGED="tauri://theme-changed",u.WINDOW_FILE_DROP="tauri://file-drop",u.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",u.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",u.MENU="tauri://menu",u.CHECK_UPDATE="tauri://update",u.UPDATE_AVAILABLE="tauri://update-available",u.INSTALL_UPDATE="tauri://update-install",u.STATUS_UPDATE="tauri://update-status",u.DOWNLOAD_PROGRESS="tauri://update-download-progress",u))(v||{});async function L(n,e){return _(n,null,e)}async function U(n,e){return P(n,null,e)}async function E(n,e){return w(n,void 0,e)}var I={};c(I,{BaseDirectory:()=>q,appCacheDir:()=>me,appConfigDir:()=>de,appDataDir:()=>ue,appLocalDataDir:()=>ce,appLogDir:()=>xe,audioDir:()=>pe,basename:()=>Fe,cacheDir:()=>ye,configDir:()=>ge,dataDir:()=>he,delimiter:()=>Le,desktopDir:()=>be,dirname:()=>Re,documentDir:()=>_e,downloadDir:()=>fe,executableDir:()=>we,extname:()=>Ne,fontDir:()=>Pe,homeDir:()=>ve,isAbsolute:()=>ze,join:()=>Ie,localDataDir:()=>Ee,normalize:()=>ke,pictureDir:()=>Oe,publicDir:()=>We,resolve:()=>Ue,resolveResource:()=>Ce,resourceDir:()=>Me,runtimeDir:()=>Ae,sep:()=>Se,templateDir:()=>Te,videoDir:()=>De});function f(){return navigator.appVersion.includes("Win")}var q=(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))(q||{});async function de(){return o("plugin:path|resolve_directory",{directory:13})}async function ue(){return o("plugin:path|resolve_directory",{directory:14})}async function ce(){return o("plugin:path|resolve_directory",{directory:15})}async function me(){return o("plugin:path|resolve_directory",{directory:16})}async function pe(){return o("plugin:path|resolve_directory",{directory:1})}async function ye(){return o("plugin:path|resolve_directory",{directory:2})}async function ge(){return o("plugin:path|resolve_directory",{directory:3})}async function he(){return o("plugin:path|resolve_directory",{directory:4})}async function be(){return o("plugin:path|resolve_directory",{directory:18})}async function _e(){return o("plugin:path|resolve_directory",{directory:6})}async function fe(){return o("plugin:path|resolve_directory",{directory:7})}async function we(){return o("plugin:path|resolve_directory",{directory:19})}async function Pe(){return o("plugin:path|resolve_directory",{directory:20})}async function ve(){return o("plugin:path|resolve_directory",{directory:21})}async function Ee(){return o("plugin:path|resolve_directory",{directory:5})}async function Oe(){return o("plugin:path|resolve_directory",{directory:8})}async function We(){return o("plugin:path|resolve_directory",{directory:9})}async function Me(){return o("plugin:path|resolve_directory",{directory:11})}async function Ce(n){return o("plugin:path|resolve_directory",{directory:11,path:n})}async function Ae(){return o("plugin:path|resolve_directory",{directory:22})}async function Te(){return o("plugin:path|resolve_directory",{directory:23})}async function De(){return o("plugin:path|resolve_directory",{directory:10})}async function xe(){return o("plugin:path|resolve_directory",{directory:17})}var Se=f()?"\\":"/",Le=f()?";":":";async function Ue(...n){return o("plugin:path|resolve",{paths:n})}async function ke(n){return o("plugin:path|normalize",{path:n})}async function Ie(...n){return o("plugin:path|join",{paths:n})}async function Re(n){return o("plugin:path|dirname",{path:n})}async function Ne(n){return o("plugin:path|extname",{path:n})}async function Fe(n,e){return o("plugin:path|basename",{path:n,ext:e})}async function ze(n){return o("plugin:path|isAbsolute",{path:n})}var R={};c(R,{exit:()=>Ve,relaunch:()=>He});async function Ve(n=0){return i({__tauriModule:"Process",message:{cmd:"exit",exitCode:n}})}async function He(){return i({__tauriModule:"Process",message:{cmd:"relaunch"}})}var N={};c(N,{Child:()=>O,Command:()=>g,EventEmitter:()=>y,open:()=>je});async function Ge(n,e,t=[],r){return typeof t=="object"&&Object.freeze(t),i({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:t,options:r,onEventFn:p(n)}})}var y=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let r=s=>{this.removeListener(e,r),t(s)};return this.addListener(e,r)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(r=>r!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){let r=this.eventListeners[e];for(let s of r)s(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let r=s=>{this.removeListener(e,r),t(s)};return this.prependListener(e,r)}},O=class{constructor(e){this.pid=e}async write(e){return i({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return i({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},g=class extends y{constructor(t,r=[],s){super();this.stdout=new y;this.stderr=new y;this.program=t,this.args=typeof r=="string"?[r]:r,this.options=s??{}}static create(t,r=[],s){return new g(t,r,s)}static sidecar(t,r=[],s){let l=new g(t,r,s);return l.options.sidecar=!0,l}async spawn(){return Ge(t=>{switch(t.event){case"Error":this.emit("error",t.payload);break;case"Terminated":this.emit("close",t.payload);break;case"Stdout":this.stdout.emit("data",t.payload);break;case"Stderr":this.stderr.emit("data",t.payload);break}},this.program,this.args,this.options).then(t=>new O(t))}async execute(){return new Promise((t,r)=>{this.on("error",r);let s=[],l=[];this.stdout.on("data",d=>{s.push(d)}),this.stderr.on("data",d=>{l.push(d)}),this.on("close",d=>{t({code:d.code,signal:d.signal,stdout:this.collectOutput(s),stderr:this.collectOutput(l)})}),this.spawn().catch(r)})}collectOutput(t){return this.options.encoding==="raw"?t.reduce((r,s)=>new Uint8Array([...r,...s,10]),new Uint8Array):t.join(` -`)}};async function je(n,e){return i({__tauriModule:"Shell",message:{cmd:"open",path:n,with:e}})}var z={};c(z,{checkUpdate:()=>qe,installUpdate:()=>$e,onUpdaterEvent:()=>F});async function F(n){return L("tauri://update-status",e=>{n(e?.payload)})}async function $e(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(l){if(l.error){e(),r(l.error);return}l.status==="DONE"&&(e(),t())}F(s).then(l=>{n=l}).catch(l=>{throw e(),l}),E("tauri://update-install").catch(l=>{throw e(),l})})}async function qe(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(d){e(),t({manifest:d,shouldUpdate:!0})}function l(d){if(d.error){e(),r(d.error);return}d.status==="UPTODATE"&&(e(),t({shouldUpdate:!1}))}U("tauri://update-available",d=>{s(d?.payload)}).catch(d=>{throw e(),d}),F(l).then(d=>{n=d}).catch(d=>{throw e(),d}),E("tauri://update").catch(d=>{throw e(),d})})}var G={};c(G,{CloseRequestedEvent:()=>T,LogicalPosition:()=>M,LogicalSize:()=>W,PhysicalPosition:()=>b,PhysicalSize:()=>h,UserAttentionType:()=>Q,WebviewWindow:()=>m,WebviewWindowHandle:()=>C,WindowManager:()=>A,appWindow:()=>V,availableMonitors:()=>Ye,currentMonitor:()=>Qe,getAll:()=>Z,getCurrent:()=>Ke,primaryMonitor:()=>Ze});var W=class{constructor(e,t){this.type="Logical";this.width=e,this.height=t}},h=class{constructor(e,t){this.type="Physical";this.width=e,this.height=t}toLogical(e){return new W(this.width/e,this.height/e)}},M=class{constructor(e,t){this.type="Logical";this.x=e,this.y=t}},b=class{constructor(e,t){this.type="Physical";this.x=e,this.y=t}toLogical(e){return new M(this.x/e,this.y/e)}},Q=(t=>(t[t.Critical=1]="Critical",t[t.Informational=2]="Informational",t))(Q||{});function Ke(){return new m(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Z(){return window.__TAURI_METADATA__.__windows.map(n=>new m(n.label,{skip:!0}))}var K=["tauri://created","tauri://error"],C=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):_(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(t),1)}):P(e,this.label,t)}async emit(e,t){if(K.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return w(e,this.label,t)}_handleTauriEvent(e,t){return K.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},A=class extends C{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 b(e,t))}async outerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new b(e,t))}async innerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new h(e,t))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new h(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",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let r=new T(t);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",s=>{e({...s,payload:!0})}),r=await this.listen("tauri://blur",s=>{e({...s,payload:!1})});return()=>{t(),r()}}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",l=>{e({...l,payload:{type:"drop",paths:l.payload}})}),r=await this.listen("tauri://file-drop-hover",l=>{e({...l,payload:{type:"hover",paths:l.payload}})}),s=await this.listen("tauri://file-drop-cancelled",l=>{e({...l,payload:{type:"cancel"}})});return()=>{t(),r(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},T=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}},m=class extends A{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 r=>this.emit("tauri://error",r))}static getByLabel(e){return Z().some(t=>t.label===e)?new m(e,{skip:!0}):null}},V;"__TAURI_METADATA__"in window?V=new m(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.`),V=new m("main",{skip:!0}));function H(n){return n===null?null:{name:n.name,scaleFactor:n.scaleFactor,position:new b(n.position.x,n.position.y),size:new h(n.size.width,n.size.height)}}async function Qe(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(H)}async function Ze(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(H)}async function Ye(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(n=>n.map(H))}var j={};c(j,{EOL:()=>Je,arch:()=>tt,platform:()=>Xe,tempdir:()=>nt,type:()=>et,version:()=>Be});var Je=f()?`\r +"use strict";var __TAURI_IIFE__=(()=>{var A=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var K=Object.getOwnPropertyNames;var Q=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var n in e)A(t,n,{get:e[n],enumerable:!0})},Z=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of K(e))!Q.call(t,l)&&l!==n&&A(t,l,{get:()=>e[l],enumerable:!(o=q(e,l))||o.enumerable});return t};var Y=t=>Z(A({},"__esModule",{value:!0}),t);var Xe={};c(Xe,{app:()=>C,event:()=>x,invoke:()=>Je,os:()=>N,path:()=>L,process:()=>O,tauri:()=>T,updater:()=>I,window:()=>z});var C={};c(C,{getName:()=>ee,getTauriVersion:()=>te,getVersion:()=>B,hide:()=>ie,show:()=>ne});var T={};c(T,{convertFileSrc:()=>X,invoke:()=>r,transformCallback:()=>g});function J(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function g(t,e=!1){let n=J(),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 X(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 B(){return i({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function ee(){return i({__tauriModule:"App",message:{cmd:"getAppName"}})}async function te(){return i({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function ne(){return i({__tauriModule:"App",message:{cmd:"show"}})}async function ie(){return i({__tauriModule:"App",message:{cmd:"hide"}})}var x={};c(x,{TauriEvent:()=>P,emit:()=>f,listen:()=>U,once:()=>S});async function V(t,e){return i({__tauriModule:"Event",message:{cmd:"unlisten",event:t,eventId:e}})}async function _(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()=>V(t,o))}async function w(t,e,n){return h(t,e,o=>{n(o),V(t,o.id).catch(()=>{})})}var P=(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))(P||{});async function U(t,e){return h(t,null,e)}async function S(t,e){return w(t,null,e)}async function f(t,e){return _(t,void 0,e)}var L={};c(L,{BaseDirectory:()=>H,appCacheDir:()=>le,appConfigDir:()=>re,appDataDir:()=>oe,appLocalDataDir:()=>se,appLogDir:()=>Ae,audioDir:()=>ue,basename:()=>Re,cacheDir:()=>de,configDir:()=>ce,dataDir:()=>me,delimiter:()=>Ce,desktopDir:()=>pe,dirname:()=>Le,documentDir:()=>ye,downloadDir:()=>ge,executableDir:()=>he,extname:()=>Oe,fontDir:()=>be,homeDir:()=>_e,isAbsolute:()=>Ie,join:()=>xe,localDataDir:()=>we,normalize:()=>Se,pictureDir:()=>Pe,publicDir:()=>fe,resolve:()=>Ue,resolveResource:()=>We,resourceDir:()=>ve,runtimeDir:()=>Me,sep:()=>Te,templateDir:()=>Ee,videoDir:()=>De});function b(){return navigator.appVersion.includes("Win")}var H=(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))(H||{});async function re(){return r("plugin:path|resolve_directory",{directory:13})}async function oe(){return r("plugin:path|resolve_directory",{directory:14})}async function se(){return r("plugin:path|resolve_directory",{directory:15})}async function le(){return r("plugin:path|resolve_directory",{directory:16})}async function ue(){return r("plugin:path|resolve_directory",{directory:1})}async function de(){return r("plugin:path|resolve_directory",{directory:2})}async function ce(){return r("plugin:path|resolve_directory",{directory:3})}async function me(){return r("plugin:path|resolve_directory",{directory:4})}async function pe(){return r("plugin:path|resolve_directory",{directory:18})}async function ye(){return r("plugin:path|resolve_directory",{directory:6})}async function ge(){return r("plugin:path|resolve_directory",{directory:7})}async function he(){return r("plugin:path|resolve_directory",{directory:19})}async function be(){return r("plugin:path|resolve_directory",{directory:20})}async function _e(){return r("plugin:path|resolve_directory",{directory:21})}async function we(){return r("plugin:path|resolve_directory",{directory:5})}async function Pe(){return r("plugin:path|resolve_directory",{directory:8})}async function fe(){return r("plugin:path|resolve_directory",{directory:9})}async function ve(){return r("plugin:path|resolve_directory",{directory:11})}async function We(t){return r("plugin:path|resolve_directory",{directory:11,path:t})}async function Me(){return r("plugin:path|resolve_directory",{directory:22})}async function Ee(){return r("plugin:path|resolve_directory",{directory:23})}async function De(){return r("plugin:path|resolve_directory",{directory:10})}async function Ae(){return r("plugin:path|resolve_directory",{directory:17})}var Te=b()?"\\":"/",Ce=b()?";":":";async function Ue(...t){return r("plugin:path|resolve",{paths:t})}async function Se(t){return r("plugin:path|normalize",{path:t})}async function xe(...t){return r("plugin:path|join",{paths:t})}async function Le(t){return r("plugin:path|dirname",{path:t})}async function Oe(t){return r("plugin:path|extname",{path:t})}async function Re(t,e){return r("plugin:path|basename",{path:t,ext:e})}async function Ie(t){return r("plugin:path|isAbsolute",{path:t})}var O={};c(O,{exit:()=>Fe,relaunch:()=>ke});async function Fe(t=0){return i({__tauriModule:"Process",message:{cmd:"exit",exitCode:t}})}async function ke(){return i({__tauriModule:"Process",message:{cmd:"relaunch"}})}var I={};c(I,{checkUpdate:()=>Ne,installUpdate:()=>ze,onUpdaterEvent:()=>R});async function R(t){return U("tauri://update-status",e=>{t(e?.payload)})}async function ze(){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())}R(l).then(s=>{t=s}).catch(s=>{throw e(),s}),f("tauri://update-install").catch(s=>{throw e(),s})})}async function Ne(){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}))}S("tauri://update-available",u=>{l(u?.payload)}).catch(u=>{throw e(),u}),R(s).then(u=>{t=u}).catch(u=>{throw e(),u}),f("tauri://update").catch(u=>{throw e(),u})})}var z={};c(z,{CloseRequestedEvent:()=>D,LogicalPosition:()=>W,LogicalSize:()=>v,PhysicalPosition:()=>y,PhysicalSize:()=>p,UserAttentionType:()=>$,WebviewWindow:()=>m,WebviewWindowHandle:()=>M,WindowManager:()=>E,appWindow:()=>F,availableMonitors:()=>$e,currentMonitor:()=>He,getAll:()=>j,getCurrent:()=>Ve,primaryMonitor:()=>Ge});var v=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 v(this.width/e,this.height/e)}},W=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 W(this.x/e,this.y/e)}},$=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))($||{});function Ve(){return new m(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function j(){return window.__TAURI_METADATA__.__windows.map(t=>new m(t.label,{skip:!0}))}var G=["tauri://created","tauri://error"],M=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)}):w(e,this.label,n)}async emit(e,n){if(G.includes(e)){for(let o of this.listeners[e]||[])o({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return _(e,this.label,n)}_handleTauriEvent(e,n){return G.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}},E=class extends M{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",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let o=new D(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)}},D=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}},m=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 j().some(n=>n.label===e)?new m(e,{skip:!0}):null}},F;"__TAURI_METADATA__"in window?F=new m(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.`),F=new m("main",{skip:!0}));function k(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:new y(t.position.x,t.position.y),size:new p(t.size.width,t.size.height)}}async function He(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(k)}async function Ge(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(k)}async function $e(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(t=>t.map(k))}var N={};c(N,{EOL:()=>je,arch:()=>Ze,platform:()=>qe,tempdir:()=>Ye,type:()=>Qe,version:()=>Ke});var je=b()?`\r `:` -`;async function Xe(){return i({__tauriModule:"Os",message:{cmd:"platform"}})}async function Be(){return i({__tauriModule:"Os",message:{cmd:"version"}})}async function et(){return i({__tauriModule:"Os",message:{cmd:"osType"}})}async function tt(){return i({__tauriModule:"Os",message:{cmd:"arch"}})}async function nt(){return i({__tauriModule:"Os",message:{cmd:"tempdir"}})}var it=o;return ee(rt);})(); +`;async function qe(){return i({__tauriModule:"Os",message:{cmd:"platform"}})}async function Ke(){return i({__tauriModule:"Os",message:{cmd:"version"}})}async function Qe(){return i({__tauriModule:"Os",message:{cmd:"osType"}})}async function Ze(){return i({__tauriModule:"Os",message:{cmd:"arch"}})}async function Ye(){return i({__tauriModule:"Os",message:{cmd:"tempdir"}})}var Je=r;return Y(Xe);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/api/mod.rs b/core/tauri/src/api/mod.rs index b7eb7d6963f..f3d24f4c39b 100644 --- a/core/tauri/src/api/mod.rs +++ b/core/tauri/src/api/mod.rs @@ -7,10 +7,6 @@ pub mod dir; pub mod file; pub mod ipc; -pub mod process; -#[cfg(feature = "shell-open-api")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "shell-open-api")))] -pub mod shell; pub mod version; mod error; diff --git a/core/tauri/src/api/process/command.rs b/core/tauri/src/api/process/command.rs deleted file mode 100644 index 25605c747e0..00000000000 --- a/core/tauri/src/api/process/command.rs +++ /dev/null @@ -1,531 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -use std::{ - collections::HashMap, - io::{BufReader, Write}, - path::PathBuf, - process::{Command as StdCommand, Stdio}, - sync::{Arc, Mutex, RwLock}, - thread::spawn, -}; - -#[cfg(unix)] -use std::os::unix::process::ExitStatusExt; -#[cfg(windows)] -use std::os::windows::process::CommandExt; - -#[cfg(windows)] -const CREATE_NO_WINDOW: u32 = 0x0800_0000; -const NEWLINE_BYTE: u8 = b'\n'; - -use crate::async_runtime::{block_on as block_on_task, channel, Receiver, Sender}; - -pub use encoding_rs::Encoding; -use os_pipe::{pipe, PipeReader, PipeWriter}; -use serde::Serialize; -use shared_child::SharedChild; -use tauri_utils::platform; - -type ChildStore = Arc>>>; - -fn commands() -> &'static ChildStore { - use once_cell::sync::Lazy; - static STORE: Lazy = Lazy::new(Default::default); - &STORE -} - -/// Kills all child processes created with [`Command`]. -/// By default it's called before the [`crate::App`] exits. -pub fn kill_children() { - let commands = commands().lock().unwrap(); - let children = commands.values(); - for child in children { - let _ = child.kill(); - } -} - -/// Payload for the [`CommandEvent::Terminated`] command event. -#[derive(Debug, Clone, Serialize)] -pub struct TerminatedPayload { - /// Exit code of the process. - pub code: Option, - /// If the process was terminated by a signal, represents that signal. - pub signal: Option, -} - -/// A event sent to the command callback. -#[derive(Debug, Clone)] -#[non_exhaustive] -pub enum CommandEvent { - /// Stderr bytes until a newline (\n) or carriage return (\r) is found. - Stderr(Vec), - /// Stdout bytes until a newline (\n) or carriage return (\r) is found. - Stdout(Vec), - /// An error happened waiting for the command to finish or converting the stdout/stderr bytes to an UTF-8 string. - Error(String), - /// Command process terminated. - Terminated(TerminatedPayload), -} - -/// The type to spawn commands. -#[derive(Debug)] -pub struct Command { - program: String, - args: Vec, - env_clear: bool, - env: HashMap, - current_dir: Option, -} - -/// Spawned child process. -#[derive(Debug)] -pub struct CommandChild { - inner: Arc, - stdin_writer: PipeWriter, -} - -impl CommandChild { - /// Writes to process stdin. - pub fn write(&mut self, buf: &[u8]) -> crate::api::Result<()> { - self.stdin_writer.write_all(buf)?; - Ok(()) - } - - /// Sends a kill signal to the child. - pub fn kill(self) -> crate::api::Result<()> { - self.inner.kill()?; - Ok(()) - } - - /// Returns the process pid. - pub fn pid(&self) -> u32 { - self.inner.id() - } -} - -/// Describes the result of a process after it has terminated. -#[derive(Debug)] -pub struct ExitStatus { - code: Option, -} - -impl ExitStatus { - /// Returns the exit code of the process, if any. - pub fn code(&self) -> Option { - self.code - } - - /// Returns true if exit status is zero. Signal termination is not considered a success, and success is defined as a zero exit status. - pub fn success(&self) -> bool { - self.code == Some(0) - } -} - -/// The output of a finished process. -#[derive(Debug)] -pub struct Output { - /// The status (exit code) of the process. - pub status: ExitStatus, - /// The data that the process wrote to stdout. - pub stdout: Vec, - /// The data that the process wrote to stderr. - pub stderr: Vec, -} - -fn relative_command_path(command: String) -> crate::Result { - match platform::current_exe()?.parent() { - #[cfg(windows)] - Some(exe_dir) => Ok(format!("{}\\{command}.exe", exe_dir.display())), - #[cfg(not(windows))] - Some(exe_dir) => Ok(format!("{}/{command}", exe_dir.display())), - None => Err(crate::api::Error::Command("Could not evaluate executable dir".to_string()).into()), - } -} - -impl From for StdCommand { - fn from(cmd: Command) -> StdCommand { - let mut command = StdCommand::new(cmd.program); - command.args(cmd.args); - command.stdout(Stdio::piped()); - command.stdin(Stdio::piped()); - command.stderr(Stdio::piped()); - if cmd.env_clear { - command.env_clear(); - } - command.envs(cmd.env); - if let Some(current_dir) = cmd.current_dir { - command.current_dir(current_dir); - } - #[cfg(windows)] - command.creation_flags(CREATE_NO_WINDOW); - command - } -} - -impl Command { - /// Creates a new Command for launching the given program. - pub fn new>(program: S) -> Self { - Self { - program: program.into(), - args: Default::default(), - env_clear: false, - env: Default::default(), - current_dir: None, - } - } - - /// Creates a new Command for launching the given sidecar program. - /// - /// A sidecar program is a embedded external binary in order to make your application work - /// or to prevent users having to install additional dependencies (e.g. Node.js, Python, etc). - pub fn new_sidecar>(program: S) -> crate::Result { - Ok(Self::new(relative_command_path(program.into())?)) - } - - /// Appends arguments to the command. - #[must_use] - pub fn args(mut self, args: I) -> Self - where - I: IntoIterator, - S: AsRef, - { - for arg in args { - self.args.push(arg.as_ref().to_string()); - } - self - } - - /// Clears the entire environment map for the child process. - #[must_use] - pub fn env_clear(mut self) -> Self { - self.env_clear = true; - self - } - - /// Adds or updates multiple environment variable mappings. - #[must_use] - pub fn envs(mut self, env: HashMap) -> Self { - self.env = env; - self - } - - /// Sets the working directory for the child process. - #[must_use] - pub fn current_dir(mut self, current_dir: PathBuf) -> Self { - self.current_dir.replace(current_dir); - self - } - - /// Spawns the command. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::process::{Command, CommandEvent}; - /// tauri::async_runtime::spawn(async move { - /// let (mut rx, mut child) = Command::new("cargo") - /// .args(["tauri", "dev"]) - /// .spawn() - /// .expect("Failed to spawn cargo"); - /// - /// let mut i = 0; - /// while let Some(event) = rx.recv().await { - /// if let CommandEvent::Stdout(line) = event { - /// println!("got: {}", String::from_utf8(line).unwrap()); - /// i += 1; - /// if i == 4 { - /// child.write("message from Rust\n".as_bytes()).unwrap(); - /// i = 0; - /// } - /// } - /// } - /// }); - /// ``` - pub fn spawn(self) -> crate::api::Result<(Receiver, CommandChild)> { - let mut command: StdCommand = self.into(); - let (stdout_reader, stdout_writer) = pipe()?; - let (stderr_reader, stderr_writer) = pipe()?; - let (stdin_reader, stdin_writer) = pipe()?; - command.stdout(stdout_writer); - command.stderr(stderr_writer); - command.stdin(stdin_reader); - - let shared_child = SharedChild::spawn(&mut command)?; - let child = Arc::new(shared_child); - let child_ = child.clone(); - let guard = Arc::new(RwLock::new(())); - - commands().lock().unwrap().insert(child.id(), child.clone()); - - let (tx, rx) = channel(1); - - spawn_pipe_reader( - tx.clone(), - guard.clone(), - stdout_reader, - CommandEvent::Stdout, - ); - spawn_pipe_reader( - tx.clone(), - guard.clone(), - stderr_reader, - CommandEvent::Stderr, - ); - - spawn(move || { - let _ = match child_.wait() { - Ok(status) => { - let _l = guard.write().unwrap(); - commands().lock().unwrap().remove(&child_.id()); - block_on_task(async move { - tx.send(CommandEvent::Terminated(TerminatedPayload { - code: status.code(), - #[cfg(windows)] - signal: None, - #[cfg(unix)] - signal: status.signal(), - })) - .await - }) - } - Err(e) => { - let _l = guard.write().unwrap(); - block_on_task(async move { tx.send(CommandEvent::Error(e.to_string())).await }) - } - }; - }); - - Ok(( - rx, - CommandChild { - inner: child, - stdin_writer, - }, - )) - } - - /// Executes a command as a child process, waiting for it to finish and collecting its exit status. - /// Stdin, stdout and stderr are ignored. - /// - /// # Examples - /// ```rust,no_run - /// use tauri::api::process::Command; - /// let status = Command::new("which").args(["ls"]).status().unwrap(); - /// println!("`which` finished with status: {:?}", status.code()); - /// ``` - pub fn status(self) -> crate::api::Result { - let (mut rx, _child) = self.spawn()?; - let code = crate::async_runtime::safe_block_on(async move { - let mut code = None; - #[allow(clippy::collapsible_match)] - while let Some(event) = rx.recv().await { - if let CommandEvent::Terminated(payload) = event { - code = payload.code; - } - } - code - }); - Ok(ExitStatus { code }) - } - - /// Executes the command as a child process, waiting for it to finish and collecting all of its output. - /// Stdin is ignored. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::process::Command; - /// let output = Command::new("echo").args(["TAURI"]).output().unwrap(); - /// assert!(output.status.success()); - /// assert_eq!(String::from_utf8(output.stdout).unwrap(), "TAURI"); - /// ``` - pub fn output(self) -> crate::api::Result { - let (mut rx, _child) = self.spawn()?; - - let output = crate::async_runtime::safe_block_on(async move { - let mut code = None; - let mut stdout = Vec::new(); - let mut stderr = Vec::new(); - - while let Some(event) = rx.recv().await { - match event { - CommandEvent::Terminated(payload) => { - code = payload.code; - } - CommandEvent::Stdout(line) => { - stdout.extend(line); - stdout.push(NEWLINE_BYTE); - } - CommandEvent::Stderr(line) => { - stderr.extend(line); - stderr.push(NEWLINE_BYTE); - } - CommandEvent::Error(_) => {} - } - } - Output { - status: ExitStatus { code }, - stdout, - stderr, - } - }); - - Ok(output) - } -} - -fn spawn_pipe_reader) -> CommandEvent + Send + Copy + 'static>( - tx: Sender, - guard: Arc>, - pipe_reader: PipeReader, - wrapper: F, -) { - spawn(move || { - let _lock = guard.read().unwrap(); - let mut reader = BufReader::new(pipe_reader); - - loop { - let mut buf = Vec::new(); - match tauri_utils::io::read_line(&mut reader, &mut buf) { - Ok(n) => { - if n == 0 { - break; - } - let tx_ = tx.clone(); - let _ = block_on_task(async move { tx_.send(wrapper(buf)).await }); - } - Err(e) => { - let tx_ = tx.clone(); - let _ = block_on_task(async move { tx_.send(CommandEvent::Error(e.to_string())).await }); - } - } - } - }); -} - -// tests for the commands functions. -#[cfg(test)] -mod tests { - #[cfg(not(windows))] - use super::*; - - #[cfg(not(windows))] - #[test] - fn test_cmd_spawn_output() { - let cmd = Command::new("cat").args(["test/api/test.txt"]); - let (mut rx, _) = cmd.spawn().unwrap(); - - crate::async_runtime::block_on(async move { - while let Some(event) = rx.recv().await { - match event { - CommandEvent::Terminated(payload) => { - assert_eq!(payload.code, Some(0)); - } - CommandEvent::Stdout(line) => { - assert_eq!(String::from_utf8(line).unwrap(), "This is a test doc!"); - } - _ => {} - } - } - }); - } - - #[cfg(not(windows))] - #[test] - fn test_cmd_spawn_raw_output() { - let cmd = Command::new("cat").args(["test/api/test.txt"]); - let (mut rx, _) = cmd.spawn().unwrap(); - - crate::async_runtime::block_on(async move { - while let Some(event) = rx.recv().await { - match event { - CommandEvent::Terminated(payload) => { - assert_eq!(payload.code, Some(0)); - } - CommandEvent::Stdout(line) => { - assert_eq!(String::from_utf8(line).unwrap(), "This is a test doc!"); - } - _ => {} - } - } - }); - } - - #[cfg(not(windows))] - #[test] - // test the failure case - fn test_cmd_spawn_fail() { - let cmd = Command::new("cat").args(["test/api/"]); - let (mut rx, _) = cmd.spawn().unwrap(); - - crate::async_runtime::block_on(async move { - while let Some(event) = rx.recv().await { - match event { - CommandEvent::Terminated(payload) => { - assert_eq!(payload.code, Some(1)); - } - CommandEvent::Stderr(line) => { - assert_eq!( - String::from_utf8(line).unwrap(), - "cat: test/api/: Is a directory" - ); - } - _ => {} - } - } - }); - } - - #[cfg(not(windows))] - #[test] - // test the failure case (raw encoding) - fn test_cmd_spawn_raw_fail() { - let cmd = Command::new("cat").args(["test/api/"]); - let (mut rx, _) = cmd.spawn().unwrap(); - - crate::async_runtime::block_on(async move { - while let Some(event) = rx.recv().await { - match event { - CommandEvent::Terminated(payload) => { - assert_eq!(payload.code, Some(1)); - } - CommandEvent::Stderr(line) => { - assert_eq!( - String::from_utf8(line).unwrap(), - "cat: test/api/: Is a directory" - ); - } - _ => {} - } - } - }); - } - - #[cfg(not(windows))] - #[test] - fn test_cmd_output_output() { - let cmd = Command::new("cat").args(["test/api/test.txt"]); - let output = cmd.output().unwrap(); - - assert_eq!(String::from_utf8(output.stderr).unwrap(), ""); - assert_eq!( - String::from_utf8(output.stdout).unwrap(), - "This is a test doc!\n" - ); - } - - #[cfg(not(windows))] - #[test] - fn test_cmd_output_output_fail() { - let cmd = Command::new("cat").args(["test/api/"]); - let output = cmd.output().unwrap(); - - assert_eq!(String::from_utf8(output.stdout).unwrap(), ""); - assert_eq!( - String::from_utf8(output.stderr).unwrap(), - "cat: test/api/: Is a directory\n" - ); - } -} diff --git a/core/tauri/src/api/shell.rs b/core/tauri/src/api/shell.rs deleted file mode 100644 index 0a22dd67912..00000000000 --- a/core/tauri/src/api/shell.rs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -//! Types and functions related to shell. - -use crate::ShellScope; -use std::str::FromStr; - -/// Program to use on the [`open()`] call. -pub enum Program { - /// Use the `open` program. - Open, - /// Use the `start` program. - Start, - /// Use the `xdg-open` program. - XdgOpen, - /// Use the `gio` program. - Gio, - /// Use the `gnome-open` program. - GnomeOpen, - /// Use the `kde-open` program. - KdeOpen, - /// Use the `wslview` program. - WslView, - /// Use the `Firefox` program. - Firefox, - /// Use the `Google Chrome` program. - Chrome, - /// Use the `Chromium` program. - Chromium, - /// Use the `Safari` program. - Safari, -} - -impl FromStr for Program { - type Err = super::Error; - - fn from_str(s: &str) -> Result { - let p = match s.to_lowercase().as_str() { - "open" => Self::Open, - "start" => Self::Start, - "xdg-open" => Self::XdgOpen, - "gio" => Self::Gio, - "gnome-open" => Self::GnomeOpen, - "kde-open" => Self::KdeOpen, - "wslview" => Self::WslView, - "firefox" => Self::Firefox, - "chrome" | "google chrome" => Self::Chrome, - "chromium" => Self::Chromium, - "safari" => Self::Safari, - _ => return Err(super::Error::UnknownProgramName(s.to_string())), - }; - Ok(p) - } -} - -impl Program { - pub(crate) fn name(self) -> &'static str { - match self { - Self::Open => "open", - Self::Start => "start", - Self::XdgOpen => "xdg-open", - Self::Gio => "gio", - Self::GnomeOpen => "gnome-open", - Self::KdeOpen => "kde-open", - Self::WslView => "wslview", - - #[cfg(target_os = "macos")] - Self::Firefox => "Firefox", - #[cfg(not(target_os = "macos"))] - Self::Firefox => "firefox", - - #[cfg(target_os = "macos")] - Self::Chrome => "Google Chrome", - #[cfg(not(target_os = "macos"))] - Self::Chrome => "google-chrome", - - #[cfg(target_os = "macos")] - Self::Chromium => "Chromium", - #[cfg(not(target_os = "macos"))] - Self::Chromium => "chromium", - - #[cfg(target_os = "macos")] - Self::Safari => "Safari", - #[cfg(not(target_os = "macos"))] - Self::Safari => "safari", - } - } -} - -/// Opens path or URL with the program specified in `with`, or system default if `None`. -/// -/// The path will be matched against the shell open validation regex, defaulting to `^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+`. -/// A custom validation regex may be supplied in the config in `tauri > allowlist > scope > open`. -/// -/// # Examples -/// -/// ```rust,no_run -/// use tauri::{api::shell::open, Manager}; -/// tauri::Builder::default() -/// .setup(|app| { -/// // open the given URL on the system default browser -/// open(&app.shell_scope(), "https://github.com/tauri-apps/tauri", None)?; -/// Ok(()) -/// }); -/// ``` -pub fn open>( - scope: &ShellScope, - path: P, - with: Option, -) -> crate::api::Result<()> { - scope - .open(path.as_ref(), with) - .map_err(|err| crate::api::Error::Shell(format!("failed to open: {err}"))) -} diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index b9dfa644ada..77916b724ba 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -27,9 +27,6 @@ use crate::{ Runtime, Scopes, StateManager, Theme, Window, }; -#[cfg(shell_scope)] -use crate::scope::ShellScope; - use raw_window_handle::HasRawDisplayHandle; use tauri_macros::default_runtime; use tauri_runtime::window::{ @@ -420,18 +417,14 @@ impl AppHandle { std::process::exit(exit_code); } - /// Restarts the app. This is the same as [`crate::api::process::restart`], but it performs cleanup on this application. + /// Restarts the app. This is the same as [`crate::process::restart`], but it performs cleanup on this application. pub fn restart(&self) { self.cleanup_before_exit(); - crate::api::process::restart(&self.env()); + crate::process::restart(&self.env()); } /// Runs necessary cleanup tasks before exiting the process fn cleanup_before_exit(&self) { - #[cfg(any(shell_execute, shell_sidecar))] - { - crate::api::process::kill_children(); - } #[cfg(all(windows, feature = "system-tray"))] { for tray in self.manager().trays().values() { @@ -764,7 +757,7 @@ impl App { /// Runs a iteration of the runtime event loop and immediately return. /// /// Note that when using this API, app cleanup is not automatically done. - /// The cleanup calls [`crate::api::process::kill_children`] so you may want to call that function before exiting the application. + /// The cleanup calls [`crate::process::kill_children`] so you may want to call that function before exiting the application. /// Additionally, the cleanup calls [AppHandle#remove_system_tray](`AppHandle#method.remove_system_tray`) (Windows only). /// /// # Examples @@ -1203,19 +1196,15 @@ impl Builder { /// MenuEntry::Submenu(Submenu::new( /// "File", /// Menu::with_items([ - /// CustomMenuItem::new("New", "New").into(), - /// CustomMenuItem::new("Learn More", "Learn More").into(), + /// CustomMenuItem::new("new", "New").into(), + /// CustomMenuItem::new("learn-more", "Learn More").into(), /// ]), /// )), /// ])) /// .on_menu_event(|event| { /// match event.menu_item_id() { - /// "Learn More" => { - /// // open in browser (requires the `shell-open-api` feature) - #[cfg_attr( - feature = "shell-open-api", - doc = r#" api::shell::open(&event.window().shell_scope(), "https://github.com/tauri-apps/tauri".to_string(), None).unwrap();"# - )] + /// "learn-more" => { + /// // open a link in the browser using tauri-plugin-shell /// } /// id => { /// // do something with other events @@ -1384,9 +1373,6 @@ impl Builder { self.menu = Some(Menu::os_default(&context.package_info().name)); } - #[cfg(shell_scope)] - let shell_scope = context.shell_scope.clone(); - let manager = WindowManager::with_handlers( context, self.plugins, @@ -1462,8 +1448,6 @@ impl Builder { &app, &app.config().tauri.allowlist.protocol.asset_scope, )?, - #[cfg(shell_scope)] - shell: ShellScope::new(&app, shell_scope), }); #[cfg(windows)] diff --git a/core/tauri/src/endpoints.rs b/core/tauri/src/endpoints.rs index 8da90c66279..ed57ffd4052 100644 --- a/core/tauri/src/endpoints.rs +++ b/core/tauri/src/endpoints.rs @@ -18,8 +18,6 @@ mod event; mod operating_system; #[cfg(process_any)] mod process; -#[cfg(shell_any)] -mod shell; mod window; /// The context passed to the invoke handler. @@ -62,8 +60,6 @@ enum Module { #[cfg(os_any)] Os(operating_system::Cmd), Window(Box), - #[cfg(shell_any)] - Shell(shell::Cmd), Event(event::Cmd), } @@ -108,13 +104,6 @@ impl Module { .and_then(|r| r.json) .map_err(InvokeError::from_anyhow) }), - #[cfg(shell_any)] - Self::Shell(cmd) => resolver.respond_async(async move { - cmd - .run(context) - .and_then(|r| r.json) - .map_err(InvokeError::from_anyhow) - }), Self::Event(cmd) => resolver.respond_async(async move { cmd .run(context) diff --git a/core/tauri/src/endpoints/shell.rs b/core/tauri/src/endpoints/shell.rs deleted file mode 100644 index 3be8cb9f84c..00000000000 --- a/core/tauri/src/endpoints/shell.rs +++ /dev/null @@ -1,345 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -#![allow(unused_imports)] - -use super::InvokeContext; -#[cfg(any(shell_execute, shell_sidecar))] -use crate::api::process::{CommandEvent, TerminatedPayload}; -use crate::{api::ipc::CallbackFn, Runtime}; -#[cfg(shell_scope)] -use crate::{Manager, Scopes}; -use encoding_rs::Encoding; -use serde::{Deserialize, Serialize}; -use tauri_macros::{command_enum, module_command_handler, CommandModule}; - -#[cfg(shell_scope)] -use crate::ExecuteArgs; -#[cfg(not(shell_scope))] -type ExecuteArgs = (); - -#[cfg(any(shell_execute, shell_sidecar))] -use std::sync::{Arc, Mutex}; -use std::{collections::HashMap, path::PathBuf, string::FromUtf8Error}; - -type ChildId = u32; -#[cfg(any(shell_execute, shell_sidecar))] -type ChildStore = Arc>>; - -#[cfg(any(shell_execute, shell_sidecar))] -fn command_child_store() -> &'static ChildStore { - use once_cell::sync::Lazy; - static STORE: Lazy = Lazy::new(Default::default); - &STORE -} - -#[cfg(any(shell_execute, shell_sidecar))] -#[derive(Debug, Clone, Serialize)] -#[serde(tag = "event", content = "payload")] -#[non_exhaustive] -enum JSCommandEvent { - /// Stderr bytes until a newline (\n) or carriage return (\r) is found. - Stderr(Buffer), - /// Stdout bytes until a newline (\n) or carriage return (\r) is found. - Stdout(Buffer), - /// An error happened waiting for the command to finish or converting the stdout/stderr bytes to an UTF-8 string. - Error(String), - /// Command process terminated. - Terminated(TerminatedPayload), -} - -#[cfg(any(shell_execute, shell_sidecar))] -fn get_event_buffer(line: Vec, encoding: EncodingWrapper) -> Result { - match encoding { - EncodingWrapper::Text(character_encoding) => match character_encoding { - Some(encoding) => Ok(Buffer::Text( - encoding.decode_with_bom_removal(&line).0.into(), - )), - None => String::from_utf8(line).map(Buffer::Text), - }, - EncodingWrapper::Raw => Ok(Buffer::Raw(line)), - } -} - -#[cfg(any(shell_execute, shell_sidecar))] -impl JSCommandEvent { - pub fn new(event: CommandEvent, encoding: EncodingWrapper) -> Self { - match event { - CommandEvent::Terminated(payload) => JSCommandEvent::Terminated(payload), - CommandEvent::Error(error) => JSCommandEvent::Error(error), - CommandEvent::Stderr(line) => get_event_buffer(line, encoding) - .map(JSCommandEvent::Stderr) - .unwrap_or_else(|e| JSCommandEvent::Error(e.to_string())), - CommandEvent::Stdout(line) => get_event_buffer(line, encoding) - .map(JSCommandEvent::Stdout) - .unwrap_or_else(|e| JSCommandEvent::Error(e.to_string())), - } - } -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -#[serde(untagged)] -#[allow(missing_docs)] -pub enum Buffer { - Text(String), - Raw(Vec), -} - -#[cfg(any(shell_execute, shell_sidecar))] -#[derive(Debug, Copy, Clone)] -pub enum EncodingWrapper { - Raw, - Text(Option<&'static Encoding>), -} - -#[allow(clippy::unnecessary_wraps)] -fn default_env() -> Option> { - Some(HashMap::default()) -} - -#[allow(dead_code)] -#[derive(Debug, Clone, Default, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct CommandOptions { - #[serde(default)] - sidecar: bool, - cwd: Option, - // by default we don't add any env variables to the spawned process - // but the env is an `Option` so when it's `None` we clear the env. - #[serde(default = "default_env")] - env: Option>, - // Character encoding for stdout/stderr - encoding: Option, -} - -/// The API descriptor. -#[command_enum] -#[derive(Deserialize, CommandModule)] -#[serde(tag = "cmd", rename_all = "camelCase")] -pub enum Cmd { - /// The execute script API. - #[cmd(shell_script, "shell > execute or shell > sidecar")] - #[serde(rename_all = "camelCase")] - Execute { - program: String, - args: ExecuteArgs, - on_event_fn: CallbackFn, - #[serde(default)] - options: CommandOptions, - }, - #[cmd(shell_script, "shell > execute or shell > sidecar")] - StdinWrite { pid: ChildId, buffer: Buffer }, - #[cmd(shell_script, "shell > execute or shell > sidecar")] - KillChild { pid: ChildId }, - #[cmd(shell_open, "shell > open")] - Open { path: String, with: Option }, -} - -impl Cmd { - #[module_command_handler(shell_script)] - #[allow(unused_variables)] - fn execute( - context: InvokeContext, - program: String, - args: ExecuteArgs, - on_event_fn: CallbackFn, - options: CommandOptions, - ) -> super::Result { - let mut command = if options.sidecar { - #[cfg(not(shell_sidecar))] - return Err(crate::Error::ApiNotAllowlisted("shell > sidecar".to_string()).into_anyhow()); - #[cfg(shell_sidecar)] - { - let program = PathBuf::from(program); - let program_as_string = program.display().to_string(); - let program_no_ext_as_string = program.with_extension("").display().to_string(); - let configured_sidecar = context - .config - .tauri - .bundle - .external_bin - .as_ref() - .map(|bins| { - bins - .iter() - .find(|b| b == &&program_as_string || b == &&program_no_ext_as_string) - }) - .unwrap_or_default(); - if let Some(sidecar) = configured_sidecar { - context - .window - .state::() - .shell - .prepare_sidecar(&program.to_string_lossy(), sidecar, args) - .map_err(crate::error::into_anyhow)? - } else { - return Err(crate::Error::SidecarNotAllowed(program).into_anyhow()); - } - } - } else { - #[cfg(not(shell_execute))] - return Err(crate::Error::ApiNotAllowlisted("shell > execute".to_string()).into_anyhow()); - #[cfg(shell_execute)] - match context - .window - .state::() - .shell - .prepare(&program, args) - { - Ok(cmd) => cmd, - Err(e) => { - #[cfg(debug_assertions)] - eprintln!("{e}"); - return Err(crate::Error::ProgramNotAllowed(PathBuf::from(program)).into_anyhow()); - } - } - }; - #[cfg(any(shell_execute, shell_sidecar))] - { - if let Some(cwd) = options.cwd { - command = command.current_dir(cwd); - } - if let Some(env) = options.env { - command = command.envs(env); - } else { - command = command.env_clear(); - } - let encoding = match options.encoding { - Option::None => EncodingWrapper::Text(None), - Some(encoding) => match encoding.as_str() { - "raw" => EncodingWrapper::Raw, - _ => { - if let Some(text_encoding) = - crate::api::process::Encoding::for_label(encoding.as_bytes()) - { - EncodingWrapper::Text(Some(text_encoding)) - } else { - return Err(anyhow::anyhow!(format!("unknown encoding {encoding}"))); - } - } - }, - }; - - let (mut rx, child) = command.spawn()?; - - let pid = child.pid(); - command_child_store().lock().unwrap().insert(pid, child); - - crate::async_runtime::spawn(async move { - while let Some(event) = rx.recv().await { - if matches!(event, crate::api::process::CommandEvent::Terminated(_)) { - command_child_store().lock().unwrap().remove(&pid); - }; - let js_event = JSCommandEvent::new(event, encoding); - let js = crate::api::ipc::format_callback(on_event_fn, &js_event) - .expect("unable to serialize CommandEvent"); - - let _ = context.window.eval(js.as_str()); - } - }); - - Ok(pid) - } - } - - #[module_command_handler(shell_script)] - fn stdin_write( - _context: InvokeContext, - pid: ChildId, - buffer: Buffer, - ) -> super::Result<()> { - if let Some(child) = command_child_store().lock().unwrap().get_mut(&pid) { - match buffer { - Buffer::Text(t) => child.write(t.as_bytes())?, - Buffer::Raw(r) => child.write(&r)?, - } - } - Ok(()) - } - - #[module_command_handler(shell_script)] - fn kill_child(_context: InvokeContext, pid: ChildId) -> super::Result<()> { - if let Some(child) = command_child_store().lock().unwrap().remove(&pid) { - child.kill()?; - } - Ok(()) - } - - /// Open a (url) path with a default or specific browser opening program. - /// - /// See [`crate::api::shell::open`] for how it handles security-related measures. - #[module_command_handler(shell_open)] - fn open( - context: InvokeContext, - path: String, - with: Option, - ) -> super::Result<()> { - use std::str::FromStr; - - with - .as_deref() - // only allow pre-determined programs to be specified - .map(crate::api::shell::Program::from_str) - .transpose() - .map_err(Into::into) - // validate and open path - .and_then(|with| { - crate::api::shell::open(&context.window.state::().shell, path, with) - .map_err(Into::into) - }) - } -} - -#[cfg(test)] -mod tests { - use super::{Buffer, ChildId, CommandOptions, ExecuteArgs}; - use crate::api::ipc::CallbackFn; - use quickcheck::{Arbitrary, Gen}; - - impl Arbitrary for CommandOptions { - fn arbitrary(g: &mut Gen) -> Self { - Self { - sidecar: false, - cwd: Option::arbitrary(g), - env: Option::arbitrary(g), - encoding: Option::arbitrary(g), - } - } - } - - impl Arbitrary for Buffer { - fn arbitrary(g: &mut Gen) -> Self { - Buffer::Text(String::arbitrary(g)) - } - } - - #[cfg(shell_scope)] - impl Arbitrary for ExecuteArgs { - fn arbitrary(_: &mut Gen) -> Self { - ExecuteArgs::None - } - } - - #[tauri_macros::module_command_test(shell_execute, "shell > execute")] - #[quickcheck_macros::quickcheck] - fn execute( - _program: String, - _args: ExecuteArgs, - _on_event_fn: CallbackFn, - _options: CommandOptions, - ) { - } - - #[tauri_macros::module_command_test(shell_execute, "shell > execute or shell > sidecar")] - #[quickcheck_macros::quickcheck] - fn stdin_write(_pid: ChildId, _buffer: Buffer) {} - - #[tauri_macros::module_command_test(shell_execute, "shell > execute or shell > sidecar")] - #[quickcheck_macros::quickcheck] - fn kill_child(_pid: ChildId) {} - - #[tauri_macros::module_command_test(shell_open, "shell > open")] - #[quickcheck_macros::quickcheck] - fn open(_path: String, _with: Option) {} -} diff --git a/core/tauri/src/error.rs b/core/tauri/src/error.rs index eaaa45fd1e6..880edaf822e 100644 --- a/core/tauri/src/error.rs +++ b/core/tauri/src/error.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use std::{fmt, path::PathBuf}; +use std::fmt; /// A generic boxed error. #[derive(Debug)] @@ -85,23 +85,9 @@ pub enum Error { /// Error initializing plugin. #[error("failed to initialize plugin `{0}`: {1}")] PluginInitialization(String, String), - /// A part of the URL is malformed or invalid. This may occur when parsing and combining - /// user-provided URLs and paths. - #[error("invalid url: {0}")] - InvalidUrl(url::ParseError), /// Task join error. #[error(transparent)] JoinError(#[from] tokio::task::JoinError), - /// Sidecar not allowed by the configuration. - #[error("sidecar not configured under `tauri.conf.json > tauri > bundle > externalBin`: {0}")] - SidecarNotAllowed(PathBuf), - /// Sidecar was not found by the configuration. - #[cfg(shell_scope)] - #[error("sidecar configuration found, but unable to create a path to it: {0}")] - SidecarNotFound(#[from] Box), - /// Program not allowed by the scope. - #[error("program not allowed on the configured shell scope: {0}")] - ProgramNotAllowed(PathBuf), /// An error happened inside the isolation pattern. #[cfg(feature = "isolation")] #[error("isolation pattern error: {0}")] diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 58d7007a8f2..ede4a5992c1 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -19,12 +19,10 @@ //! - **updater**: Enables the application auto updater. Enabled by default if the `updater` config is defined on the `tauri.conf.json` file. //! - **devtools**: Enables the developer tools (Web inspector) and [`Window::open_devtools`]. Enabled by default on debug builds. //! On macOS it uses private APIs, so you can't enable it if your app will be published to the App Store. -//! - **shell-open-api**: Enables the [`api::shell`] module. //! - **native-tls**: Provides TLS support to connect over HTTPS. //! - **native-tls-vendored**: Compile and statically link to a vendored copy of OpenSSL. //! - **rustls-tls**: Provides TLS support to connect over HTTPS using rustls. -//! - **process-command-api**: Enables the [`api::process::Command`] APIs. -//! - **process-relaunch-dangerous-allow-symlink-macos**: Allows the [`api::process::current_binary`] function to allow symlinks on macOS (this is dangerous, see the Security section in the documentation website). +//! - **process-relaunch-dangerous-allow-symlink-macos**: Allows the [`process::current_binary`] function to allow symlinks on macOS (this is dangerous, see the Security section in the documentation website). //! - **dialog**: Enables the [`api::dialog`] module. //! - **fs-extract-api**: Enabled the `tauri::api::file::Extract` API. //! - **system-tray**: Enables application system tray API. Enabled by default if the `systemTray` config is defined on the `tauri.conf.json` file. @@ -170,9 +168,6 @@ pub use cocoa; pub use embed_plist; /// The Tauri error enum. pub use error::Error; -#[cfg(shell_scope)] -#[doc(hidden)] -pub use regex; #[cfg(target_os = "ios")] #[doc(hidden)] pub use swift_rs; @@ -200,6 +195,7 @@ mod ios; mod jni_helpers; /// Path APIs. pub mod path; +pub mod process; /// The allowlist scopes. pub mod scope; mod state; @@ -543,8 +539,6 @@ pub struct Context { pub(crate) package_info: PackageInfo, pub(crate) _info_plist: (), pub(crate) pattern: Pattern, - #[cfg(shell_scope)] - pub(crate) shell_scope: scope::ShellScopeConfig, } impl fmt::Debug for Context { @@ -559,8 +553,6 @@ impl fmt::Debug for Context { #[cfg(desktop)] d.field("system_tray_icon", &self.system_tray_icon); - #[cfg(shell_scope)] - d.field("shell_scope", &self.shell_scope); d.finish() } } @@ -634,13 +626,6 @@ impl Context { &self.pattern } - /// The scoped shell commands, where the `HashMap` key is the name each configuration. - #[cfg(shell_scope)] - #[inline(always)] - pub fn allowed_commands(&self) -> &scope::ShellScopeConfig { - &self.shell_scope - } - /// Create a new [`Context`] from the minimal required items. #[inline(always)] #[allow(clippy::too_many_arguments)] @@ -663,8 +648,6 @@ impl Context { package_info, _info_plist: info_plist, pattern, - #[cfg(shell_scope)] - shell_scope: Default::default(), } } @@ -889,12 +872,6 @@ pub trait Manager: sealed::ManagerBase { self.state::().inner().asset_protocol.clone() } - /// Gets the scope for the shell execute APIs. - #[cfg(shell_scope)] - fn shell_scope(&self) -> ShellScope { - self.state::().inner().shell.clone() - } - /// The path resolver. fn path(&self) -> &crate::path::PathResolver { self.state::>().inner() @@ -991,7 +968,6 @@ mod tests { // features that look like an allowlist feature, but are not let allowed = [ "fs-extract-api", - "process-command-api", "process-relaunch-dangerous-allow-symlink-macos", "window-data-url", ]; diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index 3a4c4bd9fb7..7e8c2520e44 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -1242,7 +1242,6 @@ impl WindowManager { if path.to_str() != Some("index.html") { url .join(&path.to_string_lossy()) - .map_err(crate::Error::InvalidUrl) // this will never fail .unwrap() } else { diff --git a/core/tauri/src/api/process.rs b/core/tauri/src/process.rs similarity index 86% rename from core/tauri/src/api/process.rs rename to core/tauri/src/process.rs index 1cb4c0e0885..7eef25939ac 100644 --- a/core/tauri/src/api/process.rs +++ b/core/tauri/src/process.rs @@ -8,13 +8,6 @@ use crate::Env; use std::path::PathBuf; -#[cfg(feature = "process-command-api")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "process-command-api")))] -mod command; -#[cfg(feature = "process-command-api")] -#[cfg_attr(doc_cfg, doc(cfg(feature = "process-command-api")))] -pub use command::*; - /// Finds the current running binary's path. /// /// With exception to any following platform-specific behavior, the path is cached as soon as @@ -41,7 +34,7 @@ pub use command::*; /// # Examples /// /// ```rust,no_run -/// use tauri::{api::process::current_binary, Env, Manager}; +/// use tauri::{process::current_binary, Env, Manager}; /// let current_binary_path = current_binary(&Env::default()).unwrap(); /// /// tauri::Builder::default() @@ -70,7 +63,7 @@ pub fn current_binary(_env: &Env) -> std::io::Result { /// # Examples /// /// ```rust,no_run -/// use tauri::{api::process::restart, Env, Manager}; +/// use tauri::{process::restart, Env, Manager}; /// /// tauri::Builder::default() /// .setup(|app| { diff --git a/core/tauri/src/scope/mod.rs b/core/tauri/src/scope/mod.rs index 1f7a79a203a..6389e71c5ca 100644 --- a/core/tauri/src/scope/mod.rs +++ b/core/tauri/src/scope/mod.rs @@ -3,24 +3,14 @@ // SPDX-License-Identifier: MIT mod fs; -#[cfg(shell_scope)] -mod shell; pub use fs::{Event as FsScopeEvent, Pattern as GlobPattern, Scope as FsScope}; -#[cfg(shell_scope)] -pub use shell::{ - ExecuteArgs, Scope as ShellScope, ScopeAllowedArg as ShellScopeAllowedArg, - ScopeAllowedCommand as ShellScopeAllowedCommand, ScopeConfig as ShellScopeConfig, - ScopeError as ShellScopeError, -}; use std::path::Path; pub(crate) struct Scopes { pub fs: FsScope, #[cfg(protocol_asset)] pub asset_protocol: FsScope, - #[cfg(shell_scope)] - pub shell: ShellScope, } impl Scopes { diff --git a/core/tauri/src/scope/shell.rs b/core/tauri/src/scope/shell.rs deleted file mode 100644 index 4d1aba537ba..00000000000 --- a/core/tauri/src/scope/shell.rs +++ /dev/null @@ -1,361 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -#[cfg(any(shell_execute, shell_sidecar))] -use crate::api::process::Command; -#[cfg(feature = "shell-open-api")] -use crate::api::shell::Program; -use crate::{Manager, Runtime}; - -use regex::Regex; - -use std::collections::HashMap; - -const DEFAULT_OPEN_REGEX: &str = r#"^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+"#; - -/// Allowed representation of `Execute` command arguments. -#[derive(Debug, Clone, serde::Deserialize)] -#[serde(untagged, deny_unknown_fields)] -#[non_exhaustive] -pub enum ExecuteArgs { - /// No arguments - None, - - /// A single string argument - Single(String), - - /// Multiple string arguments - List(Vec), -} - -impl ExecuteArgs { - /// Whether the argument list is empty or not. - pub fn is_empty(&self) -> bool { - match self { - Self::None => true, - Self::Single(s) if s.is_empty() => true, - Self::List(l) => l.is_empty(), - _ => false, - } - } -} - -impl From<()> for ExecuteArgs { - fn from(_: ()) -> Self { - Self::None - } -} - -impl From for ExecuteArgs { - fn from(string: String) -> Self { - Self::Single(string) - } -} - -impl From> for ExecuteArgs { - fn from(vec: Vec) -> Self { - Self::List(vec) - } -} - -/// Shell scope configuration. -#[derive(Debug, Clone)] -pub struct ScopeConfig { - /// The validation regex that `shell > open` paths must match against. - pub open: Option, - - /// All allowed commands, using their unique command name as the keys. - pub scopes: HashMap, -} - -impl Default for ScopeConfig { - fn default() -> Self { - Self { - open: Some(Regex::new(DEFAULT_OPEN_REGEX).unwrap()), - scopes: Default::default(), - } - } -} - -impl ScopeConfig { - /// Creates a new scope configuration with the default validation regex ^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+. - pub fn new() -> Self { - Self::default() - } - - /// Creates a new scope configuration with the specified validation regex. - pub fn with_validator(regex: Regex) -> Self { - Self { - open: Some(regex), - scopes: Default::default(), - } - } - - /// Unsets the validator regex, allowing any path to be opened. - pub fn skip_validation(mut self) -> Self { - self.open = None; - self - } - - /// Sets the commands that are allowed to be executed. - pub fn set_allowed_commands>( - mut self, - scopes: I, - ) -> Self { - self.scopes = scopes.into_iter().collect(); - self - } -} - -/// A configured scoped shell command. -#[derive(Debug, Clone)] -pub struct ScopeAllowedCommand { - /// The shell command to be called. - pub command: std::path::PathBuf, - - /// The arguments the command is allowed to be called with. - pub args: Option>, - - /// If this command is a sidecar command. - pub sidecar: bool, -} - -/// A configured argument to a scoped shell command. -#[derive(Debug, Clone)] -pub enum ScopeAllowedArg { - /// A non-configurable argument. - Fixed(String), - - /// An argument with a value to be evaluated at runtime, must pass a regex validation. - Var { - /// The validation that the variable value must pass in order to be called. - validator: Regex, - }, -} - -impl ScopeAllowedArg { - /// If the argument is fixed. - pub fn is_fixed(&self) -> bool { - matches!(self, Self::Fixed(_)) - } - - /// If the argument is a variable value. - pub fn is_var(&self) -> bool { - matches!(self, Self::Var { .. }) - } -} - -/// Scope for filesystem access. -#[derive(Clone)] -pub struct Scope(ScopeConfig); - -/// All errors that can happen while validating a scoped command. -#[derive(Debug, thiserror::Error)] -pub enum ScopeError { - /// At least one argument did not pass input validation. - #[cfg(any(shell_execute, shell_sidecar))] - #[cfg_attr( - doc_cfg, - doc(cfg(any(feature = "shell-execute", feature = "shell-sidecar"))) - )] - #[error("The scoped command was called with the improper sidecar flag set")] - BadSidecarFlag, - - /// The sidecar program validated but failed to find the sidecar path. - /// - /// Note: This can be called on `shell-execute` feature too due to [`Scope::prepare`] checking if - /// it's a sidecar from the config. - #[cfg(any(shell_execute, shell_sidecar))] - #[cfg_attr( - doc_cfg, - doc(cfg(any(feature = "shell-execute", feature = "shell-sidecar"))) - )] - #[error( - "The scoped sidecar command was validated, but failed to create the path to the command: {0}" - )] - Sidecar(crate::Error), - - /// The named command was not found in the scoped config. - #[error("Scoped command {0} not found")] - #[cfg(any(shell_execute, shell_sidecar))] - #[cfg_attr( - doc_cfg, - doc(cfg(any(feature = "shell-execute", feature = "shell-sidecar"))) - )] - NotFound(String), - - /// A command variable has no value set in the arguments. - #[error( - "Scoped command argument at position {0} must match regex validation {1} but it was not found" - )] - #[cfg(any(shell_execute, shell_sidecar))] - #[cfg_attr( - doc_cfg, - doc(cfg(any(feature = "shell-execute", feature = "shell-sidecar"))) - )] - MissingVar(usize, String), - - /// At least one argument did not pass input validation. - #[cfg(shell_scope)] - #[cfg_attr( - doc_cfg, - doc(cfg(any(feature = "shell-execute", feature = "shell-open"))) - )] - #[error("Scoped command argument at position {index} was found, but failed regex validation {validation}")] - Validation { - /// Index of the variable. - index: usize, - - /// Regex that the variable value failed to match. - validation: String, - }, - - /// The format of the passed input does not match the expected shape. - /// - /// This can happen from passing a string or array of strings to a command that is expecting - /// named variables, and vice-versa. - #[cfg(any(shell_execute, shell_sidecar))] - #[cfg_attr( - doc_cfg, - doc(cfg(any(feature = "shell-execute", feature = "shell-sidecar"))) - )] - #[error("Scoped command {0} received arguments in an unexpected format")] - InvalidInput(String), - - /// A generic IO error that occurs while executing specified shell commands. - #[cfg(shell_scope)] - #[cfg_attr( - doc_cfg, - doc(cfg(any(feature = "shell-execute", feature = "shell-sidecar"))) - )] - #[error("Scoped shell IO error: {0}")] - Io(#[from] std::io::Error), -} - -impl Scope { - /// Creates a new shell scope. - pub(crate) fn new>(manager: &M, mut scope: ScopeConfig) -> Self { - for cmd in scope.scopes.values_mut() { - if let Ok(path) = manager.path().parse(&cmd.command) { - cmd.command = path; - } - } - Self(scope) - } - - /// Validates argument inputs and creates a Tauri sidecar [`Command`]. - #[cfg(shell_sidecar)] - pub fn prepare_sidecar( - &self, - command_name: &str, - command_script: &str, - args: ExecuteArgs, - ) -> Result { - self._prepare(command_name, args, Some(command_script)) - } - - /// Validates argument inputs and creates a Tauri [`Command`]. - #[cfg(shell_execute)] - pub fn prepare(&self, command_name: &str, args: ExecuteArgs) -> Result { - self._prepare(command_name, args, None) - } - - /// Validates argument inputs and creates a Tauri [`Command`]. - #[cfg(any(shell_execute, shell_sidecar))] - pub fn _prepare( - &self, - command_name: &str, - args: ExecuteArgs, - sidecar: Option<&str>, - ) -> Result { - let command = match self.0.scopes.get(command_name) { - Some(command) => command, - None => return Err(ScopeError::NotFound(command_name.into())), - }; - - if command.sidecar != sidecar.is_some() { - return Err(ScopeError::BadSidecarFlag); - } - - let args = match (&command.args, args) { - (None, ExecuteArgs::None) => Ok(vec![]), - (None, ExecuteArgs::List(list)) => Ok(list), - (None, ExecuteArgs::Single(string)) => Ok(vec![string]), - (Some(list), ExecuteArgs::List(args)) => list - .iter() - .enumerate() - .map(|(i, arg)| match arg { - ScopeAllowedArg::Fixed(fixed) => Ok(fixed.to_string()), - ScopeAllowedArg::Var { validator } => { - let value = args - .get(i) - .ok_or_else(|| ScopeError::MissingVar(i, validator.to_string()))? - .to_string(); - if validator.is_match(&value) { - Ok(value) - } else { - Err(ScopeError::Validation { - index: i, - validation: validator.to_string(), - }) - } - } - }) - .collect(), - (Some(list), arg) if arg.is_empty() && list.iter().all(ScopeAllowedArg::is_fixed) => list - .iter() - .map(|arg| match arg { - ScopeAllowedArg::Fixed(fixed) => Ok(fixed.to_string()), - _ => unreachable!(), - }) - .collect(), - (Some(list), _) if list.is_empty() => Err(ScopeError::InvalidInput(command_name.into())), - (Some(_), _) => Err(ScopeError::InvalidInput(command_name.into())), - }?; - - let command_s = sidecar - .map(|s| { - std::path::PathBuf::from(s) - .components() - .last() - .unwrap() - .as_os_str() - .to_string_lossy() - .into_owned() - }) - .unwrap_or_else(|| command.command.to_string_lossy().into_owned()); - let command = if command.sidecar { - Command::new_sidecar(command_s).map_err(ScopeError::Sidecar)? - } else { - Command::new(command_s) - }; - - Ok(command.args(args)) - } - - /// Open a path in the default (or specified) browser. - /// - /// The path is validated against the `tauri > allowlist > shell > open` validation regex, which - /// defaults to `^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+`. - #[cfg(feature = "shell-open-api")] - pub fn open(&self, path: &str, with: Option) -> Result<(), ScopeError> { - // ensure we pass validation if the configuration has one - if let Some(regex) = &self.0.open { - if !regex.is_match(path) { - return Err(ScopeError::Validation { - index: 0, - validation: regex.as_str().into(), - }); - } - } - - // The prevention of argument escaping is handled by the usage of std::process::Command::arg by - // the `open` dependency. This behavior should be re-confirmed during upgrades of `open`. - match with.map(Program::name) { - Some(program) => ::open::with(path, program), - None => ::open::that(path), - } - .map_err(Into::into) - } -} diff --git a/core/tauri/src/test/mod.rs b/core/tauri/src/test/mod.rs index 22d4acf5b97..71c6fec913e 100644 --- a/core/tauri/src/test/mod.rs +++ b/core/tauri/src/test/mod.rs @@ -7,12 +7,8 @@ mod mock_runtime; pub use mock_runtime::*; -#[cfg(shell_scope)] -use std::collections::HashMap; use std::{borrow::Cow, sync::Arc}; -#[cfg(shell_scope)] -use crate::ShellScopeConfig; use crate::{Manager, Pattern, WindowBuilder}; use tauri_utils::{ assets::{AssetKey, Assets, CspHash}, @@ -71,11 +67,6 @@ pub fn mock_context(assets: A) -> crate::Context { }, _info_plist: (), pattern: Pattern::Brownfield(std::marker::PhantomData), - #[cfg(shell_scope)] - shell_scope: ShellScopeConfig { - open: None, - scopes: HashMap::new(), - }, } } diff --git a/core/tests/restart/src/main.rs b/core/tests/restart/src/main.rs index 32a1641bdc4..6984ab20c5d 100644 --- a/core/tests/restart/src/main.rs +++ b/core/tests/restart/src/main.rs @@ -13,8 +13,8 @@ fn main() { println!( "{}", - tauri::api::process::current_binary(&Default::default()) - .expect("tauri::api::process::current_binary could not resolve") + tauri::process::current_binary(&Default::default()) + .expect("tauri::process::current_binary could not resolve") .display() ); @@ -22,7 +22,7 @@ fn main() { Some("restart") => { let mut env = Env::default(); env.args.clear(); - tauri::api::process::restart(&env) + tauri::process::restart(&env) } Some(invalid) => panic!("only argument `restart` is allowed, {invalid} is invalid"), None => {} diff --git a/core/tests/restart/tests/restart.rs b/core/tests/restart/tests/restart.rs index 6f5d75ab562..a174f537a97 100644 --- a/core/tests/restart/tests/restart.rs +++ b/core/tests/restart/tests/restart.rs @@ -45,7 +45,7 @@ fn symlink_runner(create_symlinks: impl Fn(&Path) -> io::Result) -> Res // run the command from the symlink, so that we can test if restart resolves it correctly let mut cmd = Command::new(link); - // add the restart parameter so that the invocation will call tauri::api::process::restart + // add the restart parameter so that the invocation will call tauri::process::restart cmd.arg("restart"); let output = cmd.output()?; diff --git a/examples/api/dist/assets/index.css b/examples/api/dist/assets/index.css index bc73b30c42b..82482576691 100644 --- a/examples/api/dist/assets/index.css +++ b/examples/api/dist/assets/index.css @@ -1 +1 @@ -*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x:var(--un-empty,/*!*/ /*!*/);--un-pan-y:var(--un-empty,/*!*/ /*!*/);--un-pinch-zoom:var(--un-empty,/*!*/ /*!*/);--un-scroll-snap-strictness:proximity;--un-ordinal:var(--un-empty,/*!*/ /*!*/);--un-slashed-zero:var(--un-empty,/*!*/ /*!*/);--un-numeric-figure:var(--un-empty,/*!*/ /*!*/);--un-numeric-spacing:var(--un-empty,/*!*/ /*!*/);--un-numeric-fraction:var(--un-empty,/*!*/ /*!*/);--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset:var(--un-empty,/*!*/ /*!*/);--un-shadow:0 0 #0000;--un-ring-inset:var(--un-empty,/*!*/ /*!*/);--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur:var(--un-empty,/*!*/ /*!*/);--un-brightness:var(--un-empty,/*!*/ /*!*/);--un-contrast:var(--un-empty,/*!*/ /*!*/);--un-drop-shadow:var(--un-empty,/*!*/ /*!*/);--un-grayscale:var(--un-empty,/*!*/ /*!*/);--un-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-invert:var(--un-empty,/*!*/ /*!*/);--un-saturate:var(--un-empty,/*!*/ /*!*/);--un-sepia:var(--un-empty,/*!*/ /*!*/);--un-backdrop-blur:var(--un-empty,/*!*/ /*!*/);--un-backdrop-brightness:var(--un-empty,/*!*/ /*!*/);--un-backdrop-contrast:var(--un-empty,/*!*/ /*!*/);--un-backdrop-grayscale:var(--un-empty,/*!*/ /*!*/);--un-backdrop-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-invert:var(--un-empty,/*!*/ /*!*/);--un-backdrop-opacity:var(--un-empty,/*!*/ /*!*/);--un-backdrop-saturate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-sepia:var(--un-empty,/*!*/ /*!*/);}@font-face { font-family: 'Fira Code'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firacode/v21/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sFVc.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtQIQ.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bS2SlFPv1weGeLZDtondv3mQ.ttf) format('truetype');}@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/rubik/v26/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.i-codicon-chrome-maximize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3 3v10h10V3H3zm9 9H4V4h8v8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-minimize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14 8v1H3V8h11z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-restore{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M3 5v9h9V5H3zm8 8H4V6h7v7z'/%3E%3Cpath fill-rule='evenodd' d='M5 5h1V4h7v7h-1v1h2V3H5v2z' clip-rule='evenodd'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-clear-all{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m10 12.6l.7.7l1.6-1.6l1.6 1.6l.8-.7L13 11l1.7-1.6l-.8-.8l-1.6 1.7l-1.6-1.7l-.7.8l1.6 1.6l-1.6 1.6zM1 4h14V3H1v1zm0 3h14V6H1v1zm8 2.5V9H1v1h8v-.5zM9 13v-1H1v1h8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m8 8.707l3.646 3.647l.708-.707L8.707 8l3.647-3.646l-.707-.708L8 7.293L4.354 3.646l-.707.708L7.293 8l-3.646 3.646l.707.708L8 8.707z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-cloud-download{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11.957 6h.05a2.99 2.99 0 0 1 2.116.879a3.003 3.003 0 0 1 0 4.242a2.99 2.99 0 0 1-2.117.879v-1a2.002 2.002 0 0 0 0-4h-.914l-.123-.857a2.49 2.49 0 0 0-2.126-2.122A2.478 2.478 0 0 0 6.231 5.5l-.333.762l-.809-.189A2.49 2.49 0 0 0 4.523 6c-.662 0-1.297.263-1.764.732A2.503 2.503 0 0 0 4.523 11h.498v1h-.498a3.486 3.486 0 0 1-2.628-1.16a3.502 3.502 0 0 1 1.958-5.78a3.462 3.462 0 0 1 1.468.04a3.486 3.486 0 0 1 3.657-2.06A3.479 3.479 0 0 1 11.957 6zm-5.25 5.121l1.314 1.314V7h.994v5.4l1.278-1.279l.707.707l-2.146 2.147h-.708L6 11.829l.707-.708z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-hubot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M8.48 4h4l.5.5v2.03h.52l.5.5V8l-.5.5h-.52v3l-.5.5H9.36l-2.5 2.76L6 14.4V12H3.5l-.5-.64V8.5h-.5L2 8v-.97l.5-.5H3V4.36L3.53 4h4V2.86A1 1 0 0 1 7 2a1 1 0 0 1 2 0a1 1 0 0 1-.52.83V4zM12 8V5H4v5.86l2.5.14H7v2.19l1.8-2.04l.35-.15H12V8zm-2.12.51a2.71 2.71 0 0 1-1.37.74v-.01a2.71 2.71 0 0 1-2.42-.74l-.7.71c.34.34.745.608 1.19.79c.45.188.932.286 1.42.29a3.7 3.7 0 0 0 2.58-1.07l-.7-.71zM6.49 6.5h-1v1h1v-1zm3 0h1v1h-1v-1z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-link-external{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z'/%3E%3Cpath d='M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-menu{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-radio-tower{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.998 5.58a5.55 5.55 0 0 1 1.62-3.88l-.71-.7a6.45 6.45 0 0 0 0 9.16l.71-.7a5.55 5.55 0 0 1-1.62-3.88zm1.06 0a4.42 4.42 0 0 0 1.32 3.17l.71-.71a3.27 3.27 0 0 1-.76-1.12a3.45 3.45 0 0 1 0-2.67a3.22 3.22 0 0 1 .76-1.13l-.71-.71a4.46 4.46 0 0 0-1.32 3.17zm7.65 3.21l-.71-.71c.33-.32.59-.704.76-1.13a3.449 3.449 0 0 0 0-2.67a3.22 3.22 0 0 0-.76-1.13l.71-.7a4.468 4.468 0 0 1 0 6.34zM13.068 1l-.71.71a5.43 5.43 0 0 1 0 7.74l.71.71a6.45 6.45 0 0 0 0-9.16zM9.993 5.43a1.5 1.5 0 0 1-.245.98a2 2 0 0 1-.27.23l3.44 7.73l-.92.4l-.77-1.73h-5.54l-.77 1.73l-.92-.4l3.44-7.73a1.52 1.52 0 0 1-.33-1.63a1.55 1.55 0 0 1 .56-.68a1.5 1.5 0 0 1 2.325 1.1zm-1.595-.34a.52.52 0 0 0-.25.14a.52.52 0 0 0-.11.22a.48.48 0 0 0 0 .29c.04.09.102.17.18.23a.54.54 0 0 0 .28.08a.51.51 0 0 0 .5-.5a.54.54 0 0 0-.08-.28a.58.58 0 0 0-.23-.18a.48.48 0 0 0-.29 0zm.23 2.05h-.27l-.87 1.94h2l-.86-1.94zm2.2 4.94l-.89-2h-2.88l-.89 2h4.66z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-terminal{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3 1.5L1.5 3v18L3 22.5h18l1.5-1.5V3L21 1.5H3zM3 21V3h18v18H3zm5.656-4.01l1.038 1.061l5.26-5.243v-.912l-5.26-5.26l-1.035 1.06l4.59 4.702l-4.593 4.592z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-terminal-bash{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M13.655 3.56L8.918.75a1.785 1.785 0 0 0-1.82 0L2.363 3.56a1.889 1.889 0 0 0-.921 1.628v5.624a1.889 1.889 0 0 0 .913 1.627l4.736 2.812a1.785 1.785 0 0 0 1.82 0l4.736-2.812a1.888 1.888 0 0 0 .913-1.627V5.188a1.889 1.889 0 0 0-.904-1.627zm-3.669 8.781v.404a.149.149 0 0 1-.07.124l-.239.137c-.038.02-.07 0-.07-.053v-.396a.78.78 0 0 1-.545.053a.073.073 0 0 1-.027-.09l.086-.365a.153.153 0 0 1 .071-.096a.048.048 0 0 1 .038 0a.662.662 0 0 0 .497-.063a.662.662 0 0 0 .37-.567c0-.206-.112-.292-.384-.293c-.344 0-.661-.066-.67-.574A1.47 1.47 0 0 1 9.6 9.437V9.03a.147.147 0 0 1 .07-.126l.231-.147c.038-.02.07 0 .07.054v.409a.754.754 0 0 1 .453-.055a.073.073 0 0 1 .03.095l-.081.362a.156.156 0 0 1-.065.09a.055.055 0 0 1-.035 0a.6.6 0 0 0-.436.072a.549.549 0 0 0-.331.486c0 .185.098.242.425.248c.438 0 .627.199.632.639a1.568 1.568 0 0 1-.576 1.185zm2.481-.68a.094.094 0 0 1-.036.092l-1.198.727a.034.034 0 0 1-.04.003a.035.035 0 0 1-.016-.037v-.31a.086.086 0 0 1 .055-.076l1.179-.706a.035.035 0 0 1 .056.035v.273zm.827-6.914L8.812 7.515c-.559.331-.97.693-.97 1.367v5.52c0 .404.165.662.413.741a1.465 1.465 0 0 1-.248.025c-.264 0-.522-.072-.748-.207L2.522 12.15a1.558 1.558 0 0 1-.75-1.338V5.188a1.558 1.558 0 0 1 .75-1.34l4.738-2.81a1.46 1.46 0 0 1 1.489 0l4.736 2.812a1.548 1.548 0 0 1 .728 1.083c-.154-.334-.508-.427-.92-.185h.002z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-window{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14.5 2h-13l-.5.5v11l.5.5h13l.5-.5v-11l-.5-.5zM14 13H2V6h12v7zm0-8H2V3h12v2z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-broadcast{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 88a40 40 0 1 0 40 40a40 40 0 0 0-40-40Zm0 64a24 24 0 1 1 24-24a24.1 24.1 0 0 1-24 24Zm-59-48.9a64.5 64.5 0 0 0 0 49.8a65.4 65.4 0 0 0 13.7 20.4a7.9 7.9 0 0 1 0 11.3a8 8 0 0 1-5.6 2.3a8.3 8.3 0 0 1-5.7-2.3a80 80 0 0 1-17.1-25.5a79.9 79.9 0 0 1 0-62.2a80 80 0 0 1 17.1-25.5a8 8 0 0 1 11.3 0a7.9 7.9 0 0 1 0 11.3A65.4 65.4 0 0 0 69 103.1Zm132.7 56a80 80 0 0 1-17.1 25.5a8.3 8.3 0 0 1-5.7 2.3a8 8 0 0 1-5.6-2.3a7.9 7.9 0 0 1 0-11.3a65.4 65.4 0 0 0 13.7-20.4a64.5 64.5 0 0 0 0-49.8a65.4 65.4 0 0 0-13.7-20.4a7.9 7.9 0 0 1 0-11.3a8 8 0 0 1 11.3 0a80 80 0 0 1 17.1 25.5a79.9 79.9 0 0 1 0 62.2ZM54.5 201.5a8.1 8.1 0 0 1 0 11.4a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a121.8 121.8 0 0 1-25.7-38.2a120.7 120.7 0 0 1 0-93.4a121.8 121.8 0 0 1 25.7-38.2a8.1 8.1 0 0 1 11.4 11.4A103.5 103.5 0 0 0 24 128a103.5 103.5 0 0 0 30.5 73.5ZM248 128a120.2 120.2 0 0 1-9.4 46.7a121.8 121.8 0 0 1-25.7 38.2a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4A103.5 103.5 0 0 0 232 128a103.5 103.5 0 0 0-30.5-73.5a8.1 8.1 0 1 1 11.4-11.4a121.8 121.8 0 0 1 25.7 38.2A120.2 120.2 0 0 1 248 128Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-hand-waving{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.2 104l-20-34.7a28.1 28.1 0 0 0-47.3-1.9l-17.3-30a28.1 28.1 0 0 0-38.3-10.3a29.4 29.4 0 0 0-9.9 9.6a27.9 27.9 0 0 0-11.5-6.2a27.2 27.2 0 0 0-21.2 2.8a27.9 27.9 0 0 0-10.3 38.2l3.4 5.8A28.5 28.5 0 0 0 36 81a28.1 28.1 0 0 0-10.2 38.2l42 72.8a88 88 0 1 0 152.4-88Zm-6.7 62.6a71.2 71.2 0 0 1-33.5 43.7A72.1 72.1 0 0 1 81.6 184l-42-72.8a12 12 0 0 1 20.8-12l22 38.1l.6.9v.2l.5.5l.2.2l.7.6h.1l.7.5h.3l.6.3h.2l.9.3h.1l.8.2h2.2l.9-.2h.3l.6-.2h.3l.9-.4a8.1 8.1 0 0 0 2.9-11l-22-38.1l-16-27.7a12 12 0 0 1-1.2-9.1a11.8 11.8 0 0 1 5.6-7.3a12 12 0 0 1 9.1-1.2a12.5 12.5 0 0 1 7.3 5.6l8 14h.1l26 45a7 7 0 0 0 1.5 1.9a8 8 0 0 0 12.3-9.9l-26-45a12 12 0 1 1 20.8-12l30 51.9l6.3 11a48.1 48.1 0 0 0-10.9 61a8 8 0 0 0 13.8-8a32 32 0 0 1 11.7-43.7l.7-.4l.5-.4h.1l.6-.6l.5-.5l.4-.5l.3-.6h.1l.2-.5v-.2a1.9 1.9 0 0 0 .2-.7h.1c0-.2.1-.4.1-.6s0-.2.1-.2v-2.1a6.4 6.4 0 0 0-.2-.7a1.9 1.9 0 0 0-.2-.7v-.2c0-.2-.1-.3-.2-.5l-.3-.7l-10-17.4a12 12 0 0 1 13.5-17.5a11.8 11.8 0 0 1 7.2 5.5l20 34.7a70.9 70.9 0 0 1 7.2 53.8Zm-125.8 78a8.2 8.2 0 0 1-6.6 3.4a8.6 8.6 0 0 1-4.6-1.4A117.9 117.9 0 0 1 41.1 208a8 8 0 1 1 13.8-8a102.6 102.6 0 0 0 30.8 33.4a8.1 8.1 0 0 1 2 11.2ZM168 31a8 8 0 0 1 8-8a60.2 60.2 0 0 1 52 30a7.9 7.9 0 0 1-3 10.9a7.1 7.1 0 0 1-4 1.1a8 8 0 0 1-6.9-4A44 44 0 0 0 176 39a8 8 0 0 1-8-8Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M224.3 150.3a8.1 8.1 0 0 0-7.8-5.7l-2.2.4A84 84 0 0 1 111 41.6a5.7 5.7 0 0 0 .3-1.8a7.9 7.9 0 0 0-10.3-8.1a100 100 0 1 0 123.3 123.2a7.2 7.2 0 0 0 0-4.6ZM128 212A84 84 0 0 1 92.8 51.7a99.9 99.9 0 0 0 111.5 111.5A84.4 84.4 0 0 1 128 212Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 60a68 68 0 1 0 68 68a68.1 68.1 0 0 0-68-68Zm0 120a52 52 0 1 1 52-52a52 52 0 0 1-52 52Zm-8-144V16a8 8 0 0 1 16 0v20a8 8 0 0 1-16 0ZM43.1 54.5a8.1 8.1 0 1 1 11.4-11.4l14.1 14.2a8 8 0 0 1 0 11.3a8.1 8.1 0 0 1-11.3 0ZM36 136H16a8 8 0 0 1 0-16h20a8 8 0 0 1 0 16Zm32.6 51.4a8 8 0 0 1 0 11.3l-14.1 14.2a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4l14.2-14.1a8 8 0 0 1 11.3 0ZM136 220v20a8 8 0 0 1-16 0v-20a8 8 0 0 1 16 0Zm76.9-18.5a8.1 8.1 0 0 1 0 11.4a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3l-14.1-14.2a8 8 0 0 1 11.3-11.3ZM248 128a8 8 0 0 1-8 8h-20a8 8 0 0 1 0-16h20a8 8 0 0 1 8 8Zm-60.6-59.4a8 8 0 0 1 0-11.3l14.1-14.2a8.1 8.1 0 0 1 11.4 11.4l-14.2 14.1a8.1 8.1 0 0 1-11.3 0Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.note{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);padding:0.5rem;text-decoration:none;}.note-red{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);background-color:rgba(185,28,28,0.1);padding:0.5rem;text-decoration:none;}.nv{position:relative;display:flex;align-items:center;border-radius:0.25rem;padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.nv_selected{position:relative;display:flex;align-items:center;border-left-width:4px;border-left-style:solid;border-radius:0.25rem;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));color:rgba(53,120,229,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.input{height:2.5rem;display:flex;align-items:center;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(233,236,239,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.btn{user-select:none;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));padding:0.5rem;font-weight:400;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));color:rgba(255,255,255,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.nv_selected:hover,.nv:hover{border-left-width:4px;border-left-style:solid;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.dark .note{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);}.dark .note-red{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);background-color:rgba(185,28,28,0.1);}.btn:hover{--un-bg-opacity:1;background-color:rgba(45,102,195,var(--un-bg-opacity));}.dark .btn{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));font-weight:600;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .btn:hover{--un-bg-opacity:1;background-color:rgba(57,202,232,var(--un-bg-opacity));}.dark .input{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.dark .note-red::after,.note-red::after{--un-bg-opacity:1;background-color:rgba(185,28,28,var(--un-bg-opacity));}.btn:active{--un-bg-opacity:1;background-color:rgba(37,84,160,var(--un-bg-opacity));}.dark .btn:active{--un-bg-opacity:1;background-color:rgba(25,181,213,var(--un-bg-opacity));}.dark .nv_selected,.dark .nv_selected:hover,.dark .nv:hover{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));} ::-webkit-scrollbar-thumb { background-color: #3578E5; } .dark ::-webkit-scrollbar-thumb { background-color: #67d6ed; } code { font-size: 0.75rem; font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; border-radius: 0.25rem; background-color: #d6d8da; } .code-block { font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size: 0.875rem; } .dark code { background-color: #282a2e; } .visible{visibility:visible;}.absolute{position:absolute;}.left-2{left:0.5rem;}.top-2{top:0.5rem;}.z-2000{z-index:2000;}.grid{display:grid;}.grid-rows-\[2fr_auto\]{grid-template-rows:2fr auto;}.grid-rows-\[2px_2rem_1fr\]{grid-template-rows:2px 2rem 1fr;}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr;}.my-2{margin-top:0.5rem;margin-bottom:0.5rem;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*,.children\:h10>*{height:2.5rem;}.children\:h-100\%>*,.h-100\%{height:100%;}.children\:w-12>*{width:3rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.children\:inline-flex>*{display:inline-flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.children\:grow>*,.grow{flex-grow:1;}.flex-row{flex-direction:row;}.flex-col{flex-direction:column;}.flex-wrap{flex-wrap:wrap;}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.animate-fade-in{animation:fade-in 1s linear 1;}.animate-spin{animation:spin 1s linear infinite;}.animate-duration-300ms{animation-duration:300ms;}.cursor-ns-resize{cursor:ns-resize;}.cursor-pointer{cursor:pointer;}.select-none{user-select:none;}.children\:items-center>*,.items-center{align-items:center;}.self-center{align-self:center;}.children\:justify-center>*,.justify-center{justify-content:center;}.justify-between{justify-content:space-between;}.gap-1{grid-gap:0.25rem;gap:0.25rem;}.gap-2{grid-gap:0.5rem;gap:0.5rem;}.overflow-hidden{overflow:hidden;}.overflow-y-auto{overflow-y:auto;}.rd-1{border-radius:0.25rem;}.rd-8{border-radius:2rem;}.bg-accent{--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));}.bg-black\/20{background-color:rgba(0,0,0,0.2);}.bg-darkPrimaryLighter{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5{background-color:rgba(255,255,255,0.05);}.dark .dark\:bg-darkAccent{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));}.dark .dark\:bg-darkPrimary{--un-bg-opacity:1;background-color:rgba(27,27,29,var(--un-bg-opacity));}.dark .dark\:hover\:bg-darkHoverOverlay:hover{--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.hover\:bg-hoverOverlay:hover{--un-bg-opacity:.05;background-color:rgba(0,0,0,var(--un-bg-opacity));}.active\:bg-accentDark:active{--un-bg-opacity:1;background-color:rgba(48,108,206,var(--un-bg-opacity));}.active\:bg-hoverOverlay\/25:active{background-color:rgba(0,0,0,0.25);}.active\:bg-hoverOverlayDarker:active{--un-bg-opacity:.1;background-color:rgba(0,0,0,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkAccentDark:active{--un-bg-opacity:1;background-color:rgba(73,206,233,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkHoverOverlay\/25:active{background-color:hsla(0,0%,100%,0.25);}.dark .dark\:active\:bg-darkHoverOverlayDarker:active{--un-bg-opacity:.1;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.p-1{padding:0.25rem;}.p-7{padding:1.75rem;}.px{padding-left:1rem;padding-right:1rem;}.px-2{padding-left:0.5rem;padding-right:0.5rem;}.px-5{padding-left:1.25rem;padding-right:1.25rem;}.children-pb-2>*{padding-bottom:0.5rem;}.children-pt8>*{padding-top:2rem;}.pl-2{padding-left:0.5rem;}.all\:font-mono *{font-family:"Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}.all\:text-xs *{font-size:0.75rem;line-height:1rem;}.text-sm{font-size:0.875rem;line-height:1.25rem;}.font-700{font-weight:700;}.font-semibold{font-weight:600;}.dark .dark\:text-darkAccent{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));}.dark .dark\:text-darkAccentText,.text-primaryText{--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .dark\:text-darkPrimaryText,.text-darkPrimaryText{--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.text-accent{--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.text-accentText{--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\:pl-10{padding-left:2.5rem;}.lt-sm\:shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}}*:not(h1,h2,h3,h4,h5,h6){margin:0;padding:0}*{box-sizing:border-box;font-family:Rubik,sans-serif}::-webkit-scrollbar{width:.25rem;height:3px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.25rem}code{padding:.05rem .25rem}code.code-block{padding:.5rem}#sidebar{width:18.75rem}@media screen and (max-width: 640px){#sidebar{--translate-x: -18.75rem;transform:translate(var(--translate-x))}}.spinner.svelte-4xesec{height:1.2rem;width:1.2rem;border-radius:50rem;color:currentColor;border:2px dashed currentColor} +*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x:var(--un-empty,/*!*/ /*!*/);--un-pan-y:var(--un-empty,/*!*/ /*!*/);--un-pinch-zoom:var(--un-empty,/*!*/ /*!*/);--un-scroll-snap-strictness:proximity;--un-ordinal:var(--un-empty,/*!*/ /*!*/);--un-slashed-zero:var(--un-empty,/*!*/ /*!*/);--un-numeric-figure:var(--un-empty,/*!*/ /*!*/);--un-numeric-spacing:var(--un-empty,/*!*/ /*!*/);--un-numeric-fraction:var(--un-empty,/*!*/ /*!*/);--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset:var(--un-empty,/*!*/ /*!*/);--un-shadow:0 0 #0000;--un-ring-inset:var(--un-empty,/*!*/ /*!*/);--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur:var(--un-empty,/*!*/ /*!*/);--un-brightness:var(--un-empty,/*!*/ /*!*/);--un-contrast:var(--un-empty,/*!*/ /*!*/);--un-drop-shadow:var(--un-empty,/*!*/ /*!*/);--un-grayscale:var(--un-empty,/*!*/ /*!*/);--un-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-invert:var(--un-empty,/*!*/ /*!*/);--un-saturate:var(--un-empty,/*!*/ /*!*/);--un-sepia:var(--un-empty,/*!*/ /*!*/);--un-backdrop-blur:var(--un-empty,/*!*/ /*!*/);--un-backdrop-brightness:var(--un-empty,/*!*/ /*!*/);--un-backdrop-contrast:var(--un-empty,/*!*/ /*!*/);--un-backdrop-grayscale:var(--un-empty,/*!*/ /*!*/);--un-backdrop-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-invert:var(--un-empty,/*!*/ /*!*/);--un-backdrop-opacity:var(--un-empty,/*!*/ /*!*/);--un-backdrop-saturate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-sepia:var(--un-empty,/*!*/ /*!*/);}@font-face { font-family: 'Fira Code'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firacode/v21/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sFVc.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtQIQ.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bS2SlFPv1weGeLZDtondv3mQ.ttf) format('truetype');}@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/rubik/v26/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.i-codicon-chrome-maximize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3 3v10h10V3H3zm9 9H4V4h8v8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-minimize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14 8v1H3V8h11z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-restore{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M3 5v9h9V5H3zm8 8H4V6h7v7z'/%3E%3Cpath fill-rule='evenodd' d='M5 5h1V4h7v7h-1v1h2V3H5v2z' clip-rule='evenodd'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-clear-all{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m10 12.6l.7.7l1.6-1.6l1.6 1.6l.8-.7L13 11l1.7-1.6l-.8-.8l-1.6 1.7l-1.6-1.7l-.7.8l1.6 1.6l-1.6 1.6zM1 4h14V3H1v1zm0 3h14V6H1v1zm8 2.5V9H1v1h8v-.5zM9 13v-1H1v1h8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m8 8.707l3.646 3.647l.708-.707L8.707 8l3.647-3.646l-.707-.708L8 7.293L4.354 3.646l-.707.708L7.293 8l-3.646 3.646l.707.708L8 8.707z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-cloud-download{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11.957 6h.05a2.99 2.99 0 0 1 2.116.879a3.003 3.003 0 0 1 0 4.242a2.99 2.99 0 0 1-2.117.879v-1a2.002 2.002 0 0 0 0-4h-.914l-.123-.857a2.49 2.49 0 0 0-2.126-2.122A2.478 2.478 0 0 0 6.231 5.5l-.333.762l-.809-.189A2.49 2.49 0 0 0 4.523 6c-.662 0-1.297.263-1.764.732A2.503 2.503 0 0 0 4.523 11h.498v1h-.498a3.486 3.486 0 0 1-2.628-1.16a3.502 3.502 0 0 1 1.958-5.78a3.462 3.462 0 0 1 1.468.04a3.486 3.486 0 0 1 3.657-2.06A3.479 3.479 0 0 1 11.957 6zm-5.25 5.121l1.314 1.314V7h.994v5.4l1.278-1.279l.707.707l-2.146 2.147h-.708L6 11.829l.707-.708z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-hubot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M8.48 4h4l.5.5v2.03h.52l.5.5V8l-.5.5h-.52v3l-.5.5H9.36l-2.5 2.76L6 14.4V12H3.5l-.5-.64V8.5h-.5L2 8v-.97l.5-.5H3V4.36L3.53 4h4V2.86A1 1 0 0 1 7 2a1 1 0 0 1 2 0a1 1 0 0 1-.52.83V4zM12 8V5H4v5.86l2.5.14H7v2.19l1.8-2.04l.35-.15H12V8zm-2.12.51a2.71 2.71 0 0 1-1.37.74v-.01a2.71 2.71 0 0 1-2.42-.74l-.7.71c.34.34.745.608 1.19.79c.45.188.932.286 1.42.29a3.7 3.7 0 0 0 2.58-1.07l-.7-.71zM6.49 6.5h-1v1h1v-1zm3 0h1v1h-1v-1z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-link-external{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z'/%3E%3Cpath d='M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-menu{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-radio-tower{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.998 5.58a5.55 5.55 0 0 1 1.62-3.88l-.71-.7a6.45 6.45 0 0 0 0 9.16l.71-.7a5.55 5.55 0 0 1-1.62-3.88zm1.06 0a4.42 4.42 0 0 0 1.32 3.17l.71-.71a3.27 3.27 0 0 1-.76-1.12a3.45 3.45 0 0 1 0-2.67a3.22 3.22 0 0 1 .76-1.13l-.71-.71a4.46 4.46 0 0 0-1.32 3.17zm7.65 3.21l-.71-.71c.33-.32.59-.704.76-1.13a3.449 3.449 0 0 0 0-2.67a3.22 3.22 0 0 0-.76-1.13l.71-.7a4.468 4.468 0 0 1 0 6.34zM13.068 1l-.71.71a5.43 5.43 0 0 1 0 7.74l.71.71a6.45 6.45 0 0 0 0-9.16zM9.993 5.43a1.5 1.5 0 0 1-.245.98a2 2 0 0 1-.27.23l3.44 7.73l-.92.4l-.77-1.73h-5.54l-.77 1.73l-.92-.4l3.44-7.73a1.52 1.52 0 0 1-.33-1.63a1.55 1.55 0 0 1 .56-.68a1.5 1.5 0 0 1 2.325 1.1zm-1.595-.34a.52.52 0 0 0-.25.14a.52.52 0 0 0-.11.22a.48.48 0 0 0 0 .29c.04.09.102.17.18.23a.54.54 0 0 0 .28.08a.51.51 0 0 0 .5-.5a.54.54 0 0 0-.08-.28a.58.58 0 0 0-.23-.18a.48.48 0 0 0-.29 0zm.23 2.05h-.27l-.87 1.94h2l-.86-1.94zm2.2 4.94l-.89-2h-2.88l-.89 2h4.66z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-terminal{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3 1.5L1.5 3v18L3 22.5h18l1.5-1.5V3L21 1.5H3zM3 21V3h18v18H3zm5.656-4.01l1.038 1.061l5.26-5.243v-.912l-5.26-5.26l-1.035 1.06l4.59 4.702l-4.593 4.592z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-window{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14.5 2h-13l-.5.5v11l.5.5h13l.5-.5v-11l-.5-.5zM14 13H2V6h12v7zm0-8H2V3h12v2z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-broadcast{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 88a40 40 0 1 0 40 40a40 40 0 0 0-40-40Zm0 64a24 24 0 1 1 24-24a24.1 24.1 0 0 1-24 24Zm-59-48.9a64.5 64.5 0 0 0 0 49.8a65.4 65.4 0 0 0 13.7 20.4a7.9 7.9 0 0 1 0 11.3a8 8 0 0 1-5.6 2.3a8.3 8.3 0 0 1-5.7-2.3a80 80 0 0 1-17.1-25.5a79.9 79.9 0 0 1 0-62.2a80 80 0 0 1 17.1-25.5a8 8 0 0 1 11.3 0a7.9 7.9 0 0 1 0 11.3A65.4 65.4 0 0 0 69 103.1Zm132.7 56a80 80 0 0 1-17.1 25.5a8.3 8.3 0 0 1-5.7 2.3a8 8 0 0 1-5.6-2.3a7.9 7.9 0 0 1 0-11.3a65.4 65.4 0 0 0 13.7-20.4a64.5 64.5 0 0 0 0-49.8a65.4 65.4 0 0 0-13.7-20.4a7.9 7.9 0 0 1 0-11.3a8 8 0 0 1 11.3 0a80 80 0 0 1 17.1 25.5a79.9 79.9 0 0 1 0 62.2ZM54.5 201.5a8.1 8.1 0 0 1 0 11.4a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a121.8 121.8 0 0 1-25.7-38.2a120.7 120.7 0 0 1 0-93.4a121.8 121.8 0 0 1 25.7-38.2a8.1 8.1 0 0 1 11.4 11.4A103.5 103.5 0 0 0 24 128a103.5 103.5 0 0 0 30.5 73.5ZM248 128a120.2 120.2 0 0 1-9.4 46.7a121.8 121.8 0 0 1-25.7 38.2a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4A103.5 103.5 0 0 0 232 128a103.5 103.5 0 0 0-30.5-73.5a8.1 8.1 0 1 1 11.4-11.4a121.8 121.8 0 0 1 25.7 38.2A120.2 120.2 0 0 1 248 128Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-hand-waving{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.2 104l-20-34.7a28.1 28.1 0 0 0-47.3-1.9l-17.3-30a28.1 28.1 0 0 0-38.3-10.3a29.4 29.4 0 0 0-9.9 9.6a27.9 27.9 0 0 0-11.5-6.2a27.2 27.2 0 0 0-21.2 2.8a27.9 27.9 0 0 0-10.3 38.2l3.4 5.8A28.5 28.5 0 0 0 36 81a28.1 28.1 0 0 0-10.2 38.2l42 72.8a88 88 0 1 0 152.4-88Zm-6.7 62.6a71.2 71.2 0 0 1-33.5 43.7A72.1 72.1 0 0 1 81.6 184l-42-72.8a12 12 0 0 1 20.8-12l22 38.1l.6.9v.2l.5.5l.2.2l.7.6h.1l.7.5h.3l.6.3h.2l.9.3h.1l.8.2h2.2l.9-.2h.3l.6-.2h.3l.9-.4a8.1 8.1 0 0 0 2.9-11l-22-38.1l-16-27.7a12 12 0 0 1-1.2-9.1a11.8 11.8 0 0 1 5.6-7.3a12 12 0 0 1 9.1-1.2a12.5 12.5 0 0 1 7.3 5.6l8 14h.1l26 45a7 7 0 0 0 1.5 1.9a8 8 0 0 0 12.3-9.9l-26-45a12 12 0 1 1 20.8-12l30 51.9l6.3 11a48.1 48.1 0 0 0-10.9 61a8 8 0 0 0 13.8-8a32 32 0 0 1 11.7-43.7l.7-.4l.5-.4h.1l.6-.6l.5-.5l.4-.5l.3-.6h.1l.2-.5v-.2a1.9 1.9 0 0 0 .2-.7h.1c0-.2.1-.4.1-.6s0-.2.1-.2v-2.1a6.4 6.4 0 0 0-.2-.7a1.9 1.9 0 0 0-.2-.7v-.2c0-.2-.1-.3-.2-.5l-.3-.7l-10-17.4a12 12 0 0 1 13.5-17.5a11.8 11.8 0 0 1 7.2 5.5l20 34.7a70.9 70.9 0 0 1 7.2 53.8Zm-125.8 78a8.2 8.2 0 0 1-6.6 3.4a8.6 8.6 0 0 1-4.6-1.4A117.9 117.9 0 0 1 41.1 208a8 8 0 1 1 13.8-8a102.6 102.6 0 0 0 30.8 33.4a8.1 8.1 0 0 1 2 11.2ZM168 31a8 8 0 0 1 8-8a60.2 60.2 0 0 1 52 30a7.9 7.9 0 0 1-3 10.9a7.1 7.1 0 0 1-4 1.1a8 8 0 0 1-6.9-4A44 44 0 0 0 176 39a8 8 0 0 1-8-8Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M224.3 150.3a8.1 8.1 0 0 0-7.8-5.7l-2.2.4A84 84 0 0 1 111 41.6a5.7 5.7 0 0 0 .3-1.8a7.9 7.9 0 0 0-10.3-8.1a100 100 0 1 0 123.3 123.2a7.2 7.2 0 0 0 0-4.6ZM128 212A84 84 0 0 1 92.8 51.7a99.9 99.9 0 0 0 111.5 111.5A84.4 84.4 0 0 1 128 212Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 60a68 68 0 1 0 68 68a68.1 68.1 0 0 0-68-68Zm0 120a52 52 0 1 1 52-52a52 52 0 0 1-52 52Zm-8-144V16a8 8 0 0 1 16 0v20a8 8 0 0 1-16 0ZM43.1 54.5a8.1 8.1 0 1 1 11.4-11.4l14.1 14.2a8 8 0 0 1 0 11.3a8.1 8.1 0 0 1-11.3 0ZM36 136H16a8 8 0 0 1 0-16h20a8 8 0 0 1 0 16Zm32.6 51.4a8 8 0 0 1 0 11.3l-14.1 14.2a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4l14.2-14.1a8 8 0 0 1 11.3 0ZM136 220v20a8 8 0 0 1-16 0v-20a8 8 0 0 1 16 0Zm76.9-18.5a8.1 8.1 0 0 1 0 11.4a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3l-14.1-14.2a8 8 0 0 1 11.3-11.3ZM248 128a8 8 0 0 1-8 8h-20a8 8 0 0 1 0-16h20a8 8 0 0 1 8 8Zm-60.6-59.4a8 8 0 0 1 0-11.3l14.1-14.2a8.1 8.1 0 0 1 11.4 11.4l-14.2 14.1a8.1 8.1 0 0 1-11.3 0Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.note{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);padding:0.5rem;text-decoration:none;}.note-red{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);background-color:rgba(185,28,28,0.1);padding:0.5rem;text-decoration:none;}.nv{position:relative;display:flex;align-items:center;border-radius:0.25rem;padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.nv_selected{position:relative;display:flex;align-items:center;border-left-width:4px;border-left-style:solid;border-radius:0.25rem;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));color:rgba(53,120,229,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.input{height:2.5rem;display:flex;align-items:center;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(233,236,239,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.btn{user-select:none;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));padding:0.5rem;font-weight:400;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));color:rgba(255,255,255,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.nv_selected:hover,.nv:hover{border-left-width:4px;border-left-style:solid;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.dark .note{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);}.dark .note-red{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);background-color:rgba(185,28,28,0.1);}.btn:hover{--un-bg-opacity:1;background-color:rgba(45,102,195,var(--un-bg-opacity));}.dark .btn{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));font-weight:600;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .btn:hover{--un-bg-opacity:1;background-color:rgba(57,202,232,var(--un-bg-opacity));}.dark .input{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.dark .note-red::after,.note-red::after{--un-bg-opacity:1;background-color:rgba(185,28,28,var(--un-bg-opacity));}.btn:active{--un-bg-opacity:1;background-color:rgba(37,84,160,var(--un-bg-opacity));}.dark .btn:active{--un-bg-opacity:1;background-color:rgba(25,181,213,var(--un-bg-opacity));}.dark .nv_selected,.dark .nv_selected:hover,.dark .nv:hover{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));} ::-webkit-scrollbar-thumb { background-color: #3578E5; } .dark ::-webkit-scrollbar-thumb { background-color: #67d6ed; } code { font-size: 0.75rem; font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; border-radius: 0.25rem; background-color: #d6d8da; } .code-block { font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size: 0.875rem; } .dark code { background-color: #282a2e; } .visible{visibility:visible;}.absolute{position:absolute;}.left-2{left:0.5rem;}.top-2{top:0.5rem;}.z-2000{z-index:2000;}.grid{display:grid;}.grid-rows-\[2fr_auto\]{grid-template-rows:2fr auto;}.grid-rows-\[2px_2rem_1fr\]{grid-template-rows:2px 2rem 1fr;}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr;}.my-2{margin-top:0.5rem;margin-bottom:0.5rem;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*,.children\:h10>*{height:2.5rem;}.children\:h-100\%>*,.h-100\%{height:100%;}.children\:w-12>*{width:3rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.children\:inline-flex>*{display:inline-flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.children\:grow>*,.grow{flex-grow:1;}.flex-row{flex-direction:row;}.flex-col{flex-direction:column;}.flex-wrap{flex-wrap:wrap;}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.animate-fade-in{animation:fade-in 1s linear 1;}.animate-spin{animation:spin 1s linear infinite;}.animate-duration-300ms{animation-duration:300ms;}.cursor-ns-resize{cursor:ns-resize;}.cursor-pointer{cursor:pointer;}.select-none{user-select:none;}.children\:items-center>*,.items-center{align-items:center;}.self-center{align-self:center;}.children\:justify-center>*,.justify-center{justify-content:center;}.justify-between{justify-content:space-between;}.gap-1{grid-gap:0.25rem;gap:0.25rem;}.gap-2{grid-gap:0.5rem;gap:0.5rem;}.overflow-hidden{overflow:hidden;}.overflow-y-auto{overflow-y:auto;}.rd-1{border-radius:0.25rem;}.rd-8{border-radius:2rem;}.bg-accent{--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));}.bg-black\/20{background-color:rgba(0,0,0,0.2);}.bg-darkPrimaryLighter{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5{background-color:rgba(255,255,255,0.05);}.dark .dark\:bg-darkAccent{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));}.dark .dark\:bg-darkPrimary{--un-bg-opacity:1;background-color:rgba(27,27,29,var(--un-bg-opacity));}.dark .dark\:hover\:bg-darkHoverOverlay:hover{--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.hover\:bg-hoverOverlay:hover{--un-bg-opacity:.05;background-color:rgba(0,0,0,var(--un-bg-opacity));}.active\:bg-accentDark:active{--un-bg-opacity:1;background-color:rgba(48,108,206,var(--un-bg-opacity));}.active\:bg-hoverOverlay\/25:active{background-color:rgba(0,0,0,0.25);}.active\:bg-hoverOverlayDarker:active{--un-bg-opacity:.1;background-color:rgba(0,0,0,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkAccentDark:active{--un-bg-opacity:1;background-color:rgba(73,206,233,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkHoverOverlay\/25:active{background-color:hsla(0,0%,100%,0.25);}.dark .dark\:active\:bg-darkHoverOverlayDarker:active{--un-bg-opacity:.1;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.p-1{padding:0.25rem;}.p-7{padding:1.75rem;}.px{padding-left:1rem;padding-right:1rem;}.px-2{padding-left:0.5rem;padding-right:0.5rem;}.px-5{padding-left:1.25rem;padding-right:1.25rem;}.children-pb-2>*{padding-bottom:0.5rem;}.children-pt8>*{padding-top:2rem;}.pl-2{padding-left:0.5rem;}.all\:font-mono *{font-family:"Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}.all\:text-xs *{font-size:0.75rem;line-height:1rem;}.text-sm{font-size:0.875rem;line-height:1.25rem;}.font-700{font-weight:700;}.font-semibold{font-weight:600;}.dark .dark\:text-darkAccent{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));}.dark .dark\:text-darkAccentText,.text-primaryText{--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .dark\:text-darkPrimaryText,.text-darkPrimaryText{--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.text-accent{--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.text-accentText{--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\:pl-10{padding-left:2.5rem;}.lt-sm\:shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}}*:not(h1,h2,h3,h4,h5,h6){margin:0;padding:0}*{box-sizing:border-box;font-family:Rubik,sans-serif}::-webkit-scrollbar{width:.25rem;height:3px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.25rem}code{padding:.05rem .25rem}code.code-block{padding:.5rem}#sidebar{width:18.75rem}@media screen and (max-width: 640px){#sidebar{--translate-x: -18.75rem;transform:translate(var(--translate-x))}}.spinner.svelte-4xesec{height:1.2rem;width:1.2rem;border-radius:50rem;color:currentColor;border:2px dashed currentColor} diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index c387235ec21..61cf5dc4d1c 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,44 +1,39 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const u of r.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerpolicy&&(r.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?r.credentials="include":s.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();function F(){}function Bl(e){return e()}function Wl(){return Object.create(null)}function he(e){e.forEach(Bl)}function gs(e){return typeof e=="function"}function Se(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let In;function vs(e,t){return In||(In=document.createElement("a")),In.href=t,e===In.href}function ys(e){return Object.keys(e).length===0}function ws(e,...t){if(e==null)return F;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ks(e,t,n){e.$$.on_destroy.push(ws(t,n))}function l(e,t){e.appendChild(t)}function b(e,t,n){e.insertBefore(t,n||null)}function _(e){e.parentNode.removeChild(e)}function qn(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function Cl(e){return function(t){return t.preventDefault(),e.call(this,t)}}function o(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function ee(e){return e===""?null:+e}function Ls(e){return Array.from(e.childNodes)}function Q(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function N(e,t){e.value=t==null?"":t}function Fn(e,t){for(let n=0;n{Un.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function El(e){e&&e.c()}function yi(e,t,n,i){const{fragment:s,on_mount:r,on_destroy:u,after_update:p}=e.$$;s&&s.m(t,n),i||Ut(()=>{const d=r.map(Bl).filter(gs);u?u.push(...d):he(d),e.$$.on_mount=[]}),p.forEach(Ut)}function wi(e,t){const n=e.$$;n.fragment!==null&&(he(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Es(e,t){e.$$.dirty[0]===-1&&(It.push(e),Cs(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const h=M.length?M[0]:y;return f.ctx&&s(f.ctx[v],f.ctx[v]=h)&&(!f.skip_bound&&f.bound[v]&&f.bound[v](h),g&&Es(e,v)),y}):[],f.update(),g=!0,he(f.before_update),f.fragment=i?i(f.ctx):!1,t.target){if(t.hydrate){const v=Ls(t.target);f.fragment&&f.fragment.l(v),v.forEach(_)}else f.fragment&&f.fragment.c();t.intro&&vi(e.$$.fragment),yi(e,t.target,t.anchor,t.customElement),$l()}Rt(d)}class He{$destroy(){wi(this,1),this.$destroy=F}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!ys(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Wt=[];function Ps(e,t=F){let n;const i=new Set;function s(p){if(Se(e,p)&&(e=p,n)){const d=!Wt.length;for(const f of i)f[1](),Wt.push(f,e);if(d){for(let f=0;f{i.delete(f),i.size===0&&(n(),n=null)}}return{set:s,update:r,subscribe:u}}var Os=Object.defineProperty,Qe=(e,t)=>{for(var n in t)Os(e,n,{get:t[n],enumerable:!0})},Ds={};Qe(Ds,{convertFileSrc:()=>Rs,invoke:()=>jt,transformCallback:()=>Nt});function Is(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function Nt(e,t=!1){let n=Is(),i=`_${n}`;return Object.defineProperty(window,i,{value:s=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(s)),writable:!1,configurable:!0}),n}async function jt(e,t={}){return new Promise((n,i)=>{let s=Nt(u=>{n(u),Reflect.deleteProperty(window,`_${r}`)},!0),r=Nt(u=>{i(u),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:e,callback:s,error:r,...t})})}function Rs(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function L(e){return jt("tauri",e)}var Hs={};Qe(Hs,{Child:()=>Ql,Command:()=>Vn,EventEmitter:()=>Nn,open:()=>Mi});async function Us(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),L({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:Nt(e)}})}var Nn=class{constructor(){this.eventListeners=Object.create(null)}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}on(e,t){return e in this.eventListeners?this.eventListeners[e].push(t):this.eventListeners[e]=[t],this}once(e,t){let n=i=>{this.removeListener(e,n),t(i)};return this.addListener(e,n)}off(e,t){return e in this.eventListeners&&(this.eventListeners[e]=this.eventListeners[e].filter(n=>n!==t)),this}removeAllListeners(e){return e?delete this.eventListeners[e]:this.eventListeners=Object.create(null),this}emit(e,t){if(e in this.eventListeners){let n=this.eventListeners[e];for(let i of n)i(t);return!0}return!1}listenerCount(e){return e in this.eventListeners?this.eventListeners[e].length:0}prependListener(e,t){return e in this.eventListeners?this.eventListeners[e].unshift(t):this.eventListeners[e]=[t],this}prependOnceListener(e,t){let n=i=>{this.removeListener(e,n),t(i)};return this.prependListener(e,n)}},Ql=class{constructor(e){this.pid=e}async write(e){return L({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return L({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},Vn=class extends Nn{constructor(e,t=[],n){super(),this.stdout=new Nn,this.stderr=new Nn,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static create(e,t=[],n){return new Vn(e,t,n)}static sidecar(e,t=[],n){let i=new Vn(e,t,n);return i.options.sidecar=!0,i}async spawn(){return Us(e=>{switch(e.event){case"Error":this.emit("error",e.payload);break;case"Terminated":this.emit("close",e.payload);break;case"Stdout":this.stdout.emit("data",e.payload);break;case"Stderr":this.stderr.emit("data",e.payload);break}},this.program,this.args,this.options).then(e=>new Ql(e))}async execute(){return new Promise((e,t)=>{this.on("error",t);let n=[],i=[];this.stdout.on("data",s=>{n.push(s)}),this.stderr.on("data",s=>{i.push(s)}),this.on("close",s=>{e({code:s.code,signal:s.signal,stdout:this.collectOutput(n),stderr:this.collectOutput(i)})}),this.spawn().catch(t)})}collectOutput(e){return this.options.encoding==="raw"?e.reduce((t,n)=>new Uint8Array([...t,...n,10]),new Uint8Array):e.join(` -`)}};async function Mi(e,t){return L({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var Ns={};Qe(Ns,{TauriEvent:()=>ns,emit:()=>Gn,listen:()=>qt,once:()=>is});async function Zl(e,t){return L({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function es(e,t,n){await L({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Li(e,t,n){return L({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:Nt(n)}}).then(i=>async()=>Zl(e,i))}async function ts(e,t,n){return Li(e,t,i=>{n(i),Zl(e,i.id).catch(()=>{})})}var ns=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(ns||{});async function qt(e,t){return Li(e,null,t)}async function is(e,t){return ts(e,null,t)}async function Gn(e,t){return es(e,void 0,t)}var js={};Qe(js,{CloseRequestedEvent:()=>rs,LogicalPosition:()=>ls,LogicalSize:()=>xn,PhysicalPosition:()=>$e,PhysicalSize:()=>rt,UserAttentionType:()=>zi,WebviewWindow:()=>ct,WebviewWindowHandle:()=>as,WindowManager:()=>os,appWindow:()=>ut,availableMonitors:()=>Vs,currentMonitor:()=>qs,getAll:()=>ss,getCurrent:()=>jn,primaryMonitor:()=>Fs});var xn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},rt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new xn(this.width/e,this.height/e)}},ls=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},$e=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new ls(this.x/e,this.y/e)}},zi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(zi||{});function jn(){return new ct(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function ss(){return window.__TAURI_METADATA__.__windows.map(e=>new ct(e.label,{skip:!0}))}var Pl=["tauri://created","tauri://error"],as=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Li(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):ts(e,this.label,t)}async emit(e,t){if(Pl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return es(e,this.label,t)}_handleTauriEvent(e,t){return Pl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},os=class extends as{async scaleFactor(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new $e(e,t))}async outerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new $e(e,t))}async innerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new rt(e,t))}async outerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new rt(e,t))}async isFullscreen(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return L({__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"}),L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return L({__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 L({__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 L({__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 L({__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 L({__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 L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return L({__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 L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return L({__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 L({__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 L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new rs(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),n=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",s=>{e({...s,payload:{type:"drop",paths:s.payload}})}),n=await this.listen("tauri://file-drop-hover",s=>{e({...s,payload:{type:"hover",paths:s.payload}})}),i=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},rs=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}},ct=class extends os{constructor(e,t={}){super(e),t!=null&&t.skip||L({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return ss().some(t=>t.label===e)?new ct(e,{skip:!0}):null}},ut;"__TAURI_METADATA__"in window?ut=new ct(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.`),ut=new ct("main",{skip:!0}));function Wi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new $e(e.position.x,e.position.y),size:new rt(e.size.width,e.size.height)}}async function qs(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Wi)}async function Fs(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Wi)}async function Vs(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(Wi))}function xs(){return navigator.appVersion.includes("Win")}var Gs={};Qe(Gs,{EOL:()=>Xs,arch:()=>Ks,platform:()=>us,tempdir:()=>Js,type:()=>Bs,version:()=>Ys});var Xs=xs()?`\r +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const c of r.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerpolicy&&(r.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?r.credentials="include":s.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();function U(){}function Ul(e){return e()}function gl(){return Object.create(null)}function we(e){e.forEach(Ul)}function os(e){return typeof e=="function"}function Ie(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Ln;function rs(e,t){return Ln||(Ln=document.createElement("a")),Ln.href=t,e===Ln.href}function us(e){return Object.keys(e).length===0}function cs(e,...t){if(e==null)return U;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ds(e,t,n){e.$$.on_destroy.push(cs(t,n))}function l(e,t){e.appendChild(t)}function b(e,t,n){e.insertBefore(t,n||null)}function _(e){e.parentNode.removeChild(e)}function Dn(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function ps(e){return function(t){return t.preventDefault(),e.call(this,t)}}function o(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Q(e){return e===""?null:+e}function ms(e){return Array.from(e.childNodes)}function $(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function G(e,t){e.value=t==null?"":t}function In(e,t){for(let n=0;n{Pn.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function kl(e){e&&e.c()}function mi(e,t,n,i){const{fragment:s,on_mount:r,on_destroy:c,after_update:f}=e.$$;s&&s.m(t,n),i||Ot(()=>{const h=r.map(Ul).filter(os);c?c.push(...h):we(h),e.$$.on_mount=[]}),f.forEach(Ot)}function hi(e,t){const n=e.$$;n.fragment!==null&&(we(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ws(e,t){e.$$.dirty[0]===-1&&(Et.push(e),bs(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const p=M.length?M[0]:C;return m.ctx&&s(m.ctx[g],m.ctx[g]=p)&&(!m.skip_bound&&m.bound[g]&&m.bound[g](p),y&&ws(e,g)),C}):[],m.update(),y=!0,we(m.before_update),m.fragment=i?i(m.ctx):!1,t.target){if(t.hydrate){const g=ms(t.target);m.fragment&&m.fragment.l(g),g.forEach(_)}else m.fragment&&m.fragment.c();t.intro&&pi(e.$$.fragment),mi(e,t.target,t.anchor,t.customElement),ql()}St(h)}class Je{$destroy(){hi(this,1),this.$destroy=U}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!us(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const wt=[];function ks(e,t=U){let n;const i=new Set;function s(f){if(Ie(e,f)&&(e=f,n)){const h=!wt.length;for(const m of i)m[1](),wt.push(m,e);if(h){for(let m=0;m{i.delete(m),i.size===0&&(n(),n=null)}}return{set:s,update:r,subscribe:c}}var Ms=Object.defineProperty,ot=(e,t)=>{for(var n in t)Ms(e,n,{get:t[n],enumerable:!0})},zs={};ot(zs,{convertFileSrc:()=>Cs,invoke:()=>Dt,transformCallback:()=>Rn});function Ws(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function Rn(e,t=!1){let n=Ws(),i=`_${n}`;return Object.defineProperty(window,i,{value:s=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(s)),writable:!1,configurable:!0}),n}async function Dt(e,t={}){return new Promise((n,i)=>{let s=Rn(c=>{n(c),Reflect.deleteProperty(window,`_${r}`)},!0),r=Rn(c=>{i(c),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:e,callback:s,error:r,...t})})}function Cs(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function z(e){return Dt("tauri",e)}var Ts={};ot(Ts,{TauriEvent:()=>Gl,emit:()=>Un,listen:()=>It,once:()=>Xl});async function Fl(e,t){return z({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function jl(e,t,n){await z({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function bi(e,t,n){return z({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:Rn(n)}}).then(i=>async()=>Fl(e,i))}async function Vl(e,t,n){return bi(e,t,i=>{n(i),Fl(e,i.id).catch(()=>{})})}var Gl=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(Gl||{});async function It(e,t){return bi(e,null,t)}async function Xl(e,t){return Vl(e,null,t)}async function Un(e,t){return jl(e,void 0,t)}var As={};ot(As,{CloseRequestedEvent:()=>Kl,LogicalPosition:()=>Yl,LogicalSize:()=>Hn,PhysicalPosition:()=>Be,PhysicalSize:()=>lt,UserAttentionType:()=>gi,WebviewWindow:()=>at,WebviewWindowHandle:()=>$l,WindowManager:()=>Jl,appWindow:()=>st,availableMonitors:()=>Ss,currentMonitor:()=>Ls,getAll:()=>Bl,getCurrent:()=>On,primaryMonitor:()=>Es});var Hn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},lt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new Hn(this.width/e,this.height/e)}},Yl=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},Be=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Yl(this.x/e,this.y/e)}},gi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(gi||{});function On(){return new at(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Bl(){return window.__TAURI_METADATA__.__windows.map(e=>new at(e.label,{skip:!0}))}var Ml=["tauri://created","tauri://error"],$l=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):bi(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Vl(e,this.label,t)}async emit(e,t){if(Ml.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return jl(e,this.label,t)}_handleTauriEvent(e,t){return Ml.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Jl=class extends $l{async scaleFactor(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new Be(e,t))}async outerPosition(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new Be(e,t))}async innerSize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new lt(e,t))}async outerSize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new lt(e,t))}async isFullscreen(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return z({__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"}),z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return z({__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 z({__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 z({__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 z({__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 z({__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 z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return z({__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 z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return z({__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 z({__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 z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new Kl(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),n=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",s=>{e({...s,payload:{type:"drop",paths:s.payload}})}),n=await this.listen("tauri://file-drop-hover",s=>{e({...s,payload:{type:"hover",paths:s.payload}})}),i=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},Kl=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}},at=class extends Jl{constructor(e,t={}){super(e),t!=null&&t.skip||z({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return Bl().some(t=>t.label===e)?new at(e,{skip:!0}):null}},st;"__TAURI_METADATA__"in window?st=new at(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.`),st=new at("main",{skip:!0}));function yi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new Be(e.position.x,e.position.y),size:new lt(e.size.width,e.size.height)}}async function Ls(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(yi)}async function Es(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(yi)}async function Ss(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(yi))}function Ps(){return navigator.appVersion.includes("Win")}var Os={};ot(Os,{EOL:()=>Ds,arch:()=>Hs,platform:()=>Ql,tempdir:()=>Us,type:()=>Rs,version:()=>Is});var Ds=Ps()?`\r `:` -`;async function us(){return L({__tauriModule:"Os",message:{cmd:"platform"}})}async function Ys(){return L({__tauriModule:"Os",message:{cmd:"version"}})}async function Bs(){return L({__tauriModule:"Os",message:{cmd:"osType"}})}async function Ks(){return L({__tauriModule:"Os",message:{cmd:"arch"}})}async function Js(){return L({__tauriModule:"Os",message:{cmd:"tempdir"}})}var $s={};Qe($s,{getName:()=>ds,getTauriVersion:()=>fs,getVersion:()=>cs,hide:()=>ms,show:()=>ps});async function cs(){return L({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function ds(){return L({__tauriModule:"App",message:{cmd:"getAppName"}})}async function fs(){return L({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function ps(){return L({__tauriModule:"App",message:{cmd:"show"}})}async function ms(){return L({__tauriModule:"App",message:{cmd:"hide"}})}var Qs={};Qe(Qs,{exit:()=>hs,relaunch:()=>Ci});async function hs(e=0){return L({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function Ci(){return L({__tauriModule:"Process",message:{cmd:"relaunch"}})}function Zs(e){let t,n,i,s,r,u,p,d,f,g,v,y,M,h,W,T,G,H,U,R,E,I,P,X,O,j;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our +`;async function Ql(){return z({__tauriModule:"Os",message:{cmd:"platform"}})}async function Is(){return z({__tauriModule:"Os",message:{cmd:"version"}})}async function Rs(){return z({__tauriModule:"Os",message:{cmd:"osType"}})}async function Hs(){return z({__tauriModule:"Os",message:{cmd:"arch"}})}async function Us(){return z({__tauriModule:"Os",message:{cmd:"tempdir"}})}var Ns={};ot(Ns,{getName:()=>es,getTauriVersion:()=>ts,getVersion:()=>Zl,hide:()=>is,show:()=>ns});async function Zl(){return z({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function es(){return z({__tauriModule:"App",message:{cmd:"getAppName"}})}async function ts(){return z({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function ns(){return z({__tauriModule:"App",message:{cmd:"show"}})}async function is(){return z({__tauriModule:"App",message:{cmd:"hide"}})}var xs={};ot(xs,{exit:()=>ls,relaunch:()=>vi});async function ls(e=0){return z({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function vi(){return z({__tauriModule:"Process",message:{cmd:"relaunch"}})}function qs(e){let t,n,i,s,r,c,f,h,m,y,g,C,M,p,T,O,X,H,D,S,P,J,N,j,x,ne;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our development process. In the future, this app will be used on Tauri's integration - tests.`,n=m(),i=a("br"),s=m(),r=a("br"),u=m(),p=a("pre"),d=w("App name: "),f=a("code"),g=w(e[2]),v=w(` -App version: `),y=a("code"),M=w(e[0]),h=w(` -Tauri version: `),W=a("code"),T=w(e[1]),G=w(` -`),H=m(),U=a("br"),R=m(),E=a("div"),I=a("button"),I.textContent="Close application",P=m(),X=a("button"),X.textContent="Relaunch application",o(I,"class","btn"),o(X,"class","btn"),o(E,"class","flex flex-wrap gap-1 shadow-")},m(S,V){b(S,t,V),b(S,n,V),b(S,i,V),b(S,s,V),b(S,r,V),b(S,u,V),b(S,p,V),l(p,d),l(p,f),l(f,g),l(p,v),l(p,y),l(y,M),l(p,h),l(p,W),l(W,T),l(p,G),b(S,H,V),b(S,U,V),b(S,R,V),b(S,E,V),l(E,I),l(E,P),l(E,X),O||(j=[A(I,"click",e[3]),A(X,"click",e[4])],O=!0)},p(S,[V]){V&4&&Q(g,S[2]),V&1&&Q(M,S[0]),V&2&&Q(T,S[1])},i:F,o:F,d(S){S&&_(t),S&&_(n),S&&_(i),S&&_(s),S&&_(r),S&&_(u),S&&_(p),S&&_(H),S&&_(U),S&&_(R),S&&_(E),O=!1,he(j)}}}function ea(e,t,n){let i="0.0.0",s="0.0.0",r="Unknown";ds().then(d=>{n(2,r=d)}),cs().then(d=>{n(0,i=d)}),fs().then(d=>{n(1,s=d)});async function u(){await hs()}async function p(){await Ci()}return[i,s,r,u,p]}class ta extends He{constructor(t){super(),Re(this,t,ea,Zs,Se,{})}}function na(e){let t,n,i,s,r,u,p,d,f,g,v,y,M;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments: + tests.`,n=d(),i=a("br"),s=d(),r=a("br"),c=d(),f=a("pre"),h=k("App name: "),m=a("code"),y=k(e[2]),g=k(` +App version: `),C=a("code"),M=k(e[0]),p=k(` +Tauri version: `),T=a("code"),O=k(e[1]),X=k(` +`),H=d(),D=a("br"),S=d(),P=a("div"),J=a("button"),J.textContent="Close application",N=d(),j=a("button"),j.textContent="Relaunch application",o(J,"class","btn"),o(j,"class","btn"),o(P,"class","flex flex-wrap gap-1 shadow-")},m(L,I){b(L,t,I),b(L,n,I),b(L,i,I),b(L,s,I),b(L,r,I),b(L,c,I),b(L,f,I),l(f,h),l(f,m),l(m,y),l(f,g),l(f,C),l(C,M),l(f,p),l(f,T),l(T,O),l(f,X),b(L,H,I),b(L,D,I),b(L,S,I),b(L,P,I),l(P,J),l(P,N),l(P,j),x||(ne=[A(J,"click",e[3]),A(j,"click",e[4])],x=!0)},p(L,[I]){I&4&&$(y,L[2]),I&1&&$(M,L[0]),I&2&&$(O,L[1])},i:U,o:U,d(L){L&&_(t),L&&_(n),L&&_(i),L&&_(s),L&&_(r),L&&_(c),L&&_(f),L&&_(H),L&&_(D),L&&_(S),L&&_(P),x=!1,we(ne)}}}function Fs(e,t,n){let i="0.0.0",s="0.0.0",r="Unknown";es().then(h=>{n(2,r=h)}),Zl().then(h=>{n(0,i=h)}),ts().then(h=>{n(1,s=h)});async function c(){await ls()}async function f(){await vi()}return[i,s,r,c,f]}class js extends Je{constructor(t){super(),$e(this,t,Fs,qs,Ie,{})}}function Vs(e){let t,n,i,s,r,c,f,h,m,y,g,C,M;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments:
  --config <PATH>
   --theme <light|dark|system>
   --verbose
- Additionally, it has a update --background subcommand.`,n=m(),i=a("br"),s=m(),r=a("div"),r.textContent="Note that the arguments are only parsed, not implemented.",u=m(),p=a("br"),d=m(),f=a("br"),g=m(),v=a("button"),v.textContent="Get matches",o(r,"class","note"),o(v,"class","btn"),o(v,"id","cli-matches")},m(h,W){b(h,t,W),b(h,n,W),b(h,i,W),b(h,s,W),b(h,r,W),b(h,u,W),b(h,p,W),b(h,d,W),b(h,f,W),b(h,g,W),b(h,v,W),y||(M=A(v,"click",e[0]),y=!0)},p:F,i:F,o:F,d(h){h&&_(t),h&&_(n),h&&_(i),h&&_(s),h&&_(r),h&&_(u),h&&_(p),h&&_(d),h&&_(f),h&&_(g),h&&_(v),y=!1,M()}}}function ia(e,t,n){let{onMessage:i}=t;function s(){jt("plugin:cli|cli_matches").then(i).catch(i)}return e.$$set=r=>{"onMessage"in r&&n(1,i=r.onMessage)},[s,i]}class la extends He{constructor(t){super(),Re(this,t,ia,na,Se,{onMessage:1})}}function sa(e){let t,n,i,s,r,u,p,d;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=m(),s=a("button"),s.textContent="Call Request (async) API",r=m(),u=a("button"),u.textContent="Send event to Rust",o(n,"class","btn"),o(n,"id","log"),o(s,"class","btn"),o(s,"id","request"),o(u,"class","btn"),o(u,"id","event")},m(f,g){b(f,t,g),l(t,n),l(t,i),l(t,s),l(t,r),l(t,u),p||(d=[A(n,"click",e[0]),A(s,"click",e[1]),A(u,"click",e[2])],p=!0)},p:F,i:F,o:F,d(f){f&&_(t),p=!1,he(d)}}}function aa(e,t,n){let{onMessage:i}=t,s;at(async()=>{s=await qt("rust-event",i)}),ki(()=>{s&&s()});function r(){jt("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){jt("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function p(){Gn("js-event","this is the payload string")}return e.$$set=d=>{"onMessage"in d&&n(3,i=d.onMessage)},[r,u,p,i]}class oa extends He{constructor(t){super(),Re(this,t,aa,sa,Se,{onMessage:3})}}function Ol(e,t,n){const i=e.slice();return i[68]=t[n],i}function Dl(e,t,n){const i=e.slice();return i[71]=t[n],i}function Il(e){let t,n,i,s,r,u,p=Object.keys(e[1]),d=[];for(let f=0;fe[39].call(i))},m(f,g){b(f,t,g),b(f,n,g),b(f,i,g),l(i,s);for(let v=0;ve[58].call(Ie)),o(Ye,"class","input"),o(Ye,"type","number"),o(Be,"class","input"),o(Be,"type","number"),o(De,"class","flex gap-2"),o(Ke,"class","input grow"),o(Ke,"id","title"),o(Ot,"class","btn"),o(Ot,"type","submit"),o(lt,"class","flex gap-1"),o(Je,"class","input grow"),o(Je,"id","url"),o(Dt,"class","btn"),o(Dt,"id","open-url"),o(st,"class","flex gap-1"),o(it,"class","flex flex-col gap-1")},m(c,k){b(c,t,k),b(c,n,k),b(c,i,k),l(i,s),l(i,r),l(i,u),l(i,p),l(i,d),l(i,f),l(i,g),b(c,v,k),b(c,y,k),b(c,M,k),b(c,h,k),l(h,W),l(W,T),l(W,G),G.checked=e[3],l(h,H),l(h,U),l(U,R),l(U,E),E.checked=e[2],l(h,I),l(h,P),l(P,X),l(P,O),O.checked=e[4],l(h,j),l(h,S),l(S,V),l(S,oe),oe.checked=e[5],l(h,ce),l(h,ie),l(ie,x),l(ie,C),C.checked=e[6],l(h,q),l(h,K),l(K,_e),l(K,le),le.checked=e[7],b(c,ve,k),b(c,ke,k),b(c,Me,k),b(c,se,k),l(se,re),l(re,be),l(be,Ue),l(be,de),N(de,e[14]),l(re,te),l(re,Te),l(Te,Ee),l(Te,Z),N(Z,e[15]),l(se,ne),l(se,ue),l(ue,J),l(J,Le),l(J,fe),N(fe,e[8]),l(ue,ze),l(ue,$),l($,z),l($,Y),N(Y,e[9]),l(se,D),l(se,pe),l(pe,dt),l(dt,Ft),l(dt,Ce),N(Ce,e[10]),l(pe,Vt),l(pe,ft),l(ft,xt),l(ft,Ae),N(Ae,e[11]),l(se,Gt),l(se,Ne),l(Ne,pt),l(pt,B),l(pt,ye),N(ye,e[12]),l(Ne,Ct),l(Ne,Ze),l(Ze,At),l(Ze,we),N(we,e[13]),b(c,mt,k),b(c,ht,k),b(c,_t,k),b(c,ge,k),l(ge,Pe),l(Pe,We),l(We,et),l(We,St),l(We,tt),l(tt,Tt),l(tt,bt),l(We,Et),l(We,gt),l(gt,Si),l(gt,Xn),l(Pe,Ti),l(Pe,je),l(je,Yt),l(je,Ei),l(je,Bt),l(Bt,Pi),l(Bt,Yn),l(je,Oi),l(je,Jt),l(Jt,Di),l(Jt,Bn),l(ge,Ii),l(ge,vt),l(vt,qe),l(qe,Qt),l(qe,Ri),l(qe,Zt),l(Zt,Hi),l(Zt,Kn),l(qe,Ui),l(qe,tn),l(tn,Ni),l(tn,Jn),l(vt,ji),l(vt,Fe),l(Fe,ln),l(Fe,qi),l(Fe,sn),l(sn,Fi),l(sn,$n),l(Fe,Vi),l(Fe,on),l(on,xi),l(on,Qn),l(ge,Gi),l(ge,yt),l(yt,Ve),l(Ve,un),l(Ve,Xi),l(Ve,cn),l(cn,Yi),l(cn,Zn),l(Ve,Bi),l(Ve,fn),l(fn,Ki),l(fn,ei),l(yt,Ji),l(yt,xe),l(xe,mn),l(xe,$i),l(xe,hn),l(hn,Qi),l(hn,ti),l(xe,Zi),l(xe,bn),l(bn,el),l(bn,ni),l(ge,tl),l(ge,wt),l(wt,Ge),l(Ge,vn),l(Ge,nl),l(Ge,yn),l(yn,il),l(yn,ii),l(Ge,ll),l(Ge,kn),l(kn,sl),l(kn,li),l(wt,al),l(wt,Xe),l(Xe,Ln),l(Xe,ol),l(Xe,zn),l(zn,rl),l(zn,si),l(Xe,ul),l(Xe,Cn),l(Cn,cl),l(Cn,ai),b(c,oi,k),b(c,ri,k),b(c,ui,k),b(c,Pt,k),b(c,ci,k),b(c,Oe,k),l(Oe,Sn),l(Sn,kt),kt.checked=e[16],l(Sn,dl),l(Oe,fl),l(Oe,Tn),l(Tn,Mt),Mt.checked=e[17],l(Tn,pl),l(Oe,ml),l(Oe,En),l(En,Lt),Lt.checked=e[21],l(En,hl),b(c,di,k),b(c,De,k),l(De,Pn),l(Pn,_l),l(Pn,Ie);for(let ae=0;ae=1,g,v,y,M=f&&Il(e),h=e[1][e[0]]&&Hl(e);return{c(){t=a("div"),n=a("div"),i=a("input"),s=m(),r=a("button"),r.textContent="New window",u=m(),p=a("br"),d=m(),M&&M.c(),g=m(),h&&h.c(),o(i,"class","input grow"),o(i,"type","text"),o(i,"placeholder","New Window label.."),o(r,"class","btn"),o(n,"class","flex gap-1"),o(t,"class","flex flex-col children:grow gap-2")},m(W,T){b(W,t,T),l(t,n),l(n,i),N(i,e[22]),l(n,s),l(n,r),l(t,u),l(t,p),l(t,d),M&&M.m(t,null),l(t,g),h&&h.m(t,null),v||(y=[A(i,"input",e[38]),A(r,"click",e[35])],v=!0)},p(W,T){T[0]&4194304&&i.value!==W[22]&&N(i,W[22]),T[0]&2&&(f=Object.keys(W[1]).length>=1),f?M?M.p(W,T):(M=Il(W),M.c(),M.m(t,g)):M&&(M.d(1),M=null),W[1][W[0]]?h?h.p(W,T):(h=Hl(W),h.c(),h.m(t,null)):h&&(h.d(1),h=null)},i:F,o:F,d(W){W&&_(t),M&&M.d(),h&&h.d(),v=!1,he(y)}}}function ua(e,t,n){let i=ut.label;const s={[ut.label]:ut},r=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:u}=t,p,d="https://tauri.app",f=!0,g=!1,v=!0,y=!1,M=!0,h=!1,W=null,T=null,G=null,H=null,U=null,R=null,E=null,I=null,P=1,X=new $e(E,I),O=new $e(E,I),j=new rt(W,T),S=new rt(W,T),V,oe,ce=!1,ie=!0,x=null,C=null,q="default",K=!1,_e="Awesome Tauri Example!";function le(){Mi(d)}function ve(){s[i].setTitle(_e)}function ke(){s[i].hide(),setTimeout(s[i].show,2e3)}function Me(){s[i].minimize(),setTimeout(s[i].unminimize,2e3)}function se(){if(!p)return;const B=new ct(p);n(1,s[p]=B,s),B.once("tauri://error",function(){u("Error creating new webview")})}function re(){s[i].innerSize().then(B=>{n(27,j=B),n(8,W=j.width),n(9,T=j.height)}),s[i].outerSize().then(B=>{n(28,S=B)})}function be(){s[i].innerPosition().then(B=>{n(25,X=B)}),s[i].outerPosition().then(B=>{n(26,O=B),n(14,E=O.x),n(15,I=O.y)})}async function Ue(B){!B||(V&&V(),oe&&oe(),oe=await B.listen("tauri://move",be),V=await B.listen("tauri://resize",re))}async function de(){await s[i].minimize(),await s[i].requestUserAttention(zi.Critical),await new Promise(B=>setTimeout(B,3e3)),await s[i].requestUserAttention(null)}function te(){p=this.value,n(22,p)}function Te(){i=Al(this),n(0,i),n(1,s)}const Ee=()=>s[i].center();function Z(){g=this.checked,n(3,g)}function ne(){f=this.checked,n(2,f)}function ue(){v=this.checked,n(4,v)}function J(){y=this.checked,n(5,y)}function Le(){M=this.checked,n(6,M)}function fe(){h=this.checked,n(7,h)}function ze(){E=ee(this.value),n(14,E)}function $(){I=ee(this.value),n(15,I)}function z(){W=ee(this.value),n(8,W)}function Y(){T=ee(this.value),n(9,T)}function D(){G=ee(this.value),n(10,G)}function pe(){H=ee(this.value),n(11,H)}function dt(){U=ee(this.value),n(12,U)}function Ft(){R=ee(this.value),n(13,R)}function Ce(){ce=this.checked,n(16,ce)}function Vt(){ie=this.checked,n(17,ie)}function ft(){K=this.checked,n(21,K)}function xt(){q=Al(this),n(20,q),n(30,r)}function Ae(){x=ee(this.value),n(18,x)}function Gt(){C=ee(this.value),n(19,C)}function Ne(){_e=this.value,n(29,_e)}function pt(){d=this.value,n(23,d)}return e.$$set=B=>{"onMessage"in B&&n(37,u=B.onMessage)},e.$$.update=()=>{var B,ye,Ct,Ze,At,we,mt,ht,_t,ge,Pe,We,et,St,tt,Tt,nt,bt,Et;e.$$.dirty[0]&3&&(s[i],be(),re()),e.$$.dirty[0]&7&&((B=s[i])==null||B.setResizable(f)),e.$$.dirty[0]&11&&(g?(ye=s[i])==null||ye.maximize():(Ct=s[i])==null||Ct.unmaximize()),e.$$.dirty[0]&19&&((Ze=s[i])==null||Ze.setDecorations(v)),e.$$.dirty[0]&35&&((At=s[i])==null||At.setAlwaysOnTop(y)),e.$$.dirty[0]&67&&((we=s[i])==null||we.setContentProtected(M)),e.$$.dirty[0]&131&&((mt=s[i])==null||mt.setFullscreen(h)),e.$$.dirty[0]&771&&W&&T&&((ht=s[i])==null||ht.setSize(new rt(W,T))),e.$$.dirty[0]&3075&&(G&&H?(_t=s[i])==null||_t.setMinSize(new xn(G,H)):(ge=s[i])==null||ge.setMinSize(null)),e.$$.dirty[0]&12291&&(U>800&&R>400?(Pe=s[i])==null||Pe.setMaxSize(new xn(U,R)):(We=s[i])==null||We.setMaxSize(null)),e.$$.dirty[0]&49155&&E!==null&&I!==null&&((et=s[i])==null||et.setPosition(new $e(E,I))),e.$$.dirty[0]&3&&((St=s[i])==null||St.scaleFactor().then(gt=>n(24,P=gt))),e.$$.dirty[0]&3&&Ue(s[i]),e.$$.dirty[0]&65539&&((tt=s[i])==null||tt.setCursorGrab(ce)),e.$$.dirty[0]&131075&&((Tt=s[i])==null||Tt.setCursorVisible(ie)),e.$$.dirty[0]&1048579&&((nt=s[i])==null||nt.setCursorIcon(q)),e.$$.dirty[0]&786435&&x!==null&&C!==null&&((bt=s[i])==null||bt.setCursorPosition(new $e(x,C))),e.$$.dirty[0]&2097155&&((Et=s[i])==null||Et.setIgnoreCursorEvents(K))},[i,s,f,g,v,y,M,h,W,T,G,H,U,R,E,I,ce,ie,x,C,q,K,p,d,P,X,O,j,S,_e,r,le,ve,ke,Me,se,de,u,te,Te,Ee,Z,ne,ue,J,Le,fe,ze,$,z,Y,D,pe,dt,Ft,Ce,Vt,ft,xt,Ae,Gt,Ne,pt]}class ca extends He{constructor(t){super(),Re(this,t,ua,ra,Se,{onMessage:37},null,[-1,-1,-1])}}function Nl(e){let t,n,i,s,r,u,p;return{c(){t=a("br"),n=m(),i=a("input"),s=m(),r=a("button"),r.textContent="Write",o(i,"class","input"),o(i,"placeholder","write to stdin"),o(r,"class","btn")},m(d,f){b(d,t,f),b(d,n,f),b(d,i,f),N(i,e[4]),b(d,s,f),b(d,r,f),u||(p=[A(i,"input",e[14]),A(r,"click",e[8])],u=!0)},p(d,f){f&16&&i.value!==d[4]&&N(i,d[4])},d(d){d&&_(t),d&&_(n),d&&_(i),d&&_(s),d&&_(r),u=!1,he(p)}}}function da(e){let t,n,i,s,r,u,p,d,f,g,v,y,M,h,W,T,G,H,U,R,E,I,P,X,O=e[5]&&Nl(e);return{c(){t=a("div"),n=a("div"),i=w(`Script: - `),s=a("input"),r=m(),u=a("div"),p=w(`Encoding: - `),d=a("input"),f=m(),g=a("div"),v=w(`Working directory: - `),y=a("input"),M=m(),h=a("div"),W=w(`Arguments: - `),T=a("input"),G=m(),H=a("div"),U=a("button"),U.textContent="Run",R=m(),E=a("button"),E.textContent="Kill",I=m(),O&&O.c(),o(s,"class","grow input"),o(n,"class","flex items-center gap-1"),o(d,"class","grow input"),o(u,"class","flex items-center gap-1"),o(y,"class","grow input"),o(y,"placeholder","Working directory"),o(g,"class","flex items-center gap-1"),o(T,"class","grow input"),o(T,"placeholder","Environment variables"),o(h,"class","flex items-center gap-1"),o(U,"class","btn"),o(E,"class","btn"),o(H,"class","flex children:grow gap-1"),o(t,"class","flex flex-col childre:grow gap-1")},m(j,S){b(j,t,S),l(t,n),l(n,i),l(n,s),N(s,e[0]),l(t,r),l(t,u),l(u,p),l(u,d),N(d,e[3]),l(t,f),l(t,g),l(g,v),l(g,y),N(y,e[1]),l(t,M),l(t,h),l(h,W),l(h,T),N(T,e[2]),l(t,G),l(t,H),l(H,U),l(H,R),l(H,E),l(t,I),O&&O.m(t,null),P||(X=[A(s,"input",e[10]),A(d,"input",e[11]),A(y,"input",e[12]),A(T,"input",e[13]),A(U,"click",e[6]),A(E,"click",e[7])],P=!0)},p(j,[S]){S&1&&s.value!==j[0]&&N(s,j[0]),S&8&&d.value!==j[3]&&N(d,j[3]),S&2&&y.value!==j[1]&&N(y,j[1]),S&4&&T.value!==j[2]&&N(T,j[2]),j[5]?O?O.p(j,S):(O=Nl(j),O.c(),O.m(t,null)):O&&(O.d(1),O=null)},i:F,o:F,d(j){j&&_(t),O&&O.d(),P=!1,he(X)}}}function fa(e,t,n){const i=navigator.userAgent.includes("Windows");let s=i?"cmd":"sh",r=i?["/C"]:["-c"],{onMessage:u}=t,p='echo "hello world"',d=null,f="SOMETHING=value ANOTHER=2",g="",v="",y;function M(){return f.split(" ").reduce((I,P)=>{let[X,O]=P.split("=");return{...I,[X]:O}},{})}function h(){n(5,y=null);const I=Vn.create(s,[...r,p],{cwd:d||null,env:M(),encoding:g||void 0});I.on("close",P=>{u(`command finished with code ${P.code} and signal ${P.signal}`),n(5,y=null)}),I.on("error",P=>u(`command error: "${P}"`)),I.stdout.on("data",P=>u(`command stdout: "${P}"`)),I.stderr.on("data",P=>u(`command stderr: "${P}"`)),I.spawn().then(P=>{n(5,y=P)}).catch(u)}function W(){y.kill().then(()=>u("killed child process")).catch(u)}function T(){y.write(v).catch(u)}function G(){p=this.value,n(0,p)}function H(){g=this.value,n(3,g)}function U(){d=this.value,n(1,d)}function R(){f=this.value,n(2,f)}function E(){v=this.value,n(4,v)}return e.$$set=I=>{"onMessage"in I&&n(9,u=I.onMessage)},[p,d,f,g,v,y,h,W,T,u,G,H,U,R,E]}class pa extends He{constructor(t){super(),Re(this,t,fa,da,Se,{onMessage:9})}}var ma={};Qe(ma,{checkUpdate:()=>bs,installUpdate:()=>_s,onUpdaterEvent:()=>Ai});async function Ai(e){return qt("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function _s(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function s(r){if(r.error){t(),i(r.error);return}r.status==="DONE"&&(t(),n())}Ai(s).then(r=>{e=r}).catch(r=>{throw t(),r}),Gn("tauri://update-install").catch(r=>{throw t(),r})})}async function bs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function s(u){t(),n({manifest:u,shouldUpdate:!0})}function r(u){if(u.error){t(),i(u.error);return}u.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}is("tauri://update-available",u=>{s(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),Ai(r).then(u=>{e=u}).catch(u=>{throw t(),u}),Gn("tauri://update").catch(u=>{throw t(),u})})}function ha(e){let t;return{c(){t=a("button"),t.innerHTML='
',o(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){b(n,t,i)},p:F,d(n){n&&_(t)}}}function _a(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",o(t,"class","btn")},m(s,r){b(s,t,r),n||(i=A(t,"click",e[4]),n=!0)},p:F,d(s){s&&_(t),n=!1,i()}}}function ba(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",o(t,"class","btn")},m(s,r){b(s,t,r),n||(i=A(t,"click",e[3]),n=!0)},p:F,d(s){s&&_(t),n=!1,i()}}}function ga(e){let t;function n(r,u){return!r[0]&&!r[2]?ba:!r[1]&&r[2]?_a:ha}let i=n(e),s=i(e);return{c(){t=a("div"),s.c(),o(t,"class","flex children:grow children:h10")},m(r,u){b(r,t,u),s.m(t,null)},p(r,[u]){i===(i=n(r))&&s?s.p(r,u):(s.d(1),s=i(r),s&&(s.c(),s.m(t,null)))},i:F,o:F,d(r){r&&_(t),s.d()}}}function va(e,t,n){let{onMessage:i}=t,s;at(async()=>{s=await qt("tauri://update-status",i)}),ki(()=>{s&&s()});let r,u,p;async function d(){n(0,r=!0);try{const{shouldUpdate:g,manifest:v}=await bs();i(`Should update: ${g}`),i(v),n(2,p=g)}catch(g){i(g)}finally{n(0,r=!1)}}async function f(){n(1,u=!0);try{await _s(),i("Installation complete, restart required."),await Ci()}catch(g){i(g)}finally{n(1,u=!1)}}return e.$$set=g=>{"onMessage"in g&&n(5,i=g.onMessage)},[r,u,p,d,f,i]}class ya extends He{constructor(t){super(),Re(this,t,va,ga,Se,{onMessage:5})}}function wa(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
- `,o(t,"class","flex flex-col gap-2")},m(n,i){b(n,t,i)},p:F,i:F,o:F,d(n){n&&_(t)}}}function ka(e,t,n){let{onMessage:i}=t;const s=window.constraints={audio:!0,video:!0};function r(p){const d=document.querySelector("video"),f=p.getVideoTracks();i("Got stream with constraints:",s),i(`Using video device: ${f[0].label}`),window.stream=p,d.srcObject=p}function u(p){if(p.name==="ConstraintNotSatisfiedError"){const d=s.video;i(`The resolution ${d.width.exact}x${d.height.exact} px is not supported by your device.`)}else p.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${p.name}`,p)}return at(async()=>{try{const p=await navigator.mediaDevices.getUserMedia(s);r(p)}catch(p){u(p)}}),ki(()=>{window.stream.getTracks().forEach(function(p){p.stop()})}),e.$$set=p=>{"onMessage"in p&&n(0,i=p.onMessage)},[i]}class Ma extends He{constructor(t){super(),Re(this,t,ka,wa,Se,{onMessage:0})}}function La(e){let t,n,i,s,r,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=m(),s=a("button"),s.textContent="Hide",o(n,"class","btn"),o(n,"id","show"),o(n,"title","Hides and shows the app after 2 seconds"),o(s,"class","btn"),o(s,"id","hide")},m(p,d){b(p,t,d),l(t,n),l(t,i),l(t,s),r||(u=[A(n,"click",e[0]),A(s,"click",e[1])],r=!0)},p:F,i:F,o:F,d(p){p&&_(t),r=!1,he(u)}}}function za(e,t,n){let{onMessage:i}=t;function s(){r().then(()=>{setTimeout(()=>{ps().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function r(){return ms().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[s,r,i]}class Wa extends He{constructor(t){super(),Re(this,t,za,La,Se,{onMessage:2})}}function jl(e,t,n){const i=e.slice();return i[30]=t[n],i}function ql(e,t,n){const i=e.slice();return i[33]=t[n],i}function Fl(e){let t,n,i,s,r,u,p,d,f,g,v,y,M;function h(R,E){return R[3]?Aa:Ca}let W=h(e),T=W(e);function G(R,E){return R[2]?Ta:Sa}let H=G(e),U=H(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=m(),s=a("span"),r=a("span"),T.c(),p=m(),d=a("span"),d.innerHTML='
',f=m(),g=a("span"),U.c(),o(n,"class","lt-sm:pl-10 text-darkPrimaryText"),o(r,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),o(r,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(d,"title","Minimize"),o(d,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(g,"title",v=e[2]?"Restore":"Maximize"),o(g,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(s,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),o(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),o(t,"data-tauri-drag-region","")},m(R,E){b(R,t,E),l(t,n),l(t,i),l(t,s),l(s,r),T.m(r,null),l(s,p),l(s,d),l(s,f),l(s,g),U.m(g,null),y||(M=[A(r,"click",e[11]),A(d,"click",e[9]),A(g,"click",e[10])],y=!0)},p(R,E){W!==(W=h(R))&&(T.d(1),T=W(R),T&&(T.c(),T.m(r,null))),E[0]&8&&u!==(u=R[3]?"Switch to Light mode":"Switch to Dark mode")&&o(r,"title",u),H!==(H=G(R))&&(U.d(1),U=H(R),U&&(U.c(),U.m(g,null))),E[0]&4&&v!==(v=R[2]?"Restore":"Maximize")&&o(g,"title",v)},d(R){R&&_(t),T.d(),U.d(),y=!1,he(M)}}}function Ca(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-moon")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Aa(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-sun")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Sa(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-maximize")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Ta(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-restore")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Ea(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Pa(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Vl(e){let t,n,i,s,r,u,p,d,f;function g(M,h){return M[3]?Da:Oa}let v=g(e),y=v(e);return{c(){t=a("a"),y.c(),n=m(),i=a("br"),s=m(),r=a("div"),u=m(),p=a("br"),o(t,"href","##"),o(t,"class","nv justify-between h-8"),o(r,"class","bg-white/5 h-2px")},m(M,h){b(M,t,h),y.m(t,null),b(M,n,h),b(M,i,h),b(M,s,h),b(M,r,h),b(M,u,h),b(M,p,h),d||(f=A(t,"click",e[11]),d=!0)},p(M,h){v!==(v=g(M))&&(y.d(1),y=v(M),y&&(y.c(),y.m(t,null)))},d(M){M&&_(t),y.d(),M&&_(n),M&&_(i),M&&_(s),M&&_(r),M&&_(u),M&&_(p),d=!1,f()}}}function Oa(e){let t,n;return{c(){t=w(`Switch to Dark mode - `),n=a("div"),o(n,"class","i-ph-moon")},m(i,s){b(i,t,s),b(i,n,s)},d(i){i&&_(t),i&&_(n)}}}function Da(e){let t,n;return{c(){t=w(`Switch to Light mode - `),n=a("div"),o(n,"class","i-ph-sun")},m(i,s){b(i,t,s),b(i,n,s)},d(i){i&&_(t),i&&_(n)}}}function Ia(e){let t,n,i,s,r=e[33].label+"",u,p,d,f;function g(){return e[19](e[33])}return{c(){t=a("a"),n=a("div"),i=m(),s=a("p"),u=w(r),o(n,"class",e[33].icon+" mr-2"),o(t,"href","##"),o(t,"class",p="nv "+(e[1]===e[33]?"nv_selected":""))},m(v,y){b(v,t,y),l(t,n),l(t,i),l(t,s),l(s,u),d||(f=A(t,"click",g),d=!0)},p(v,y){e=v,y[0]&2&&p!==(p="nv "+(e[1]===e[33]?"nv_selected":""))&&o(t,"class",p)},d(v){v&&_(t),d=!1,f()}}}function xl(e){let t,n=e[33]&&Ia(e);return{c(){n&&n.c(),t=Kl()},m(i,s){n&&n.m(i,s),b(i,t,s)},p(i,s){i[33]&&n.p(i,s)},d(i){n&&n.d(i),i&&_(t)}}}function Gl(e){let t,n=e[30].html+"",i;return{c(){t=new zs(!1),i=Kl(),t.a=i},m(s,r){t.m(n,s,r),b(s,i,r)},p(s,r){r[0]&64&&n!==(n=s[30].html+"")&&t.p(n)},d(s){s&&_(i),s&&t.d()}}}function Ra(e){let t,n,i,s,r,u,p,d,f,g,v,y,M,h,W,T,G,H,U,R,E,I,P,X,O,j,S=e[1].label+"",V,oe,ce,ie,x,C,q,K,_e,le,ve,ke,Me,se,re,be,Ue,de,te=e[5]&&Fl(e);function Te(z,Y){return z[0]?Pa:Ea}let Ee=Te(e),Z=Ee(e),ne=!e[5]&&Vl(e),ue=e[7],J=[];for(let z=0;z`,v=m(),y=a("a"),y.innerHTML=`GitHub - `,M=m(),h=a("a"),h.innerHTML=`Source - `,W=m(),T=a("br"),G=m(),H=a("div"),U=m(),R=a("br"),E=m(),I=a("div");for(let z=0;z',se=m(),re=a("div");for(let z=0;z<$.length;z+=1)$[z].c();o(n,"id","sidebarToggle"),o(n,"class","z-2000 display-none lt-sm:flex justify-center items-center absolute top-2 left-2 w-8 h-8 rd-8 bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"),o(u,"class","self-center p-7 cursor-pointer"),vs(u.src,p="tauri_logo.png")||o(u,"src",p),o(u,"alt","Tauri logo"),o(g,"class","nv justify-between h-8"),o(g,"target","_blank"),o(g,"href","https://tauri.app/v1/guides/"),o(y,"class","nv justify-between h-8"),o(y,"target","_blank"),o(y,"href","https://github.com/tauri-apps/tauri"),o(h,"class","nv justify-between h-8"),o(h,"target","_blank"),o(h,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),o(H,"class","bg-white/5 h-2px"),o(I,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),o(r,"id","sidebar"),o(r,"class","lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid select-none px-2"),o(ie,"class","mr-2"),o(ce,"class","overflow-y-auto"),o(O,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),o(K,"class","bg-black/20 h-2px cursor-ns-resize"),o(ve,"class","font-semibold"),o(Me,"class","cursor-pointer h-85% rd-1 p-1 flex justify-center items-center hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25 "),o(le,"class","flex justify-between items-center px-2"),o(re,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs"),o(q,"id","console"),o(q,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),o(X,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),o(s,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(z,Y){te&&te.m(z,Y),b(z,t,Y),b(z,n,Y),Z.m(n,null),b(z,i,Y),b(z,s,Y),l(s,r),l(r,u),l(r,d),ne&&ne.m(r,null),l(r,f),l(r,g),l(r,v),l(r,y),l(r,M),l(r,h),l(r,W),l(r,T),l(r,G),l(r,H),l(r,U),l(r,R),l(r,E),l(r,I);for(let D=0;D{wi(D,1)}),Ts()}Le?(x=new Le(fe(z)),El(x.$$.fragment),vi(x.$$.fragment,1),yi(x,ie,null)):x=null}if(Y[0]&64){ze=z[6];let D;for(D=0;D{W(`File drop: ${JSON.stringify(C.payload)}`)});const s=navigator.userAgent.toLowerCase(),r=s.includes("android")||s.includes("iphone"),u=[{label:"Welcome",component:ta,icon:"i-ph-hand-waving"},{label:"Communication",component:oa,icon:"i-codicon-radio-tower"},!r&&{label:"CLI",component:la,icon:"i-codicon-terminal"},!r&&{label:"App",component:Wa,icon:"i-codicon-hubot"},!r&&{label:"Window",component:ca,icon:"i-codicon-window"},{label:"Shell",component:pa,icon:"i-codicon-terminal-bash"},!r&&{label:"Updater",component:ya,icon:"i-codicon-cloud-download"},{label:"WebRTC",component:Ma,icon:"i-ph-broadcast"}];let p=u[0];function d(C){n(1,p=C)}let f;at(async()=>{const C=jn();n(2,f=await C.isMaximized()),qt("tauri://resize",async()=>{n(2,f=await C.isMaximized())})});function g(){jn().minimize()}async function v(){const C=jn();await C.isMaximized()?C.unmaximize():C.maximize()}let y;at(()=>{n(3,y=localStorage&&localStorage.getItem("theme")=="dark"),Yl(y)});function M(){n(3,y=!y),Yl(y)}let h=Ps([]);ks(e,h,C=>n(6,i=C));function W(C){h.update(q=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof C=="string"?C:JSON.stringify(C,null,1))+"
"},...q])}function T(C){h.update(q=>[{html:`
[${new Date().toLocaleTimeString()}]: `+C+"
"},...q])}function G(){h.update(()=>[])}let H,U,R;function E(C){R=C.clientY;const q=window.getComputedStyle(H);U=parseInt(q.height,10);const K=le=>{const ve=le.clientY-R,ke=U-ve;n(4,H.style.height=`${ke{document.removeEventListener("mouseup",_e),document.removeEventListener("mousemove",K)};document.addEventListener("mouseup",_e),document.addEventListener("mousemove",K)}let I;at(async()=>{n(5,I=await us()==="win32")});let P=!1,X,O,j=!1,S=0,V=0;const oe=(C,q,K)=>Math.min(Math.max(q,C),K);at(()=>{n(17,X=document.querySelector("#sidebar")),O=document.querySelector("#sidebarToggle"),document.addEventListener("click",C=>{O.contains(C.target)?n(0,P=!P):P&&!X.contains(C.target)&&n(0,P=!1)}),document.addEventListener("touchstart",C=>{if(O.contains(C.target))return;const q=C.touches[0].clientX;(0{if(j){const q=C.touches[0].clientX;V=q;const K=(q-S)/10;X.style.setProperty("--translate-x",`-${oe(0,P?0-K:18.75-K,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(j){const C=(V-S)/10;n(0,P=P?C>-(18.75/2):C>18.75/2)}j=!1})});const ce=()=>Mi("https://tauri.app/"),ie=C=>{d(C),n(0,P=!1)};function x(C){bi[C?"unshift":"push"](()=>{H=C,n(4,H)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const C=document.querySelector("#sidebar");C&&Ha(C,P)}},[P,p,f,y,H,I,i,u,d,g,v,M,h,W,T,G,E,X,ce,ie,x]}class Na extends He{constructor(t){super(),Re(this,t,Ua,Ra,Se,{},null,[-1,-1])}}new Na({target:document.querySelector("#app")}); + Additionally, it has a update --background subcommand.`,n=d(),i=a("br"),s=d(),r=a("div"),r.textContent="Note that the arguments are only parsed, not implemented.",c=d(),f=a("br"),h=d(),m=a("br"),y=d(),g=a("button"),g.textContent="Get matches",o(r,"class","note"),o(g,"class","btn"),o(g,"id","cli-matches")},m(p,T){b(p,t,T),b(p,n,T),b(p,i,T),b(p,s,T),b(p,r,T),b(p,c,T),b(p,f,T),b(p,h,T),b(p,m,T),b(p,y,T),b(p,g,T),C||(M=A(g,"click",e[0]),C=!0)},p:U,i:U,o:U,d(p){p&&_(t),p&&_(n),p&&_(i),p&&_(s),p&&_(r),p&&_(c),p&&_(f),p&&_(h),p&&_(m),p&&_(y),p&&_(g),C=!1,M()}}}function Gs(e,t,n){let{onMessage:i}=t;function s(){Dt("plugin:cli|cli_matches").then(i).catch(i)}return e.$$set=r=>{"onMessage"in r&&n(1,i=r.onMessage)},[s,i]}class Xs extends Je{constructor(t){super(),$e(this,t,Gs,Vs,Ie,{onMessage:1})}}function Ys(e){let t,n,i,s,r,c,f,h;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=d(),s=a("button"),s.textContent="Call Request (async) API",r=d(),c=a("button"),c.textContent="Send event to Rust",o(n,"class","btn"),o(n,"id","log"),o(s,"class","btn"),o(s,"id","request"),o(c,"class","btn"),o(c,"id","event")},m(m,y){b(m,t,y),l(t,n),l(t,i),l(t,s),l(t,r),l(t,c),f||(h=[A(n,"click",e[0]),A(s,"click",e[1]),A(c,"click",e[2])],f=!0)},p:U,i:U,o:U,d(m){m&&_(t),f=!1,we(h)}}}function Bs(e,t,n){let{onMessage:i}=t,s;nt(async()=>{s=await It("rust-event",i)}),_i(()=>{s&&s()});function r(){Dt("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function c(){Dt("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function f(){Un("js-event","this is the payload string")}return e.$$set=h=>{"onMessage"in h&&n(3,i=h.onMessage)},[r,c,f,i]}class $s extends Je{constructor(t){super(),$e(this,t,Bs,Ys,Ie,{onMessage:3})}}function zl(e,t,n){const i=e.slice();return i[65]=t[n],i}function Wl(e,t,n){const i=e.slice();return i[68]=t[n],i}function Cl(e){let t,n,i,s,r,c,f=Object.keys(e[1]),h=[];for(let m=0;me[37].call(i))},m(m,y){b(m,t,y),b(m,n,y),b(m,i,y),l(i,s);for(let g=0;ge[56].call(De)),o(Ge,"class","input"),o(Ge,"type","number"),o(Xe,"class","input"),o(Xe,"type","number"),o(Oe,"class","flex gap-2"),o(Ye,"class","input grow"),o(Ye,"id","title"),o(Lt,"class","btn"),o(Lt,"type","submit"),o(tt,"class","flex gap-1"),o(At,"class","flex flex-col gap-1")},m(u,w){b(u,t,w),b(u,n,w),b(u,i,w),l(i,s),l(i,r),l(i,c),l(i,f),l(i,h),l(i,m),l(i,y),b(u,g,w),b(u,C,w),b(u,M,w),b(u,p,w),l(p,T),l(T,O),l(T,X),X.checked=e[3],l(p,H),l(p,D),l(D,S),l(D,P),P.checked=e[2],l(p,J),l(p,N),l(N,j),l(N,x),x.checked=e[4],l(p,ne),l(p,L),l(L,I),l(L,ae),ae.checked=e[5],l(p,ue),l(p,te),l(te,v),l(te,R),R.checked=e[6],l(p,q),l(p,ie),l(ie,Te),l(ie,le),le.checked=e[7],b(u,he,w),b(u,Re,w),b(u,be,w),b(u,se,w),l(se,ce),l(ce,ge),l(ge,He),l(ge,de),G(de,e[14]),l(ce,Z),l(ce,Ae),l(Ae,Le),l(Ae,K),G(K,e[15]),l(se,ee),l(se,re),l(re,Y),l(Y,ke),l(Y,fe),G(fe,e[8]),l(re,Me),l(re,B),l(B,W),l(B,F),G(F,e[9]),l(se,E),l(se,pe),l(pe,rt),l(rt,Rt),l(rt,We),G(We,e[10]),l(pe,Ht),l(pe,ut),l(ut,Ut),l(ut,Ce),G(Ce,e[11]),l(se,V),l(se,Ee),l(Ee,Ke),l(Ke,kt),l(Ke,ye),G(ye,e[12]),l(Ee,Mt),l(Ee,Qe),l(Qe,zt),l(Qe,ve),G(ve,e[13]),b(u,ct,w),b(u,dt,w),b(u,ft,w),b(u,_e,w),l(_e,Se),l(Se,ze),l(ze,Ze),l(ze,Wt),l(ze,et),l(et,Ct),l(et,Nn),l(ze,ki),l(ze,Nt),l(Nt,Mi),l(Nt,xn),l(Se,zi),l(Se,Ue),l(Ue,qt),l(Ue,Wi),l(Ue,Ft),l(Ft,Ci),l(Ft,qn),l(Ue,Ti),l(Ue,Vt),l(Vt,Ai),l(Vt,Fn),l(_e,Li),l(_e,mt),l(mt,Ne),l(Ne,Xt),l(Ne,Ei),l(Ne,Yt),l(Yt,Si),l(Yt,jn),l(Ne,Pi),l(Ne,$t),l($t,Oi),l($t,Vn),l(mt,Di),l(mt,xe),l(xe,Kt),l(xe,Ii),l(xe,Qt),l(Qt,Ri),l(Qt,Gn),l(xe,Hi),l(xe,en),l(en,Ui),l(en,Xn),l(_e,Ni),l(_e,ht),l(ht,qe),l(qe,nn),l(qe,xi),l(qe,ln),l(ln,qi),l(ln,Yn),l(qe,Fi),l(qe,an),l(an,ji),l(an,Bn),l(ht,Vi),l(ht,Fe),l(Fe,rn),l(Fe,Gi),l(Fe,un),l(un,Xi),l(un,$n),l(Fe,Yi),l(Fe,dn),l(dn,Bi),l(dn,Jn),l(_e,$i),l(_e,_t),l(_t,je),l(je,pn),l(je,Ji),l(je,mn),l(mn,Ki),l(mn,Kn),l(je,Qi),l(je,_n),l(_n,Zi),l(_n,Qn),l(_t,el),l(_t,Ve),l(Ve,gn),l(Ve,tl),l(Ve,yn),l(yn,nl),l(yn,Zn),l(Ve,il),l(Ve,wn),l(wn,ll),l(wn,ei),b(u,ti,w),b(u,ni,w),b(u,ii,w),b(u,Tt,w),b(u,li,w),b(u,Pe,w),l(Pe,Mn),l(Mn,bt),bt.checked=e[16],l(Mn,sl),l(Pe,al),l(Pe,zn),l(zn,gt),gt.checked=e[17],l(zn,ol),l(Pe,rl),l(Pe,Wn),l(Wn,yt),yt.checked=e[21],l(Wn,ul),b(u,si,w),b(u,Oe,w),l(Oe,Cn),l(Cn,cl),l(Cn,De);for(let oe=0;oe=1,y,g,C,M=m&&Cl(e),p=e[1][e[0]]&&Al(e);return{c(){t=a("div"),n=a("div"),i=a("input"),s=d(),r=a("button"),r.textContent="New window",c=d(),f=a("br"),h=d(),M&&M.c(),y=d(),p&&p.c(),o(i,"class","input grow"),o(i,"type","text"),o(i,"placeholder","New Window label.."),o(r,"class","btn"),o(n,"class","flex gap-1"),o(t,"class","flex flex-col children:grow gap-2")},m(T,O){b(T,t,O),l(t,n),l(n,i),G(i,e[22]),l(n,s),l(n,r),l(t,c),l(t,f),l(t,h),M&&M.m(t,null),l(t,y),p&&p.m(t,null),g||(C=[A(i,"input",e[36]),A(r,"click",e[33])],g=!0)},p(T,O){O[0]&4194304&&i.value!==T[22]&&G(i,T[22]),O[0]&2&&(m=Object.keys(T[1]).length>=1),m?M?M.p(T,O):(M=Cl(T),M.c(),M.m(t,y)):M&&(M.d(1),M=null),T[1][T[0]]?p?p.p(T,O):(p=Al(T),p.c(),p.m(t,null)):p&&(p.d(1),p=null)},i:U,o:U,d(T){T&&_(t),M&&M.d(),p&&p.d(),g=!1,we(C)}}}function Ks(e,t,n){let i=st.label;const s={[st.label]:st},r=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:c}=t,f,h=!0,m=!1,y=!0,g=!1,C=!0,M=!1,p=null,T=null,O=null,X=null,H=null,D=null,S=null,P=null,J=1,N=new Be(S,P),j=new Be(S,P),x=new lt(p,T),ne=new lt(p,T),L,I,ae=!1,ue=!0,te=null,v=null,R="default",q=!1,ie="Awesome Tauri Example!";function Te(){s[i].setTitle(ie)}function le(){s[i].hide(),setTimeout(s[i].show,2e3)}function he(){s[i].minimize(),setTimeout(s[i].unminimize,2e3)}function Re(){if(!f)return;const V=new at(f);n(1,s[f]=V,s),V.once("tauri://error",function(){c("Error creating new webview")})}function be(){s[i].innerSize().then(V=>{n(26,x=V),n(8,p=x.width),n(9,T=x.height)}),s[i].outerSize().then(V=>{n(27,ne=V)})}function se(){s[i].innerPosition().then(V=>{n(24,N=V)}),s[i].outerPosition().then(V=>{n(25,j=V),n(14,S=j.x),n(15,P=j.y)})}async function ce(V){!V||(L&&L(),I&&I(),I=await V.listen("tauri://move",se),L=await V.listen("tauri://resize",be))}async function ge(){await s[i].minimize(),await s[i].requestUserAttention(gi.Critical),await new Promise(V=>setTimeout(V,3e3)),await s[i].requestUserAttention(null)}function He(){f=this.value,n(22,f)}function de(){i=yl(this),n(0,i),n(1,s)}const Z=()=>s[i].center();function Ae(){m=this.checked,n(3,m)}function Le(){h=this.checked,n(2,h)}function K(){y=this.checked,n(4,y)}function ee(){g=this.checked,n(5,g)}function re(){C=this.checked,n(6,C)}function Y(){M=this.checked,n(7,M)}function ke(){S=Q(this.value),n(14,S)}function fe(){P=Q(this.value),n(15,P)}function Me(){p=Q(this.value),n(8,p)}function B(){T=Q(this.value),n(9,T)}function W(){O=Q(this.value),n(10,O)}function F(){X=Q(this.value),n(11,X)}function E(){H=Q(this.value),n(12,H)}function pe(){D=Q(this.value),n(13,D)}function rt(){ae=this.checked,n(16,ae)}function Rt(){ue=this.checked,n(17,ue)}function We(){q=this.checked,n(21,q)}function Ht(){R=yl(this),n(20,R),n(29,r)}function ut(){te=Q(this.value),n(18,te)}function Ut(){v=Q(this.value),n(19,v)}function Ce(){ie=this.value,n(28,ie)}return e.$$set=V=>{"onMessage"in V&&n(35,c=V.onMessage)},e.$$.update=()=>{var V,Ee,Ke,kt,ye,Mt,Qe,zt,ve,ct,dt,ft,_e,Se,ze,Ze,Wt,et,Ct;e.$$.dirty[0]&3&&(s[i],se(),be()),e.$$.dirty[0]&7&&((V=s[i])==null||V.setResizable(h)),e.$$.dirty[0]&11&&(m?(Ee=s[i])==null||Ee.maximize():(Ke=s[i])==null||Ke.unmaximize()),e.$$.dirty[0]&19&&((kt=s[i])==null||kt.setDecorations(y)),e.$$.dirty[0]&35&&((ye=s[i])==null||ye.setAlwaysOnTop(g)),e.$$.dirty[0]&67&&((Mt=s[i])==null||Mt.setContentProtected(C)),e.$$.dirty[0]&131&&((Qe=s[i])==null||Qe.setFullscreen(M)),e.$$.dirty[0]&771&&p&&T&&((zt=s[i])==null||zt.setSize(new lt(p,T))),e.$$.dirty[0]&3075&&(O&&X?(ve=s[i])==null||ve.setMinSize(new Hn(O,X)):(ct=s[i])==null||ct.setMinSize(null)),e.$$.dirty[0]&12291&&(H>800&&D>400?(dt=s[i])==null||dt.setMaxSize(new Hn(H,D)):(ft=s[i])==null||ft.setMaxSize(null)),e.$$.dirty[0]&49155&&S!==null&&P!==null&&((_e=s[i])==null||_e.setPosition(new Be(S,P))),e.$$.dirty[0]&3&&((Se=s[i])==null||Se.scaleFactor().then(pt=>n(23,J=pt))),e.$$.dirty[0]&3&&ce(s[i]),e.$$.dirty[0]&65539&&((ze=s[i])==null||ze.setCursorGrab(ae)),e.$$.dirty[0]&131075&&((Ze=s[i])==null||Ze.setCursorVisible(ue)),e.$$.dirty[0]&1048579&&((Wt=s[i])==null||Wt.setCursorIcon(R)),e.$$.dirty[0]&786435&&te!==null&&v!==null&&((et=s[i])==null||et.setCursorPosition(new Be(te,v))),e.$$.dirty[0]&2097155&&((Ct=s[i])==null||Ct.setIgnoreCursorEvents(q))},[i,s,h,m,y,g,C,M,p,T,O,X,H,D,S,P,ae,ue,te,v,R,q,f,J,N,j,x,ne,ie,r,Te,le,he,Re,ge,c,He,de,Z,Ae,Le,K,ee,re,Y,ke,fe,Me,B,W,F,E,pe,rt,Rt,We,Ht,ut,Ut,Ce]}class Qs extends Je{constructor(t){super(),$e(this,t,Ks,Js,Ie,{onMessage:35},null,[-1,-1,-1])}}var Zs={};ot(Zs,{checkUpdate:()=>as,installUpdate:()=>ss,onUpdaterEvent:()=>wi});async function wi(e){return It("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function ss(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function s(r){if(r.error){t(),i(r.error);return}r.status==="DONE"&&(t(),n())}wi(s).then(r=>{e=r}).catch(r=>{throw t(),r}),Un("tauri://update-install").catch(r=>{throw t(),r})})}async function as(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function s(c){t(),n({manifest:c,shouldUpdate:!0})}function r(c){if(c.error){t(),i(c.error);return}c.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}Xl("tauri://update-available",c=>{s(c==null?void 0:c.payload)}).catch(c=>{throw t(),c}),wi(r).then(c=>{e=c}).catch(c=>{throw t(),c}),Un("tauri://update").catch(c=>{throw t(),c})})}function ea(e){let t;return{c(){t=a("button"),t.innerHTML='
',o(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){b(n,t,i)},p:U,d(n){n&&_(t)}}}function ta(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",o(t,"class","btn")},m(s,r){b(s,t,r),n||(i=A(t,"click",e[4]),n=!0)},p:U,d(s){s&&_(t),n=!1,i()}}}function na(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",o(t,"class","btn")},m(s,r){b(s,t,r),n||(i=A(t,"click",e[3]),n=!0)},p:U,d(s){s&&_(t),n=!1,i()}}}function ia(e){let t;function n(r,c){return!r[0]&&!r[2]?na:!r[1]&&r[2]?ta:ea}let i=n(e),s=i(e);return{c(){t=a("div"),s.c(),o(t,"class","flex children:grow children:h10")},m(r,c){b(r,t,c),s.m(t,null)},p(r,[c]){i===(i=n(r))&&s?s.p(r,c):(s.d(1),s=i(r),s&&(s.c(),s.m(t,null)))},i:U,o:U,d(r){r&&_(t),s.d()}}}function la(e,t,n){let{onMessage:i}=t,s;nt(async()=>{s=await It("tauri://update-status",i)}),_i(()=>{s&&s()});let r,c,f;async function h(){n(0,r=!0);try{const{shouldUpdate:y,manifest:g}=await as();i(`Should update: ${y}`),i(g),n(2,f=y)}catch(y){i(y)}finally{n(0,r=!1)}}async function m(){n(1,c=!0);try{await ss(),i("Installation complete, restart required."),await vi()}catch(y){i(y)}finally{n(1,c=!1)}}return e.$$set=y=>{"onMessage"in y&&n(5,i=y.onMessage)},[r,c,f,h,m,i]}class sa extends Je{constructor(t){super(),$e(this,t,la,ia,Ie,{onMessage:5})}}function aa(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
+ `,o(t,"class","flex flex-col gap-2")},m(n,i){b(n,t,i)},p:U,i:U,o:U,d(n){n&&_(t)}}}function oa(e,t,n){let{onMessage:i}=t;const s=window.constraints={audio:!0,video:!0};function r(f){const h=document.querySelector("video"),m=f.getVideoTracks();i("Got stream with constraints:",s),i(`Using video device: ${m[0].label}`),window.stream=f,h.srcObject=f}function c(f){if(f.name==="ConstraintNotSatisfiedError"){const h=s.video;i(`The resolution ${h.width.exact}x${h.height.exact} px is not supported by your device.`)}else f.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${f.name}`,f)}return nt(async()=>{try{const f=await navigator.mediaDevices.getUserMedia(s);r(f)}catch(f){c(f)}}),_i(()=>{window.stream.getTracks().forEach(function(f){f.stop()})}),e.$$set=f=>{"onMessage"in f&&n(0,i=f.onMessage)},[i]}class ra extends Je{constructor(t){super(),$e(this,t,oa,aa,Ie,{onMessage:0})}}function ua(e){let t,n,i,s,r,c;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=d(),s=a("button"),s.textContent="Hide",o(n,"class","btn"),o(n,"id","show"),o(n,"title","Hides and shows the app after 2 seconds"),o(s,"class","btn"),o(s,"id","hide")},m(f,h){b(f,t,h),l(t,n),l(t,i),l(t,s),r||(c=[A(n,"click",e[0]),A(s,"click",e[1])],r=!0)},p:U,i:U,o:U,d(f){f&&_(t),r=!1,we(c)}}}function ca(e,t,n){let{onMessage:i}=t;function s(){r().then(()=>{setTimeout(()=>{ns().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function r(){return is().then(()=>i("Hide app")).catch(i)}return e.$$set=c=>{"onMessage"in c&&n(2,i=c.onMessage)},[s,r,i]}class da extends Je{constructor(t){super(),$e(this,t,ca,ua,Ie,{onMessage:2})}}function El(e,t,n){const i=e.slice();return i[29]=t[n],i}function Sl(e,t,n){const i=e.slice();return i[32]=t[n],i}function Pl(e){let t,n,i,s,r,c,f,h,m,y,g,C,M;function p(S,P){return S[3]?pa:fa}let T=p(e),O=T(e);function X(S,P){return S[2]?ha:ma}let H=X(e),D=H(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=d(),s=a("span"),r=a("span"),O.c(),f=d(),h=a("span"),h.innerHTML='
',m=d(),y=a("span"),D.c(),o(n,"class","lt-sm:pl-10 text-darkPrimaryText"),o(r,"title",c=e[3]?"Switch to Light mode":"Switch to Dark mode"),o(r,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(h,"title","Minimize"),o(h,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(y,"title",g=e[2]?"Restore":"Maximize"),o(y,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(s,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),o(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),o(t,"data-tauri-drag-region","")},m(S,P){b(S,t,P),l(t,n),l(t,i),l(t,s),l(s,r),O.m(r,null),l(s,f),l(s,h),l(s,m),l(s,y),D.m(y,null),C||(M=[A(r,"click",e[11]),A(h,"click",e[9]),A(y,"click",e[10])],C=!0)},p(S,P){T!==(T=p(S))&&(O.d(1),O=T(S),O&&(O.c(),O.m(r,null))),P[0]&8&&c!==(c=S[3]?"Switch to Light mode":"Switch to Dark mode")&&o(r,"title",c),H!==(H=X(S))&&(D.d(1),D=H(S),D&&(D.c(),D.m(y,null))),P[0]&4&&g!==(g=S[2]?"Restore":"Maximize")&&o(y,"title",g)},d(S){S&&_(t),O.d(),D.d(),C=!1,we(M)}}}function fa(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-moon")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function pa(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-sun")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function ma(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-maximize")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function ha(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-restore")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function _a(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function ba(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Ol(e){let t,n,i,s,r,c,f,h,m;function y(M,p){return M[3]?ya:ga}let g=y(e),C=g(e);return{c(){t=a("a"),C.c(),n=d(),i=a("br"),s=d(),r=a("div"),c=d(),f=a("br"),o(t,"href","##"),o(t,"class","nv justify-between h-8"),o(r,"class","bg-white/5 h-2px")},m(M,p){b(M,t,p),C.m(t,null),b(M,n,p),b(M,i,p),b(M,s,p),b(M,r,p),b(M,c,p),b(M,f,p),h||(m=A(t,"click",e[11]),h=!0)},p(M,p){g!==(g=y(M))&&(C.d(1),C=g(M),C&&(C.c(),C.m(t,null)))},d(M){M&&_(t),C.d(),M&&_(n),M&&_(i),M&&_(s),M&&_(r),M&&_(c),M&&_(f),h=!1,m()}}}function ga(e){let t,n;return{c(){t=k(`Switch to Dark mode + `),n=a("div"),o(n,"class","i-ph-moon")},m(i,s){b(i,t,s),b(i,n,s)},d(i){i&&_(t),i&&_(n)}}}function ya(e){let t,n;return{c(){t=k(`Switch to Light mode + `),n=a("div"),o(n,"class","i-ph-sun")},m(i,s){b(i,t,s),b(i,n,s)},d(i){i&&_(t),i&&_(n)}}}function va(e){let t,n,i,s,r=e[32].label+"",c,f,h,m;function y(){return e[18](e[32])}return{c(){t=a("a"),n=a("div"),i=d(),s=a("p"),c=k(r),o(n,"class",e[32].icon+" mr-2"),o(t,"href","##"),o(t,"class",f="nv "+(e[1]===e[32]?"nv_selected":""))},m(g,C){b(g,t,C),l(t,n),l(t,i),l(t,s),l(s,c),h||(m=A(t,"click",y),h=!0)},p(g,C){e=g,C[0]&2&&f!==(f="nv "+(e[1]===e[32]?"nv_selected":""))&&o(t,"class",f)},d(g){g&&_(t),h=!1,m()}}}function Dl(e){let t,n=e[32]&&va(e);return{c(){n&&n.c(),t=Nl()},m(i,s){n&&n.m(i,s),b(i,t,s)},p(i,s){i[32]&&n.p(i,s)},d(i){n&&n.d(i),i&&_(t)}}}function Il(e){let t,n=e[29].html+"",i;return{c(){t=new hs(!1),i=Nl(),t.a=i},m(s,r){t.m(n,s,r),b(s,i,r)},p(s,r){r[0]&64&&n!==(n=s[29].html+"")&&t.p(n)},d(s){s&&_(i),s&&t.d()}}}function wa(e){let t,n,i,s,r,c,f,h,m,y,g,C,M,p,T,O,X,H,D,S,P,J,N,j,x,ne,L=e[1].label+"",I,ae,ue,te,v,R,q,ie,Te,le,he,Re,be,se,ce,ge,He,de,Z=e[5]&&Pl(e);function Ae(W,F){return W[0]?ba:_a}let Le=Ae(e),K=Le(e),ee=!e[5]&&Ol(e),re=e[7],Y=[];for(let W=0;W`,g=d(),C=a("a"),C.innerHTML=`GitHub + `,M=d(),p=a("a"),p.innerHTML=`Source + `,T=d(),O=a("br"),X=d(),H=a("div"),D=d(),S=a("br"),P=d(),J=a("div");for(let W=0;W',se=d(),ce=a("div");for(let W=0;W{hi(E,1)}),vs()}ke?(v=new ke(fe(W)),kl(v.$$.fragment),pi(v.$$.fragment,1),mi(v,te,null)):v=null}if(F[0]&64){Me=W[6];let E;for(E=0;E{T(`File drop: ${JSON.stringify(v.payload)}`)});const s=navigator.userAgent.toLowerCase(),r=s.includes("android")||s.includes("iphone"),c=[{label:"Welcome",component:js,icon:"i-ph-hand-waving"},{label:"Communication",component:$s,icon:"i-codicon-radio-tower"},!r&&{label:"CLI",component:Xs,icon:"i-codicon-terminal"},!r&&{label:"App",component:da,icon:"i-codicon-hubot"},!r&&{label:"Window",component:Qs,icon:"i-codicon-window"},!r&&{label:"Updater",component:sa,icon:"i-codicon-cloud-download"},{label:"WebRTC",component:ra,icon:"i-ph-broadcast"}];let f=c[0];function h(v){n(1,f=v)}let m;nt(async()=>{const v=On();n(2,m=await v.isMaximized()),It("tauri://resize",async()=>{n(2,m=await v.isMaximized())})});function y(){On().minimize()}async function g(){const v=On();await v.isMaximized()?v.unmaximize():v.maximize()}let C;nt(()=>{n(3,C=localStorage&&localStorage.getItem("theme")=="dark"),Hl(C)});function M(){n(3,C=!C),Hl(C)}let p=ks([]);ds(e,p,v=>n(6,i=v));function T(v){p.update(R=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof v=="string"?v:JSON.stringify(v,null,1))+"
"},...R])}function O(v){p.update(R=>[{html:`
[${new Date().toLocaleTimeString()}]: `+v+"
"},...R])}function X(){p.update(()=>[])}let H,D,S;function P(v){S=v.clientY;const R=window.getComputedStyle(H);D=parseInt(R.height,10);const q=Te=>{const le=Te.clientY-S,he=D-le;n(4,H.style.height=`${he{document.removeEventListener("mouseup",ie),document.removeEventListener("mousemove",q)};document.addEventListener("mouseup",ie),document.addEventListener("mousemove",q)}let J;nt(async()=>{n(5,J=await Ql()==="win32")});let N=!1,j,x,ne=!1,L=0,I=0;const ae=(v,R,q)=>Math.min(Math.max(R,v),q);nt(()=>{n(17,j=document.querySelector("#sidebar")),x=document.querySelector("#sidebarToggle"),document.addEventListener("click",v=>{x.contains(v.target)?n(0,N=!N):N&&!j.contains(v.target)&&n(0,N=!1)}),document.addEventListener("touchstart",v=>{if(x.contains(v.target))return;const R=v.touches[0].clientX;(0{if(ne){const R=v.touches[0].clientX;I=R;const q=(R-L)/10;j.style.setProperty("--translate-x",`-${ae(0,N?0-q:18.75-q,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(ne){const v=(I-L)/10;n(0,N=N?v>-(18.75/2):v>18.75/2)}ne=!1})});const ue=v=>{h(v),n(0,N=!1)};function te(v){di[v?"unshift":"push"](()=>{H=v,n(4,H)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const v=document.querySelector("#sidebar");v&&ka(v,N)}},[N,f,m,C,H,J,i,c,h,y,g,M,p,T,O,X,P,j,ue,te]}class za extends Je{constructor(t){super(),$e(this,t,Ma,wa,Ie,{},null,[-1,-1])}}new za({target:document.querySelector("#app")}); diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte index 7f5110cfeb8..629d6a4d843 100644 --- a/examples/api/src/App.svelte +++ b/examples/api/src/App.svelte @@ -1,6 +1,5 @@ - -
-
- Script: - -
-
- Encoding: - -
-
- Working directory: - -
-
- Arguments: - -
-
- - -
- {#if child} -
- - - {/if} -
diff --git a/examples/api/src/views/Window.svelte b/examples/api/src/views/Window.svelte index 76a6e558d66..8b37eaf0cd1 100644 --- a/examples/api/src/views/Window.svelte +++ b/examples/api/src/views/Window.svelte @@ -7,7 +7,6 @@ PhysicalSize, PhysicalPosition } from '@tauri-apps/api/window' - import { open } from '@tauri-apps/api/shell' let selectedWindow = appWindow.label const windowMap = { @@ -90,10 +89,6 @@ let cursorIgnoreEvents = false let windowTitle = 'Awesome Tauri Example!' - function openUrl() { - open(urlValue) - } - function setTitle_() { windowMap[selectedWindow].setTitle(windowTitle) } @@ -438,10 +433,6 @@ -
- - -
{/if} diff --git a/examples/resources/src-tauri/src/main.rs b/examples/resources/src-tauri/src/main.rs index f6c49155f34..f4d5d165a41 100644 --- a/examples/resources/src-tauri/src/main.rs +++ b/examples/resources/src-tauri/src/main.rs @@ -6,7 +6,7 @@ fn main() { use tauri::{ - api::process::{Command, CommandEvent}, + process::{Command, CommandEvent}, Manager, }; diff --git a/examples/sidecar/src-tauri/src/main.rs b/examples/sidecar/src-tauri/src/main.rs index 743a6f6ea09..7120d1acaef 100644 --- a/examples/sidecar/src-tauri/src/main.rs +++ b/examples/sidecar/src-tauri/src/main.rs @@ -5,7 +5,7 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] use tauri::{ - api::process::{Command, CommandEvent}, + process::{Command, CommandEvent}, Manager, }; diff --git a/tooling/api/docs/js-api.json b/tooling/api/docs/js-api.json index 0e72fe7c3f7..f889a66647d 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":"app","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Get application metadata.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.app`"},{"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.app`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.app) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"app\": {\n \"all\": true, // enable all app APIs\n \"show\": true,\n \"hide\": 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."}]},"children":[{"id":2,"name":"getName","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":60,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/app.ts#L60"}],"signatures":[{"id":3,"name":"getName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the application name."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getName } from '@tauri-apps/api/app';\nconst appName = await getName();\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":6,"name":"getTauriVersion","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":80,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/app.ts#L80"}],"signatures":[{"id":7,"name":"getTauriVersion","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the Tauri version."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getTauriVersion } from '@tauri-apps/api/app';\nconst tauriVersion = await getTauriVersion();\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":4,"name":"getVersion","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":41,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/app.ts#L41"}],"signatures":[{"id":5,"name":"getVersion","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the application version."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getVersion } from '@tauri-apps/api/app';\nconst appVersion = await getVersion();\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":10,"name":"hide","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":120,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/app.ts#L120"}],"signatures":[{"id":11,"name":"hide","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Hides the application on macOS."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { hide } from '@tauri-apps/api/app';\nawait hide();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.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":8,"name":"show","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":100,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/app.ts#L100"}],"signatures":[{"id":9,"name":"show","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows the application on macOS. This function does not automatically focus any specific app window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { show } from '@tauri-apps/api/app';\nawait show();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.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"}}]}],"groups":[{"title":"Functions","children":[2,6,4,10,8]}],"sources":[{"fileName":"app.ts","line":29,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/app.ts#L29"}]},{"id":12,"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":14,"name":"TauriEvent","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":28,"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/f78a37834/tooling/api/src/event.ts#L34"}],"type":{"type":"literal","value":"tauri://update"}},{"id":32,"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/f78a37834/tooling/api/src/event.ts#L38"}],"type":{"type":"literal","value":"tauri://update-download-progress"}},{"id":30,"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/f78a37834/tooling/api/src/event.ts#L36"}],"type":{"type":"literal","value":"tauri://update-install"}},{"id":27,"name":"MENU","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/event.ts#L33"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":31,"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/f78a37834/tooling/api/src/event.ts#L37"}],"type":{"type":"literal","value":"tauri://update-status"}},{"id":29,"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/f78a37834/tooling/api/src/event.ts#L35"}],"type":{"type":"literal","value":"tauri://update-available"}},{"id":21,"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/f78a37834/tooling/api/src/event.ts#L27"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":17,"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/f78a37834/tooling/api/src/event.ts#L23"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":18,"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/f78a37834/tooling/api/src/event.ts#L24"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":19,"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/f78a37834/tooling/api/src/event.ts#L25"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":24,"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/f78a37834/tooling/api/src/event.ts#L30"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":26,"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/f78a37834/tooling/api/src/event.ts#L32"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":25,"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/f78a37834/tooling/api/src/event.ts#L31"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":20,"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/f78a37834/tooling/api/src/event.ts#L26"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":16,"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/f78a37834/tooling/api/src/event.ts#L22"}],"type":{"type":"literal","value":"tauri://move"}},{"id":15,"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/f78a37834/tooling/api/src/event.ts#L21"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":22,"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/f78a37834/tooling/api/src/event.ts#L28"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":23,"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/f78a37834/tooling/api/src/event.ts#L29"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[28,32,30,27,31,29,21,17,18,19,24,26,25,20,16,15,22,23]}],"sources":[{"fileName":"event.ts","line":20,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/event.ts#L20"}]},{"id":907,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":908,"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/f78a37834/tooling/api/src/helpers/event.ts#L12"}],"type":{"type":"reference","id":13,"name":"EventName"}},{"id":910,"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/f78a37834/tooling/api/src/helpers/event.ts#L16"}],"type":{"type":"intrinsic","name":"number"}},{"id":911,"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/f78a37834/tooling/api/src/helpers/event.ts#L18"}],"type":{"type":"reference","id":912,"name":"T"}},{"id":909,"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/f78a37834/tooling/api/src/helpers/event.ts#L14"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[908,910,911,909]}],"sources":[{"fileName":"helpers/event.ts","line":10,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/helpers/event.ts#L10"}],"typeParameters":[{"id":912,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":913,"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/f78a37834/tooling/api/src/helpers/event.ts#L21"}],"typeParameters":[{"id":917,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":914,"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/f78a37834/tooling/api/src/helpers/event.ts#L21"}],"signatures":[{"id":915,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":916,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":907,"typeArguments":[{"type":"reference","id":917,"name":"T"}],"name":"Event"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":13,"name":"EventName","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"event.ts","line":15,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/event.ts#L15"}],"type":{"type":"union","types":[{"type":"template-literal","head":"","tail":[[{"type":"reference","id":14,"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":918,"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/f78a37834/tooling/api/src/helpers/event.ts#L23"}],"type":{"type":"reflection","declaration":{"id":919,"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/f78a37834/tooling/api/src/helpers/event.ts#L23"}],"signatures":[{"id":920,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":43,"name":"emit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":112,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/event.ts#L112"}],"signatures":[{"id":44,"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":45,"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":46,"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":33,"name":"listen","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":62,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/event.ts#L62"}],"signatures":[{"id":34,"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":35,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":36,"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":13,"name":"EventName"}},{"id":37,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","id":913,"typeArguments":[{"type":"reference","id":35,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":918,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":38,"name":"once","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":93,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/event.ts#L93"}],"signatures":[{"id":39,"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":40,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":41,"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":13,"name":"EventName"}},{"id":42,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":913,"typeArguments":[{"type":"reference","id":40,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":918,"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":[14]},{"title":"Interfaces","children":[907]},{"title":"Type Aliases","children":[913,13,918]},{"title":"Functions","children":[43,33,38]}],"sources":[{"fileName":"event.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/event.ts#L12"}]},{"id":47,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":59,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":171,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/mocks.ts#L171"}],"signatures":[{"id":60,"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":48,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":65,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/mocks.ts#L65"}],"signatures":[{"id":49,"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":50,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":51,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":66,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/mocks.ts#L66"}],"signatures":[{"id":52,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":53,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":54,"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":55,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":135,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/mocks.ts#L135"}],"signatures":[{"id":56,"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":57,"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":58,"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":[59,48,55]}],"sources":[{"fileName":"mocks.ts","line":5,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/mocks.ts#L5"}]},{"id":61,"name":"os","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Provides operating system-related utility methods and properties.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.os`"},{"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.os`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.os) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"os\": {\n \"all\": true, // enable all Os 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":75,"name":"Arch","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":43,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/os.ts#L43"}],"type":{"type":"union","types":[{"type":"literal","value":"x86"},{"type":"literal","value":"x86_64"},{"type":"literal","value":"arm"},{"type":"literal","value":"aarch64"},{"type":"literal","value":"mips"},{"type":"literal","value":"mips64"},{"type":"literal","value":"powerpc"},{"type":"literal","value":"powerpc64"},{"type":"literal","value":"riscv64"},{"type":"literal","value":"s390x"},{"type":"literal","value":"sparc64"}]}},{"id":74,"name":"OsType","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":41,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/os.ts#L41"}],"type":{"type":"union","types":[{"type":"literal","value":"Linux"},{"type":"literal","value":"Darwin"},{"type":"literal","value":"Windows_NT"}]}},{"id":73,"name":"Platform","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":29,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/os.ts#L29"}],"type":{"type":"union","types":[{"type":"literal","value":"linux"},{"type":"literal","value":"darwin"},{"type":"literal","value":"ios"},{"type":"literal","value":"freebsd"},{"type":"literal","value":"dragonfly"},{"type":"literal","value":"netbsd"},{"type":"literal","value":"openbsd"},{"type":"literal","value":"solaris"},{"type":"literal","value":"android"},{"type":"literal","value":"win32"}]}},{"id":62,"name":"EOL","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"The operating system-specific end-of-line marker.\n- "},{"kind":"code","text":"`\\n`"},{"kind":"text","text":" on POSIX\n- "},{"kind":"code","text":"`\\r\\n`"},{"kind":"text","text":" on Windows"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"os.ts","line":63,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/os.ts#L63"}],"type":{"type":"union","types":[{"type":"literal","value":"\n"},{"type":"literal","value":"\r\n"}]},"defaultValue":"..."},{"id":69,"name":"arch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":135,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/os.ts#L135"}],"signatures":[{"id":70,"name":"arch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the operating system CPU architecture for which the tauri app was compiled.\nPossible values are "},{"kind":"code","text":"`'x86'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'x86_64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'arm'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'aarch64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'mips'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'mips64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'powerpc'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'powerpc64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'riscv64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'s390x'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'sparc64'`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { arch } from '@tauri-apps/api/os';\nconst archName = await arch();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":75,"name":"Arch"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":63,"name":"platform","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":77,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/os.ts#L77"}],"signatures":[{"id":64,"name":"platform","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a string identifying the operating system platform.\nThe value is set at compile time. Possible values are "},{"kind":"code","text":"`'linux'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'darwin'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'ios'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'freebsd'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'dragonfly'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'netbsd'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'openbsd'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'solaris'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'android'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'win32'`"}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { platform } from '@tauri-apps/api/os';\nconst platformName = await platform();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":73,"name":"Platform"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":71,"name":"tempdir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":154,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/os.ts#L154"}],"signatures":[{"id":72,"name":"tempdir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the operating system's default directory for temporary files as a string."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { tempdir } from '@tauri-apps/api/os';\nconst tempdirPath = await tempdir();\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":67,"name":"type","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":115,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/os.ts#L115"}],"signatures":[{"id":68,"name":"type","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"`'Linux'`"},{"kind":"text","text":" on Linux, "},{"kind":"code","text":"`'Darwin'`"},{"kind":"text","text":" on macOS, and "},{"kind":"code","text":"`'Windows_NT'`"},{"kind":"text","text":" on Windows."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { type } from '@tauri-apps/api/os';\nconst osType = await type();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":74,"name":"OsType"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":65,"name":"version","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":96,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/os.ts#L96"}],"signatures":[{"id":66,"name":"version","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a string identifying the kernel version."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { version } from '@tauri-apps/api/os';\nconst osVersion = await version();\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":"Type Aliases","children":[75,74,73]},{"title":"Variables","children":[62]},{"title":"Functions","children":[69,63,71,67,65]}],"sources":[{"fileName":"os.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/os.ts#L26"}]},{"id":76,"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":77,"name":"BaseDirectory","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":93,"name":"AppCache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L48"}],"type":{"type":"literal","value":16}},{"id":90,"name":"AppConfig","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":45,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L45"}],"type":{"type":"literal","value":13}},{"id":91,"name":"AppData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":46,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L46"}],"type":{"type":"literal","value":14}},{"id":92,"name":"AppLocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L47"}],"type":{"type":"literal","value":15}},{"id":94,"name":"AppLog","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L49"}],"type":{"type":"literal","value":17}},{"id":78,"name":"Audio","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L33"}],"type":{"type":"literal","value":1}},{"id":79,"name":"Cache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L34"}],"type":{"type":"literal","value":2}},{"id":80,"name":"Config","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L35"}],"type":{"type":"literal","value":3}},{"id":81,"name":"Data","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L36"}],"type":{"type":"literal","value":4}},{"id":95,"name":"Desktop","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L51"}],"type":{"type":"literal","value":18}},{"id":83,"name":"Document","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L38"}],"type":{"type":"literal","value":6}},{"id":84,"name":"Download","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L39"}],"type":{"type":"literal","value":7}},{"id":96,"name":"Executable","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L52"}],"type":{"type":"literal","value":19}},{"id":97,"name":"Font","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L53"}],"type":{"type":"literal","value":20}},{"id":98,"name":"Home","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L54"}],"type":{"type":"literal","value":21}},{"id":82,"name":"LocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L37"}],"type":{"type":"literal","value":5}},{"id":85,"name":"Picture","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L40"}],"type":{"type":"literal","value":8}},{"id":86,"name":"Public","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L41"}],"type":{"type":"literal","value":9}},{"id":88,"name":"Resource","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L43"}],"type":{"type":"literal","value":11}},{"id":99,"name":"Runtime","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L55"}],"type":{"type":"literal","value":22}},{"id":89,"name":"Temp","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":44,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L44"}],"type":{"type":"literal","value":12}},{"id":100,"name":"Template","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L56"}],"type":{"type":"literal","value":23}},{"id":87,"name":"Video","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L42"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[93,90,91,92,94,78,79,80,81,95,83,84,96,97,98,82,85,86,88,99,89,100,87]}],"sources":[{"fileName":"path.ts","line":32,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L32"}]},{"id":149,"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/f78a37834/tooling/api/src/path.ts#L555"}],"type":{"type":"union","types":[{"type":"literal","value":";"},{"type":"literal","value":":"}]},"defaultValue":"..."},{"id":148,"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/f78a37834/tooling/api/src/path.ts#L546"}],"type":{"type":"union","types":[{"type":"literal","value":"\\"},{"type":"literal","value":"/"}]},"defaultValue":"..."},{"id":107,"name":"appCacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":121,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L121"}],"signatures":[{"id":108,"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":101,"name":"appConfigDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":70,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L70"}],"signatures":[{"id":102,"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":103,"name":"appDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L87"}],"signatures":[{"id":104,"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":105,"name":"appLocalDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":104,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L104"}],"signatures":[{"id":106,"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":109,"name":"appLogDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":533,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L533"}],"signatures":[{"id":110,"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":111,"name":"audioDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":143,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L143"}],"signatures":[{"id":112,"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":165,"name":"basename","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":647,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L647"}],"signatures":[{"id":166,"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":167,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":168,"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":113,"name":"cacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":165,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L165"}],"signatures":[{"id":114,"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":115,"name":"configDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":187,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L187"}],"signatures":[{"id":116,"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":117,"name":"dataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":209,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L209"}],"signatures":[{"id":118,"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":119,"name":"desktopDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":231,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L231"}],"signatures":[{"id":120,"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":159,"name":"dirname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":613,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L613"}],"signatures":[{"id":160,"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":161,"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":121,"name":"documentDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":253,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L253"}],"signatures":[{"id":122,"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":123,"name":"downloadDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":275,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L275"}],"signatures":[{"id":124,"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":125,"name":"executableDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":297,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L297"}],"signatures":[{"id":126,"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":162,"name":"extname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":629,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L629"}],"signatures":[{"id":163,"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":164,"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":127,"name":"fontDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":319,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L319"}],"signatures":[{"id":128,"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":129,"name":"homeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":341,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L341"}],"signatures":[{"id":130,"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":169,"name":"isAbsolute","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":661,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L661"}],"signatures":[{"id":170,"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":171,"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":156,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":598,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L598"}],"signatures":[{"id":157,"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":158,"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":131,"name":"localDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":363,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L363"}],"signatures":[{"id":132,"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":153,"name":"normalize","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":583,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L583"}],"signatures":[{"id":154,"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":155,"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":133,"name":"pictureDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":385,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L385"}],"signatures":[{"id":134,"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":135,"name":"publicDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":407,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L407"}],"signatures":[{"id":136,"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":150,"name":"resolve","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":568,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L568"}],"signatures":[{"id":151,"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":152,"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":139,"name":"resolveResource","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":444,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L444"}],"signatures":[{"id":140,"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":141,"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":137,"name":"resourceDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":424,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L424"}],"signatures":[{"id":138,"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":142,"name":"runtimeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":467,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L467"}],"signatures":[{"id":143,"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":144,"name":"templateDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":489,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L489"}],"signatures":[{"id":145,"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":146,"name":"videoDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":511,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L511"}],"signatures":[{"id":147,"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":[77]},{"title":"Variables","children":[149,148]},{"title":"Functions","children":[107,101,103,105,109,111,165,113,115,117,119,159,121,123,125,162,127,129,169,156,131,153,133,135,150,139,137,142,144,146]}],"sources":[{"fileName":"path.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/path.ts#L26"}]},{"id":172,"name":"process","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Perform operations on the current process.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.process`"},{"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":173,"name":"exit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"process.ts","line":27,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/process.ts#L27"}],"signatures":[{"id":174,"name":"exit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Exits immediately with the given "},{"kind":"code","text":"`exitCode`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { exit } from '@tauri-apps/api/process';\nawait exit(1);\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"}]}]},"parameters":[{"id":175,"name":"exitCode","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The exit code to use."}]},"type":{"type":"intrinsic","name":"number"},"defaultValue":"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":"relaunch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"process.ts","line":49,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/process.ts#L49"}],"signatures":[{"id":177,"name":"relaunch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Exits the current instance of the app then relaunches it."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { relaunch } from '@tauri-apps/api/process';\nawait relaunch();\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"}}]}],"groups":[{"title":"Functions","children":[173,176]}],"sources":[{"fileName":"process.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/process.ts#L12"}]},{"id":178,"name":"shell","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Access the system shell.\nAllows you to spawn child processes and manage files and URLs using their default application.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.shell`"},{"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.shell`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.shell) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"shell\": {\n \"all\": true, // enable all shell APIs\n \"execute\": true, // enable process spawn APIs\n \"sidecar\": true, // enable spawning sidecars\n \"open\": true // enable opening files/URLs using the default program\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## Security\n\nThis API has a scope configuration that forces you to restrict the programs and arguments that can be used.\n\n### Restricting access to the "},{"kind":"inline-tag","tag":"@link","text":"`open`","target":384},{"kind":"text","text":" API\n\nOn the allowlist, "},{"kind":"code","text":"`open: true`"},{"kind":"text","text":" means that the "},{"kind":"inline-tag","tag":"@link","text":"open","target":384},{"kind":"text","text":" API can be used with any URL,\nas the argument is validated with the "},{"kind":"code","text":"`^((mailto:\\w+)|(tel:\\w+)|(https?://\\w+)).+`"},{"kind":"text","text":" regex.\nYou can change that regex by changing the boolean value to a string, e.g. "},{"kind":"code","text":"`open: ^https://github.com/`"},{"kind":"text","text":".\n\n### Restricting access to the "},{"kind":"inline-tag","tag":"@link","text":"`Command`","target":179},{"kind":"text","text":" APIs\n\nThe "},{"kind":"code","text":"`shell`"},{"kind":"text","text":" allowlist object has a "},{"kind":"code","text":"`scope`"},{"kind":"text","text":" field that defines an array of CLIs that can be used.\nEach CLI is a configuration object "},{"kind":"code","text":"`{ name: string, cmd: string, sidecar?: bool, args?: boolean | Arg[] }`"},{"kind":"text","text":".\n\n- "},{"kind":"code","text":"`name`"},{"kind":"text","text":": the unique identifier of the command, passed to the "},{"kind":"inline-tag","tag":"@link","text":"Command.create function","target":180},{"kind":"text","text":".\nIf it's a sidecar, this must be the value defined on "},{"kind":"code","text":"`tauri.conf.json > tauri > bundle > externalBin`"},{"kind":"text","text":".\n- "},{"kind":"code","text":"`cmd`"},{"kind":"text","text":": the program that is executed on this configuration. If it's a sidecar, this value is ignored.\n- "},{"kind":"code","text":"`sidecar`"},{"kind":"text","text":": whether the object configures a sidecar or a system program.\n- "},{"kind":"code","text":"`args`"},{"kind":"text","text":": the arguments that can be passed to the program. By default no arguments are allowed.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" means that any argument list is allowed.\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" means that no arguments are allowed.\n - otherwise an array can be configured. Each item is either a string representing the fixed argument value\n or a "},{"kind":"code","text":"`{ validator: string }`"},{"kind":"text","text":" that defines a regex validating the argument value.\n\n#### Example scope configuration\n\nCLI: "},{"kind":"code","text":"`git commit -m \"the commit message\"`"},{"kind":"text","text":"\n\nConfiguration:\n"},{"kind":"code","text":"```json\n{\n \"scope\": [\n {\n \"name\": \"run-git-commit\",\n \"cmd\": \"git\",\n \"args\": [\"commit\", \"-m\", { \"validator\": \"\\\\S+\" }]\n }\n ]\n}\n```"},{"kind":"text","text":"\nUsage:\n"},{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell'\nCommand.create('run-git-commit', ['commit', '-m', 'the commit message'])\n```"},{"kind":"text","text":"\n\nTrying to execute any API with a program not configured on the scope results in a promise rejection due to denied access."}]},"children":[{"id":296,"name":"Child","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":297,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"shell.ts","line":346,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L346"}],"signatures":[{"id":298,"name":"new Child","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":299,"name":"pid","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":296,"name":"Child"}}]},{"id":300,"name":"pid","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The child process "},{"kind":"code","text":"`pid`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"shell.ts","line":344,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L344"}],"type":{"type":"intrinsic","name":"number"}},{"id":304,"name":"kill","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":382,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L382"}],"signatures":[{"id":305,"name":"kill","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Kills the child process."}],"blockTags":[{"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"}}]},{"id":301,"name":"write","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":365,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L365"}],"signatures":[{"id":302,"name":"write","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Writes "},{"kind":"code","text":"`data`"},{"kind":"text","text":" to the "},{"kind":"code","text":"`stdin`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('node');\nconst child = await command.spawn();\nawait child.write('message');\nawait child.write([0, 1, 2, 3, 4, 5]);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":303,"name":"data","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The message to write, either a string or a byte array."}]},"type":{"type":"reference","id":388,"name":"IOPayload"}}],"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"}}]}],"groups":[{"title":"Constructors","children":[297]},{"title":"Properties","children":[300]},{"title":"Methods","children":[304,301]}],"sources":[{"fileName":"shell.ts","line":342,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L342"}]},{"id":179,"name":"Command","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"The entry point for spawning child processes.\nIt emits the "},{"kind":"code","text":"`close`"},{"kind":"text","text":" and "},{"kind":"code","text":"`error`"},{"kind":"text","text":" events."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('node');\ncommand.on('close', data => {\n console.log(`command finished with code ${data.code} and signal ${data.signal}`)\n});\ncommand.on('error', error => console.error(`command error: \"${error}\"`));\ncommand.stdout.on('data', line => console.log(`command stdout: \"${line}\"`));\ncommand.stderr.on('data', line => console.log(`command stderr: \"${line}\"`));\n\nconst child = await command.spawn();\nconsole.log('pid:', child.pid);\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":218,"name":"stderr","kind":1024,"kindString":"Property","flags":{"isReadonly":true},"comment":{"summary":[{"kind":"text","text":"Event emitter for the "},{"kind":"code","text":"`stderr`"},{"kind":"text","text":". Emits the "},{"kind":"code","text":"`data`"},{"kind":"text","text":" event."}]},"sources":[{"fileName":"shell.ts","line":433,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L433"}],"type":{"type":"reference","id":306,"typeArguments":[{"type":"reference","id":395,"typeArguments":[{"type":"reference","name":"O"}],"name":"OutputEvents"}],"name":"EventEmitter"},"defaultValue":"..."},{"id":217,"name":"stdout","kind":1024,"kindString":"Property","flags":{"isReadonly":true},"comment":{"summary":[{"kind":"text","text":"Event emitter for the "},{"kind":"code","text":"`stdout`"},{"kind":"text","text":". Emits the "},{"kind":"code","text":"`data`"},{"kind":"text","text":" event."}]},"sources":[{"fileName":"shell.ts","line":431,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L431"}],"type":{"type":"reference","id":306,"typeArguments":[{"type":"reference","id":395,"typeArguments":[{"type":"reference","name":"O"}],"name":"OutputEvents"}],"name":"EventEmitter"},"defaultValue":"..."},{"id":226,"name":"addListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L164"}],"signatures":[{"id":227,"name":"addListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Alias for "},{"kind":"code","text":"`emitter.on(eventName, listener)`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":228,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":389,"name":"CommandEvents"}}}],"parameters":[{"id":229,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":228,"name":"N"}},{"id":230,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":231,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":166,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L166"}],"signatures":[{"id":232,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":233,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":228,"name":"N"},"objectType":{"type":"reference","id":389,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":315,"name":"EventEmitter.addListener"}}],"inheritedFrom":{"type":"reference","id":314,"name":"EventEmitter.addListener"}},{"id":221,"name":"execute","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":564,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L564"}],"signatures":[{"id":222,"name":"execute","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Executes the command as a child process, waiting for it to finish and collecting all of its output."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst output = await Command.create('echo', 'message').execute();\nassert(output.code === 0);\nassert(output.signal === null);\nassert(output.stdout === 'message');\nassert(output.stderr === '');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the child process output."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":398,"typeArguments":[{"type":"reference","name":"O"}],"name":"ChildProcess"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":275,"name":"listenerCount","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":287,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L287"}],"signatures":[{"id":276,"name":"listenerCount","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the number of listeners listening to the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":277,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":389,"name":"CommandEvents"}}}],"parameters":[{"id":278,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":277,"name":"N"}}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","id":364,"name":"EventEmitter.listenerCount"}}],"inheritedFrom":{"type":"reference","id":363,"name":"EventEmitter.listenerCount"}},{"id":258,"name":"off","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":233,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L233"}],"signatures":[{"id":259,"name":"off","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes the all specified listener from the listener array for the event eventName\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":260,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":389,"name":"CommandEvents"}}}],"parameters":[{"id":261,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":260,"name":"N"}},{"id":262,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":263,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":235,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L235"}],"signatures":[{"id":264,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":265,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":260,"name":"N"},"objectType":{"type":"reference","id":389,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":347,"name":"EventEmitter.off"}}],"inheritedFrom":{"type":"reference","id":346,"name":"EventEmitter.off"}},{"id":242,"name":"on","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":193,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L193"}],"signatures":[{"id":243,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function to the end of the listeners array for the\nevent named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". No checks are made to see if the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" has\nalready been added. Multiple calls passing the same combination of "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"and "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" will result in the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" being added, and called, multiple\ntimes.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":244,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":389,"name":"CommandEvents"}}}],"parameters":[{"id":245,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":244,"name":"N"}},{"id":246,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":247,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":195,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L195"}],"signatures":[{"id":248,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":249,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":244,"name":"N"},"objectType":{"type":"reference","id":389,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":331,"name":"EventEmitter.on"}}],"inheritedFrom":{"type":"reference","id":330,"name":"EventEmitter.on"}},{"id":250,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":215,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L215"}],"signatures":[{"id":251,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a **one-time**"},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function for the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". The\nnext time "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" is triggered, this listener is removed and then invoked.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":252,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":389,"name":"CommandEvents"}}}],"parameters":[{"id":253,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":252,"name":"N"}},{"id":254,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":255,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":217,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L217"}],"signatures":[{"id":256,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":257,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":252,"name":"N"},"objectType":{"type":"reference","id":389,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":339,"name":"EventEmitter.once"}}],"inheritedFrom":{"type":"reference","id":338,"name":"EventEmitter.once"}},{"id":279,"name":"prependListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":304,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L304"}],"signatures":[{"id":280,"name":"prependListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function to the _beginning_ of the listeners array for the\nevent named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". No checks are made to see if the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" has\nalready been added. Multiple calls passing the same combination of "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"and "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" will result in the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" being added, and called, multiple\ntimes.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":281,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":389,"name":"CommandEvents"}}}],"parameters":[{"id":282,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":281,"name":"N"}},{"id":283,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":284,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":306,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L306"}],"signatures":[{"id":285,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":286,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":281,"name":"N"},"objectType":{"type":"reference","id":389,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":368,"name":"EventEmitter.prependListener"}}],"inheritedFrom":{"type":"reference","id":367,"name":"EventEmitter.prependListener"}},{"id":287,"name":"prependOnceListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":326,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L326"}],"signatures":[{"id":288,"name":"prependOnceListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a **one-time**"},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function for the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" to the_beginning_ of the listeners array. The next time "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" is triggered, this\nlistener is removed, and then invoked.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":289,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":389,"name":"CommandEvents"}}}],"parameters":[{"id":290,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":289,"name":"N"}},{"id":291,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":292,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":328,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L328"}],"signatures":[{"id":293,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":294,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":289,"name":"N"},"objectType":{"type":"reference","id":389,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":376,"name":"EventEmitter.prependOnceListener"}}],"inheritedFrom":{"type":"reference","id":375,"name":"EventEmitter.prependOnceListener"}},{"id":266,"name":"removeAllListeners","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":253,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L253"}],"signatures":[{"id":267,"name":"removeAllListeners","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes all listeners, or those of the specified eventName.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":268,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":389,"name":"CommandEvents"}}}],"parameters":[{"id":269,"name":"event","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":268,"name":"N"}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":355,"name":"EventEmitter.removeAllListeners"}}],"inheritedFrom":{"type":"reference","id":354,"name":"EventEmitter.removeAllListeners"}},{"id":234,"name":"removeListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L176"}],"signatures":[{"id":235,"name":"removeListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Alias for "},{"kind":"code","text":"`emitter.off(eventName, listener)`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":236,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":389,"name":"CommandEvents"}}}],"parameters":[{"id":237,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":236,"name":"N"}},{"id":238,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":239,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":178,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L178"}],"signatures":[{"id":240,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":241,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":236,"name":"N"},"objectType":{"type":"reference","id":389,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":323,"name":"EventEmitter.removeListener"}}],"inheritedFrom":{"type":"reference","id":322,"name":"EventEmitter.removeListener"}},{"id":219,"name":"spawn","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":526,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L526"}],"signatures":[{"id":220,"name":"spawn","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Executes the command as a child process, returning a handle to it."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the child process handle."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":296,"name":"Child"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":180,"name":"create","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"shell.ts","line":455,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L455"},{"fileName":"shell.ts","line":456,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L456"},{"fileName":"shell.ts","line":461,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L461"},{"fileName":"shell.ts","line":479,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L479"}],"signatures":[{"id":181,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('my-app', ['run', 'tauri']);\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":182,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":183,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}},{"id":184,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('my-app', ['run', 'tauri']);\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":185,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":186,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}},{"id":187,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":404,"name":"SpawnOptions"},{"type":"reflection","declaration":{"id":188,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":189,"name":"encoding","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":459,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L459"}],"type":{"type":"literal","value":"raw"}}],"groups":[{"title":"Properties","children":[189]}],"sources":[{"fileName":"shell.ts","line":459,"character":29,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L459"}]}}]}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}],"name":"Command"}},{"id":190,"name":"create","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.create('my-app', ['run', 'tauri']);\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":191,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":192,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}},{"id":193,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":404,"name":"SpawnOptions"}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}}]},{"id":194,"name":"sidecar","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"shell.ts","line":487,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L487"},{"fileName":"shell.ts","line":488,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L488"},{"fileName":"shell.ts","line":493,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L493"},{"fileName":"shell.ts","line":511,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L511"}],"signatures":[{"id":195,"name":"sidecar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given sidecar program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.sidecar('my-sidecar');\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":196,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":197,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}},{"id":198,"name":"sidecar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given sidecar program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.sidecar('my-sidecar');\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":199,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":200,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}},{"id":201,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":404,"name":"SpawnOptions"},{"type":"reflection","declaration":{"id":202,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":203,"name":"encoding","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":491,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L491"}],"type":{"type":"literal","value":"raw"}}],"groups":[{"title":"Properties","children":[203]}],"sources":[{"fileName":"shell.ts","line":491,"character":29,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L491"}]}}]}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}],"name":"Command"}},{"id":204,"name":"sidecar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a command to execute the given sidecar program."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Command } from '@tauri-apps/api/shell';\nconst command = Command.sidecar('my-sidecar');\nconst output = await command.execute();\n```"}]}]},"parameters":[{"id":205,"name":"program","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The program to execute.\nIt must be configured on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > scope`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":206,"name":"args","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}]}},{"id":207,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":404,"name":"SpawnOptions"}}],"type":{"type":"reference","id":179,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}}]}],"groups":[{"title":"Properties","children":[218,217]},{"title":"Methods","children":[226,221,275,258,242,250,279,287,266,234,219,180,194]}],"sources":[{"fileName":"shell.ts","line":423,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L423"}],"typeParameters":[{"id":295,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":388,"name":"IOPayload"}}],"extendedTypes":[{"type":"reference","id":306,"typeArguments":[{"type":"reference","id":389,"name":"CommandEvents"}],"name":"EventEmitter"}]},{"id":306,"name":"EventEmitter","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":307,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"signatures":[{"id":308,"name":"new EventEmitter","kind":16384,"kindString":"Constructor signature","flags":{},"typeParameter":[{"id":309,"name":"E","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"reference","id":306,"typeArguments":[{"type":"reference","id":309,"name":"E"}],"name":"EventEmitter"}}]},{"id":314,"name":"addListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L164"}],"signatures":[{"id":315,"name":"addListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Alias for "},{"kind":"code","text":"`emitter.on(eventName, listener)`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":316,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":317,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":228,"name":"N"}},{"id":318,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":319,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":166,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L166"}],"signatures":[{"id":320,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":321,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":228,"name":"N"},"objectType":{"type":"reference","id":309,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":306,"typeArguments":[{"type":"reference","id":309,"name":"E"}],"name":"EventEmitter"}}]},{"id":363,"name":"listenerCount","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":287,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L287"}],"signatures":[{"id":364,"name":"listenerCount","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the number of listeners listening to the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":365,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":366,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":277,"name":"N"}}],"type":{"type":"intrinsic","name":"number"}}]},{"id":346,"name":"off","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":233,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L233"}],"signatures":[{"id":347,"name":"off","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes the all specified listener from the listener array for the event eventName\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":348,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":349,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":260,"name":"N"}},{"id":350,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":351,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":235,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L235"}],"signatures":[{"id":352,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":353,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":260,"name":"N"},"objectType":{"type":"reference","id":309,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":306,"typeArguments":[{"type":"reference","id":309,"name":"E"}],"name":"EventEmitter"}}]},{"id":330,"name":"on","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":193,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L193"}],"signatures":[{"id":331,"name":"on","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function to the end of the listeners array for the\nevent named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". No checks are made to see if the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" has\nalready been added. Multiple calls passing the same combination of "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"and "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" will result in the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" being added, and called, multiple\ntimes.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":332,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":333,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":244,"name":"N"}},{"id":334,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":335,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":195,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L195"}],"signatures":[{"id":336,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":337,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":244,"name":"N"},"objectType":{"type":"reference","id":309,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":306,"typeArguments":[{"type":"reference","id":309,"name":"E"}],"name":"EventEmitter"}}]},{"id":338,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":215,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L215"}],"signatures":[{"id":339,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a **one-time**"},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function for the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". The\nnext time "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" is triggered, this listener is removed and then invoked.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":340,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":341,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":252,"name":"N"}},{"id":342,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":343,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":217,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L217"}],"signatures":[{"id":344,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":345,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":252,"name":"N"},"objectType":{"type":"reference","id":309,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":306,"typeArguments":[{"type":"reference","id":309,"name":"E"}],"name":"EventEmitter"}}]},{"id":367,"name":"prependListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":304,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L304"}],"signatures":[{"id":368,"name":"prependListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function to the _beginning_ of the listeners array for the\nevent named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":". No checks are made to see if the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" has\nalready been added. Multiple calls passing the same combination of "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":"and "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" will result in the "},{"kind":"code","text":"`listener`"},{"kind":"text","text":" being added, and called, multiple\ntimes.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":369,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":370,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":281,"name":"N"}},{"id":371,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":372,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":306,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L306"}],"signatures":[{"id":373,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":374,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":281,"name":"N"},"objectType":{"type":"reference","id":309,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":306,"typeArguments":[{"type":"reference","id":309,"name":"E"}],"name":"EventEmitter"}}]},{"id":375,"name":"prependOnceListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":326,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L326"}],"signatures":[{"id":376,"name":"prependOnceListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a **one-time**"},{"kind":"code","text":"`listener`"},{"kind":"text","text":" function for the event named "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" to the_beginning_ of the listeners array. The next time "},{"kind":"code","text":"`eventName`"},{"kind":"text","text":" is triggered, this\nlistener is removed, and then invoked.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":377,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":378,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":289,"name":"N"}},{"id":379,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":380,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":328,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L328"}],"signatures":[{"id":381,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":382,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":289,"name":"N"},"objectType":{"type":"reference","id":309,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":306,"typeArguments":[{"type":"reference","id":309,"name":"E"}],"name":"EventEmitter"}}]},{"id":354,"name":"removeAllListeners","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":253,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L253"}],"signatures":[{"id":355,"name":"removeAllListeners","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Removes all listeners, or those of the specified eventName.\n\nReturns a reference to the "},{"kind":"code","text":"`EventEmitter`"},{"kind":"text","text":", so that calls can be chained."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":356,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":357,"name":"event","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":268,"name":"N"}}],"type":{"type":"reference","id":306,"typeArguments":[{"type":"reference","id":309,"name":"E"}],"name":"EventEmitter"}}]},{"id":322,"name":"removeListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L176"}],"signatures":[{"id":323,"name":"removeListener","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Alias for "},{"kind":"code","text":"`emitter.off(eventName, listener)`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"typeParameter":[{"id":324,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"symbol"}]}}],"parameters":[{"id":325,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":236,"name":"N"}},{"id":326,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":327,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":178,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L178"}],"signatures":[{"id":328,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":329,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":236,"name":"N"},"objectType":{"type":"reference","id":309,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":306,"typeArguments":[{"type":"reference","id":309,"name":"E"}],"name":"EventEmitter"}}]}],"groups":[{"title":"Constructors","children":[307]},{"title":"Methods","children":[314,363,346,330,338,367,375,354,322]}],"sources":[{"fileName":"shell.ts","line":153,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L153"}],"typeParameters":[{"id":383,"name":"E","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"extendedBy":[{"type":"reference","id":179,"name":"Command"}]},{"id":398,"name":"ChildProcess","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":399,"name":"code","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Exit code of the process. "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if the process was terminated by a signal on Unix."}]},"sources":[{"fileName":"shell.ts","line":109,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L109"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":400,"name":"signal","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"If the process was terminated by a signal, represents that signal."}]},"sources":[{"fileName":"shell.ts","line":111,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L111"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":402,"name":"stderr","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The data that the process wrote to "},{"kind":"code","text":"`stderr`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"shell.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L115"}],"type":{"type":"reference","id":403,"name":"O"}},{"id":401,"name":"stdout","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The data that the process wrote to "},{"kind":"code","text":"`stdout`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"shell.ts","line":113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L113"}],"type":{"type":"reference","id":403,"name":"O"}}],"groups":[{"title":"Properties","children":[399,400,402,401]}],"sources":[{"fileName":"shell.ts","line":107,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L107"}],"typeParameters":[{"id":403,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":388,"name":"IOPayload"}}]},{"id":389,"name":"CommandEvents","kind":256,"kindString":"Interface","flags":{},"children":[{"id":390,"name":"close","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":394,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L394"}],"type":{"type":"reference","id":392,"name":"TerminatedPayload"}},{"id":391,"name":"error","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":395,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L395"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[390,391]}],"sources":[{"fileName":"shell.ts","line":393,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L393"}]},{"id":395,"name":"OutputEvents","kind":256,"kindString":"Interface","flags":{},"children":[{"id":396,"name":"data","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":399,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L399"}],"type":{"type":"reference","id":397,"name":"O"}}],"groups":[{"title":"Properties","children":[396]}],"sources":[{"fileName":"shell.ts","line":398,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L398"}],"typeParameters":[{"id":397,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":388,"name":"IOPayload"}}]},{"id":404,"name":"SpawnOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":405,"name":"cwd","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Current working directory."}]},"sources":[{"fileName":"shell.ts","line":88,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L88"}],"type":{"type":"intrinsic","name":"string"}},{"id":407,"name":"encoding","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Character encoding for stdout/stderr"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"sources":[{"fileName":"shell.ts","line":96,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L96"}],"type":{"type":"intrinsic","name":"string"}},{"id":406,"name":"env","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Environment variables. set to "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to clear the process env."}]},"sources":[{"fileName":"shell.ts","line":90,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L90"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"string"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"groups":[{"title":"Properties","children":[405,407,406]}],"sources":[{"fileName":"shell.ts","line":86,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L86"}]},{"id":392,"name":"TerminatedPayload","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Payload for the "},{"kind":"code","text":"`Terminated`"},{"kind":"text","text":" command event."}]},"children":[{"id":393,"name":"code","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Exit code of the process. "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if the process was terminated by a signal on Unix."}]},"sources":[{"fileName":"shell.ts","line":615,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L615"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":394,"name":"signal","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"If the process was terminated by a signal, represents that signal."}]},"sources":[{"fileName":"shell.ts","line":617,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L617"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Properties","children":[393,394]}],"sources":[{"fileName":"shell.ts","line":613,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L613"}]},{"id":388,"name":"IOPayload","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload type"}]},"sources":[{"fileName":"shell.ts","line":621,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L621"}],"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"}]}},{"id":384,"name":"open","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"shell.ts","line":656,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L656"}],"signatures":[{"id":385,"name":"open","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Opens a path or URL with the system's default app,\nor the one specified with "},{"kind":"code","text":"`openWith`"},{"kind":"text","text":".\n\nThe "},{"kind":"code","text":"`openWith`"},{"kind":"text","text":" value must be one of "},{"kind":"code","text":"`firefox`"},{"kind":"text","text":", "},{"kind":"code","text":"`google chrome`"},{"kind":"text","text":", "},{"kind":"code","text":"`chromium`"},{"kind":"text","text":" "},{"kind":"code","text":"`safari`"},{"kind":"text","text":",\n"},{"kind":"code","text":"`open`"},{"kind":"text","text":", "},{"kind":"code","text":"`start`"},{"kind":"text","text":", "},{"kind":"code","text":"`xdg-open`"},{"kind":"text","text":", "},{"kind":"code","text":"`gio`"},{"kind":"text","text":", "},{"kind":"code","text":"`gnome-open`"},{"kind":"text","text":", "},{"kind":"code","text":"`kde-open`"},{"kind":"text","text":" or "},{"kind":"code","text":"`wslview`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { open } from '@tauri-apps/api/shell';\n// opens the given URL on the default browser:\nawait open('https://github.com/tauri-apps/tauri');\n// opens the given URL using `firefox`:\nawait open('https://github.com/tauri-apps/tauri', 'firefox');\n// opens a file using the default program:\nawait open('/path/to/file');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":386,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The path or URL to open.\nThis value is matched against the string regex defined on "},{"kind":"code","text":"`tauri.conf.json > tauri > allowlist > shell > open`"},{"kind":"text","text":",\nwhich defaults to "},{"kind":"code","text":"`^((mailto:\\w+)|(tel:\\w+)|(https?://\\w+)).+`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":387,"name":"openWith","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The app to open the file or URL with.\nDefaults to the system default application for the specified path type."}]},"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"}}]}],"groups":[{"title":"Classes","children":[296,179,306]},{"title":"Interfaces","children":[398,389,395,404,392]},{"title":"Type Aliases","children":[388]},{"title":"Functions","children":[384]}],"sources":[{"fileName":"shell.ts","line":80,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/shell.ts#L80"}]},{"id":408,"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":409,"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/f78a37834/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":422,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":129,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/tauri.ts#L129"}],"signatures":[{"id":423,"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":424,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":425,"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":417,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":79,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/tauri.ts#L79"}],"signatures":[{"id":418,"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":419,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":420,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":421,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":409,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":419,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":410,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":411,"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":412,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":413,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":414,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":415,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":416,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Type Aliases","children":[409]},{"title":"Functions","children":[422,417,410]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/tauri.ts#L13"}]},{"id":426,"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":431,"name":"UpdateManifest","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":434,"name":"body","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L34"}],"type":{"type":"intrinsic","name":"string"}},{"id":433,"name":"date","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L33"}],"type":{"type":"intrinsic","name":"string"}},{"id":432,"name":"version","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L32"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[434,433,432]}],"sources":[{"fileName":"updater.ts","line":31,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L31"}]},{"id":435,"name":"UpdateResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":436,"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/f78a37834/tooling/api/src/updater.ts#L41"}],"type":{"type":"reference","id":431,"name":"UpdateManifest"}},{"id":437,"name":"shouldUpdate","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L42"}],"type":{"type":"intrinsic","name":"boolean"}}],"groups":[{"title":"Properties","children":[436,437]}],"sources":[{"fileName":"updater.ts","line":40,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L40"}]},{"id":428,"name":"UpdateStatusResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":429,"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/f78a37834/tooling/api/src/updater.ts#L24"}],"type":{"type":"intrinsic","name":"string"}},{"id":430,"name":"status","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L25"}],"type":{"type":"reference","id":427,"name":"UpdateStatus"}}],"groups":[{"title":"Properties","children":[429,430]}],"sources":[{"fileName":"updater.ts","line":23,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L23"}]},{"id":427,"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/f78a37834/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":446,"name":"checkUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":146,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L146"}],"signatures":[{"id":447,"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":435,"name":"UpdateResult"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":444,"name":"installUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L87"}],"signatures":[{"id":445,"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":438,"name":"onUpdaterEvent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":63,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L63"}],"signatures":[{"id":439,"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":440,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":441,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"updater.ts","line":64,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L64"}],"signatures":[{"id":442,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":443,"name":"status","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":428,"name":"UpdateStatusResult"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":918,"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":[431,435,428]},{"title":"Type Aliases","children":[427]},{"title":"Functions","children":[446,444,438]}],"sources":[{"fileName":"updater.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/updater.ts#L12"}]},{"id":448,"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":849,"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":850,"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/f78a37834/tooling/api/src/window.ts#L226"}],"type":{"type":"literal","value":1}},{"id":851,"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/f78a37834/tooling/api/src/window.ts#L232"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[850,851]}],"sources":[{"fileName":"window.ts","line":220,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L220"}]},{"id":794,"name":"CloseRequestedEvent","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":795,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":1963,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1963"}],"signatures":[{"id":796,"name":"new CloseRequestedEvent","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":797,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":907,"typeArguments":[{"type":"literal","value":null}],"name":"Event"}}],"type":{"type":"reference","id":794,"name":"CloseRequestedEvent"}}]},{"id":801,"name":"_preventDefault","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"window.ts","line":1961,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1961"}],"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"},{"id":798,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"window.ts","line":1956,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1956"}],"type":{"type":"reference","id":13,"name":"EventName"}},{"id":800,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"window.ts","line":1960,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1960"}],"type":{"type":"intrinsic","name":"number"}},{"id":799,"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":1958,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1958"}],"type":{"type":"intrinsic","name":"string"}},{"id":804,"name":"isPreventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1973,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1973"}],"signatures":[{"id":805,"name":"isPreventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"boolean"}}]},{"id":802,"name":"preventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1969,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1969"}],"signatures":[{"id":803,"name":"preventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[795]},{"title":"Properties","children":[801,798,800,799]},{"title":"Methods","children":[804,802]}],"sources":[{"fileName":"window.ts","line":1954,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1954"}]},{"id":830,"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":831,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L164"}],"signatures":[{"id":832,"name":"new LogicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":833,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":834,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":830,"name":"LogicalPosition"}}]},{"id":835,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L160"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":836,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L161"}],"type":{"type":"intrinsic","name":"number"}},{"id":837,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":162,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L162"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[831]},{"title":"Properties","children":[835,836,837]}],"sources":[{"fileName":"window.ts","line":159,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L159"}]},{"id":811,"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":812,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":118,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L118"}],"signatures":[{"id":813,"name":"new LogicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":814,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":815,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":811,"name":"LogicalSize"}}]},{"id":818,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L116"}],"type":{"type":"intrinsic","name":"number"}},{"id":816,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":114,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L114"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":817,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L115"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[812]},{"title":"Properties","children":[818,816,817]}],"sources":[{"fileName":"window.ts","line":113,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L113"}]},{"id":838,"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":839,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":180,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L180"}],"signatures":[{"id":840,"name":"new PhysicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":841,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":842,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":838,"name":"PhysicalPosition"}}]},{"id":843,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L176"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":844,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L177"}],"type":{"type":"intrinsic","name":"number"}},{"id":845,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":178,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L178"}],"type":{"type":"intrinsic","name":"number"}},{"id":846,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L195"}],"signatures":[{"id":847,"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":848,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":830,"name":"LogicalPosition"}}]}],"groups":[{"title":"Constructors","children":[839]},{"title":"Properties","children":[843,844,845]},{"title":"Methods","children":[846]}],"sources":[{"fileName":"window.ts","line":175,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L175"}]},{"id":819,"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":820,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":134,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L134"}],"signatures":[{"id":821,"name":"new PhysicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":822,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":823,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":819,"name":"PhysicalSize"}}]},{"id":826,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L132"}],"type":{"type":"intrinsic","name":"number"}},{"id":824,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L130"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":825,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L131"}],"type":{"type":"intrinsic","name":"number"}},{"id":827,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L149"}],"signatures":[{"id":828,"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":829,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":811,"name":"LogicalSize"}}]}],"groups":[{"title":"Constructors","children":[820]},{"title":"Properties","children":[826,824,825]},{"title":"Methods","children":[827]}],"sources":[{"fileName":"window.ts","line":129,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L129"}]},{"id":451,"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":455,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":2031,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2031"}],"signatures":[{"id":456,"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":457,"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":458,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":877,"name":"WindowOptions"},"defaultValue":"{}"}],"type":{"type":"reference","id":451,"name":"WebviewWindow"},"overwrites":{"type":"reference","name":"WindowManager.constructor"}}],"overwrites":{"type":"reference","name":"WindowManager.constructor"}},{"id":591,"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/f78a37834/tooling/api/src/window.ts#L316"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","name":"WindowManager.label"}},{"id":592,"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/f78a37834/tooling/api/src/window.ts#L318"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"reference","id":913,"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"EventCallback"}}],"name":"Record","qualifiedName":"Record","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listeners"}},{"id":485,"name":"center","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":780,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L780"}],"signatures":[{"id":486,"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":510,"name":"close","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1081,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1081"}],"signatures":[{"id":511,"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":603,"name":"emit","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":400,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L400"}],"signatures":[{"id":604,"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":605,"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":606,"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":508,"name":"hide","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1056,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1056"}],"signatures":[{"id":509,"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":461,"name":"innerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":470,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L470"}],"signatures":[{"id":462,"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":838,"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":465,"name":"innerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":521,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L521"}],"signatures":[{"id":466,"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":819,"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":475,"name":"isDecorated","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":647,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L647"}],"signatures":[{"id":476,"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":469,"name":"isFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":572,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L572"}],"signatures":[{"id":470,"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":473,"name":"isMaximized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":622,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L622"}],"signatures":[{"id":474,"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":471,"name":"isMinimized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":597,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L597"}],"signatures":[{"id":472,"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":477,"name":"isResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":672,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L672"}],"signatures":[{"id":478,"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":479,"name":"isVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":697,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L697"}],"signatures":[{"id":480,"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":593,"name":"listen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":345,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L345"}],"signatures":[{"id":594,"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":595,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":596,"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":13,"name":"EventName"}},{"id":597,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":913,"typeArguments":[{"type":"reference","id":595,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":918,"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":496,"name":"maximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":906,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L906"}],"signatures":[{"id":497,"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":502,"name":"minimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":981,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L981"}],"signatures":[{"id":503,"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":570,"name":"onCloseRequested","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1763,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1763"}],"signatures":[{"id":571,"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":572,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":573,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"window.ts","line":1764,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1764"}],"signatures":[{"id":574,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":575,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":794,"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":918,"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":585,"name":"onFileDropEvent","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1896,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1896"}],"signatures":[{"id":586,"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":587,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":913,"typeArguments":[{"type":"reference","id":868,"name":"FileDropEvent"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":918,"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":576,"name":"onFocusChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1795,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1795"}],"signatures":[{"id":577,"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":578,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":913,"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":918,"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":582,"name":"onMenuClicked","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1865,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1865"}],"signatures":[{"id":583,"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":584,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":913,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":918,"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":567,"name":"onMoved","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1735,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1735"}],"signatures":[{"id":568,"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":569,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":913,"typeArguments":[{"type":"reference","id":838,"name":"PhysicalPosition"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":918,"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":564,"name":"onResized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1712,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1712"}],"signatures":[{"id":565,"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":566,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":913,"typeArguments":[{"type":"reference","id":819,"name":"PhysicalSize"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":918,"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":579,"name":"onScaleChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1837,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1837"}],"signatures":[{"id":580,"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":581,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":913,"typeArguments":[{"type":"reference","id":865,"name":"ScaleFactorChanged"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":918,"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":588,"name":"onThemeChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1946,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1946"}],"signatures":[{"id":589,"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":590,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":913,"typeArguments":[{"type":"reference","id":858,"name":"Theme"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":918,"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":598,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":378,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L378"}],"signatures":[{"id":599,"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":600,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":601,"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":602,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":913,"typeArguments":[{"type":"reference","id":600,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":918,"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":463,"name":"outerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":495,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L495"}],"signatures":[{"id":464,"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":838,"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":467,"name":"outerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":547,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L547"}],"signatures":[{"id":468,"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":819,"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":487,"name":"requestUserAttention","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":816,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L816"}],"signatures":[{"id":488,"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":489,"name":"requestType","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":849,"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":459,"name":"scaleFactor","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":445,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L445"}],"signatures":[{"id":460,"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":518,"name":"setAlwaysOnTop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1171,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1171"}],"signatures":[{"id":519,"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":520,"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":521,"name":"setContentProtected","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1199,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1199"}],"signatures":[{"id":522,"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":523,"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":547,"name":"setCursorGrab","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1519,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1519"}],"signatures":[{"id":548,"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":549,"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":553,"name":"setCursorIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1579,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1579"}],"signatures":[{"id":554,"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":555,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor icon."}]},"type":{"type":"reference","id":449,"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":556,"name":"setCursorPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1606,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1606"}],"signatures":[{"id":557,"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":558,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor position."}]},"type":{"type":"union","types":[{"type":"reference","id":838,"name":"PhysicalPosition"},{"type":"reference","id":830,"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":550,"name":"setCursorVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1552,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1552"}],"signatures":[{"id":551,"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":552,"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":512,"name":"setDecorations","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1107,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1107"}],"signatures":[{"id":513,"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":514,"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":539,"name":"setFocus","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1417,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1417"}],"signatures":[{"id":540,"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":536,"name":"setFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1391,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1391"}],"signatures":[{"id":537,"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":538,"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":541,"name":"setIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1450,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1450"}],"signatures":[{"id":542,"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":543,"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":559,"name":"setIgnoreCursorEvents","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1650,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1650"}],"signatures":[{"id":560,"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":561,"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":530,"name":"setMaxSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1306,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1306"}],"signatures":[{"id":531,"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":532,"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":819,"name":"PhysicalSize"},{"type":"reference","id":811,"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":527,"name":"setMinSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1264,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1264"}],"signatures":[{"id":528,"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":529,"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":819,"name":"PhysicalSize"},{"type":"reference","id":811,"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":533,"name":"setPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1348,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1348"}],"signatures":[{"id":534,"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":535,"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":838,"name":"PhysicalPosition"},{"type":"reference","id":830,"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":490,"name":"setResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":853,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L853"}],"signatures":[{"id":491,"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":492,"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":515,"name":"setShadow","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1144,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1144"}],"signatures":[{"id":516,"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":517,"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":524,"name":"setSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1226,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1226"}],"signatures":[{"id":525,"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":526,"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":819,"name":"PhysicalSize"},{"type":"reference","id":811,"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":544,"name":"setSkipTaskbar","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1484"}],"signatures":[{"id":545,"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":546,"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":493,"name":"setTitle","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":880,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L880"}],"signatures":[{"id":494,"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":495,"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":506,"name":"show","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1031,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1031"}],"signatures":[{"id":507,"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":562,"name":"startDragging","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1676,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1676"}],"signatures":[{"id":563,"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":483,"name":"theme","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":752,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L752"}],"signatures":[{"id":484,"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":858,"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":481,"name":"title","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":722,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L722"}],"signatures":[{"id":482,"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":500,"name":"toggleMaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":956,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L956"}],"signatures":[{"id":501,"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":498,"name":"unmaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":931,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L931"}],"signatures":[{"id":499,"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":504,"name":"unminimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1006,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L1006"}],"signatures":[{"id":505,"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":452,"name":"getByLabel","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"window.ts","line":2063,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2063"}],"signatures":[{"id":453,"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":454,"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":451,"name":"WebviewWindow"}]}}]}],"groups":[{"title":"Constructors","children":[455]},{"title":"Properties","children":[591,592]},{"title":"Methods","children":[485,510,603,508,461,465,475,469,473,471,477,479,593,496,502,570,585,576,582,567,564,579,588,598,463,467,487,459,518,521,547,553,556,550,512,539,536,541,559,530,527,533,490,515,524,544,493,506,562,483,481,500,498,504,452]}],"sources":[{"fileName":"window.ts","line":2011,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2011"}],"extendedTypes":[{"type":"reference","name":"WindowManager"}]},{"id":860,"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":861,"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/f78a37834/tooling/api/src/window.ts#L81"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}},{"id":863,"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/f78a37834/tooling/api/src/window.ts#L85"}],"type":{"type":"reference","id":838,"name":"PhysicalPosition"}},{"id":864,"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/f78a37834/tooling/api/src/window.ts#L87"}],"type":{"type":"intrinsic","name":"number"}},{"id":862,"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/f78a37834/tooling/api/src/window.ts#L83"}],"type":{"type":"reference","id":819,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[861,863,864,862]}],"sources":[{"fileName":"window.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L79"}]},{"id":865,"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":866,"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/f78a37834/tooling/api/src/window.ts#L97"}],"type":{"type":"intrinsic","name":"number"}},{"id":867,"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/f78a37834/tooling/api/src/window.ts#L99"}],"type":{"type":"reference","id":819,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[866,867]}],"sources":[{"fileName":"window.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L95"}]},{"id":877,"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":904,"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":2187,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2187"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":896,"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":2145,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2145"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":879,"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":2107,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2107"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":897,"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":2147,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2147"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":895,"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":2143,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2143"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":900,"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":2169,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2169"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":891,"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":2131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2131"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":890,"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":2129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2129"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":883,"name":"height","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial height."}]},"sources":[{"fileName":"window.ts","line":2115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2115"}],"type":{"type":"intrinsic","name":"number"}},{"id":903,"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":2183,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2183"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":887,"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":2123,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2123"}],"type":{"type":"intrinsic","name":"number"}},{"id":886,"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":2121,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2121"}],"type":{"type":"intrinsic","name":"number"}},{"id":893,"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":2139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2139"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":885,"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":2119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2119"}],"type":{"type":"intrinsic","name":"number"}},{"id":884,"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":2117,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2117"}],"type":{"type":"intrinsic","name":"number"}},{"id":888,"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":2125,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2125"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":899,"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":2163,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2163"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":898,"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":2149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2149"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":905,"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":2194,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2194"}],"type":{"type":"intrinsic","name":"string"}},{"id":901,"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":2175,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2175"}],"type":{"type":"reference","id":858,"name":"Theme"}},{"id":889,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Window title."}]},"sources":[{"fileName":"window.ts","line":2127,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2127"}],"type":{"type":"intrinsic","name":"string"}},{"id":902,"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":2179,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2179"}],"type":{"type":"reference","id":859,"name":"TitleBarStyle"}},{"id":892,"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":2137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2137"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":878,"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":2105,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2105"}],"type":{"type":"intrinsic","name":"string"}},{"id":906,"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":2198,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2198"}],"type":{"type":"intrinsic","name":"string"}},{"id":894,"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":2141,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2141"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":882,"name":"width","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial width."}]},"sources":[{"fileName":"window.ts","line":2113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2113"}],"type":{"type":"intrinsic","name":"number"}},{"id":880,"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":2109,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2109"}],"type":{"type":"intrinsic","name":"number"}},{"id":881,"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":2111,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2111"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[904,896,879,897,895,900,891,890,883,903,887,886,893,885,884,888,899,898,905,901,889,902,892,878,906,894,882,880,881]}],"sources":[{"fileName":"window.ts","line":2097,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2097"}]},{"id":449,"name":"CursorIcon","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":235,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/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":868,"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/f78a37834/tooling/api/src/window.ts#L103"}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":869,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":871,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":21,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L104"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":870,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L104"}],"type":{"type":"literal","value":"hover"}}],"groups":[{"title":"Properties","children":[871,870]}],"sources":[{"fileName":"window.ts","line":104,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L104"}]}},{"type":"reflection","declaration":{"id":872,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":874,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L105"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":873,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L105"}],"type":{"type":"literal","value":"drop"}}],"groups":[{"title":"Properties","children":[874,873]}],"sources":[{"fileName":"window.ts","line":105,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L105"}]}},{"type":"reflection","declaration":{"id":875,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":876,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":106,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L106"}],"type":{"type":"literal","value":"cancel"}}],"groups":[{"title":"Properties","children":[876]}],"sources":[{"fileName":"window.ts","line":106,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L106"}]}}]}},{"id":858,"name":"Theme","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L71"}],"type":{"type":"union","types":[{"type":"literal","value":"light"},{"type":"literal","value":"dark"}]}},{"id":859,"name":"TitleBarStyle","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":72,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L72"}],"type":{"type":"union","types":[{"type":"literal","value":"visible"},{"type":"literal","value":"transparent"},{"type":"literal","value":"overlay"}]}},{"id":810,"name":"appWindow","kind":32,"kindString":"Variable","flags":{},"comment":{"summary":[{"kind":"text","text":"The WebviewWindow for the current window."}]},"sources":[{"fileName":"window.ts","line":2073,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2073"}],"type":{"type":"reference","id":451,"name":"WebviewWindow"}},{"id":856,"name":"availableMonitors","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2272,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2272"}],"signatures":[{"id":857,"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":860,"name":"Monitor"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":852,"name":"currentMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2223,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2223"}],"signatures":[{"id":853,"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":860,"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":808,"name":"getAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":293,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L293"}],"signatures":[{"id":809,"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":451,"name":"WebviewWindow"}}}]},{"id":806,"name":"getCurrent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":281,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L281"}],"signatures":[{"id":807,"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":451,"name":"WebviewWindow"}}]},{"id":854,"name":"primaryMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2248,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L2248"}],"signatures":[{"id":855,"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":860,"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":[849]},{"title":"Classes","children":[794,830,811,838,819,451]},{"title":"Interfaces","children":[860,865,877]},{"title":"Type Aliases","children":[449,868,858,859]},{"title":"Variables","children":[810]},{"title":"Functions","children":[856,852,808,806,854]}],"sources":[{"fileName":"window.ts","line":66,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/f78a37834/tooling/api/src/window.ts#L66"}]}],"groups":[{"title":"Modules","children":[1,12,47,61,76,172,178,408,426,448]}]} \ No newline at end of file +{"id":0,"name":"@tauri-apps/api","kind":1,"flags":{},"originalName":"","children":[{"id":1,"name":"app","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Get application metadata.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.app`"},{"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.app`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.app) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"app\": {\n \"all\": true, // enable all app APIs\n \"show\": true,\n \"hide\": 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."}]},"children":[{"id":2,"name":"getName","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":60,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/app.ts#L60"}],"signatures":[{"id":3,"name":"getName","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the application name."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getName } from '@tauri-apps/api/app';\nconst appName = await getName();\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":6,"name":"getTauriVersion","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":80,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/app.ts#L80"}],"signatures":[{"id":7,"name":"getTauriVersion","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the Tauri version."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getTauriVersion } from '@tauri-apps/api/app';\nconst tauriVersion = await getTauriVersion();\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":4,"name":"getVersion","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":41,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/app.ts#L41"}],"signatures":[{"id":5,"name":"getVersion","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the application version."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getVersion } from '@tauri-apps/api/app';\nconst appVersion = await getVersion();\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":10,"name":"hide","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":120,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/app.ts#L120"}],"signatures":[{"id":11,"name":"hide","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Hides the application on macOS."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { hide } from '@tauri-apps/api/app';\nawait hide();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.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":8,"name":"show","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"app.ts","line":100,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/app.ts#L100"}],"signatures":[{"id":9,"name":"show","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows the application on macOS. This function does not automatically focus any specific app window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { show } from '@tauri-apps/api/app';\nawait show();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.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"}}]}],"groups":[{"title":"Functions","children":[2,6,4,10,8]}],"sources":[{"fileName":"app.ts","line":29,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/app.ts#L29"}]},{"id":12,"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":14,"name":"TauriEvent","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":28,"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/86488a6ad/tooling/api/src/event.ts#L34"}],"type":{"type":"literal","value":"tauri://update"}},{"id":32,"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/86488a6ad/tooling/api/src/event.ts#L38"}],"type":{"type":"literal","value":"tauri://update-download-progress"}},{"id":30,"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/86488a6ad/tooling/api/src/event.ts#L36"}],"type":{"type":"literal","value":"tauri://update-install"}},{"id":27,"name":"MENU","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/event.ts#L33"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":31,"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/86488a6ad/tooling/api/src/event.ts#L37"}],"type":{"type":"literal","value":"tauri://update-status"}},{"id":29,"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/86488a6ad/tooling/api/src/event.ts#L35"}],"type":{"type":"literal","value":"tauri://update-available"}},{"id":21,"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/86488a6ad/tooling/api/src/event.ts#L27"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":17,"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/86488a6ad/tooling/api/src/event.ts#L23"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":18,"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/86488a6ad/tooling/api/src/event.ts#L24"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":19,"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/86488a6ad/tooling/api/src/event.ts#L25"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":24,"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/86488a6ad/tooling/api/src/event.ts#L30"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":26,"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/86488a6ad/tooling/api/src/event.ts#L32"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":25,"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/86488a6ad/tooling/api/src/event.ts#L31"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":20,"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/86488a6ad/tooling/api/src/event.ts#L26"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":16,"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/86488a6ad/tooling/api/src/event.ts#L22"}],"type":{"type":"literal","value":"tauri://move"}},{"id":15,"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/86488a6ad/tooling/api/src/event.ts#L21"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":22,"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/86488a6ad/tooling/api/src/event.ts#L28"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":23,"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/86488a6ad/tooling/api/src/event.ts#L29"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[28,32,30,27,31,29,21,17,18,19,24,26,25,20,16,15,22,23]}],"sources":[{"fileName":"event.ts","line":20,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/event.ts#L20"}]},{"id":677,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":678,"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/86488a6ad/tooling/api/src/helpers/event.ts#L12"}],"type":{"type":"reference","id":13,"name":"EventName"}},{"id":680,"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/86488a6ad/tooling/api/src/helpers/event.ts#L16"}],"type":{"type":"intrinsic","name":"number"}},{"id":681,"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/86488a6ad/tooling/api/src/helpers/event.ts#L18"}],"type":{"type":"reference","id":682,"name":"T"}},{"id":679,"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/86488a6ad/tooling/api/src/helpers/event.ts#L14"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[678,680,681,679]}],"sources":[{"fileName":"helpers/event.ts","line":10,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/helpers/event.ts#L10"}],"typeParameters":[{"id":682,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":683,"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/86488a6ad/tooling/api/src/helpers/event.ts#L21"}],"typeParameters":[{"id":687,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":684,"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/86488a6ad/tooling/api/src/helpers/event.ts#L21"}],"signatures":[{"id":685,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":686,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":677,"typeArguments":[{"type":"reference","id":687,"name":"T"}],"name":"Event"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":13,"name":"EventName","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"event.ts","line":15,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/event.ts#L15"}],"type":{"type":"union","types":[{"type":"template-literal","head":"","tail":[[{"type":"reference","id":14,"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":688,"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/86488a6ad/tooling/api/src/helpers/event.ts#L23"}],"type":{"type":"reflection","declaration":{"id":689,"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/86488a6ad/tooling/api/src/helpers/event.ts#L23"}],"signatures":[{"id":690,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":43,"name":"emit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":112,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/event.ts#L112"}],"signatures":[{"id":44,"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":45,"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":46,"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":33,"name":"listen","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":62,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/event.ts#L62"}],"signatures":[{"id":34,"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":35,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":36,"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":13,"name":"EventName"}},{"id":37,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","id":683,"typeArguments":[{"type":"reference","id":35,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":688,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":38,"name":"once","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":93,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/event.ts#L93"}],"signatures":[{"id":39,"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":40,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":41,"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":13,"name":"EventName"}},{"id":42,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":683,"typeArguments":[{"type":"reference","id":40,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":688,"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":[14]},{"title":"Interfaces","children":[677]},{"title":"Type Aliases","children":[683,13,688]},{"title":"Functions","children":[43,33,38]}],"sources":[{"fileName":"event.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/event.ts#L12"}]},{"id":47,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":59,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":171,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/mocks.ts#L171"}],"signatures":[{"id":60,"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":48,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":65,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/mocks.ts#L65"}],"signatures":[{"id":49,"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":50,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":51,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":66,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/mocks.ts#L66"}],"signatures":[{"id":52,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":53,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":54,"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":55,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":135,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/mocks.ts#L135"}],"signatures":[{"id":56,"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":57,"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":58,"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":[59,48,55]}],"sources":[{"fileName":"mocks.ts","line":5,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/mocks.ts#L5"}]},{"id":61,"name":"os","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Provides operating system-related utility methods and properties.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.os`"},{"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.os`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.os) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"os\": {\n \"all\": true, // enable all Os 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":75,"name":"Arch","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":43,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/os.ts#L43"}],"type":{"type":"union","types":[{"type":"literal","value":"x86"},{"type":"literal","value":"x86_64"},{"type":"literal","value":"arm"},{"type":"literal","value":"aarch64"},{"type":"literal","value":"mips"},{"type":"literal","value":"mips64"},{"type":"literal","value":"powerpc"},{"type":"literal","value":"powerpc64"},{"type":"literal","value":"riscv64"},{"type":"literal","value":"s390x"},{"type":"literal","value":"sparc64"}]}},{"id":74,"name":"OsType","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":41,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/os.ts#L41"}],"type":{"type":"union","types":[{"type":"literal","value":"Linux"},{"type":"literal","value":"Darwin"},{"type":"literal","value":"Windows_NT"}]}},{"id":73,"name":"Platform","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":29,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/os.ts#L29"}],"type":{"type":"union","types":[{"type":"literal","value":"linux"},{"type":"literal","value":"darwin"},{"type":"literal","value":"ios"},{"type":"literal","value":"freebsd"},{"type":"literal","value":"dragonfly"},{"type":"literal","value":"netbsd"},{"type":"literal","value":"openbsd"},{"type":"literal","value":"solaris"},{"type":"literal","value":"android"},{"type":"literal","value":"win32"}]}},{"id":62,"name":"EOL","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"The operating system-specific end-of-line marker.\n- "},{"kind":"code","text":"`\\n`"},{"kind":"text","text":" on POSIX\n- "},{"kind":"code","text":"`\\r\\n`"},{"kind":"text","text":" on Windows"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"os.ts","line":63,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/os.ts#L63"}],"type":{"type":"union","types":[{"type":"literal","value":"\r\n"},{"type":"literal","value":"\n"}]},"defaultValue":"..."},{"id":69,"name":"arch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":135,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/os.ts#L135"}],"signatures":[{"id":70,"name":"arch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the operating system CPU architecture for which the tauri app was compiled.\nPossible values are "},{"kind":"code","text":"`'x86'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'x86_64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'arm'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'aarch64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'mips'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'mips64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'powerpc'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'powerpc64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'riscv64'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'s390x'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'sparc64'`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { arch } from '@tauri-apps/api/os';\nconst archName = await arch();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":75,"name":"Arch"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":63,"name":"platform","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":77,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/os.ts#L77"}],"signatures":[{"id":64,"name":"platform","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a string identifying the operating system platform.\nThe value is set at compile time. Possible values are "},{"kind":"code","text":"`'linux'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'darwin'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'ios'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'freebsd'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'dragonfly'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'netbsd'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'openbsd'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'solaris'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'android'`"},{"kind":"text","text":", "},{"kind":"code","text":"`'win32'`"}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { platform } from '@tauri-apps/api/os';\nconst platformName = await platform();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":73,"name":"Platform"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":71,"name":"tempdir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":154,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/os.ts#L154"}],"signatures":[{"id":72,"name":"tempdir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the operating system's default directory for temporary files as a string."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { tempdir } from '@tauri-apps/api/os';\nconst tempdirPath = await tempdir();\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":67,"name":"type","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":115,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/os.ts#L115"}],"signatures":[{"id":68,"name":"type","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns "},{"kind":"code","text":"`'Linux'`"},{"kind":"text","text":" on Linux, "},{"kind":"code","text":"`'Darwin'`"},{"kind":"text","text":" on macOS, and "},{"kind":"code","text":"`'Windows_NT'`"},{"kind":"text","text":" on Windows."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { type } from '@tauri-apps/api/os';\nconst osType = await type();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":74,"name":"OsType"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":65,"name":"version","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":96,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/os.ts#L96"}],"signatures":[{"id":66,"name":"version","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a string identifying the kernel version."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { version } from '@tauri-apps/api/os';\nconst osVersion = await version();\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":"Type Aliases","children":[75,74,73]},{"title":"Variables","children":[62]},{"title":"Functions","children":[69,63,71,67,65]}],"sources":[{"fileName":"os.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/os.ts#L26"}]},{"id":76,"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":77,"name":"BaseDirectory","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":93,"name":"AppCache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L48"}],"type":{"type":"literal","value":16}},{"id":90,"name":"AppConfig","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":45,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L45"}],"type":{"type":"literal","value":13}},{"id":91,"name":"AppData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":46,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L46"}],"type":{"type":"literal","value":14}},{"id":92,"name":"AppLocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L47"}],"type":{"type":"literal","value":15}},{"id":94,"name":"AppLog","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L49"}],"type":{"type":"literal","value":17}},{"id":78,"name":"Audio","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L33"}],"type":{"type":"literal","value":1}},{"id":79,"name":"Cache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L34"}],"type":{"type":"literal","value":2}},{"id":80,"name":"Config","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L35"}],"type":{"type":"literal","value":3}},{"id":81,"name":"Data","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L36"}],"type":{"type":"literal","value":4}},{"id":95,"name":"Desktop","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L51"}],"type":{"type":"literal","value":18}},{"id":83,"name":"Document","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L38"}],"type":{"type":"literal","value":6}},{"id":84,"name":"Download","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L39"}],"type":{"type":"literal","value":7}},{"id":96,"name":"Executable","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L52"}],"type":{"type":"literal","value":19}},{"id":97,"name":"Font","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L53"}],"type":{"type":"literal","value":20}},{"id":98,"name":"Home","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L54"}],"type":{"type":"literal","value":21}},{"id":82,"name":"LocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L37"}],"type":{"type":"literal","value":5}},{"id":85,"name":"Picture","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L40"}],"type":{"type":"literal","value":8}},{"id":86,"name":"Public","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L41"}],"type":{"type":"literal","value":9}},{"id":88,"name":"Resource","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L43"}],"type":{"type":"literal","value":11}},{"id":99,"name":"Runtime","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L55"}],"type":{"type":"literal","value":22}},{"id":89,"name":"Temp","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":44,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L44"}],"type":{"type":"literal","value":12}},{"id":100,"name":"Template","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L56"}],"type":{"type":"literal","value":23}},{"id":87,"name":"Video","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L42"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[93,90,91,92,94,78,79,80,81,95,83,84,96,97,98,82,85,86,88,99,89,100,87]}],"sources":[{"fileName":"path.ts","line":32,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L32"}]},{"id":149,"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/86488a6ad/tooling/api/src/path.ts#L555"}],"type":{"type":"union","types":[{"type":"literal","value":";"},{"type":"literal","value":":"}]},"defaultValue":"..."},{"id":148,"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/86488a6ad/tooling/api/src/path.ts#L546"}],"type":{"type":"union","types":[{"type":"literal","value":"\\"},{"type":"literal","value":"/"}]},"defaultValue":"..."},{"id":107,"name":"appCacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":121,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L121"}],"signatures":[{"id":108,"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":101,"name":"appConfigDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":70,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L70"}],"signatures":[{"id":102,"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":103,"name":"appDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L87"}],"signatures":[{"id":104,"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":105,"name":"appLocalDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":104,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L104"}],"signatures":[{"id":106,"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":109,"name":"appLogDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":533,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L533"}],"signatures":[{"id":110,"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":111,"name":"audioDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":143,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L143"}],"signatures":[{"id":112,"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":165,"name":"basename","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":647,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L647"}],"signatures":[{"id":166,"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":167,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":168,"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":113,"name":"cacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":165,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L165"}],"signatures":[{"id":114,"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":115,"name":"configDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":187,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L187"}],"signatures":[{"id":116,"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":117,"name":"dataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":209,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L209"}],"signatures":[{"id":118,"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":119,"name":"desktopDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":231,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L231"}],"signatures":[{"id":120,"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":159,"name":"dirname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":613,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L613"}],"signatures":[{"id":160,"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":161,"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":121,"name":"documentDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":253,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L253"}],"signatures":[{"id":122,"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":123,"name":"downloadDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":275,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L275"}],"signatures":[{"id":124,"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":125,"name":"executableDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":297,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L297"}],"signatures":[{"id":126,"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":162,"name":"extname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":629,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L629"}],"signatures":[{"id":163,"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":164,"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":127,"name":"fontDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":319,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L319"}],"signatures":[{"id":128,"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":129,"name":"homeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":341,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L341"}],"signatures":[{"id":130,"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":169,"name":"isAbsolute","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":661,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L661"}],"signatures":[{"id":170,"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":171,"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":156,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":598,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L598"}],"signatures":[{"id":157,"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":158,"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":131,"name":"localDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":363,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L363"}],"signatures":[{"id":132,"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":153,"name":"normalize","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":583,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L583"}],"signatures":[{"id":154,"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":155,"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":133,"name":"pictureDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":385,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L385"}],"signatures":[{"id":134,"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":135,"name":"publicDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":407,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L407"}],"signatures":[{"id":136,"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":150,"name":"resolve","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":568,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L568"}],"signatures":[{"id":151,"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":152,"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":139,"name":"resolveResource","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":444,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L444"}],"signatures":[{"id":140,"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":141,"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":137,"name":"resourceDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":424,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L424"}],"signatures":[{"id":138,"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":142,"name":"runtimeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":467,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L467"}],"signatures":[{"id":143,"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":144,"name":"templateDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":489,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L489"}],"signatures":[{"id":145,"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":146,"name":"videoDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":511,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L511"}],"signatures":[{"id":147,"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":[77]},{"title":"Variables","children":[149,148]},{"title":"Functions","children":[107,101,103,105,109,111,165,113,115,117,119,159,121,123,125,162,127,129,169,156,131,153,133,135,150,139,137,142,144,146]}],"sources":[{"fileName":"path.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/path.ts#L26"}]},{"id":172,"name":"process","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Perform operations on the current process.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.process`"},{"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":173,"name":"exit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"process.ts","line":27,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/process.ts#L27"}],"signatures":[{"id":174,"name":"exit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Exits immediately with the given "},{"kind":"code","text":"`exitCode`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { exit } from '@tauri-apps/api/process';\nawait exit(1);\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"}]}]},"parameters":[{"id":175,"name":"exitCode","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The exit code to use."}]},"type":{"type":"intrinsic","name":"number"},"defaultValue":"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":"relaunch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"process.ts","line":49,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/process.ts#L49"}],"signatures":[{"id":177,"name":"relaunch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Exits the current instance of the app then relaunches it."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { relaunch } from '@tauri-apps/api/process';\nawait relaunch();\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"}}]}],"groups":[{"title":"Functions","children":[173,176]}],"sources":[{"fileName":"process.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/process.ts#L12"}]},{"id":178,"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":179,"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/86488a6ad/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":192,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":129,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/tauri.ts#L129"}],"signatures":[{"id":193,"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":194,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":195,"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":187,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":79,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/tauri.ts#L79"}],"signatures":[{"id":188,"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":189,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":190,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":191,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":179,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":189,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":180,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":181,"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":182,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":183,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":184,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":185,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":186,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Type Aliases","children":[179]},{"title":"Functions","children":[192,187,180]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/tauri.ts#L13"}]},{"id":196,"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":201,"name":"UpdateManifest","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":204,"name":"body","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L34"}],"type":{"type":"intrinsic","name":"string"}},{"id":203,"name":"date","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L33"}],"type":{"type":"intrinsic","name":"string"}},{"id":202,"name":"version","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L32"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[204,203,202]}],"sources":[{"fileName":"updater.ts","line":31,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L31"}]},{"id":205,"name":"UpdateResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":206,"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/86488a6ad/tooling/api/src/updater.ts#L41"}],"type":{"type":"reference","id":201,"name":"UpdateManifest"}},{"id":207,"name":"shouldUpdate","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L42"}],"type":{"type":"intrinsic","name":"boolean"}}],"groups":[{"title":"Properties","children":[206,207]}],"sources":[{"fileName":"updater.ts","line":40,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L40"}]},{"id":198,"name":"UpdateStatusResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":199,"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/86488a6ad/tooling/api/src/updater.ts#L24"}],"type":{"type":"intrinsic","name":"string"}},{"id":200,"name":"status","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L25"}],"type":{"type":"reference","id":197,"name":"UpdateStatus"}}],"groups":[{"title":"Properties","children":[199,200]}],"sources":[{"fileName":"updater.ts","line":23,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L23"}]},{"id":197,"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/86488a6ad/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":216,"name":"checkUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":146,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L146"}],"signatures":[{"id":217,"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":205,"name":"UpdateResult"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":214,"name":"installUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L87"}],"signatures":[{"id":215,"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":208,"name":"onUpdaterEvent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":63,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L63"}],"signatures":[{"id":209,"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":210,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":211,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"updater.ts","line":64,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L64"}],"signatures":[{"id":212,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":213,"name":"status","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":198,"name":"UpdateStatusResult"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":688,"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":[201,205,198]},{"title":"Type Aliases","children":[197]},{"title":"Functions","children":[216,214,208]}],"sources":[{"fileName":"updater.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/updater.ts#L12"}]},{"id":218,"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":619,"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":620,"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/86488a6ad/tooling/api/src/window.ts#L226"}],"type":{"type":"literal","value":1}},{"id":621,"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/86488a6ad/tooling/api/src/window.ts#L232"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[620,621]}],"sources":[{"fileName":"window.ts","line":220,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L220"}]},{"id":564,"name":"CloseRequestedEvent","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":565,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":1963,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1963"}],"signatures":[{"id":566,"name":"new CloseRequestedEvent","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":567,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":677,"typeArguments":[{"type":"literal","value":null}],"name":"Event"}}],"type":{"type":"reference","id":564,"name":"CloseRequestedEvent"}}]},{"id":571,"name":"_preventDefault","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"window.ts","line":1961,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1961"}],"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"},{"id":568,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"window.ts","line":1956,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1956"}],"type":{"type":"reference","id":13,"name":"EventName"}},{"id":570,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"window.ts","line":1960,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1960"}],"type":{"type":"intrinsic","name":"number"}},{"id":569,"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":1958,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1958"}],"type":{"type":"intrinsic","name":"string"}},{"id":574,"name":"isPreventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1973,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1973"}],"signatures":[{"id":575,"name":"isPreventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"boolean"}}]},{"id":572,"name":"preventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1969,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1969"}],"signatures":[{"id":573,"name":"preventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[565]},{"title":"Properties","children":[571,568,570,569]},{"title":"Methods","children":[574,572]}],"sources":[{"fileName":"window.ts","line":1954,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1954"}]},{"id":600,"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":601,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L164"}],"signatures":[{"id":602,"name":"new LogicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":603,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":604,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":600,"name":"LogicalPosition"}}]},{"id":605,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L160"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":606,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L161"}],"type":{"type":"intrinsic","name":"number"}},{"id":607,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":162,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L162"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[601]},{"title":"Properties","children":[605,606,607]}],"sources":[{"fileName":"window.ts","line":159,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L159"}]},{"id":581,"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":582,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":118,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L118"}],"signatures":[{"id":583,"name":"new LogicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":584,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":585,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":581,"name":"LogicalSize"}}]},{"id":588,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L116"}],"type":{"type":"intrinsic","name":"number"}},{"id":586,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":114,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L114"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":587,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L115"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[582]},{"title":"Properties","children":[588,586,587]}],"sources":[{"fileName":"window.ts","line":113,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L113"}]},{"id":608,"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":609,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":180,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L180"}],"signatures":[{"id":610,"name":"new PhysicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":611,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":612,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":608,"name":"PhysicalPosition"}}]},{"id":613,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L176"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":614,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L177"}],"type":{"type":"intrinsic","name":"number"}},{"id":615,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":178,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L178"}],"type":{"type":"intrinsic","name":"number"}},{"id":616,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L195"}],"signatures":[{"id":617,"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":618,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":600,"name":"LogicalPosition"}}]}],"groups":[{"title":"Constructors","children":[609]},{"title":"Properties","children":[613,614,615]},{"title":"Methods","children":[616]}],"sources":[{"fileName":"window.ts","line":175,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L175"}]},{"id":589,"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":590,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":134,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L134"}],"signatures":[{"id":591,"name":"new PhysicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":592,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":593,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":589,"name":"PhysicalSize"}}]},{"id":596,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L132"}],"type":{"type":"intrinsic","name":"number"}},{"id":594,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L130"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":595,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L131"}],"type":{"type":"intrinsic","name":"number"}},{"id":597,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L149"}],"signatures":[{"id":598,"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":599,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":581,"name":"LogicalSize"}}]}],"groups":[{"title":"Constructors","children":[590]},{"title":"Properties","children":[596,594,595]},{"title":"Methods","children":[597]}],"sources":[{"fileName":"window.ts","line":129,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L129"}]},{"id":221,"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":225,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":2031,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2031"}],"signatures":[{"id":226,"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":227,"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":228,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"name":"WindowOptions"},"defaultValue":"{}"}],"type":{"type":"reference","id":221,"name":"WebviewWindow"},"overwrites":{"type":"reference","name":"WindowManager.constructor"}}],"overwrites":{"type":"reference","name":"WindowManager.constructor"}},{"id":361,"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/86488a6ad/tooling/api/src/window.ts#L316"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","name":"WindowManager.label"}},{"id":362,"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/86488a6ad/tooling/api/src/window.ts#L318"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"reference","id":683,"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"EventCallback"}}],"name":"Record","qualifiedName":"Record","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listeners"}},{"id":255,"name":"center","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":780,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L780"}],"signatures":[{"id":256,"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":280,"name":"close","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1081,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1081"}],"signatures":[{"id":281,"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":373,"name":"emit","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":400,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L400"}],"signatures":[{"id":374,"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":375,"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":376,"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":278,"name":"hide","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1056,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1056"}],"signatures":[{"id":279,"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":231,"name":"innerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":470,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L470"}],"signatures":[{"id":232,"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":608,"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":235,"name":"innerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":521,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L521"}],"signatures":[{"id":236,"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":589,"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":245,"name":"isDecorated","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":647,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L647"}],"signatures":[{"id":246,"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":239,"name":"isFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":572,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L572"}],"signatures":[{"id":240,"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":243,"name":"isMaximized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":622,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L622"}],"signatures":[{"id":244,"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":241,"name":"isMinimized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":597,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L597"}],"signatures":[{"id":242,"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":247,"name":"isResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":672,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L672"}],"signatures":[{"id":248,"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":249,"name":"isVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":697,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L697"}],"signatures":[{"id":250,"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":363,"name":"listen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":345,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L345"}],"signatures":[{"id":364,"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":365,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":366,"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":13,"name":"EventName"}},{"id":367,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":683,"typeArguments":[{"type":"reference","id":365,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":688,"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":266,"name":"maximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":906,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L906"}],"signatures":[{"id":267,"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":272,"name":"minimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":981,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L981"}],"signatures":[{"id":273,"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":340,"name":"onCloseRequested","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1763,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1763"}],"signatures":[{"id":341,"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":342,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":343,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"window.ts","line":1764,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1764"}],"signatures":[{"id":344,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":345,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":564,"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":688,"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":355,"name":"onFileDropEvent","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1896,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1896"}],"signatures":[{"id":356,"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":357,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":683,"typeArguments":[{"type":"reference","id":638,"name":"FileDropEvent"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":688,"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":346,"name":"onFocusChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1795,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1795"}],"signatures":[{"id":347,"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":348,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":683,"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":688,"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":352,"name":"onMenuClicked","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1865,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1865"}],"signatures":[{"id":353,"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":354,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":683,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":688,"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":337,"name":"onMoved","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1735,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1735"}],"signatures":[{"id":338,"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":339,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":683,"typeArguments":[{"type":"reference","id":608,"name":"PhysicalPosition"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":688,"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":334,"name":"onResized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1712,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1712"}],"signatures":[{"id":335,"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":336,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":683,"typeArguments":[{"type":"reference","id":589,"name":"PhysicalSize"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":688,"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":349,"name":"onScaleChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1837,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1837"}],"signatures":[{"id":350,"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":351,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":683,"typeArguments":[{"type":"reference","id":635,"name":"ScaleFactorChanged"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":688,"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":358,"name":"onThemeChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1946,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1946"}],"signatures":[{"id":359,"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":360,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":683,"typeArguments":[{"type":"reference","id":628,"name":"Theme"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":688,"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":368,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":378,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L378"}],"signatures":[{"id":369,"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":370,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":371,"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":372,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":683,"typeArguments":[{"type":"reference","id":370,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":688,"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":233,"name":"outerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":495,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L495"}],"signatures":[{"id":234,"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":608,"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":237,"name":"outerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":547,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L547"}],"signatures":[{"id":238,"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":589,"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":257,"name":"requestUserAttention","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":816,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L816"}],"signatures":[{"id":258,"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":259,"name":"requestType","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":619,"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":229,"name":"scaleFactor","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":445,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L445"}],"signatures":[{"id":230,"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":288,"name":"setAlwaysOnTop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1171,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1171"}],"signatures":[{"id":289,"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":290,"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":291,"name":"setContentProtected","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1199,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1199"}],"signatures":[{"id":292,"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":293,"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":317,"name":"setCursorGrab","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1519,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1519"}],"signatures":[{"id":318,"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":319,"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":323,"name":"setCursorIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1579,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1579"}],"signatures":[{"id":324,"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":325,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor icon."}]},"type":{"type":"reference","id":219,"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":326,"name":"setCursorPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1606,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1606"}],"signatures":[{"id":327,"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":328,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor position."}]},"type":{"type":"union","types":[{"type":"reference","id":608,"name":"PhysicalPosition"},{"type":"reference","id":600,"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":320,"name":"setCursorVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1552,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1552"}],"signatures":[{"id":321,"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":322,"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":282,"name":"setDecorations","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1107,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1107"}],"signatures":[{"id":283,"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":284,"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":309,"name":"setFocus","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1417,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1417"}],"signatures":[{"id":310,"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":306,"name":"setFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1391,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1391"}],"signatures":[{"id":307,"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":308,"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":311,"name":"setIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1450,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1450"}],"signatures":[{"id":312,"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":313,"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":329,"name":"setIgnoreCursorEvents","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1650,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1650"}],"signatures":[{"id":330,"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":331,"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":300,"name":"setMaxSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1306,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1306"}],"signatures":[{"id":301,"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":302,"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":589,"name":"PhysicalSize"},{"type":"reference","id":581,"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":297,"name":"setMinSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1264,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1264"}],"signatures":[{"id":298,"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":299,"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":589,"name":"PhysicalSize"},{"type":"reference","id":581,"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":303,"name":"setPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1348,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1348"}],"signatures":[{"id":304,"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":305,"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":608,"name":"PhysicalPosition"},{"type":"reference","id":600,"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":260,"name":"setResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":853,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L853"}],"signatures":[{"id":261,"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":262,"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":285,"name":"setShadow","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1144,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1144"}],"signatures":[{"id":286,"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":287,"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":294,"name":"setSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1226,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1226"}],"signatures":[{"id":295,"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":296,"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":589,"name":"PhysicalSize"},{"type":"reference","id":581,"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":314,"name":"setSkipTaskbar","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1484"}],"signatures":[{"id":315,"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":316,"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":263,"name":"setTitle","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":880,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L880"}],"signatures":[{"id":264,"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":265,"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":276,"name":"show","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1031,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1031"}],"signatures":[{"id":277,"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":332,"name":"startDragging","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1676,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1676"}],"signatures":[{"id":333,"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":253,"name":"theme","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":752,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L752"}],"signatures":[{"id":254,"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":628,"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":251,"name":"title","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":722,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L722"}],"signatures":[{"id":252,"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":270,"name":"toggleMaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":956,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L956"}],"signatures":[{"id":271,"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":268,"name":"unmaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":931,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L931"}],"signatures":[{"id":269,"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":274,"name":"unminimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1006,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L1006"}],"signatures":[{"id":275,"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":222,"name":"getByLabel","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"window.ts","line":2063,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2063"}],"signatures":[{"id":223,"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":224,"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":221,"name":"WebviewWindow"}]}}]}],"groups":[{"title":"Constructors","children":[225]},{"title":"Properties","children":[361,362]},{"title":"Methods","children":[255,280,373,278,231,235,245,239,243,241,247,249,363,266,272,340,355,346,352,337,334,349,358,368,233,237,257,229,288,291,317,323,326,320,282,309,306,311,329,300,297,303,260,285,294,314,263,276,332,253,251,270,268,274,222]}],"sources":[{"fileName":"window.ts","line":2011,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2011"}],"extendedTypes":[{"type":"reference","name":"WindowManager"}]},{"id":630,"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":631,"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/86488a6ad/tooling/api/src/window.ts#L81"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}},{"id":633,"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/86488a6ad/tooling/api/src/window.ts#L85"}],"type":{"type":"reference","id":608,"name":"PhysicalPosition"}},{"id":634,"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/86488a6ad/tooling/api/src/window.ts#L87"}],"type":{"type":"intrinsic","name":"number"}},{"id":632,"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/86488a6ad/tooling/api/src/window.ts#L83"}],"type":{"type":"reference","id":589,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[631,633,634,632]}],"sources":[{"fileName":"window.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L79"}]},{"id":635,"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":636,"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/86488a6ad/tooling/api/src/window.ts#L97"}],"type":{"type":"intrinsic","name":"number"}},{"id":637,"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/86488a6ad/tooling/api/src/window.ts#L99"}],"type":{"type":"reference","id":589,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[636,637]}],"sources":[{"fileName":"window.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L95"}]},{"id":647,"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":674,"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":2187,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2187"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":666,"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":2145,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2145"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":649,"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":2107,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2107"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":667,"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":2147,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2147"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":665,"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":2143,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2143"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":670,"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":2169,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2169"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":661,"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":2131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2131"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":660,"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":2129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2129"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":653,"name":"height","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial height."}]},"sources":[{"fileName":"window.ts","line":2115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2115"}],"type":{"type":"intrinsic","name":"number"}},{"id":673,"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":2183,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2183"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":657,"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":2123,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2123"}],"type":{"type":"intrinsic","name":"number"}},{"id":656,"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":2121,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2121"}],"type":{"type":"intrinsic","name":"number"}},{"id":663,"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":2139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2139"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":655,"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":2119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2119"}],"type":{"type":"intrinsic","name":"number"}},{"id":654,"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":2117,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2117"}],"type":{"type":"intrinsic","name":"number"}},{"id":658,"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":2125,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2125"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":669,"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":2163,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2163"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":668,"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":2149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2149"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":675,"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":2194,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2194"}],"type":{"type":"intrinsic","name":"string"}},{"id":671,"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":2175,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2175"}],"type":{"type":"reference","id":628,"name":"Theme"}},{"id":659,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Window title."}]},"sources":[{"fileName":"window.ts","line":2127,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2127"}],"type":{"type":"intrinsic","name":"string"}},{"id":672,"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":2179,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2179"}],"type":{"type":"reference","id":629,"name":"TitleBarStyle"}},{"id":662,"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":2137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2137"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":648,"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":2105,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2105"}],"type":{"type":"intrinsic","name":"string"}},{"id":676,"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":2198,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2198"}],"type":{"type":"intrinsic","name":"string"}},{"id":664,"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":2141,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2141"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":652,"name":"width","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial width."}]},"sources":[{"fileName":"window.ts","line":2113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2113"}],"type":{"type":"intrinsic","name":"number"}},{"id":650,"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":2109,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2109"}],"type":{"type":"intrinsic","name":"number"}},{"id":651,"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":2111,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2111"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[674,666,649,667,665,670,661,660,653,673,657,656,663,655,654,658,669,668,675,671,659,672,662,648,676,664,652,650,651]}],"sources":[{"fileName":"window.ts","line":2097,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2097"}]},{"id":219,"name":"CursorIcon","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":235,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/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":638,"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/86488a6ad/tooling/api/src/window.ts#L103"}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":639,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":641,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":21,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L104"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":640,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L104"}],"type":{"type":"literal","value":"hover"}}],"groups":[{"title":"Properties","children":[641,640]}],"sources":[{"fileName":"window.ts","line":104,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L104"}]}},{"type":"reflection","declaration":{"id":642,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":644,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L105"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":643,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L105"}],"type":{"type":"literal","value":"drop"}}],"groups":[{"title":"Properties","children":[644,643]}],"sources":[{"fileName":"window.ts","line":105,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L105"}]}},{"type":"reflection","declaration":{"id":645,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":646,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":106,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L106"}],"type":{"type":"literal","value":"cancel"}}],"groups":[{"title":"Properties","children":[646]}],"sources":[{"fileName":"window.ts","line":106,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L106"}]}}]}},{"id":628,"name":"Theme","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L71"}],"type":{"type":"union","types":[{"type":"literal","value":"light"},{"type":"literal","value":"dark"}]}},{"id":629,"name":"TitleBarStyle","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":72,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L72"}],"type":{"type":"union","types":[{"type":"literal","value":"visible"},{"type":"literal","value":"transparent"},{"type":"literal","value":"overlay"}]}},{"id":580,"name":"appWindow","kind":32,"kindString":"Variable","flags":{},"comment":{"summary":[{"kind":"text","text":"The WebviewWindow for the current window."}]},"sources":[{"fileName":"window.ts","line":2073,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2073"}],"type":{"type":"reference","id":221,"name":"WebviewWindow"}},{"id":626,"name":"availableMonitors","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2272,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2272"}],"signatures":[{"id":627,"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":630,"name":"Monitor"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":622,"name":"currentMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2223,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2223"}],"signatures":[{"id":623,"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":630,"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":578,"name":"getAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":293,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L293"}],"signatures":[{"id":579,"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":221,"name":"WebviewWindow"}}}]},{"id":576,"name":"getCurrent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":281,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L281"}],"signatures":[{"id":577,"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":221,"name":"WebviewWindow"}}]},{"id":624,"name":"primaryMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2248,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L2248"}],"signatures":[{"id":625,"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":630,"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":[619]},{"title":"Classes","children":[564,600,581,608,589,221]},{"title":"Interfaces","children":[630,635,647]},{"title":"Type Aliases","children":[219,638,628,629]},{"title":"Variables","children":[580]},{"title":"Functions","children":[626,622,578,576,624]}],"sources":[{"fileName":"window.ts","line":66,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/86488a6ad/tooling/api/src/window.ts#L66"}]}],"groups":[{"title":"Modules","children":[1,12,47,61,76,172,178,196,218]}]} \ No newline at end of file diff --git a/tooling/api/src/index.ts b/tooling/api/src/index.ts index 63c21b2b73c..f257c213cdc 100644 --- a/tooling/api/src/index.ts +++ b/tooling/api/src/index.ts @@ -17,7 +17,6 @@ import * as app from './app' import * as event from './event' import * as path from './path' import * as process from './process' -import * as shell from './shell' import * as tauri from './tauri' import * as updater from './updater' import * as window from './window' @@ -26,4 +25,4 @@ import * as os from './os' /** @ignore */ const invoke = tauri.invoke -export { invoke, app, event, path, process, shell, tauri, updater, window, os } +export { invoke, app, event, path, process, tauri, updater, window, os } diff --git a/tooling/api/src/shell.ts b/tooling/api/src/shell.ts deleted file mode 100644 index ac1bba0d41e..00000000000 --- a/tooling/api/src/shell.ts +++ /dev/null @@ -1,675 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -/** - * Access the system shell. - * Allows you to spawn child processes and manage files and URLs using their default application. - * - * This package is also accessible with `window.__TAURI__.shell` when [`build.withGlobalTauri`](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in `tauri.conf.json` is set to `true`. - * - * The APIs must be added to [`tauri.allowlist.shell`](https://tauri.app/v1/api/config/#allowlistconfig.shell) in `tauri.conf.json`: - * ```json - * { - * "tauri": { - * "allowlist": { - * "shell": { - * "all": true, // enable all shell APIs - * "execute": true, // enable process spawn APIs - * "sidecar": true, // enable spawning sidecars - * "open": true // enable opening files/URLs using the default program - * } - * } - * } - * } - * ``` - * It is recommended to allowlist only the APIs you use for optimal bundle size and security. - * - * ## Security - * - * This API has a scope configuration that forces you to restrict the programs and arguments that can be used. - * - * ### Restricting access to the {@link open | `open`} API - * - * On the allowlist, `open: true` means that the {@link open} API can be used with any URL, - * as the argument is validated with the `^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+` regex. - * You can change that regex by changing the boolean value to a string, e.g. `open: ^https://github.com/`. - * - * ### Restricting access to the {@link Command | `Command`} APIs - * - * The `shell` allowlist object has a `scope` field that defines an array of CLIs that can be used. - * Each CLI is a configuration object `{ name: string, cmd: string, sidecar?: bool, args?: boolean | Arg[] }`. - * - * - `name`: the unique identifier of the command, passed to the {@link Command.create | Command.create function}. - * If it's a sidecar, this must be the value defined on `tauri.conf.json > tauri > bundle > externalBin`. - * - `cmd`: the program that is executed on this configuration. If it's a sidecar, this value is ignored. - * - `sidecar`: whether the object configures a sidecar or a system program. - * - `args`: the arguments that can be passed to the program. By default no arguments are allowed. - * - `true` means that any argument list is allowed. - * - `false` means that no arguments are allowed. - * - otherwise an array can be configured. Each item is either a string representing the fixed argument value - * or a `{ validator: string }` that defines a regex validating the argument value. - * - * #### Example scope configuration - * - * CLI: `git commit -m "the commit message"` - * - * Configuration: - * ```json - * { - * "scope": [ - * { - * "name": "run-git-commit", - * "cmd": "git", - * "args": ["commit", "-m", { "validator": "\\S+" }] - * } - * ] - * } - * ``` - * Usage: - * ```typescript - * import { Command } from '@tauri-apps/api/shell' - * Command.create('run-git-commit', ['commit', '-m', 'the commit message']) - * ``` - * - * Trying to execute any API with a program not configured on the scope results in a promise rejection due to denied access. - * - * @module - */ - -import { invokeTauriCommand } from './helpers/tauri' -import { transformCallback } from './tauri' - -/** - * @since 1.0.0 - */ -interface SpawnOptions { - /** Current working directory. */ - cwd?: string - /** Environment variables. set to `null` to clear the process env. */ - env?: Record - /** - * Character encoding for stdout/stderr - * - * @since 1.1.0 - * */ - encoding?: string -} - -/** @ignore */ -interface InternalSpawnOptions extends SpawnOptions { - sidecar?: boolean -} - -/** - * @since 1.0.0 - */ -interface ChildProcess { - /** Exit code of the process. `null` if the process was terminated by a signal on Unix. */ - code: number | null - /** If the process was terminated by a signal, represents that signal. */ - signal: number | null - /** The data that the process wrote to `stdout`. */ - stdout: O - /** The data that the process wrote to `stderr`. */ - stderr: O -} - -/** - * Spawns a process. - * - * @ignore - * @param program The name of the scoped command. - * @param onEvent Event handler. - * @param args Program arguments. - * @param options Configuration for the process spawn. - * @returns A promise resolving to the process id. - */ -async function execute( - onEvent: (event: CommandEvent) => void, - program: string, - args: string | string[] = [], - options?: InternalSpawnOptions -): Promise { - if (typeof args === 'object') { - Object.freeze(args) - } - - return invokeTauriCommand({ - __tauriModule: 'Shell', - message: { - cmd: 'execute', - program, - args, - options, - onEventFn: transformCallback(onEvent) - } - }) -} - -/** - * @since 1.0.0 - */ -class EventEmitter> { - /** @ignore */ - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - private eventListeners: Record void>> = - Object.create(null) - - /** - * Alias for `emitter.on(eventName, listener)`. - * - * @since 1.1.0 - */ - addListener( - eventName: N, - listener: (arg: E[typeof eventName]) => void - ): this { - return this.on(eventName, listener) - } - - /** - * Alias for `emitter.off(eventName, listener)`. - * - * @since 1.1.0 - */ - removeListener( - eventName: N, - listener: (arg: E[typeof eventName]) => void - ): this { - return this.off(eventName, listener) - } - - /** - * Adds the `listener` function to the end of the listeners array for the - * event named `eventName`. No checks are made to see if the `listener` has - * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple - * times. - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * @since 1.0.0 - */ - on( - eventName: N, - listener: (arg: E[typeof eventName]) => void - ): this { - if (eventName in this.eventListeners) { - // eslint-disable-next-line security/detect-object-injection - this.eventListeners[eventName].push(listener) - } else { - // eslint-disable-next-line security/detect-object-injection - this.eventListeners[eventName] = [listener] - } - return this - } - - /** - * Adds a **one-time**`listener` function for the event named `eventName`. The - * next time `eventName` is triggered, this listener is removed and then invoked. - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * @since 1.1.0 - */ - once( - eventName: N, - listener: (arg: E[typeof eventName]) => void - ): this { - const wrapper = (arg: E[typeof eventName]): void => { - this.removeListener(eventName, wrapper) - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - listener(arg) - } - return this.addListener(eventName, wrapper) - } - - /** - * Removes the all specified listener from the listener array for the event eventName - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * @since 1.1.0 - */ - off( - eventName: N, - listener: (arg: E[typeof eventName]) => void - ): this { - if (eventName in this.eventListeners) { - // eslint-disable-next-line security/detect-object-injection - this.eventListeners[eventName] = this.eventListeners[eventName].filter( - (l) => l !== listener - ) - } - return this - } - - /** - * Removes all listeners, or those of the specified eventName. - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * @since 1.1.0 - */ - removeAllListeners(event?: N): this { - if (event) { - // eslint-disable-next-line @typescript-eslint/no-dynamic-delete,security/detect-object-injection - delete this.eventListeners[event] - } else { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment - this.eventListeners = Object.create(null) - } - return this - } - - /** - * @ignore - * Synchronously calls each of the listeners registered for the event named`eventName`, in the order they were registered, passing the supplied arguments - * to each. - * - * @returns `true` if the event had listeners, `false` otherwise. - */ - emit(eventName: N, arg: E[typeof eventName]): boolean { - if (eventName in this.eventListeners) { - // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,security/detect-object-injection - const listeners = this.eventListeners[eventName] - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - for (const listener of listeners) listener(arg) - return true - } - return false - } - - /** - * Returns the number of listeners listening to the event named `eventName`. - * - * @since 1.1.0 - */ - listenerCount(eventName: N): number { - if (eventName in this.eventListeners) - // eslint-disable-next-line security/detect-object-injection - return this.eventListeners[eventName].length - return 0 - } - - /** - * Adds the `listener` function to the _beginning_ of the listeners array for the - * event named `eventName`. No checks are made to see if the `listener` has - * already been added. Multiple calls passing the same combination of `eventName`and `listener` will result in the `listener` being added, and called, multiple - * times. - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * @since 1.1.0 - */ - prependListener( - eventName: N, - listener: (arg: E[typeof eventName]) => void - ): this { - if (eventName in this.eventListeners) { - // eslint-disable-next-line security/detect-object-injection - this.eventListeners[eventName].unshift(listener) - } else { - // eslint-disable-next-line security/detect-object-injection - this.eventListeners[eventName] = [listener] - } - return this - } - - /** - * Adds a **one-time**`listener` function for the event named `eventName` to the_beginning_ of the listeners array. The next time `eventName` is triggered, this - * listener is removed, and then invoked. - * - * Returns a reference to the `EventEmitter`, so that calls can be chained. - * - * @since 1.1.0 - */ - prependOnceListener( - eventName: N, - listener: (arg: E[typeof eventName]) => void - ): this { - const wrapper = (arg: any): void => { - this.removeListener(eventName, wrapper) - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - listener(arg) - } - return this.prependListener(eventName, wrapper) - } -} - -/** - * @since 1.1.0 - */ -class Child { - /** The child process `pid`. */ - pid: number - - constructor(pid: number) { - this.pid = pid - } - - /** - * Writes `data` to the `stdin`. - * - * @param data The message to write, either a string or a byte array. - * @example - * ```typescript - * import { Command } from '@tauri-apps/api/shell'; - * const command = Command.create('node'); - * const child = await command.spawn(); - * await child.write('message'); - * await child.write([0, 1, 2, 3, 4, 5]); - * ``` - * - * @returns A promise indicating the success or failure of the operation. - */ - async write(data: IOPayload): Promise { - return invokeTauriCommand({ - __tauriModule: 'Shell', - message: { - cmd: 'stdinWrite', - pid: this.pid, - // correctly serialize Uint8Arrays - buffer: typeof data === 'string' ? data : Array.from(data) - } - }) - } - - /** - * Kills the child process. - * - * @returns A promise indicating the success or failure of the operation. - */ - async kill(): Promise { - return invokeTauriCommand({ - __tauriModule: 'Shell', - message: { - cmd: 'killChild', - pid: this.pid - } - }) - } -} - -interface CommandEvents { - close: TerminatedPayload - error: string -} - -interface OutputEvents { - data: O -} - -/** - * The entry point for spawning child processes. - * It emits the `close` and `error` events. - * @example - * ```typescript - * import { Command } from '@tauri-apps/api/shell'; - * const command = Command.create('node'); - * command.on('close', data => { - * console.log(`command finished with code ${data.code} and signal ${data.signal}`) - * }); - * command.on('error', error => console.error(`command error: "${error}"`)); - * command.stdout.on('data', line => console.log(`command stdout: "${line}"`)); - * command.stderr.on('data', line => console.log(`command stderr: "${line}"`)); - * - * const child = await command.spawn(); - * console.log('pid:', child.pid); - * ``` - * - * @since 1.1.0 - * - */ -class Command extends EventEmitter { - /** @ignore Program to execute. */ - private readonly program: string - /** @ignore Program arguments */ - private readonly args: string[] - /** @ignore Spawn options. */ - private readonly options: InternalSpawnOptions - /** Event emitter for the `stdout`. Emits the `data` event. */ - readonly stdout = new EventEmitter>() - /** Event emitter for the `stderr`. Emits the `data` event. */ - readonly stderr = new EventEmitter>() - - /** - * @ignore - * Creates a new `Command` instance. - * - * @param program The program name to execute. - * It must be configured on `tauri.conf.json > tauri > allowlist > shell > scope`. - * @param args Program arguments. - * @param options Spawn options. - */ - private constructor( - program: string, - args: string | string[] = [], - options?: SpawnOptions - ) { - super() - this.program = program - this.args = typeof args === 'string' ? [args] : args - this.options = options ?? {} - } - - static create(program: string, args?: string | string[]): Command - static create( - program: string, - args?: string | string[], - options?: SpawnOptions & { encoding: 'raw' } - ): Command - static create( - program: string, - args?: string | string[], - options?: SpawnOptions - ): Command - - /** - * Creates a command to execute the given program. - * @example - * ```typescript - * import { Command } from '@tauri-apps/api/shell'; - * const command = Command.create('my-app', ['run', 'tauri']); - * const output = await command.execute(); - * ``` - * - * @param program The program to execute. - * It must be configured on `tauri.conf.json > tauri > allowlist > shell > scope`. - */ - static create( - program: string, - args: string | string[] = [], - options?: SpawnOptions - ): Command { - return new Command(program, args, options) - } - - static sidecar(program: string, args?: string | string[]): Command - static sidecar( - program: string, - args?: string | string[], - options?: SpawnOptions & { encoding: 'raw' } - ): Command - static sidecar( - program: string, - args?: string | string[], - options?: SpawnOptions - ): Command - - /** - * Creates a command to execute the given sidecar program. - * @example - * ```typescript - * import { Command } from '@tauri-apps/api/shell'; - * const command = Command.sidecar('my-sidecar'); - * const output = await command.execute(); - * ``` - * - * @param program The program to execute. - * It must be configured on `tauri.conf.json > tauri > allowlist > shell > scope`. - */ - static sidecar( - program: string, - args: string | string[] = [], - options?: SpawnOptions - ): Command { - const instance = new Command(program, args, options) - instance.options.sidecar = true - return instance - } - - /** - * Executes the command as a child process, returning a handle to it. - * - * @returns A promise resolving to the child process handle. - */ - async spawn(): Promise { - return execute( - (event) => { - switch (event.event) { - case 'Error': - this.emit('error', event.payload) - break - case 'Terminated': - this.emit('close', event.payload) - break - case 'Stdout': - this.stdout.emit('data', event.payload) - break - case 'Stderr': - this.stderr.emit('data', event.payload) - break - } - }, - this.program, - this.args, - this.options - ).then((pid) => new Child(pid)) - } - - /** - * Executes the command as a child process, waiting for it to finish and collecting all of its output. - * @example - * ```typescript - * import { Command } from '@tauri-apps/api/shell'; - * const output = await Command.create('echo', 'message').execute(); - * assert(output.code === 0); - * assert(output.signal === null); - * assert(output.stdout === 'message'); - * assert(output.stderr === ''); - * ``` - * - * @returns A promise resolving to the child process output. - */ - async execute(): Promise> { - return new Promise((resolve, reject) => { - this.on('error', reject) - - const stdout: O[] = [] - const stderr: O[] = [] - this.stdout.on('data', (line: O) => { - stdout.push(line) - }) - this.stderr.on('data', (line: O) => { - stderr.push(line) - }) - - this.on('close', (payload: TerminatedPayload) => { - resolve({ - code: payload.code, - signal: payload.signal, - stdout: this.collectOutput(stdout) as O, - stderr: this.collectOutput(stderr) as O - }) - }) - - this.spawn().catch(reject) - }) - } - - /** @ignore */ - private collectOutput(events: O[]): string | Uint8Array { - if (this.options.encoding === 'raw') { - return events.reduce((p, c) => { - return new Uint8Array([...p, ...(c as Uint8Array), 10]) - }, new Uint8Array()) - } else { - return events.join('\n') - } - } -} - -/** - * Describes the event message received from the command. - */ -interface Event { - event: T - payload: V -} - -/** - * Payload for the `Terminated` command event. - */ -interface TerminatedPayload { - /** Exit code of the process. `null` if the process was terminated by a signal on Unix. */ - code: number | null - /** If the process was terminated by a signal, represents that signal. */ - signal: number | null -} - -/** Event payload type */ -type IOPayload = string | Uint8Array - -/** Events emitted by the child process. */ -type CommandEvent = - | Event<'Stdout', O> - | Event<'Stderr', O> - | Event<'Terminated', TerminatedPayload> - | Event<'Error', string> - -/** - * Opens a path or URL with the system's default app, - * or the one specified with `openWith`. - * - * The `openWith` value must be one of `firefox`, `google chrome`, `chromium` `safari`, - * `open`, `start`, `xdg-open`, `gio`, `gnome-open`, `kde-open` or `wslview`. - * - * @example - * ```typescript - * import { open } from '@tauri-apps/api/shell'; - * // opens the given URL on the default browser: - * await open('https://github.com/tauri-apps/tauri'); - * // opens the given URL using `firefox`: - * await open('https://github.com/tauri-apps/tauri', 'firefox'); - * // opens a file using the default program: - * await open('/path/to/file'); - * ``` - * - * @param path The path or URL to open. - * This value is matched against the string regex defined on `tauri.conf.json > tauri > allowlist > shell > open`, - * which defaults to `^((mailto:\w+)|(tel:\w+)|(https?://\w+)).+`. - * @param openWith The app to open the file or URL with. - * Defaults to the system default application for the specified path type. - * - * @since 1.0.0 - */ -async function open(path: string, openWith?: string): Promise { - return invokeTauriCommand({ - __tauriModule: 'Shell', - message: { - cmd: 'open', - path, - with: openWith - } - }) -} - -export { Command, Child, EventEmitter, open } -export type { - IOPayload, - CommandEvents, - TerminatedPayload, - OutputEvents, - ChildProcess, - SpawnOptions -}