From 2d5378bfc1ba817ee2f331b41738a90e5997e5e8 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Tue, 18 Apr 2023 18:18:22 -0700 Subject: [PATCH] refactor(core): move dialog API to its own plugin (#6717) --- .changes/bundler-remove-dialog-option.md | 5 + .changes/move-dialog-plugin.md | 6 + .changes/remove-updater-dialog.md | 6 + core/config-schema/schema.json | 7 - core/tauri-utils/src/config.rs | 19 +- core/tauri/Cargo.toml | 12 +- core/tauri/scripts/bundle.global.js | 10 +- core/tauri/src/api/dialog.rs | 733 --------------------- core/tauri/src/api/mod.rs | 3 - core/tauri/src/app.rs | 53 +- core/tauri/src/endpoints.rs | 11 - core/tauri/src/endpoints/dialog.rs | 354 ---------- core/tauri/src/updater/mod.rs | 93 --- core/tests/app-updater/tauri.conf.json | 7 +- examples/api/dist/assets/index.css | 2 +- examples/api/dist/assets/index.js | 82 +-- examples/api/src-tauri/Cargo.lock | 24 - examples/api/src-tauri/src/tray.rs | 20 - examples/api/src-tauri/tauri.conf.json | 44 +- examples/api/src/App.svelte | 39 -- examples/api/src/views/Dialog.svelte | 87 --- examples/updater/src-tauri/tauri.conf.json | 1 - tooling/api/docs/js-api.json | 2 +- tooling/api/src/dialog.ts | 321 --------- tooling/api/src/index.ts | 2 - tooling/bundler/src/bundle/settings.rs | 2 - tooling/cli/schema.json | 7 - tooling/cli/src/interface/rust.rs | 3 - 28 files changed, 117 insertions(+), 1838 deletions(-) create mode 100644 .changes/bundler-remove-dialog-option.md create mode 100644 .changes/move-dialog-plugin.md create mode 100644 .changes/remove-updater-dialog.md delete mode 100644 core/tauri/src/api/dialog.rs delete mode 100644 core/tauri/src/endpoints/dialog.rs delete mode 100644 examples/api/src/views/Dialog.svelte delete mode 100644 tooling/api/src/dialog.ts diff --git a/.changes/bundler-remove-dialog-option.md b/.changes/bundler-remove-dialog-option.md new file mode 100644 index 00000000000..054f4433253 --- /dev/null +++ b/.changes/bundler-remove-dialog-option.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": patch +--- + +Removed the `UpdaterSettings::dialog` field. diff --git a/.changes/move-dialog-plugin.md b/.changes/move-dialog-plugin.md new file mode 100644 index 00000000000..e15185c3af6 --- /dev/null +++ b/.changes/move-dialog-plugin.md @@ -0,0 +1,6 @@ +--- +"tauri": patch +"api": patch +--- + +Moved the dialog APIs to its own plugin in the plugins-workspace repository. diff --git a/.changes/remove-updater-dialog.md b/.changes/remove-updater-dialog.md new file mode 100644 index 00000000000..00d2767a4cb --- /dev/null +++ b/.changes/remove-updater-dialog.md @@ -0,0 +1,6 @@ +--- +"tauri": patch +"tauri-utils": patch +--- + +Remove the updater's dialog option. diff --git a/core/config-schema/schema.json b/core/config-schema/schema.json index 904148a0b35..7e741e67358 100644 --- a/core/config-schema/schema.json +++ b/core/config-schema/schema.json @@ -172,7 +172,6 @@ }, "updater": { "active": false, - "dialog": true, "pubkey": "", "windows": { "installMode": "passive", @@ -426,7 +425,6 @@ "description": "The updater configuration.", "default": { "active": false, - "dialog": true, "pubkey": "", "windows": { "installMode": "passive", @@ -2476,11 +2474,6 @@ "default": false, "type": "boolean" }, - "dialog": { - "description": "Display built-in dialog or use event system if disabled.", - "default": true, - "type": "boolean" - }, "endpoints": { "description": "The updater endpoints. TLS is enforced on production.\n\nThe updater URL can contain the following variables: - {{current_version}}: The version of the app that is requesting the update - {{target}}: The operating system name (one of `linux`, `windows` or `darwin`). - {{arch}}: The architecture of the machine (one of `x86_64`, `i686`, `aarch64` or `armv7`).\n\n# Examples - \"https://my.cdn.com/latest.json\": a raw JSON endpoint that returns the latest version and download links for each platform. - \"https://updates.app.dev/{{target}}?version={{current_version}}&arch={{arch}}\": a dedicated API with positional and query string arguments.", "type": [ diff --git a/core/tauri-utils/src/config.rs b/core/tauri-utils/src/config.rs index 3579d14deb4..9f4789f8495 100644 --- a/core/tauri-utils/src/config.rs +++ b/core/tauri-utils/src/config.rs @@ -2335,9 +2335,6 @@ pub struct UpdaterConfig { /// Whether the updater is active or not. #[serde(default)] pub active: bool, - /// Display built-in dialog or use event system if disabled. - #[serde(default = "default_true")] - pub dialog: bool, /// The updater endpoints. TLS is enforced on production. /// /// The updater URL can contain the following variables: @@ -2367,8 +2364,6 @@ impl<'de> Deserialize<'de> for UpdaterConfig { struct InnerUpdaterConfig { #[serde(default)] active: bool, - #[serde(default = "default_true")] - dialog: bool, endpoints: Option>, pubkey: Option, #[serde(default)] @@ -2385,7 +2380,6 @@ impl<'de> Deserialize<'de> for UpdaterConfig { Ok(UpdaterConfig { active: config.active, - dialog: config.dialog, endpoints: config.endpoints, pubkey: config.pubkey.unwrap_or_default(), windows: config.windows, @@ -2397,7 +2391,6 @@ impl Default for UpdaterConfig { fn default() -> Self { Self { active: false, - dialog: default_true(), endpoints: None, pubkey: "".into(), windows: Default::default(), @@ -3246,7 +3239,6 @@ mod build { impl ToTokens for UpdaterConfig { fn to_tokens(&self, tokens: &mut TokenStream) { let active = self.active; - let dialog = self.dialog; let pubkey = str_lit(&self.pubkey); let endpoints = opt_lit( self @@ -3262,15 +3254,7 @@ mod build { ); let windows = &self.windows; - literal_struct!( - tokens, - UpdaterConfig, - active, - dialog, - pubkey, - endpoints, - windows - ); + literal_struct!(tokens, UpdaterConfig, active, pubkey, endpoints, windows); } } @@ -3596,7 +3580,6 @@ mod test { }, updater: UpdaterConfig { active: false, - dialog: true, pubkey: "".into(), endpoints: None, windows: Default::default(), diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index f8371d1f4cf..5a997857dcc 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -82,7 +82,6 @@ ico = { version = "0.2.0", optional = true } encoding_rs = "0.8.31" [target."cfg(any(target_os = \"macos\", windows, target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] -rfd = { version = "0.11", optional = true, features = [ "gtk3", "common-controls-v6" ] } notify-rust = { version = "4.5", optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] @@ -157,7 +156,6 @@ native-tls = [ "reqwest/native-tls" ] native-tls-vendored = [ "reqwest/native-tls-vendored" ] rustls-tls = [ "reqwest/rustls-tls" ] process-command-api = [ "shared_child", "os_pipe" ] -dialog = [ "rfd" ] notification = [ "notify-rust" ] system-tray = [ "tauri-runtime/system-tray", "tauri-runtime-wry/system-tray" ] devtools = [ "tauri-runtime/devtools", "tauri-runtime-wry/devtools" ] @@ -187,11 +185,11 @@ clipboard-all = [ "clipboard-write-text", "clipboard-read-text" ] clipboard-read-text = [ ] clipboard-write-text = [ ] dialog-all = [ "dialog-open", "dialog-save", "dialog-message", "dialog-ask" ] -dialog-ask = [ "dialog" ] -dialog-confirm = [ "dialog" ] -dialog-message = [ "dialog" ] -dialog-open = [ "dialog" ] -dialog-save = [ "dialog" ] +dialog-ask = [ ] +dialog-confirm = [ ] +dialog-message = [ ] +dialog-open = [ ] +dialog-save = [ ] fs-all = [ "fs-copy-file", "fs-create-dir", diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 57a8308e99a..0c873768950 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,7 +1,7 @@ -"use strict";var __TAURI_IIFE__=(()=>{var L=Object.defineProperty;var se=Object.getOwnPropertyDescriptor;var ae=Object.getOwnPropertyNames;var oe=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var t in e)L(n,t,{get:e[t],enumerable:!0})},le=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of ae(e))!oe.call(n,s)&&s!==t&&L(n,s,{get:()=>e[s],enumerable:!(r=se(e,s))||r.enumerable});return n};var ue=n=>le(L({},"__esModule",{value:!0}),n);var vt={};c(vt,{app:()=>k,dialog:()=>N,event:()=>F,http:()=>H,invoke:()=>wt,notification:()=>V,os:()=>Z,path:()=>q,process:()=>j,shell:()=>G,tauri:()=>R,updater:()=>J,window:()=>Y});var k={};c(k,{getName:()=>pe,getTauriVersion:()=>ge,getVersion:()=>me,hide:()=>he,show:()=>ye});var R={};c(R,{convertFileSrc:()=>ce,invoke:()=>l,transformCallback:()=>g});function de(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function g(n,e=!1){let t=de(),r=`_${t}`;return Object.defineProperty(window,r,{value:s=>(e&&Reflect.deleteProperty(window,r),n?.(s)),writable:!1,configurable:!0}),t}async function l(n,e={}){return new Promise((t,r)=>{let s=g(u=>{t(u),Reflect.deleteProperty(window,`_${a}`)},!0),a=g(u=>{r(u),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:n,callback:s,error:a,...e})})}function ce(n,e="asset"){let t=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${t}`:`${e}://localhost/${t}`}async function i(n){return l("tauri",n)}async function me(){return i({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function pe(){return i({__tauriModule:"App",message:{cmd:"getAppName"}})}async function ge(){return i({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function ye(){return i({__tauriModule:"App",message:{cmd:"show"}})}async function he(){return i({__tauriModule:"App",message:{cmd:"hide"}})}var N={};c(N,{ask:()=>_e,confirm:()=>we,message:()=>Pe,open:()=>fe,save:()=>be});async function fe(n={}){return typeof n=="object"&&Object.freeze(n),i({__tauriModule:"Dialog",message:{cmd:"openDialog",options:n}})}async function be(n={}){return typeof n=="object"&&Object.freeze(n),i({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:n}})}async function Pe(n,e){let t=typeof e=="string"?{title:e}:e;return i({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:n.toString(),title:t?.title?.toString(),type:t?.type,buttonLabel:t?.okLabel?.toString()}})}async function _e(n,e){let t=typeof e=="string"?{title:e}:e;return i({__tauriModule:"Dialog",message:{cmd:"askDialog",message:n.toString(),title:t?.title?.toString(),type:t?.type,buttonLabels:[t?.okLabel?.toString()??"Yes",t?.cancelLabel?.toString()??"No"]}})}async function we(n,e){let t=typeof e=="string"?{title:e}:e;return i({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:n.toString(),title:t?.title?.toString(),type:t?.type,buttonLabels:[t?.okLabel?.toString()??"Ok",t?.cancelLabel?.toString()??"Cancel"]}})}var F={};c(F,{TauriEvent:()=>O,emit:()=>T,listen:()=>U,once:()=>I});async function X(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 P(n,e,t){return i({__tauriModule:"Event",message:{cmd:"listen",event:n,windowLabel:e,handler:g(t)}}).then(r=>async()=>X(n,r))}async function v(n,e,t){return P(n,e,r=>{t(r),X(n,r.id).catch(()=>{})})}var O=(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))(O||{});async function U(n,e){return P(n,null,e)}async function I(n,e){return v(n,null,e)}async function T(n,e){return w(n,void 0,e)}var H={};c(H,{Body:()=>p,Client:()=>D,Response:()=>E,ResponseType:()=>B,fetch:()=>Oe,getClient:()=>ee});var B=(r=>(r[r.JSON=1]="JSON",r[r.Text=2]="Text",r[r.Binary=3]="Binary",r))(B||{}),p=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},r=(s,a)=>{if(a!==null){let u;typeof a=="string"?u=a:a instanceof Uint8Array||Array.isArray(a)?u=Array.from(a):a instanceof File?u={file:a.name,mime:a.type,fileName:a.name}:typeof a.file=="string"?u={file:a.file,mime:a.mime,fileName:a.fileName}:u={file:Array.from(a.file),mime:a.mime,fileName:a.fileName},t[String(s)]=u}};if(e instanceof FormData)for(let[s,a]of e)r(s,a);else for(let[s,a]of Object.entries(e))r(s,a);return new p("Form",t)}static json(e){return new p("Json",e)}static text(e){return new p("Text",e)}static bytes(e){return new p("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},E=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},D=class{constructor(e){this.id=e}async drop(){return i({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),i({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(r=>{let s=new E(r);if(t){try{s.data=JSON.parse(s.data)}catch(a){if(s.ok&&s.data==="")s.data={};else if(s.ok)throw Error(`Failed to parse response \`${s.data}\` as JSON: ${a}; - try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return s}return s})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,r){return this.request({method:"POST",url:e,body:t,...r})}async put(e,t,r){return this.request({method:"PUT",url:e,body:t,...r})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function ee(n){return i({__tauriModule:"Http",message:{cmd:"createClient",options:n}}).then(e=>new D(e))}var z=null;async function Oe(n,e){return z===null&&(z=await ee()),z.request({url:n,method:e?.method??"GET",...e})}var V={};c(V,{isPermissionGranted:()=>Te,requestPermission:()=>Ee,sendNotification:()=>De});async function Te(){return window.Notification.permission!=="default"?Promise.resolve(window.Notification.permission==="granted"):i({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}})}async function Ee(){return window.Notification.requestPermission()}function De(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}var q={};c(q,{BaseDirectory:()=>te,appCacheDir:()=>We,appConfigDir:()=>Ce,appDataDir:()=>Me,appLocalDataDir:()=>Ae,appLogDir:()=>Qe,audioDir:()=>Se,basename:()=>it,cacheDir:()=>xe,configDir:()=>Le,dataDir:()=>Re,delimiter:()=>Ze,desktopDir:()=>ke,dirname:()=>tt,documentDir:()=>Ne,downloadDir:()=>Ue,executableDir:()=>Ie,extname:()=>nt,fontDir:()=>Fe,homeDir:()=>ze,isAbsolute:()=>rt,join:()=>et,localDataDir:()=>He,normalize:()=>Be,pictureDir:()=>Ve,publicDir:()=>qe,resolve:()=>Xe,resolveResource:()=>Ge,resourceDir:()=>je,runtimeDir:()=>$e,sep:()=>Ye,templateDir:()=>Je,videoDir:()=>Ke});function _(){return navigator.appVersion.includes("Win")}var te=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(te||{});async function Ce(){return l("plugin:path|resolve_directory",{directory:13})}async function Me(){return l("plugin:path|resolve_directory",{directory:14})}async function Ae(){return l("plugin:path|resolve_directory",{directory:15})}async function We(){return l("plugin:path|resolve_directory",{directory:16})}async function Se(){return l("plugin:path|resolve_directory",{directory:1})}async function xe(){return l("plugin:path|resolve_directory",{directory:2})}async function Le(){return l("plugin:path|resolve_directory",{directory:3})}async function Re(){return l("plugin:path|resolve_directory",{directory:4})}async function ke(){return l("plugin:path|resolve_directory",{directory:18})}async function Ne(){return l("plugin:path|resolve_directory",{directory:6})}async function Ue(){return l("plugin:path|resolve_directory",{directory:7})}async function Ie(){return l("plugin:path|resolve_directory",{directory:19})}async function Fe(){return l("plugin:path|resolve_directory",{directory:20})}async function ze(){return l("plugin:path|resolve_directory",{directory:21})}async function He(){return l("plugin:path|resolve_directory",{directory:5})}async function Ve(){return l("plugin:path|resolve_directory",{directory:8})}async function qe(){return l("plugin:path|resolve_directory",{directory:9})}async function je(){return l("plugin:path|resolve_directory",{directory:11})}async function Ge(n){return l("plugin:path|resolve_directory",{directory:11,path:n})}async function $e(){return l("plugin:path|resolve_directory",{directory:22})}async function Je(){return l("plugin:path|resolve_directory",{directory:23})}async function Ke(){return l("plugin:path|resolve_directory",{directory:10})}async function Qe(){return l("plugin:path|resolve_directory",{directory:17})}var Ye=_()?"\\":"/",Ze=_()?";":":";async function Xe(...n){return l("plugin:path|resolve",{paths:n})}async function Be(n){return l("plugin:path|normalize",{path:n})}async function et(...n){return l("plugin:path|join",{paths:n})}async function tt(n){return l("plugin:path|dirname",{path:n})}async function nt(n){return l("plugin:path|extname",{path:n})}async function it(n,e){return l("plugin:path|basename",{path:n,ext:e})}async function rt(n){return l("plugin:path|isAbsolute",{path:n})}var j={};c(j,{exit:()=>st,relaunch:()=>at});async function st(n=0){return i({__tauriModule:"Process",message:{cmd:"exit",exitCode:n}})}async function at(){return i({__tauriModule:"Process",message:{cmd:"relaunch"}})}var G={};c(G,{Child:()=>C,Command:()=>h,EventEmitter:()=>y,open:()=>lt});async function ot(n,e,t=[],r){return typeof t=="object"&&Object.freeze(t),i({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:t,options:r,onEventFn:g(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)}},C=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}})}},h=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 h(t,r,s)}static sidecar(t,r=[],s){let a=new h(t,r,s);return a.options.sidecar=!0,a}async spawn(){return ot(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 C(t))}async execute(){return new Promise((t,r)=>{this.on("error",r);let s=[],a=[];this.stdout.on("data",u=>{s.push(u)}),this.stderr.on("data",u=>{a.push(u)}),this.on("close",u=>{t({code:u.code,signal:u.signal,stdout:this.collectOutput(s),stderr:this.collectOutput(a)})}),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 lt(n,e){return i({__tauriModule:"Shell",message:{cmd:"open",path:n,with:e}})}var J={};c(J,{checkUpdate:()=>dt,installUpdate:()=>ut,onUpdaterEvent:()=>$});async function $(n){return U("tauri://update-status",e=>{n(e?.payload)})}async function ut(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(a){if(a.error){e(),r(a.error);return}a.status==="DONE"&&(e(),t())}$(s).then(a=>{n=a}).catch(a=>{throw e(),a}),T("tauri://update-install").catch(a=>{throw e(),a})})}async function dt(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(u){e(),t({manifest:u,shouldUpdate:!0})}function a(u){if(u.error){e(),r(u.error);return}u.status==="UPTODATE"&&(e(),t({shouldUpdate:!1}))}I("tauri://update-available",u=>{s(u?.payload)}).catch(u=>{throw e(),u}),$(a).then(u=>{n=u}).catch(u=>{throw e(),u}),T("tauri://update").catch(u=>{throw e(),u})})}var Y={};c(Y,{CloseRequestedEvent:()=>x,LogicalPosition:()=>A,LogicalSize:()=>M,PhysicalPosition:()=>b,PhysicalSize:()=>f,UserAttentionType:()=>ie,WebviewWindow:()=>m,WebviewWindowHandle:()=>W,WindowManager:()=>S,appWindow:()=>K,availableMonitors:()=>gt,currentMonitor:()=>mt,getAll:()=>re,getCurrent:()=>ct,primaryMonitor:()=>pt});var M=class{constructor(e,t){this.type="Logical";this.width=e,this.height=t}},f=class{constructor(e,t){this.type="Physical";this.width=e,this.height=t}toLogical(e){return new M(this.width/e,this.height/e)}},A=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 A(this.x/e,this.y/e)}},ie=(t=>(t[t.Critical=1]="Critical",t[t.Informational=2]="Informational",t))(ie||{});function ct(){return new m(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function re(){return window.__TAURI_METADATA__.__windows.map(n=>new m(n.label,{skip:!0}))}var ne=["tauri://created","tauri://error"],W=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)}):P(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)}):v(e,this.label,t)}async emit(e,t){if(ne.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 ne.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},S=class extends W{async scaleFactor(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y: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 f(e,t))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new f(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 x(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",a=>{e({...a,payload:{type:"drop",paths:a.payload}})}),r=await this.listen("tauri://file-drop-hover",a=>{e({...a,payload:{type:"hover",paths:a.payload}})}),s=await this.listen("tauri://file-drop-cancelled",a=>{e({...a,payload:{type:"cancel"}})});return()=>{t(),r(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},x=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 S{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 re().some(t=>t.label===e)?new m(e,{skip:!0}):null}},K;"__TAURI_METADATA__"in window?K=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.`),K=new m("main",{skip:!0}));function Q(n){return n===null?null:{name:n.name,scaleFactor:n.scaleFactor,position:new b(n.position.x,n.position.y),size:new f(n.size.width,n.size.height)}}async function mt(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Q)}async function pt(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Q)}async function gt(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(n=>n.map(Q))}var Z={};c(Z,{EOL:()=>yt,arch:()=>Pt,platform:()=>ht,tempdir:()=>_t,type:()=>bt,version:()=>ft});var yt=_()?`\r +"use strict";var __TAURI_IIFE__=(()=>{var R=Object.defineProperty;var re=Object.getOwnPropertyDescriptor;var se=Object.getOwnPropertyNames;var ae=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var t in e)R(n,t,{get:e[t],enumerable:!0})},oe=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of se(e))!ae.call(n,s)&&s!==t&&R(n,s,{get:()=>e[s],enumerable:!(r=re(e,s))||r.enumerable});return n};var le=n=>oe(R({},"__esModule",{value:!0}),n);var ht={};c(ht,{app:()=>N,event:()=>I,http:()=>z,invoke:()=>gt,notification:()=>H,os:()=>Z,path:()=>V,process:()=>q,shell:()=>G,tauri:()=>L,updater:()=>$,window:()=>Q});var N={};c(N,{getName:()=>me,getTauriVersion:()=>pe,getVersion:()=>ce,hide:()=>ge,show:()=>ye});var L={};c(L,{convertFileSrc:()=>ue,invoke:()=>l,transformCallback:()=>y});function de(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function y(n,e=!1){let t=de(),r=`_${t}`;return Object.defineProperty(window,r,{value:s=>(e&&Reflect.deleteProperty(window,r),n?.(s)),writable:!1,configurable:!0}),t}async function l(n,e={}){return new Promise((t,r)=>{let s=y(d=>{t(d),Reflect.deleteProperty(window,`_${a}`)},!0),a=y(d=>{r(d),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:n,callback:s,error:a,...e})})}function ue(n,e="asset"){let t=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${t}`:`${e}://localhost/${t}`}async function i(n){return l("tauri",n)}async function ce(){return i({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function me(){return i({__tauriModule:"App",message:{cmd:"getAppName"}})}async function pe(){return i({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function ye(){return i({__tauriModule:"App",message:{cmd:"show"}})}async function ge(){return i({__tauriModule:"App",message:{cmd:"hide"}})}var I={};c(I,{TauriEvent:()=>O,emit:()=>E,listen:()=>U,once:()=>k});async function Y(n,e){return i({__tauriModule:"Event",message:{cmd:"unlisten",event:n,eventId:e}})}async function _(n,e,t){await i({__tauriModule:"Event",message:{cmd:"emit",event:n,windowLabel:e,payload:t}})}async function w(n,e,t){return i({__tauriModule:"Event",message:{cmd:"listen",event:n,windowLabel:e,handler:y(t)}}).then(r=>async()=>Y(n,r))}async function v(n,e,t){return w(n,e,r=>{t(r),Y(n,r.id).catch(()=>{})})}var O=(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))(O||{});async function U(n,e){return w(n,null,e)}async function k(n,e){return v(n,null,e)}async function E(n,e){return _(n,void 0,e)}var z={};c(z,{Body:()=>p,Client:()=>A,Response:()=>T,ResponseType:()=>X,fetch:()=>fe,getClient:()=>B});var X=(r=>(r[r.JSON=1]="JSON",r[r.Text=2]="Text",r[r.Binary=3]="Binary",r))(X||{}),p=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},r=(s,a)=>{if(a!==null){let d;typeof a=="string"?d=a:a instanceof Uint8Array||Array.isArray(a)?d=Array.from(a):a instanceof File?d={file:a.name,mime:a.type,fileName:a.name}:typeof a.file=="string"?d={file:a.file,mime:a.mime,fileName:a.fileName}:d={file:Array.from(a.file),mime:a.mime,fileName:a.fileName},t[String(s)]=d}};if(e instanceof FormData)for(let[s,a]of e)r(s,a);else for(let[s,a]of Object.entries(e))r(s,a);return new p("Form",t)}static json(e){return new p("Json",e)}static text(e){return new p("Text",e)}static bytes(e){return new p("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},T=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},A=class{constructor(e){this.id=e}async drop(){return i({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),i({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(r=>{let s=new T(r);if(t){try{s.data=JSON.parse(s.data)}catch(a){if(s.ok&&s.data==="")s.data={};else if(s.ok)throw Error(`Failed to parse response \`${s.data}\` as JSON: ${a}; + try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return s}return s})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,r){return this.request({method:"POST",url:e,body:t,...r})}async put(e,t,r){return this.request({method:"PUT",url:e,body:t,...r})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function B(n){return i({__tauriModule:"Http",message:{cmd:"createClient",options:n}}).then(e=>new A(e))}var F=null;async function fe(n,e){return F===null&&(F=await B()),F.request({url:n,method:e?.method??"GET",...e})}var H={};c(H,{isPermissionGranted:()=>be,requestPermission:()=>we,sendNotification:()=>Pe});async function be(){return window.Notification.permission!=="default"?Promise.resolve(window.Notification.permission==="granted"):i({__tauriModule:"Notification",message:{cmd:"isNotificationPermissionGranted"}})}async function we(){return window.Notification.requestPermission()}function Pe(n){typeof n=="string"?new window.Notification(n):new window.Notification(n.title,n)}var V={};c(V,{BaseDirectory:()=>ee,appCacheDir:()=>Ee,appConfigDir:()=>_e,appDataDir:()=>ve,appLocalDataDir:()=>Oe,appLogDir:()=>qe,audioDir:()=>Te,basename:()=>Ye,cacheDir:()=>Ae,configDir:()=>Ce,dataDir:()=>Me,delimiter:()=>je,desktopDir:()=>We,dirname:()=>Qe,documentDir:()=>De,downloadDir:()=>xe,executableDir:()=>Se,extname:()=>Ze,fontDir:()=>Re,homeDir:()=>Le,isAbsolute:()=>Xe,join:()=>Ke,localDataDir:()=>Ne,normalize:()=>Je,pictureDir:()=>Ue,publicDir:()=>ke,resolve:()=>$e,resolveResource:()=>Fe,resourceDir:()=>Ie,runtimeDir:()=>ze,sep:()=>Ge,templateDir:()=>He,videoDir:()=>Ve});function P(){return navigator.appVersion.includes("Win")}var ee=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(ee||{});async function _e(){return l("plugin:path|resolve_directory",{directory:13})}async function ve(){return l("plugin:path|resolve_directory",{directory:14})}async function Oe(){return l("plugin:path|resolve_directory",{directory:15})}async function Ee(){return l("plugin:path|resolve_directory",{directory:16})}async function Te(){return l("plugin:path|resolve_directory",{directory:1})}async function Ae(){return l("plugin:path|resolve_directory",{directory:2})}async function Ce(){return l("plugin:path|resolve_directory",{directory:3})}async function Me(){return l("plugin:path|resolve_directory",{directory:4})}async function We(){return l("plugin:path|resolve_directory",{directory:18})}async function De(){return l("plugin:path|resolve_directory",{directory:6})}async function xe(){return l("plugin:path|resolve_directory",{directory:7})}async function Se(){return l("plugin:path|resolve_directory",{directory:19})}async function Re(){return l("plugin:path|resolve_directory",{directory:20})}async function Le(){return l("plugin:path|resolve_directory",{directory:21})}async function Ne(){return l("plugin:path|resolve_directory",{directory:5})}async function Ue(){return l("plugin:path|resolve_directory",{directory:8})}async function ke(){return l("plugin:path|resolve_directory",{directory:9})}async function Ie(){return l("plugin:path|resolve_directory",{directory:11})}async function Fe(n){return l("plugin:path|resolve_directory",{directory:11,path:n})}async function ze(){return l("plugin:path|resolve_directory",{directory:22})}async function He(){return l("plugin:path|resolve_directory",{directory:23})}async function Ve(){return l("plugin:path|resolve_directory",{directory:10})}async function qe(){return l("plugin:path|resolve_directory",{directory:17})}var Ge=P()?"\\":"/",je=P()?";":":";async function $e(...n){return l("plugin:path|resolve",{paths:n})}async function Je(n){return l("plugin:path|normalize",{path:n})}async function Ke(...n){return l("plugin:path|join",{paths:n})}async function Qe(n){return l("plugin:path|dirname",{path:n})}async function Ze(n){return l("plugin:path|extname",{path:n})}async function Ye(n,e){return l("plugin:path|basename",{path:n,ext:e})}async function Xe(n){return l("plugin:path|isAbsolute",{path:n})}var q={};c(q,{exit:()=>Be,relaunch:()=>et});async function Be(n=0){return i({__tauriModule:"Process",message:{cmd:"exit",exitCode:n}})}async function et(){return i({__tauriModule:"Process",message:{cmd:"relaunch"}})}var G={};c(G,{Child:()=>C,Command:()=>h,EventEmitter:()=>g,open:()=>nt});async function tt(n,e,t=[],r){return typeof t=="object"&&Object.freeze(t),i({__tauriModule:"Shell",message:{cmd:"execute",program:e,args:t,options:r,onEventFn:y(n)}})}var g=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)}},C=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}})}},h=class extends g{constructor(t,r=[],s){super();this.stdout=new g;this.stderr=new g;this.program=t,this.args=typeof r=="string"?[r]:r,this.options=s??{}}static create(t,r=[],s){return new h(t,r,s)}static sidecar(t,r=[],s){let a=new h(t,r,s);return a.options.sidecar=!0,a}async spawn(){return tt(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 C(t))}async execute(){return new Promise((t,r)=>{this.on("error",r);let s=[],a=[];this.stdout.on("data",d=>{s.push(d)}),this.stderr.on("data",d=>{a.push(d)}),this.on("close",d=>{t({code:d.code,signal:d.signal,stdout:this.collectOutput(s),stderr:this.collectOutput(a)})}),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 nt(n,e){return i({__tauriModule:"Shell",message:{cmd:"open",path:n,with:e}})}var $={};c($,{checkUpdate:()=>rt,installUpdate:()=>it,onUpdaterEvent:()=>j});async function j(n){return U("tauri://update-status",e=>{n(e?.payload)})}async function it(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(a){if(a.error){e(),r(a.error);return}a.status==="DONE"&&(e(),t())}j(s).then(a=>{n=a}).catch(a=>{throw e(),a}),E("tauri://update-install").catch(a=>{throw e(),a})})}async function rt(){let n;function e(){n&&n(),n=void 0}return new Promise((t,r)=>{function s(d){e(),t({manifest:d,shouldUpdate:!0})}function a(d){if(d.error){e(),r(d.error);return}d.status==="UPTODATE"&&(e(),t({shouldUpdate:!1}))}k("tauri://update-available",d=>{s(d?.payload)}).catch(d=>{throw e(),d}),j(a).then(d=>{n=d}).catch(d=>{throw e(),d}),E("tauri://update").catch(d=>{throw e(),d})})}var Q={};c(Q,{CloseRequestedEvent:()=>S,LogicalPosition:()=>W,LogicalSize:()=>M,PhysicalPosition:()=>b,PhysicalSize:()=>f,UserAttentionType:()=>ne,WebviewWindow:()=>m,WebviewWindowHandle:()=>D,WindowManager:()=>x,appWindow:()=>J,availableMonitors:()=>lt,currentMonitor:()=>at,getAll:()=>ie,getCurrent:()=>st,primaryMonitor:()=>ot});var M=class{constructor(e,t){this.type="Logical";this.width=e,this.height=t}},f=class{constructor(e,t){this.type="Physical";this.width=e,this.height=t}toLogical(e){return new M(this.width/e,this.height/e)}},W=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 W(this.x/e,this.y/e)}},ne=(t=>(t[t.Critical=1]="Critical",t[t.Informational=2]="Informational",t))(ne||{});function st(){return new m(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function ie(){return window.__TAURI_METADATA__.__windows.map(n=>new m(n.label,{skip:!0}))}var te=["tauri://created","tauri://error"],D=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)}):w(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)}):v(e,this.label,t)}async emit(e,t){if(te.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return _(e,this.label,t)}_handleTauriEvent(e,t){return te.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},x=class extends D{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 f(e,t))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new f(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 S(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",a=>{e({...a,payload:{type:"drop",paths:a.payload}})}),r=await this.listen("tauri://file-drop-hover",a=>{e({...a,payload:{type:"hover",paths:a.payload}})}),s=await this.listen("tauri://file-drop-cancelled",a=>{e({...a,payload:{type:"cancel"}})});return()=>{t(),r(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},S=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 x{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 ie().some(t=>t.label===e)?new m(e,{skip:!0}):null}},J;"__TAURI_METADATA__"in window?J=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.`),J=new m("main",{skip:!0}));function K(n){return n===null?null:{name:n.name,scaleFactor:n.scaleFactor,position:new b(n.position.x,n.position.y),size:new f(n.size.width,n.size.height)}}async function at(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(K)}async function ot(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(K)}async function lt(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(n=>n.map(K))}var Z={};c(Z,{EOL:()=>dt,arch:()=>pt,platform:()=>ut,tempdir:()=>yt,type:()=>mt,version:()=>ct});var dt=P()?`\r `:` -`;async function ht(){return i({__tauriModule:"Os",message:{cmd:"platform"}})}async function ft(){return i({__tauriModule:"Os",message:{cmd:"version"}})}async function bt(){return i({__tauriModule:"Os",message:{cmd:"osType"}})}async function Pt(){return i({__tauriModule:"Os",message:{cmd:"arch"}})}async function _t(){return i({__tauriModule:"Os",message:{cmd:"tempdir"}})}var wt=l;return ue(vt);})(); +`;async function ut(){return i({__tauriModule:"Os",message:{cmd:"platform"}})}async function ct(){return i({__tauriModule:"Os",message:{cmd:"version"}})}async function mt(){return i({__tauriModule:"Os",message:{cmd:"osType"}})}async function pt(){return i({__tauriModule:"Os",message:{cmd:"arch"}})}async function yt(){return i({__tauriModule:"Os",message:{cmd:"tempdir"}})}var gt=l;return le(ht);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/api/dialog.rs b/core/tauri/src/api/dialog.rs deleted file mode 100644 index 7fc4c1477a7..00000000000 --- a/core/tauri/src/api/dialog.rs +++ /dev/null @@ -1,733 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -//! Use native message and file open/save dialogs. -//! -//! This module exposes non-blocking APIs on its root, relying on callback closures -//! to give results back. This is particularly useful when running dialogs from the main thread. -//! When using on asynchronous contexts such as async commands, the [`blocking`] APIs are recommended. - -pub use nonblocking::*; - -#[cfg(not(target_os = "linux"))] -macro_rules! run_dialog { - ($e:expr, $h: ident) => {{ - std::thread::spawn(move || { - let response = $e; - $h(response); - }); - }}; -} - -#[cfg(target_os = "linux")] -macro_rules! run_dialog { - ($e:expr, $h: ident) => {{ - std::thread::spawn(move || { - let context = glib::MainContext::default(); - context.invoke_with_priority(glib::PRIORITY_HIGH, move || { - let response = $e; - $h(response); - }); - }); - }}; -} - -#[cfg(not(target_os = "linux"))] -macro_rules! run_file_dialog { - ($e:expr, $h: ident) => {{ - std::thread::spawn(move || { - let response = crate::async_runtime::block_on($e); - $h(response); - }); - }}; -} - -#[cfg(target_os = "linux")] -macro_rules! run_file_dialog { - ($e:expr, $h: ident) => {{ - std::thread::spawn(move || { - let context = glib::MainContext::default(); - context.invoke_with_priority(glib::PRIORITY_HIGH, move || { - let response = $e; - $h(response); - }); - }); - }}; -} - -macro_rules! run_dialog_sync { - ($e:expr) => {{ - let (tx, rx) = sync_channel(0); - let cb = move |response| { - tx.send(response).unwrap(); - }; - run_file_dialog!($e, cb); - rx.recv().unwrap() - }}; -} - -macro_rules! file_dialog_builder { - () => { - #[cfg(target_os = "linux")] - type FileDialog = rfd::FileDialog; - #[cfg(not(target_os = "linux"))] - type FileDialog = rfd::AsyncFileDialog; - - /// The file dialog builder. - /// - /// Constructs file picker dialogs that can select single/multiple files or directories. - #[derive(Debug, Default)] - pub struct FileDialogBuilder(FileDialog); - - impl FileDialogBuilder { - /// Gets the default file dialog builder. - pub fn new() -> Self { - Default::default() - } - - /// Add file extension filter. Takes in the name of the filter, and list of extensions - #[must_use] - pub fn add_filter(mut self, name: impl AsRef, extensions: &[&str]) -> Self { - self.0 = self.0.add_filter(name.as_ref(), extensions); - self - } - - /// Set starting directory of the dialog. - #[must_use] - pub fn set_directory>(mut self, directory: P) -> Self { - self.0 = self.0.set_directory(directory); - self - } - - /// Set starting file name of the dialog. - #[must_use] - pub fn set_file_name(mut self, file_name: &str) -> Self { - self.0 = self.0.set_file_name(file_name); - self - } - - /// Sets the parent window of the dialog. - #[must_use] - pub fn set_parent(mut self, parent: &W) -> Self { - self.0 = self.0.set_parent(parent); - self - } - - /// Set the title of the dialog. - #[must_use] - pub fn set_title(mut self, title: &str) -> Self { - self.0 = self.0.set_title(title); - self - } - } - }; -} - -macro_rules! message_dialog_builder { - () => { - /// A builder for message dialogs. - pub struct MessageDialogBuilder(rfd::MessageDialog); - - impl MessageDialogBuilder { - /// Creates a new message dialog builder. - pub fn new(title: impl AsRef, message: impl AsRef) -> Self { - let title = title.as_ref().to_string(); - let message = message.as_ref().to_string(); - Self( - rfd::MessageDialog::new() - .set_title(&title) - .set_description(&message), - ) - } - - /// Set parent windows explicitly (optional) - /// - /// ## Platform-specific - /// - /// - **Linux:** Unsupported. - pub fn parent(mut self, parent: &W) -> Self { - self.0 = self.0.set_parent(parent); - self - } - - /// Set the set of button that will be displayed on the dialog. - pub fn buttons(mut self, buttons: MessageDialogButtons) -> Self { - self.0 = self.0.set_buttons(buttons.into()); - self - } - - /// Set type of a dialog. - /// - /// Depending on the system it can result in type specific icon to show up, - /// the will inform user it message is a error, warning or just information. - pub fn kind(mut self, kind: MessageDialogKind) -> Self { - self.0 = self.0.set_level(kind.into()); - self - } - } - }; -} - -/// Options for action buttons on message dialogs. -#[non_exhaustive] -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub enum MessageDialogButtons { - /// Ok button. - Ok, - /// Ok and Cancel buttons. - OkCancel, - /// Yes and No buttons. - YesNo, - /// OK button with customized text. - OkWithLabel(String), - /// Ok and Cancel buttons with customized text. - OkCancelWithLabels(String, String), -} - -impl From for rfd::MessageButtons { - fn from(kind: MessageDialogButtons) -> Self { - match kind { - MessageDialogButtons::Ok => Self::Ok, - MessageDialogButtons::OkCancel => Self::OkCancel, - MessageDialogButtons::YesNo => Self::YesNo, - MessageDialogButtons::OkWithLabel(ok_text) => Self::OkCustom(ok_text), - MessageDialogButtons::OkCancelWithLabels(ok_text, cancel_text) => { - Self::OkCancelCustom(ok_text, cancel_text) - } - } - } -} - -/// Types of message, ask and confirm dialogs. -#[non_exhaustive] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum MessageDialogKind { - /// Information dialog. - Info, - /// Warning dialog. - Warning, - /// Error dialog. - Error, -} - -impl From for rfd::MessageLevel { - fn from(kind: MessageDialogKind) -> Self { - match kind { - MessageDialogKind::Info => Self::Info, - MessageDialogKind::Warning => Self::Warning, - MessageDialogKind::Error => Self::Error, - } - } -} - -/// Blocking interfaces for the dialog APIs. -/// -/// The blocking APIs will block the current thread to execute instead of relying on callback closures, -/// which makes them easier to use. -/// -/// **NOTE:** You cannot block the main thread when executing the dialog APIs, so you must use the [`crate::api::dialog`] methods instead. -/// Examples of main thread context are the [`crate::App::run`] closure and non-async commands. -pub mod blocking { - use super::{MessageDialogButtons, MessageDialogKind}; - use crate::{Runtime, Window}; - use std::path::{Path, PathBuf}; - use std::sync::mpsc::sync_channel; - - file_dialog_builder!(); - message_dialog_builder!(); - - impl FileDialogBuilder { - /// Shows the dialog to select a single file. - /// This is a blocking operation, - /// and should *NOT* be used when running on the main thread context. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::blocking::FileDialogBuilder; - /// #[tauri::command] - /// async fn my_command() { - /// let file_path = FileDialogBuilder::new().pick_file(); - /// // do something with the optional file path here - /// // the file path is `None` if the user closed the dialog - /// } - /// ``` - pub fn pick_file(self) -> Option { - #[allow(clippy::let_and_return)] - let response = run_dialog_sync!(self.0.pick_file()); - #[cfg(not(target_os = "linux"))] - let response = response.map(|p| p.path().to_path_buf()); - response - } - - /// Shows the dialog to select multiple files. - /// This is a blocking operation, - /// and should *NOT* be used when running on the main thread context. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::blocking::FileDialogBuilder; - /// #[tauri::command] - /// async fn my_command() { - /// let file_path = FileDialogBuilder::new().pick_files(); - /// // do something with the optional file paths here - /// // the file paths value is `None` if the user closed the dialog - /// } - /// ``` - pub fn pick_files(self) -> Option> { - #[allow(clippy::let_and_return)] - let response = run_dialog_sync!(self.0.pick_files()); - #[cfg(not(target_os = "linux"))] - let response = - response.map(|paths| paths.into_iter().map(|p| p.path().to_path_buf()).collect()); - response - } - - /// Shows the dialog to select a single folder. - /// This is a blocking operation, - /// and should *NOT* be used when running on the main thread context. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::blocking::FileDialogBuilder; - /// #[tauri::command] - /// async fn my_command() { - /// let folder_path = FileDialogBuilder::new().pick_folder(); - /// // do something with the optional folder path here - /// // the folder path is `None` if the user closed the dialog - /// } - /// ``` - pub fn pick_folder(self) -> Option { - #[allow(clippy::let_and_return)] - let response = run_dialog_sync!(self.0.pick_folder()); - #[cfg(not(target_os = "linux"))] - let response = response.map(|p| p.path().to_path_buf()); - response - } - - /// Shows the dialog to select multiple folders. - /// This is a blocking operation, - /// and should *NOT* be used when running on the main thread context. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::blocking::FileDialogBuilder; - /// #[tauri::command] - /// async fn my_command() { - /// let folder_paths = FileDialogBuilder::new().pick_folders(); - /// // do something with the optional folder paths here - /// // the folder paths value is `None` if the user closed the dialog - /// } - /// ``` - pub fn pick_folders(self) -> Option> { - #[allow(clippy::let_and_return)] - let response = run_dialog_sync!(self.0.pick_folders()); - #[cfg(not(target_os = "linux"))] - let response = - response.map(|paths| paths.into_iter().map(|p| p.path().to_path_buf()).collect()); - response - } - - /// Shows the dialog to save a file. - /// This is a blocking operation, - /// and should *NOT* be used when running on the main thread context. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::blocking::FileDialogBuilder; - /// #[tauri::command] - /// async fn my_command() { - /// let file_path = FileDialogBuilder::new().save_file(); - /// // do something with the optional file path here - /// // the file path is `None` if the user closed the dialog - /// } - /// ``` - pub fn save_file(self) -> Option { - #[allow(clippy::let_and_return)] - let response = run_dialog_sync!(self.0.save_file()); - #[cfg(not(target_os = "linux"))] - let response = response.map(|p| p.path().to_path_buf()); - response - } - } - - impl MessageDialogBuilder { - //// Shows a message dialog. - /// - /// - In `Ok` dialog, it will return `true` when `OK` was pressed. - /// - In `OkCancel` dialog, it will return `true` when `OK` was pressed. - /// - In `YesNo` dialog, it will return `true` when `Yes` was pressed. - pub fn show(self) -> bool { - let (tx, rx) = sync_channel(1); - let f = move |response| { - tx.send(response).unwrap(); - }; - run_dialog!(self.0.show(), f); - rx.recv().unwrap() - } - } - - /// Displays a dialog with a message and an optional title with a "yes" and a "no" button and wait for it to be closed. - /// - /// This is a blocking operation, - /// and should *NOT* be used when running on the main thread context. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::blocking::ask; - /// # let app = tauri::Builder::default().build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json")).unwrap(); - /// # let window = tauri::Manager::get_window(&app, "main").unwrap(); - /// let answer = ask(Some(&window), "Tauri", "Is Tauri awesome?"); - /// // do something with `answer` - /// ``` - #[allow(unused_variables)] - pub fn ask( - parent_window: Option<&Window>, - title: impl AsRef, - message: impl AsRef, - ) -> bool { - run_message_dialog(parent_window, title, message, rfd::MessageButtons::YesNo) - } - - /// Displays a dialog with a message and an optional title with an "ok" and a "cancel" button and wait for it to be closed. - /// - /// This is a blocking operation, - /// and should *NOT* be used when running on the main thread context. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::blocking::confirm; - /// # let app = tauri::Builder::default().build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json")).unwrap(); - /// # let window = tauri::Manager::get_window(&app, "main").unwrap(); - /// let answer = confirm(Some(&window), "Tauri", "Are you sure?"); - /// // do something with `answer` - /// ``` - #[allow(unused_variables)] - pub fn confirm( - parent_window: Option<&Window>, - title: impl AsRef, - message: impl AsRef, - ) -> bool { - run_message_dialog(parent_window, title, message, rfd::MessageButtons::OkCancel) - } - - /// Displays a message dialog and wait for it to be closed. - /// - /// This is a blocking operation, - /// and should *NOT* be used when running on the main thread context. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::blocking::message; - /// # let app = tauri::Builder::default().build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json")).unwrap(); - /// # let window = tauri::Manager::get_window(&app, "main").unwrap(); - /// message(Some(&window), "Tauri", "Tauri is awesome!"); - /// ``` - #[allow(unused_variables)] - pub fn message( - parent_window: Option<&Window>, - title: impl AsRef, - message: impl AsRef, - ) { - let _ = run_message_dialog(parent_window, title, message, rfd::MessageButtons::Ok); - } - - #[allow(unused_variables)] - fn run_message_dialog( - parent_window: Option<&Window>, - title: impl AsRef, - message: impl AsRef, - buttons: rfd::MessageButtons, - ) -> bool { - let (tx, rx) = sync_channel(1); - super::nonblocking::run_message_dialog( - parent_window, - title, - message, - buttons, - MessageDialogKind::Info, - move |response| { - tx.send(response).unwrap(); - }, - ); - rx.recv().unwrap() - } -} - -mod nonblocking { - use super::{MessageDialogButtons, MessageDialogKind}; - use crate::{Runtime, Window}; - use std::path::{Path, PathBuf}; - - file_dialog_builder!(); - message_dialog_builder!(); - - impl FileDialogBuilder { - /// Shows the dialog to select a single file. - /// This is not a blocking operation, - /// and should be used when running on the main thread to avoid deadlocks with the event loop. - /// - /// For usage in other contexts such as commands, prefer [`Self::pick_file`]. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::FileDialogBuilder; - /// tauri::Builder::default() - /// .build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json")) - /// .expect("failed to build tauri app") - /// .run(|_app, _event| { - /// FileDialogBuilder::new().pick_file(|file_path| { - /// // do something with the optional file path here - /// // the file path is `None` if the user closed the dialog - /// }) - /// }) - /// ``` - pub fn pick_file) + Send + 'static>(self, f: F) { - #[cfg(not(target_os = "linux"))] - let f = |path: Option| f(path.map(|p| p.path().to_path_buf())); - run_file_dialog!(self.0.pick_file(), f) - } - - /// Shows the dialog to select multiple files. - /// This is not a blocking operation, - /// and should be used when running on the main thread to avoid deadlocks with the event loop. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::FileDialogBuilder; - /// tauri::Builder::default() - /// .build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json")) - /// .expect("failed to build tauri app") - /// .run(|_app, _event| { - /// FileDialogBuilder::new().pick_files(|file_paths| { - /// // do something with the optional file paths here - /// // the file paths value is `None` if the user closed the dialog - /// }) - /// }) - /// ``` - pub fn pick_files>) + Send + 'static>(self, f: F) { - #[cfg(not(target_os = "linux"))] - let f = |paths: Option>| { - f(paths.map(|list| list.into_iter().map(|p| p.path().to_path_buf()).collect())) - }; - run_file_dialog!(self.0.pick_files(), f) - } - - /// Shows the dialog to select a single folder. - /// This is not a blocking operation, - /// and should be used when running on the main thread to avoid deadlocks with the event loop. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::FileDialogBuilder; - /// tauri::Builder::default() - /// .build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json")) - /// .expect("failed to build tauri app") - /// .run(|_app, _event| { - /// FileDialogBuilder::new().pick_folder(|folder_path| { - /// // do something with the optional folder path here - /// // the folder path is `None` if the user closed the dialog - /// }) - /// }) - /// ``` - pub fn pick_folder) + Send + 'static>(self, f: F) { - #[cfg(not(target_os = "linux"))] - let f = |path: Option| f(path.map(|p| p.path().to_path_buf())); - run_file_dialog!(self.0.pick_folder(), f) - } - - /// Shows the dialog to select multiple folders. - /// This is not a blocking operation, - /// and should be used when running on the main thread to avoid deadlocks with the event loop. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::FileDialogBuilder; - /// tauri::Builder::default() - /// .build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json")) - /// .expect("failed to build tauri app") - /// .run(|_app, _event| { - /// FileDialogBuilder::new().pick_folders(|file_paths| { - /// // do something with the optional folder paths here - /// // the folder paths value is `None` if the user closed the dialog - /// }) - /// }) - /// ``` - pub fn pick_folders>) + Send + 'static>(self, f: F) { - #[cfg(not(target_os = "linux"))] - let f = |paths: Option>| { - f(paths.map(|list| list.into_iter().map(|p| p.path().to_path_buf()).collect())) - }; - run_file_dialog!(self.0.pick_folders(), f) - } - - /// Shows the dialog to save a file. - /// - /// This is not a blocking operation, - /// and should be used when running on the main thread to avoid deadlocks with the event loop. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::FileDialogBuilder; - /// tauri::Builder::default() - /// .build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json")) - /// .expect("failed to build tauri app") - /// .run(|_app, _event| { - /// FileDialogBuilder::new().save_file(|file_path| { - /// // do something with the optional file path here - /// // the file path is `None` if the user closed the dialog - /// }) - /// }) - /// ``` - pub fn save_file) + Send + 'static>(self, f: F) { - #[cfg(not(target_os = "linux"))] - let f = |path: Option| f(path.map(|p| p.path().to_path_buf())); - run_file_dialog!(self.0.save_file(), f) - } - } - - impl MessageDialogBuilder { - /// Shows a message dialog: - /// - /// - In `Ok` dialog, it will call the closure with `true` when `OK` was pressed - /// - In `OkCancel` dialog, it will call the closure with `true` when `OK` was pressed - /// - In `YesNo` dialog, it will call the closure with `true` when `Yes` was pressed - pub fn show(self, f: F) { - run_dialog!(self.0.show(), f); - } - } - - /// Displays a non-blocking dialog with a message and an optional title with a "yes" and a "no" button. - /// - /// This is not a blocking operation, - /// and should be used when running on the main thread to avoid deadlocks with the event loop. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::ask; - /// # let app = tauri::Builder::default().build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json")).unwrap(); - /// # let window = tauri::Manager::get_window(&app, "main").unwrap(); - /// ask(Some(&window), "Tauri", "Is Tauri awesome?", |answer| { - /// // do something with `answer` - /// }); - /// ``` - #[allow(unused_variables)] - pub fn ask( - parent_window: Option<&Window>, - title: impl AsRef, - message: impl AsRef, - f: F, - ) { - run_message_dialog( - parent_window, - title, - message, - rfd::MessageButtons::YesNo, - MessageDialogKind::Info, - f, - ) - } - - /// Displays a non-blocking dialog with a message and an optional title with an "ok" and a "cancel" button. - /// - /// This is not a blocking operation, - /// and should be used when running on the main thread to avoid deadlocks with the event loop. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::confirm; - /// # let app = tauri::Builder::default().build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json")).unwrap(); - /// # let window = tauri::Manager::get_window(&app, "main").unwrap(); - /// confirm(Some(&window), "Tauri", "Are you sure?", |answer| { - /// // do something with `answer` - /// }); - /// ``` - #[allow(unused_variables)] - pub fn confirm( - parent_window: Option<&Window>, - title: impl AsRef, - message: impl AsRef, - f: F, - ) { - run_message_dialog( - parent_window, - title, - message, - rfd::MessageButtons::OkCancel, - MessageDialogKind::Info, - f, - ) - } - - /// Displays a non-blocking message dialog. - /// - /// This is not a blocking operation, - /// and should be used when running on the main thread to avoid deadlocks with the event loop. - /// - /// # Examples - /// - /// ```rust,no_run - /// use tauri::api::dialog::message; - /// # let app = tauri::Builder::default().build(tauri::generate_context!("test/fixture/src-tauri/tauri.conf.json")).unwrap(); - /// # let window = tauri::Manager::get_window(&app, "main").unwrap(); - /// message(Some(&window), "Tauri", "Tauri is awesome!"); - /// ``` - #[allow(unused_variables)] - pub fn message( - parent_window: Option<&Window>, - title: impl AsRef, - message: impl AsRef, - ) { - run_message_dialog( - parent_window, - title, - message, - rfd::MessageButtons::Ok, - MessageDialogKind::Info, - |_| {}, - ) - } - - #[allow(unused_variables)] - pub(crate) fn run_message_dialog( - parent_window: Option<&Window>, - title: impl AsRef, - message: impl AsRef, - buttons: rfd::MessageButtons, - level: MessageDialogKind, - f: F, - ) { - let title = title.as_ref().to_string(); - let message = message.as_ref().to_string(); - #[allow(unused_mut)] - let mut builder = rfd::MessageDialog::new() - .set_title(&title) - .set_description(&message) - .set_buttons(buttons) - .set_level(level.into()); - - #[cfg(any(windows, target_os = "macos"))] - { - if let Some(window) = parent_window { - builder = builder.set_parent(window); - } - } - - run_dialog!(builder.show(), f) - } -} diff --git a/core/tauri/src/api/mod.rs b/core/tauri/src/api/mod.rs index fd3ed5499c5..55a61320252 100644 --- a/core/tauri/src/api/mod.rs +++ b/core/tauri/src/api/mod.rs @@ -4,9 +4,6 @@ //! The Tauri API interface. -#[cfg(all(desktop, feature = "dialog"))] -#[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "dialog"))))] -pub mod dialog; pub mod dir; pub mod file; #[cfg(feature = "http-api")] diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index d256fde2f91..92e186bcf51 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -797,49 +797,15 @@ impl App { #[cfg(updater)] impl App { - /// Runs the updater hook with built-in dialog. - fn run_updater_dialog(&self) { - let handle = self.handle(); - - crate::async_runtime::spawn(async move { updater::check_update_with_dialog(handle).await }); - } - fn run_updater(&self) { - let handle = self.handle(); - let handle_ = handle.clone(); - let updater_config = self.manager.config().tauri.updater.clone(); // check if updater is active or not - if updater_config.active { - if updater_config.dialog { - #[cfg(not(target_os = "linux"))] - let updater_enabled = true; - #[cfg(target_os = "linux")] - let updater_enabled = cfg!(dev) || self.state::().appimage.is_some(); - if updater_enabled { - // if updater dialog is enabled spawn a new task - self.run_updater_dialog(); - // When dialog is enabled, if user want to recheck - // if an update is available after first start - // invoke the Event `tauri://update` from JS or rust side. - handle.listen_global(updater::EVENT_CHECK_UPDATE, move |_msg| { - let handle = handle_.clone(); - // re-spawn task inside tokyo to launch the download - // we don't need to emit anything as everything is handled - // by the process (user is asked to restart at the end) - // and it's handled by the updater - crate::async_runtime::spawn( - async move { updater::check_update_with_dialog(handle).await }, - ); - }); - } - } else { - // we only listen for `tauri://update` - // once we receive the call, we check if an update is available or not - // if there is a new update we emit `tauri://update-available` with details - // this is the user responsibilities to display dialog and ask if user want to install - // to install the update you need to invoke the Event `tauri://update-install` - updater::listener(handle); - } + if self.manager.config().tauri.updater.active { + // we only listen for `tauri://update` + // once we receive the call, we check if an update is available or not + // if there is a new update we emit `tauri://update-available` with details + // this is the user responsibilities to display dialog and ask if user want to install + // to install the update you need to invoke the Event `tauri://update-install` + updater::listener(self.handle()); } } } @@ -1005,10 +971,7 @@ impl Builder { /// tauri::Builder::default() /// .setup(|app| { /// let main_window = app.get_window("main").unwrap(); - #[cfg_attr( - feature = "dialog", - doc = r#" tauri::api::dialog::blocking::message(Some(&main_window), "Hello", "Welcome back!");"# - )] + /// main_window.set_title("Tauri!"); /// Ok(()) /// }); /// ``` diff --git a/core/tauri/src/endpoints.rs b/core/tauri/src/endpoints.rs index 3248ef96df6..f46a547b402 100644 --- a/core/tauri/src/endpoints.rs +++ b/core/tauri/src/endpoints.rs @@ -13,8 +13,6 @@ use serde_json::Value as JsonValue; use std::sync::Arc; mod app; -#[cfg(dialog_any)] -mod dialog; mod event; #[cfg(http_any)] mod http; @@ -70,8 +68,6 @@ enum Module { #[cfg(shell_any)] Shell(shell::Cmd), Event(event::Cmd), - #[cfg(dialog_any)] - Dialog(dialog::Cmd), Notification(notification::Cmd), #[cfg(http_any)] Http(http::Cmd), @@ -131,13 +127,6 @@ impl Module { .and_then(|r| r.json) .map_err(InvokeError::from_anyhow) }), - #[cfg(dialog_any)] - Self::Dialog(cmd) => resolver.respond_async(async move { - cmd - .run(context) - .and_then(|r| r.json) - .map_err(InvokeError::from_anyhow) - }), Self::Notification(cmd) => resolver.respond_async(async move { cmd .run(context) diff --git a/core/tauri/src/endpoints/dialog.rs b/core/tauri/src/endpoints/dialog.rs deleted file mode 100644 index 137c8434dd4..00000000000 --- a/core/tauri/src/endpoints/dialog.rs +++ /dev/null @@ -1,354 +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, InvokeResponse}; -use crate::Runtime; -#[cfg(any(dialog_open, dialog_save))] -use crate::{api::dialog::blocking::FileDialogBuilder, Manager, Scopes}; -use serde::{Deserialize, Deserializer}; -use tauri_macros::{command_enum, module_command_handler, CommandModule}; - -use std::path::PathBuf; - -macro_rules! message_dialog { - ($fn_name: ident, $allowlist: ident, $button_labels_type: ty, $buttons: expr) => { - #[module_command_handler($allowlist)] - fn $fn_name( - context: InvokeContext, - title: Option, - message: String, - level: Option, - button_labels: $button_labels_type, - ) -> super::Result { - let determine_button = $buttons; - let mut builder = crate::api::dialog::blocking::MessageDialogBuilder::new( - title.unwrap_or_else(|| context.window.app_handle.package_info().name.clone()), - message, - ) - .buttons(determine_button(button_labels)); - #[cfg(any(windows, target_os = "macos"))] - { - builder = builder.parent(&context.window); - } - if let Some(level) = level { - builder = builder.kind(level.into()); - } - Ok(builder.show()) - } - }; -} - -#[allow(dead_code)] -#[derive(Debug, Clone, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct DialogFilter { - name: String, - extensions: Vec, -} - -/// The options for the open dialog API. -#[derive(Debug, Clone, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct OpenDialogOptions { - /// The title of the dialog window. - pub title: Option, - /// The filters of the dialog. - #[serde(default)] - pub filters: Vec, - /// Whether the dialog allows multiple selection or not. - #[serde(default)] - pub multiple: bool, - /// Whether the dialog is a directory selection (`true` value) or file selection (`false` value). - #[serde(default)] - pub directory: bool, - /// The initial path of the dialog. - pub default_path: Option, - /// If [`Self::directory`] is true, indicates that it will be read recursively later. - /// Defines whether subdirectories will be allowed on the scope or not. - #[serde(default)] - pub recursive: bool, -} - -/// The options for the save dialog API. -#[derive(Debug, Clone, Deserialize)] -#[serde(rename_all = "camelCase")] -pub struct SaveDialogOptions { - /// The title of the dialog window. - pub title: Option, - /// The filters of the dialog. - #[serde(default)] - pub filters: Vec, - /// The initial path of the dialog. - pub default_path: Option, -} - -/// Types of message, ask and confirm dialogs. -#[non_exhaustive] -#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -pub enum MessageDialogType { - /// Information dialog. - Info, - /// Warning dialog. - Warning, - /// Error dialog. - Error, -} - -impl<'de> Deserialize<'de> for MessageDialogType { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let s = String::deserialize(deserializer)?; - Ok(match s.to_lowercase().as_str() { - "info" => MessageDialogType::Info, - "warning" => MessageDialogType::Warning, - "error" => MessageDialogType::Error, - _ => MessageDialogType::Info, - }) - } -} - -#[cfg(any(dialog_message, dialog_ask, dialog_confirm))] -impl From for crate::api::dialog::MessageDialogKind { - fn from(kind: MessageDialogType) -> Self { - match kind { - MessageDialogType::Info => Self::Info, - MessageDialogType::Warning => Self::Warning, - MessageDialogType::Error => Self::Error, - } - } -} - -/// The API descriptor. -#[command_enum] -#[derive(Deserialize, CommandModule)] -#[serde(tag = "cmd", rename_all = "camelCase")] -#[allow(clippy::enum_variant_names)] -pub enum Cmd { - /// The open dialog API. - #[cmd(dialog_open, "dialog > open")] - OpenDialog { options: OpenDialogOptions }, - /// The save dialog API. - #[cmd(dialog_save, "dialog > save")] - SaveDialog { options: SaveDialogOptions }, - #[cmd(dialog_message, "dialog > message")] - MessageDialog { - title: Option, - message: String, - #[serde(rename = "type")] - level: Option, - #[serde(rename = "buttonLabel")] - button_label: Option, - }, - #[cmd(dialog_ask, "dialog > ask")] - AskDialog { - title: Option, - message: String, - #[serde(rename = "type")] - level: Option, - #[serde(rename = "buttonLabels")] - button_label: Option<(String, String)>, - }, - #[cmd(dialog_confirm, "dialog > confirm")] - ConfirmDialog { - title: Option, - message: String, - #[serde(rename = "type")] - level: Option, - #[serde(rename = "buttonLabels")] - button_labels: Option<(String, String)>, - }, -} - -impl Cmd { - #[module_command_handler(dialog_open)] - #[allow(unused_variables)] - fn open_dialog( - context: InvokeContext, - options: OpenDialogOptions, - ) -> super::Result { - let mut dialog_builder = FileDialogBuilder::new(); - #[cfg(any(windows, target_os = "macos"))] - { - dialog_builder = dialog_builder.set_parent(&context.window); - } - if let Some(title) = options.title { - dialog_builder = dialog_builder.set_title(&title); - } - if let Some(default_path) = options.default_path { - dialog_builder = set_default_path(dialog_builder, default_path); - } - for filter in options.filters { - let extensions: Vec<&str> = filter.extensions.iter().map(|s| &**s).collect(); - dialog_builder = dialog_builder.add_filter(filter.name, &extensions); - } - - let scopes = context.window.state::(); - - let res = if options.directory { - if options.multiple { - let folders = dialog_builder.pick_folders(); - if let Some(folders) = &folders { - for folder in folders { - scopes - .allow_directory(folder, options.recursive) - .map_err(crate::error::into_anyhow)?; - } - } - folders.into() - } else { - let folder = dialog_builder.pick_folder(); - if let Some(path) = &folder { - scopes - .allow_directory(path, options.recursive) - .map_err(crate::error::into_anyhow)?; - } - folder.into() - } - } else if options.multiple { - let files = dialog_builder.pick_files(); - if let Some(files) = &files { - for file in files { - scopes.allow_file(file).map_err(crate::error::into_anyhow)?; - } - } - files.into() - } else { - let file = dialog_builder.pick_file(); - if let Some(file) = &file { - scopes.allow_file(file).map_err(crate::error::into_anyhow)?; - } - file.into() - }; - - Ok(res) - } - - #[module_command_handler(dialog_save)] - #[allow(unused_variables)] - fn save_dialog( - context: InvokeContext, - options: SaveDialogOptions, - ) -> super::Result> { - let mut dialog_builder = FileDialogBuilder::new(); - #[cfg(any(windows, target_os = "macos"))] - { - dialog_builder = dialog_builder.set_parent(&context.window); - } - if let Some(title) = options.title { - dialog_builder = dialog_builder.set_title(&title); - } - if let Some(default_path) = options.default_path { - dialog_builder = set_default_path(dialog_builder, default_path); - } - for filter in options.filters { - let extensions: Vec<&str> = filter.extensions.iter().map(|s| &**s).collect(); - dialog_builder = dialog_builder.add_filter(filter.name, &extensions); - } - - let scopes = context.window.state::(); - - let path = dialog_builder.save_file(); - if let Some(p) = &path { - scopes.allow_file(p).map_err(crate::error::into_anyhow)?; - } - - Ok(path) - } - - message_dialog!( - message_dialog, - dialog_message, - Option, - |label: Option| { - label - .map(crate::api::dialog::MessageDialogButtons::OkWithLabel) - .unwrap_or(crate::api::dialog::MessageDialogButtons::Ok) - } - ); - - message_dialog!( - ask_dialog, - dialog_ask, - Option<(String, String)>, - |labels: Option<(String, String)>| { - labels - .map(|(yes, no)| crate::api::dialog::MessageDialogButtons::OkCancelWithLabels(yes, no)) - .unwrap_or(crate::api::dialog::MessageDialogButtons::YesNo) - } - ); - - message_dialog!( - confirm_dialog, - dialog_confirm, - Option<(String, String)>, - |labels: Option<(String, String)>| { - labels - .map(|(ok, cancel)| { - crate::api::dialog::MessageDialogButtons::OkCancelWithLabels(ok, cancel) - }) - .unwrap_or(crate::api::dialog::MessageDialogButtons::OkCancel) - } - ); -} - -#[cfg(any(dialog_open, dialog_save))] -fn set_default_path( - mut dialog_builder: FileDialogBuilder, - default_path: PathBuf, -) -> FileDialogBuilder { - if default_path.is_file() || !default_path.exists() { - if let (Some(parent), Some(file_name)) = (default_path.parent(), default_path.file_name()) { - if parent.components().count() > 0 { - dialog_builder = dialog_builder.set_directory(parent); - } - dialog_builder = dialog_builder.set_file_name(&file_name.to_string_lossy()); - } else { - dialog_builder = dialog_builder.set_directory(default_path); - } - dialog_builder - } else { - dialog_builder.set_directory(default_path) - } -} - -#[cfg(test)] -mod tests { - use super::{OpenDialogOptions, SaveDialogOptions}; - use quickcheck::{Arbitrary, Gen}; - - impl Arbitrary for OpenDialogOptions { - fn arbitrary(g: &mut Gen) -> Self { - Self { - filters: Vec::new(), - multiple: bool::arbitrary(g), - directory: bool::arbitrary(g), - default_path: Option::arbitrary(g), - title: Option::arbitrary(g), - recursive: bool::arbitrary(g), - } - } - } - - impl Arbitrary for SaveDialogOptions { - fn arbitrary(g: &mut Gen) -> Self { - Self { - filters: Vec::new(), - default_path: Option::arbitrary(g), - title: Option::arbitrary(g), - } - } - } - - #[tauri_macros::module_command_test(dialog_open, "dialog > open")] - #[quickcheck_macros::quickcheck] - fn open_dialog(_options: OpenDialogOptions) {} - - #[tauri_macros::module_command_test(dialog_save, "dialog > save")] - #[quickcheck_macros::quickcheck] - fn save_dialog(_options: SaveDialogOptions) {} -} diff --git a/core/tauri/src/updater/mod.rs b/core/tauri/src/updater/mod.rs index 6e090f6c751..05ffc9f133c 100644 --- a/core/tauri/src/updater/mod.rs +++ b/core/tauri/src/updater/mod.rs @@ -70,9 +70,6 @@ pub type Result = std::result::Result; use crate::{runtime::EventLoopProxy, AppHandle, EventLoopMessage, Manager, Runtime, UpdaterEvent}; -#[cfg(desktop)] -use crate::api::dialog::blocking::ask; - #[cfg(mobile)] fn ask( _parent_window: Option<&crate::Window>, @@ -394,46 +391,6 @@ impl UpdateResponse { } } -/// Check if there is any new update with builtin dialog. -pub(crate) async fn check_update_with_dialog(handle: AppHandle) { - let updater_config = handle.config().tauri.updater.clone(); - let package_info = handle.package_info().clone(); - if let Some(endpoints) = updater_config.endpoints.clone() { - let endpoints = endpoints - .iter() - .map(|e| e.to_string()) - .collect::>(); - - let mut builder = self::core::builder(handle.clone()) - .urls(&endpoints[..]) - .current_version(package_info.version); - if let Some(target) = &handle.updater_settings.target { - builder = builder.target(target); - } - - // check updates - match builder.build().await { - Ok(updater) => { - let pubkey = updater_config.pubkey.clone(); - - // if dialog enabled only - if updater.should_update && updater_config.dialog { - let body = updater.body.clone().unwrap_or_else(|| String::from("")); - let dialog = - prompt_for_install(&updater.clone(), &package_info.name, &body.clone(), pubkey).await; - - if let Err(e) = dialog { - send_status_update(&handle, UpdaterEvent::Error(e.to_string())); - } - } - } - Err(e) => { - send_status_update(&handle, UpdaterEvent::Error(e.to_string())); - } - } - } -} - /// Updater listener /// This function should be run on the main thread once. pub(crate) fn listener(handle: AppHandle) { @@ -549,53 +506,3 @@ fn send_status_update(handle: &AppHandle, message: UpdaterEvent) .create_proxy() .send_event(EventLoopMessage::Updater(message)); } - -// Prompt a dialog asking if the user want to install the new version -// Maybe we should add an option to customize it in future versions. -async fn prompt_for_install( - update: &self::core::Update, - app_name: &str, - body: &str, - pubkey: String, -) -> Result<()> { - let windows = update.app.windows(); - let parent_window = windows.values().next(); - - // todo(lemarier): We should review this and make sure we have - // something more conventional. - let should_install = ask( - parent_window, - format!(r#"A new version of {app_name} is available! "#), - format!( - r#"{app_name} {} is now available -- you have {}. - -Would you like to install it now? - -Release Notes: -{body}"#, - update.version, update.current_version - ), - ); - - if should_install { - // Launch updater download process - // macOS we display the `Ready to restart dialog` asking to restart - // Windows is closing the current App and launch the downloaded MSI when ready (the process stop here) - // Linux we replace the AppImage by launching a new install, it start a new AppImage instance, so we're closing the previous. (the process stop here) - update - .download_and_install(pubkey.clone(), |_, _| (), || ()) - .await?; - - // Ask user if we need to restart the application - let should_exit = ask( - parent_window, - "Ready to Restart", - "The installation was successful, do you want to restart the application now?", - ); - if should_exit { - update.app.restart(); - } - } - - Ok(()) -} diff --git a/core/tests/app-updater/tauri.conf.json b/core/tests/app-updater/tauri.conf.json index 9af34d677d4..d004dd76421 100644 --- a/core/tests/app-updater/tauri.conf.json +++ b/core/tests/app-updater/tauri.conf.json @@ -28,12 +28,13 @@ }, "updater": { "active": true, - "dialog": false, "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK", - "endpoints": ["http://localhost:3007"], + "endpoints": [ + "http://localhost:3007" + ], "windows": { "installMode": "quiet" } } } -} +} \ No newline at end of file diff --git a/examples/api/dist/assets/index.css b/examples/api/dist/assets/index.css index 3031ad650a4..1925e615159 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-bell-dot{--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 fill-rule='evenodd' d='M12.994 7.875A4.008 4.008 0 0 1 12 8h-.01v.217c0 .909.143 1.818.442 2.691l.371 1.113h-9.63v-.012l.37-1.113a8.633 8.633 0 0 0 .443-2.691V6.004c0-.563.12-1.113.347-1.616c.227-.514.55-.969.969-1.34c.419-.382.91-.67 1.436-.837c.538-.18 1.1-.24 1.65-.18l.12.018a4 4 0 0 1 .673-.887a5.15 5.15 0 0 0-.697-.135c-.694-.072-1.4 0-2.07.227c-.67.215-1.28.574-1.794 1.053a4.923 4.923 0 0 0-1.208 1.675a5.067 5.067 0 0 0-.431 2.022v2.2a7.61 7.61 0 0 1-.383 2.37L2 12.343l.479.658h3.505c0 .526.215 1.04.586 1.412c.37.37.885.586 1.412.586c.526 0 1.04-.215 1.411-.586s.587-.886.587-1.412h3.505l.478-.658l-.586-1.77a7.63 7.63 0 0 1-.383-2.381v-.318ZM7.982 14.02a.997.997 0 0 0 .706-.3a.939.939 0 0 0 .287-.705H6.977c0 .263.107.514.299.706a.999.999 0 0 0 .706.299Z' clip-rule='evenodd'/%3E%3Cpath d='M12 7a3 3 0 1 0 0-6a3 3 0 0 0 0 6Z'/%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-chrome-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='m7.116 8l-4.558 4.558l.884.884L8 8.884l4.558 4.558l.884-.884L8.884 8l4.558-4.558l-.884-.884L8 7.116L3.442 2.558l-.884.884L7.116 8z' 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-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-clippy{--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='M7 13.992H4v-9h8v2h1v-2.5l-.5-.5H11v-1h-1a2 2 0 0 0-4 0H4.94v1H3.5l-.5.5v10l.5.5H7v-1zm0-11.2a1 1 0 0 1 .8-.8a1 1 0 0 1 .58.06a.94.94 0 0 1 .45.36a1 1 0 1 1-1.75.94a1 1 0 0 1-.08-.56zm7.08 9.46L13 13.342v-5.35h-1v5.34l-1.08-1.08l-.71.71l1.94 1.93h.71l1.93-1.93l-.71-.71zm-5.92-4.16h.71l1.93 1.93l-.71.71l-1.08-1.08v5.34h-1v-5.35l-1.08 1.09l-.71-.71l1.94-1.93z' 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-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-multiple-windows{--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='m6 1.5l.5-.5h8l.5.5v7l-.5.5H12V8h2V4H7v1H6V1.5zM7 2v1h7V2H7zM1.5 7l-.5.5v7l.5.5h8l.5-.5v-7L9.5 7h-8zM2 9V8h7v1H2zm0 1h7v4H2v-4z' 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-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-record-keys{--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='M14 3H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zm0 8H3V4h11v7zm-3-6h-1v1h1V5zm-1 2H9v1h1V7zm2-2h1v1h-1V5zm1 4h-1v1h1V9zM6 9h5v1H6V9zm7-2h-2v1h2V7zM8 5h1v1H8V5zm0 2H7v1h1V7zM4 9h1v1H4V9zm0-4h1v1H4V5zm3 0H6v1h1V5zM4 7h2v1H4V7z' 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-globe-hemisphere-west{--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='M221.6 173.3A102.9 102.9 0 0 0 232 128a104.2 104.2 0 0 0-77.2-100.5h-.5A103.8 103.8 0 0 0 60.4 49l-1.3 1.2A103.9 103.9 0 0 0 128 232h2.4a104.3 104.3 0 0 0 90.6-57.4ZM216 128a89.3 89.3 0 0 1-5.5 30.7l-46.4-28.5a16.6 16.6 0 0 0-6.3-2.3l-22.8-3a16.1 16.1 0 0 0-15.3 6.8h-8.6l-3.8-7.9a15.9 15.9 0 0 0-11-8.7l-6.6-1.4l4.6-10.8h21.4a16.1 16.1 0 0 0 7.7-2l12.2-6.8a16.1 16.1 0 0 0 3-2.1l26.9-24.4a15.7 15.7 0 0 0 4.5-16.9a88 88 0 0 1 46 77.3Zm-68.8-85.9l7.6 13.7l-26.9 24.3l-12.2 6.8H94.3a15.9 15.9 0 0 0-14.7 9.8l-5.3 12.4l-10.9-29.2l8.1-19.3a88 88 0 0 1 75.7-18.5ZM40 128a87.1 87.1 0 0 1 9.5-39.7l10.4 27.9a16.1 16.1 0 0 0 11.6 10l5.5 1.2h.1l15.8 3.4l3.8 7.9a16.3 16.3 0 0 0 14.4 9h1.2l-7.7 17.2a15.9 15.9 0 0 0 2.8 17.4l18.8 20.4l-2.5 13.2A88.1 88.1 0 0 1 40 128Zm100.1 87.2l1.8-9.5a16 16 0 0 0-3.9-13.9l-18.8-20.3l12.7-28.7l1-2.1l22.8 3.1l47.8 29.4a88.5 88.5 0 0 1-63.4 42Z'/%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,.hidden{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-auto{height:auto;}.h-screen{height:100vh;}.w-100\%{width:100%;}.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));}.dark .dark\:hover\:bg-red-700:hover,.hover\:bg-red-700:hover{--un-bg-opacity:1;background-color:rgba(185,28,28,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));}.active\:bg-red-700\/90:active,.dark .dark\:active\:bg-red-700\/90:active{background-color:rgba(185,28,28,0.9);}.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,.hover\:text-darkPrimaryText:hover,.text-darkPrimaryText,.active\:text-darkPrimaryText:active{--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));}.filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}.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))}}ul.svelte-gbh3pt{list-style:none;margin:0;padding:0;padding-left:var(--nodePaddingLeft, 1rem);border-left:var(--nodeBorderLeft, 1px dotted #9ca3af);color:var(--nodeColor, #374151)}.hidden.svelte-gbh3pt{display:none}.bracket.svelte-gbh3pt{cursor:pointer}.bracket.svelte-gbh3pt:hover{background:var(--bracketHoverBackground, #d1d5db)}.comma.svelte-gbh3pt{color:var(--nodeColor, #374151)}.val.svelte-gbh3pt{color:var(--leafDefaultColor, #9ca3af)}.val.string.svelte-gbh3pt{color:var(--leafStringColor, #059669)}.val.number.svelte-gbh3pt{color:var(--leafNumberColor, #d97706)}.val.boolean.svelte-gbh3pt{color:var(--leafBooleanColor, #2563eb)}.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-bell-dot{--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 fill-rule='evenodd' d='M12.994 7.875A4.008 4.008 0 0 1 12 8h-.01v.217c0 .909.143 1.818.442 2.691l.371 1.113h-9.63v-.012l.37-1.113a8.633 8.633 0 0 0 .443-2.691V6.004c0-.563.12-1.113.347-1.616c.227-.514.55-.969.969-1.34c.419-.382.91-.67 1.436-.837c.538-.18 1.1-.24 1.65-.18l.12.018a4 4 0 0 1 .673-.887a5.15 5.15 0 0 0-.697-.135c-.694-.072-1.4 0-2.07.227c-.67.215-1.28.574-1.794 1.053a4.923 4.923 0 0 0-1.208 1.675a5.067 5.067 0 0 0-.431 2.022v2.2a7.61 7.61 0 0 1-.383 2.37L2 12.343l.479.658h3.505c0 .526.215 1.04.586 1.412c.37.37.885.586 1.412.586c.526 0 1.04-.215 1.411-.586s.587-.886.587-1.412h3.505l.478-.658l-.586-1.77a7.63 7.63 0 0 1-.383-2.381v-.318ZM7.982 14.02a.997.997 0 0 0 .706-.3a.939.939 0 0 0 .287-.705H6.977c0 .263.107.514.299.706a.999.999 0 0 0 .706.299Z' clip-rule='evenodd'/%3E%3Cpath d='M12 7a3 3 0 1 0 0-6a3 3 0 0 0 0 6Z'/%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-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-clippy{--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='M7 13.992H4v-9h8v2h1v-2.5l-.5-.5H11v-1h-1a2 2 0 0 0-4 0H4.94v1H3.5l-.5.5v10l.5.5H7v-1zm0-11.2a1 1 0 0 1 .8-.8a1 1 0 0 1 .58.06a.94.94 0 0 1 .45.36a1 1 0 1 1-1.75.94a1 1 0 0 1-.08-.56zm7.08 9.46L13 13.342v-5.35h-1v5.34l-1.08-1.08l-.71.71l1.94 1.93h.71l1.93-1.93l-.71-.71zm-5.92-4.16h.71l1.93 1.93l-.71.71l-1.08-1.08v5.34h-1v-5.35l-1.08 1.09l-.71-.71l1.94-1.93z' 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-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-record-keys{--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='M14 3H3a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1zm0 8H3V4h11v7zm-3-6h-1v1h1V5zm-1 2H9v1h1V7zm2-2h1v1h-1V5zm1 4h-1v1h1V9zM6 9h5v1H6V9zm7-2h-2v1h2V7zM8 5h1v1H8V5zm0 2H7v1h1V7zM4 9h1v1H4V9zm0-4h1v1H4V5zm3 0H6v1h1V5zM4 7h2v1H4V7z' 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-globe-hemisphere-west{--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='M221.6 173.3A102.9 102.9 0 0 0 232 128a104.2 104.2 0 0 0-77.2-100.5h-.5A103.8 103.8 0 0 0 60.4 49l-1.3 1.2A103.9 103.9 0 0 0 128 232h2.4a104.3 104.3 0 0 0 90.6-57.4ZM216 128a89.3 89.3 0 0 1-5.5 30.7l-46.4-28.5a16.6 16.6 0 0 0-6.3-2.3l-22.8-3a16.1 16.1 0 0 0-15.3 6.8h-8.6l-3.8-7.9a15.9 15.9 0 0 0-11-8.7l-6.6-1.4l4.6-10.8h21.4a16.1 16.1 0 0 0 7.7-2l12.2-6.8a16.1 16.1 0 0 0 3-2.1l26.9-24.4a15.7 15.7 0 0 0 4.5-16.9a88 88 0 0 1 46 77.3Zm-68.8-85.9l7.6 13.7l-26.9 24.3l-12.2 6.8H94.3a15.9 15.9 0 0 0-14.7 9.8l-5.3 12.4l-10.9-29.2l8.1-19.3a88 88 0 0 1 75.7-18.5ZM40 128a87.1 87.1 0 0 1 9.5-39.7l10.4 27.9a16.1 16.1 0 0 0 11.6 10l5.5 1.2h.1l15.8 3.4l3.8 7.9a16.3 16.3 0 0 0 14.4 9h1.2l-7.7 17.2a15.9 15.9 0 0 0 2.8 17.4l18.8 20.4l-2.5 13.2A88.1 88.1 0 0 1 40 128Zm100.1 87.2l1.8-9.5a16 16 0 0 0-3.9-13.9l-18.8-20.3l12.7-28.7l1-2.1l22.8 3.1l47.8 29.4a88.5 88.5 0 0 1-63.4 42Z'/%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,.hidden{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-auto{height:auto;}.h-screen{height:100vh;}.w-100\%{width:100%;}.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))}}ul.svelte-gbh3pt{list-style:none;margin:0;padding:0;padding-left:var(--nodePaddingLeft, 1rem);border-left:var(--nodeBorderLeft, 1px dotted #9ca3af);color:var(--nodeColor, #374151)}.hidden.svelte-gbh3pt{display:none}.bracket.svelte-gbh3pt{cursor:pointer}.bracket.svelte-gbh3pt:hover{background:var(--bracketHoverBackground, #d1d5db)}.comma.svelte-gbh3pt{color:var(--nodeColor, #374151)}.val.svelte-gbh3pt{color:var(--leafDefaultColor, #9ca3af)}.val.string.svelte-gbh3pt{color:var(--leafStringColor, #059669)}.val.number.svelte-gbh3pt{color:var(--leafNumberColor, #d97706)}.val.boolean.svelte-gbh3pt{color:var(--leafBooleanColor, #2563eb)}.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 9b593ef5125..67d356fe1bd 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,46 +1,46 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerpolicy&&(o.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?o.credentials="include":l.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function V(){}function hs(e){return e()}function ql(){return Object.create(null)}function ue(e){e.forEach(hs)}function Ks(e){return typeof e=="function"}function ge(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Bn;function Qs(e,t){return Bn||(Bn=document.createElement("a")),Bn.href=t,e===Bn.href}function Zs(e){return Object.keys(e).length===0}function xs(e,...t){if(e==null)return V;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function _s(e,t,n){e.$$.on_destroy.push(xs(t,n))}function s(e,t){e.appendChild(t)}function m(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode.removeChild(e)}function zt(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function Wi(e){return function(t){return t.preventDefault(),e.call(this,t)}}function r(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e){return e===""?null:+e}function to(e){return Array.from(e.childNodes)}function K(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t){e.value=t==null?"":t}function Wt(e,t){for(let n=0;n{$n.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Qn(e){e&&e.c()}function Bt(e,t,n,i){const{fragment:l,on_mount:o,on_destroy:u,after_update:d}=e.$$;l&&l.m(t,n),i||Pt(()=>{const c=o.map(hs).filter(Ks);u?u.push(...c):ue(c),e.$$.on_mount=[]}),d.forEach(Pt)}function Jt(e,t){const n=e.$$;n.fragment!==null&&(ue(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function oo(e,t){e.$$.dirty[0]===-1&&(qt.push(e),lo(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const _=w.length?w[0]:g;return f.ctx&&l(f.ctx[k],f.ctx[k]=_)&&(!f.skip_bound&&f.bound[k]&&f.bound[k](_),b&&oo(e,k)),g}):[],f.update(),b=!0,ue(f.before_update),f.fragment=i?i(f.ctx):!1,t.target){if(t.hydrate){const k=to(t.target);f.fragment&&f.fragment.l(k),k.forEach(p)}else f.fragment&&f.fragment.c();t.intro&&Se(e.$$.fragment),Bt(e,t.target,t.anchor,t.customElement),gs()}Gt(c)}class Me{$destroy(){Jt(this,1),this.$destroy=V}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(t){this.$$set&&!Zs(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const Et=[];function ys(e,t=V){let n;const i=new Set;function l(d){if(ge(e,d)&&(e=d,n)){const c=!Et.length;for(const f of i)f[1](),Et.push(f,e);if(c){for(let f=0;f{i.delete(f),i.size===0&&(n(),n=null)}}return{set:l,update:o,subscribe:u}}var ao=Object.defineProperty,We=(e,t)=>{for(var n in t)ao(e,n,{get:t[n],enumerable:!0})},ro={};We(ro,{convertFileSrc:()=>co,invoke:()=>Xt,transformCallback:()=>mt});function uo(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function mt(e,t=!1){let n=uo(),i=`_${n}`;return Object.defineProperty(window,i,{value:l=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(l)),writable:!1,configurable:!0}),n}async function Xt(e,t={}){return new Promise((n,i)=>{let l=mt(u=>{n(u),Reflect.deleteProperty(window,`_${o}`)},!0),o=mt(u=>{i(u),Reflect.deleteProperty(window,`_${l}`)},!0);window.__TAURI_IPC__({cmd:e,callback:l,error:o,...t})})}function co(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function E(e){return Xt("tauri",e)}var fo={};We(fo,{Child:()=>vs,Command:()=>Zn,EventEmitter:()=>Kn,open:()=>Ii});async function po(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),E({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:mt(e)}})}var Kn=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)}},vs=class{constructor(e){this.pid=e}async write(e){return E({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return E({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},Zn=class extends Kn{constructor(e,t=[],n){super(),this.stdout=new Kn,this.stderr=new Kn,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static create(e,t=[],n){return new Zn(e,t,n)}static sidecar(e,t=[],n){let i=new Zn(e,t,n);return i.options.sidecar=!0,i}async spawn(){return po(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 vs(e))}async execute(){return new Promise((e,t)=>{this.on("error",t);let n=[],i=[];this.stdout.on("data",l=>{n.push(l)}),this.stderr.on("data",l=>{i.push(l)}),this.on("close",l=>{e({code:l.code,signal:l.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 Ii(e,t){return E({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var mo={};We(mo,{TauriEvent:()=>Ts,emit:()=>li,listen:()=>Yt,once:()=>Cs});async function ws(e,t){return E({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function ks(e,t,n){await E({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Ni(e,t,n){return E({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:mt(n)}}).then(i=>async()=>ws(e,i))}async function Ms(e,t,n){return Ni(e,t,i=>{n(i),ws(e,i.id).catch(()=>{})})}var Ts=(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))(Ts||{});async function Yt(e,t){return Ni(e,null,t)}async function Cs(e,t){return Ms(e,null,t)}async function li(e,t){return ks(e,void 0,t)}var ho={};We(ho,{CloseRequestedEvent:()=>zs,LogicalPosition:()=>Ss,LogicalSize:()=>xn,PhysicalPosition:()=>nt,PhysicalSize:()=>pt,UserAttentionType:()=>Hi,WebviewWindow:()=>ht,WebviewWindowHandle:()=>As,WindowManager:()=>Es,appWindow:()=>Fe,availableMonitors:()=>go,currentMonitor:()=>_o,getAll:()=>Ls,getCurrent:()=>Ft,primaryMonitor:()=>bo});var xn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},pt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new xn(this.width/e,this.height/e)}},Ss=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},nt=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Ss(this.x/e,this.y/e)}},Hi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(Hi||{});function Ft(){return new ht(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Ls(){return window.__TAURI_METADATA__.__windows.map(e=>new ht(e.label,{skip:!0}))}var Gl=["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)}):Ni(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)}):Ms(e,this.label,t)}async emit(e,t){if(Gl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return ks(e,this.label,t)}_handleTauriEvent(e,t){return Gl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Es=class extends As{async scaleFactor(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new nt(e,t))}async outerPosition(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new nt(e,t))}async innerSize(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new pt(e,t))}async outerSize(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new pt(e,t))}async isFullscreen(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return E({__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"}),E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return E({__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 E({__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 E({__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 E({__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 E({__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 E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return E({__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 E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return E({__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 E({__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 E({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return E({__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 zs(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",l=>{e({...l,payload:{type:"drop",paths:l.payload}})}),n=await this.listen("tauri://file-drop-hover",l=>{e({...l,payload:{type:"hover",paths:l.payload}})}),i=await this.listen("tauri://file-drop-cancelled",l=>{e({...l,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},zs=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}},ht=class extends Es{constructor(e,t={}){super(e),t!=null&&t.skip||E({__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 Ls().some(t=>t.label===e)?new ht(e,{skip:!0}):null}},Fe;"__TAURI_METADATA__"in window?Fe=new ht(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.`),Fe=new ht("main",{skip:!0}));function Ui(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new nt(e.position.x,e.position.y),size:new pt(e.size.width,e.size.height)}}async function _o(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Ui)}async function bo(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Ui)}async function go(){return E({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(Ui))}function yo(){return navigator.appVersion.includes("Win")}var vo={};We(vo,{EOL:()=>wo,arch:()=>To,platform:()=>Ws,tempdir:()=>Co,type:()=>Mo,version:()=>ko});var wo=yo()?`\r +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const u of o.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerpolicy&&(o.referrerPolicy=l.referrerpolicy),l.crossorigin==="use-credentials"?o.credentials="include":l.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function B(){}function ms(e){return e()}function jl(){return Object.create(null)}function de(e){e.forEach(ms)}function Xs(e){return typeof e=="function"}function ve(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Vn;function Ys(e,t){return Vn||(Vn=document.createElement("a")),Vn.href=t,e===Vn.href}function Ks(e){return Object.keys(e).length===0}function Qs(e,...t){if(e==null)return B;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function hs(e,t,n){e.$$.on_destroy.push(Qs(t,n))}function s(e,t){e.appendChild(t)}function h(e,t,n){e.insertBefore(t,n||null)}function p(e){e.parentNode.removeChild(e)}function Et(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function Wi(e){return function(t){return t.preventDefault(),e.call(this,t)}}function r(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e){return e===""?null:+e}function xs(e){return Array.from(e.childNodes)}function Q(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function q(e,t){e.value=t==null?"":t}function Wt(e,t){for(let n=0;n{Xn.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Qn(e){e&&e.c()}function Vt(e,t,n,i){const{fragment:l,on_mount:o,on_destroy:u,after_update:d}=e.$$;l&&l.m(t,n),i||Pt(()=>{const c=o.map(ms).filter(Xs);u?u.push(...c):de(c),e.$$.on_mount=[]}),d.forEach(Pt)}function Bt(e,t){const n=e.$$;n.fragment!==null&&(de(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function lo(e,t){e.$$.dirty[0]===-1&&(qt.push(e),no(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const v=w.length?w[0]:_;return f.ctx&&l(f.ctx[k],f.ctx[k]=v)&&(!f.skip_bound&&f.bound[k]&&f.bound[k](v),g&&lo(e,k)),_}):[],f.update(),g=!0,de(f.before_update),f.fragment=i?i(f.ctx):!1,t.target){if(t.hydrate){const k=xs(t.target);f.fragment&&f.fragment.l(k),k.forEach(p)}else f.fragment&&f.fragment.c();t.intro&&Ce(e.$$.fragment),Vt(e,t.target,t.anchor,t.customElement),bs()}Ft(c)}class Me{$destroy(){Bt(this,1),this.$destroy=B}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const l=i.indexOf(n);l!==-1&&i.splice(l,1)}}$set(t){this.$$set&&!Ks(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const zt=[];function gs(e,t=B){let n;const i=new Set;function l(d){if(ve(e,d)&&(e=d,n)){const c=!zt.length;for(const f of i)f[1](),zt.push(f,e);if(c){for(let f=0;f{i.delete(f),i.size===0&&(n(),n=null)}}return{set:l,update:o,subscribe:u}}var so=Object.defineProperty,We=(e,t)=>{for(var n in t)so(e,n,{get:t[n],enumerable:!0})},oo={};We(oo,{convertFileSrc:()=>ro,invoke:()=>$t,transformCallback:()=>mt});function ao(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function mt(e,t=!1){let n=ao(),i=`_${n}`;return Object.defineProperty(window,i,{value:l=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(l)),writable:!1,configurable:!0}),n}async function $t(e,t={}){return new Promise((n,i)=>{let l=mt(u=>{n(u),Reflect.deleteProperty(window,`_${o}`)},!0),o=mt(u=>{i(u),Reflect.deleteProperty(window,`_${l}`)},!0);window.__TAURI_IPC__({cmd:e,callback:l,error:o,...t})})}function ro(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function S(e){return $t("tauri",e)}var uo={};We(uo,{Child:()=>ys,Command:()=>Zn,EventEmitter:()=>Yn,open:()=>Ii});async function co(e,t,n=[],i){return typeof n=="object"&&Object.freeze(n),S({__tauriModule:"Shell",message:{cmd:"execute",program:t,args:n,options:i,onEventFn:mt(e)}})}var Yn=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)}},ys=class{constructor(e){this.pid=e}async write(e){return S({__tauriModule:"Shell",message:{cmd:"stdinWrite",pid:this.pid,buffer:typeof e=="string"?e:Array.from(e)}})}async kill(){return S({__tauriModule:"Shell",message:{cmd:"killChild",pid:this.pid}})}},Zn=class extends Yn{constructor(e,t=[],n){super(),this.stdout=new Yn,this.stderr=new Yn,this.program=e,this.args=typeof t=="string"?[t]:t,this.options=n!=null?n:{}}static create(e,t=[],n){return new Zn(e,t,n)}static sidecar(e,t=[],n){let i=new Zn(e,t,n);return i.options.sidecar=!0,i}async spawn(){return co(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 ys(e))}async execute(){return new Promise((e,t)=>{this.on("error",t);let n=[],i=[];this.stdout.on("data",l=>{n.push(l)}),this.stderr.on("data",l=>{i.push(l)}),this.on("close",l=>{e({code:l.code,signal:l.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 Ii(e,t){return S({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})}var fo={};We(fo,{TauriEvent:()=>Ms,emit:()=>li,listen:()=>Jt,once:()=>Ts});async function vs(e,t){return S({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function ws(e,t,n){await S({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function Ni(e,t,n){return S({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:mt(n)}}).then(i=>async()=>vs(e,i))}async function ks(e,t,n){return Ni(e,t,i=>{n(i),vs(e,i.id).catch(()=>{})})}var Ms=(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))(Ms||{});async function Jt(e,t){return Ni(e,null,t)}async function Ts(e,t){return ks(e,null,t)}async function li(e,t){return ws(e,void 0,t)}var po={};We(po,{CloseRequestedEvent:()=>zs,LogicalPosition:()=>Cs,LogicalSize:()=>xn,PhysicalPosition:()=>tt,PhysicalSize:()=>ft,UserAttentionType:()=>Hi,WebviewWindow:()=>ht,WebviewWindowHandle:()=>Ls,WindowManager:()=>As,appWindow:()=>pt,availableMonitors:()=>_o,currentMonitor:()=>mo,getAll:()=>Ss,getCurrent:()=>Kn,primaryMonitor:()=>ho});var xn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},ft=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new xn(this.width/e,this.height/e)}},Cs=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},tt=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Cs(this.x/e,this.y/e)}},Hi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(Hi||{});function Kn(){return new ht(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Ss(){return window.__TAURI_METADATA__.__windows.map(e=>new ht(e.label,{skip:!0}))}var Fl=["tauri://created","tauri://error"],Ls=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)}):Ni(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)}):ks(e,this.label,t)}async emit(e,t){if(Fl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return ws(e,this.label,t)}_handleTauriEvent(e,t){return Fl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},As=class extends Ls{async scaleFactor(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new tt(e,t))}async outerPosition(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new tt(e,t))}async innerSize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new ft(e,t))}async outerSize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new ft(e,t))}async isFullscreen(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return S({__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"}),S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return S({__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 S({__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 S({__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 S({__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 S({__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 S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return S({__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 S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return S({__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 S({__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 S({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return S({__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 zs(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",l=>{e({...l,payload:{type:"drop",paths:l.payload}})}),n=await this.listen("tauri://file-drop-hover",l=>{e({...l,payload:{type:"hover",paths:l.payload}})}),i=await this.listen("tauri://file-drop-cancelled",l=>{e({...l,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},zs=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}},ht=class extends As{constructor(e,t={}){super(e),t!=null&&t.skip||S({__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 ht(e,{skip:!0}):null}},pt;"__TAURI_METADATA__"in window?pt=new ht(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.`),pt=new ht("main",{skip:!0}));function Ui(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new tt(e.position.x,e.position.y),size:new ft(e.size.width,e.size.height)}}async function mo(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(Ui)}async function ho(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(Ui)}async function _o(){return S({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(Ui))}function bo(){return navigator.appVersion.includes("Win")}var go={};We(go,{EOL:()=>yo,arch:()=>ko,platform:()=>Es,tempdir:()=>Mo,type:()=>wo,version:()=>vo});var yo=bo()?`\r `:` -`;async function Ws(){return E({__tauriModule:"Os",message:{cmd:"platform"}})}async function ko(){return E({__tauriModule:"Os",message:{cmd:"version"}})}async function Mo(){return E({__tauriModule:"Os",message:{cmd:"osType"}})}async function To(){return E({__tauriModule:"Os",message:{cmd:"arch"}})}async function Co(){return E({__tauriModule:"Os",message:{cmd:"tempdir"}})}var So={};We(So,{getName:()=>Os,getTauriVersion:()=>Ds,getVersion:()=>Ps,hide:()=>Is,show:()=>Rs});async function Ps(){return E({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function Os(){return E({__tauriModule:"App",message:{cmd:"getAppName"}})}async function Ds(){return E({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function Rs(){return E({__tauriModule:"App",message:{cmd:"show"}})}async function Is(){return E({__tauriModule:"App",message:{cmd:"hide"}})}var Lo={};We(Lo,{exit:()=>Ns,relaunch:()=>ji});async function Ns(e=0){return E({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function ji(){return E({__tauriModule:"Process",message:{cmd:"relaunch"}})}function Ao(e){let t,n,i,l,o,u,d,c,f,b,k,g,w,_,v,S,D,U,O,F,W,C,T,H,M,I;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 Es(){return S({__tauriModule:"Os",message:{cmd:"platform"}})}async function vo(){return S({__tauriModule:"Os",message:{cmd:"version"}})}async function wo(){return S({__tauriModule:"Os",message:{cmd:"osType"}})}async function ko(){return S({__tauriModule:"Os",message:{cmd:"arch"}})}async function Mo(){return S({__tauriModule:"Os",message:{cmd:"tempdir"}})}var To={};We(To,{getName:()=>Ps,getTauriVersion:()=>Os,getVersion:()=>Ws,hide:()=>Rs,show:()=>Ds});async function Ws(){return S({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function Ps(){return S({__tauriModule:"App",message:{cmd:"getAppName"}})}async function Os(){return S({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function Ds(){return S({__tauriModule:"App",message:{cmd:"show"}})}async function Rs(){return S({__tauriModule:"App",message:{cmd:"hide"}})}var Co={};We(Co,{exit:()=>Is,relaunch:()=>ji});async function Is(e=0){return S({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function ji(){return S({__tauriModule:"Process",message:{cmd:"relaunch"}})}function So(e){let t,n,i,l,o,u,d,c,f,g,k,_,w,v,y,C,H,U,z,j,P,O,M,R,W,G;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=h(),i=a("br"),l=h(),o=a("br"),u=h(),d=a("pre"),c=A("App name: "),f=a("code"),b=A(e[2]),k=A(` -App version: `),g=a("code"),w=A(e[0]),_=A(` -Tauri version: `),v=a("code"),S=A(e[1]),D=A(` -`),U=h(),O=a("br"),F=h(),W=a("div"),C=a("button"),C.textContent="Close application",T=h(),H=a("button"),H.textContent="Relaunch application",r(C,"class","btn"),r(H,"class","btn"),r(W,"class","flex flex-wrap gap-1 shadow-")},m(j,J){m(j,t,J),m(j,n,J),m(j,i,J),m(j,l,J),m(j,o,J),m(j,u,J),m(j,d,J),s(d,c),s(d,f),s(f,b),s(d,k),s(d,g),s(g,w),s(d,_),s(d,v),s(v,S),s(d,D),m(j,U,J),m(j,O,J),m(j,F,J),m(j,W,J),s(W,C),s(W,T),s(W,H),M||(I=[L(C,"click",e[3]),L(H,"click",e[4])],M=!0)},p(j,[J]){J&4&&K(b,j[2]),J&1&&K(w,j[0]),J&2&&K(S,j[1])},i:V,o:V,d(j){j&&p(t),j&&p(n),j&&p(i),j&&p(l),j&&p(o),j&&p(u),j&&p(d),j&&p(U),j&&p(O),j&&p(F),j&&p(W),M=!1,ue(I)}}}function Eo(e,t,n){let i="0.0.0",l="0.0.0",o="Unknown";Os().then(c=>{n(2,o=c)}),Ps().then(c=>{n(0,i=c)}),Ds().then(c=>{n(1,l=c)});async function u(){await Ns()}async function d(){await ji()}return[i,l,o,u,d]}class zo extends Me{constructor(t){super(),ke(this,t,Eo,Ao,ge,{})}}function Wo(e){let t,n,i,l,o,u,d,c,f,b,k,g,w;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments: + tests.`,n=m(),i=a("br"),l=m(),o=a("br"),u=m(),d=a("pre"),c=T("App name: "),f=a("code"),g=T(e[2]),k=T(` +App version: `),_=a("code"),w=T(e[0]),v=T(` +Tauri version: `),y=a("code"),C=T(e[1]),H=T(` +`),U=m(),z=a("br"),j=m(),P=a("div"),O=a("button"),O.textContent="Close application",M=m(),R=a("button"),R.textContent="Relaunch application",r(O,"class","btn"),r(R,"class","btn"),r(P,"class","flex flex-wrap gap-1 shadow-")},m(N,J){h(N,t,J),h(N,n,J),h(N,i,J),h(N,l,J),h(N,o,J),h(N,u,J),h(N,d,J),s(d,c),s(d,f),s(f,g),s(d,k),s(d,_),s(_,w),s(d,v),s(d,y),s(y,C),s(d,H),h(N,U,J),h(N,z,J),h(N,j,J),h(N,P,J),s(P,O),s(P,M),s(P,R),W||(G=[A(O,"click",e[3]),A(R,"click",e[4])],W=!0)},p(N,[J]){J&4&&Q(g,N[2]),J&1&&Q(w,N[0]),J&2&&Q(C,N[1])},i:B,o:B,d(N){N&&p(t),N&&p(n),N&&p(i),N&&p(l),N&&p(o),N&&p(u),N&&p(d),N&&p(U),N&&p(z),N&&p(j),N&&p(P),W=!1,de(G)}}}function Lo(e,t,n){let i="0.0.0",l="0.0.0",o="Unknown";Ps().then(c=>{n(2,o=c)}),Ws().then(c=>{n(0,i=c)}),Os().then(c=>{n(1,l=c)});async function u(){await Is()}async function d(){await ji()}return[i,l,o,u,d]}class Ao extends Me{constructor(t){super(),ke(this,t,Lo,So,ve,{})}}function zo(e){let t,n,i,l,o,u,d,c,f,g,k,_,w;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=h(),i=a("br"),l=h(),o=a("div"),o.textContent="Note that the arguments are only parsed, not implemented.",u=h(),d=a("br"),c=h(),f=a("br"),b=h(),k=a("button"),k.textContent="Get matches",r(o,"class","note"),r(k,"class","btn"),r(k,"id","cli-matches")},m(_,v){m(_,t,v),m(_,n,v),m(_,i,v),m(_,l,v),m(_,o,v),m(_,u,v),m(_,d,v),m(_,c,v),m(_,f,v),m(_,b,v),m(_,k,v),g||(w=L(k,"click",e[0]),g=!0)},p:V,i:V,o:V,d(_){_&&p(t),_&&p(n),_&&p(i),_&&p(l),_&&p(o),_&&p(u),_&&p(d),_&&p(c),_&&p(f),_&&p(b),_&&p(k),g=!1,w()}}}function Po(e,t,n){let{onMessage:i}=t;function l(){Xt("plugin:cli|cli_matches").then(i).catch(i)}return e.$$set=o=>{"onMessage"in o&&n(1,i=o.onMessage)},[l,i]}class Oo extends Me{constructor(t){super(),ke(this,t,Po,Wo,ge,{onMessage:1})}}function Do(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=h(),l=a("button"),l.textContent="Call Request (async) API",o=h(),u=a("button"),u.textContent="Send event to Rust",r(n,"class","btn"),r(n,"id","log"),r(l,"class","btn"),r(l,"id","request"),r(u,"class","btn"),r(u,"id","event")},m(f,b){m(f,t,b),s(t,n),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"click",e[0]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p:V,i:V,o:V,d(f){f&&p(t),d=!1,ue(c)}}}function Ro(e,t,n){let{onMessage:i}=t,l;dt(async()=>{l=await Yt("rust-event",i)}),Ri(()=>{l&&l()});function o(){Xt("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){Xt("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function d(){li("js-event","this is the payload string")}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,u,d,i]}class Io extends Me{constructor(t){super(),ke(this,t,Ro,Do,ge,{onMessage:3})}}var No={};We(No,{ask:()=>Us,confirm:()=>Uo,message:()=>Ho,open:()=>qi,save:()=>Hs});async function qi(e={}){return typeof e=="object"&&Object.freeze(e),E({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function Hs(e={}){return typeof e=="object"&&Object.freeze(e),E({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function Ho(e,t){var i,l;let n=typeof t=="string"?{title:t}:t;return E({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabel:(l=n==null?void 0:n.okLabel)==null?void 0:l.toString()}})}async function Us(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return E({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Yes",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"No"]}})}async function Uo(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return E({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Ok",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"Cancel"]}})}function jo(e){let t,n,i,l,o,u,d,c,f,b,k,g,w,_,v,S,D,U,O,F,W,C,T,H;return{c(){t=a("div"),n=a("input"),i=h(),l=a("input"),o=h(),u=a("br"),d=h(),c=a("div"),f=a("input"),b=h(),k=a("label"),k.textContent="Multiple",g=h(),w=a("div"),_=a("input"),v=h(),S=a("label"),S.textContent="Directory",D=h(),U=a("br"),O=h(),F=a("button"),F.textContent="Open dialog",W=h(),C=a("button"),C.textContent="Open save dialog",r(n,"class","input"),r(n,"id","dialog-default-path"),r(n,"placeholder","Default path"),r(l,"class","input"),r(l,"id","dialog-filter"),r(l,"placeholder","Extensions filter, comma-separated"),r(t,"class","flex gap-2 children:grow"),r(f,"type","checkbox"),r(f,"id","dialog-multiple"),r(k,"for","dialog-multiple"),r(_,"type","checkbox"),r(_,"id","dialog-directory"),r(S,"for","dialog-directory"),r(F,"class","btn"),r(F,"id","open-dialog"),r(C,"class","btn"),r(C,"id","save-dialog")},m(M,I){m(M,t,I),s(t,n),q(n,e[0]),s(t,i),s(t,l),q(l,e[1]),m(M,o,I),m(M,u,I),m(M,d,I),m(M,c,I),s(c,f),f.checked=e[2],s(c,b),s(c,k),m(M,g,I),m(M,w,I),s(w,_),_.checked=e[3],s(w,v),s(w,S),m(M,D,I),m(M,U,I),m(M,O,I),m(M,F,I),m(M,W,I),m(M,C,I),T||(H=[L(n,"input",e[7]),L(l,"input",e[8]),L(f,"change",e[9]),L(_,"change",e[10]),L(F,"click",e[4]),L(C,"click",e[5])],T=!0)},p(M,[I]){I&1&&n.value!==M[0]&&q(n,M[0]),I&2&&l.value!==M[1]&&q(l,M[1]),I&4&&(f.checked=M[2]),I&8&&(_.checked=M[3])},i:V,o:V,d(M){M&&p(t),M&&p(o),M&&p(u),M&&p(d),M&&p(c),M&&p(g),M&&p(w),M&&p(D),M&&p(U),M&&p(O),M&&p(F),M&&p(W),M&&p(C),T=!1,ue(H)}}}function qo(e,t,n){let{onMessage:i}=t,l=null,o=null,u=!1,d=!1;function c(){qi({title:"My wonderful open dialog",defaultPath:l,filters:o?[{name:"Tauri Example",extensions:o.split(",").map(_=>_.trim())}]:[],multiple:u,directory:d}).then(i).catch(i)}function f(){Hs({title:"My wonderful save dialog",defaultPath:l,filters:o?[{name:"Tauri Example",extensions:o.split(",").map(_=>_.trim())}]:[]}).then(i).catch(i)}function b(){l=this.value,n(0,l)}function k(){o=this.value,n(1,o)}function g(){u=this.checked,n(2,u)}function w(){d=this.checked,n(3,d)}return e.$$set=_=>{"onMessage"in _&&n(6,i=_.onMessage)},[l,o,u,d,c,f,i,b,k,g,w]}class Fo extends Me{constructor(t){super(),ke(this,t,qo,jo,ge,{onMessage:6})}}var Go={};We(Go,{Body:()=>it,Client:()=>qs,Response:()=>js,ResponseType:()=>Fi,fetch:()=>Vo,getClient:()=>ei});var Fi=(e=>(e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary",e))(Fi||{}),it=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},n=(i,l)=>{if(l!==null){let o;typeof l=="string"?o=l:l instanceof Uint8Array||Array.isArray(l)?o=Array.from(l):l instanceof File?o={file:l.name,mime:l.type,fileName:l.name}:typeof l.file=="string"?o={file:l.file,mime:l.mime,fileName:l.fileName}:o={file:Array.from(l.file),mime:l.mime,fileName:l.fileName},t[String(i)]=o}};if(e instanceof FormData)for(let[i,l]of e)n(i,l);else for(let[i,l]of Object.entries(e))n(i,l);return new it("Form",t)}static json(e){return new it("Json",e)}static text(e){return new it("Text",e)}static bytes(e){return new it("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},js=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},qs=class{constructor(e){this.id=e}async drop(){return E({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),E({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(n=>{let i=new js(n);if(t){try{i.data=JSON.parse(i.data)}catch(l){if(i.ok&&i.data==="")i.data={};else if(i.ok)throw Error(`Failed to parse response \`${i.data}\` as JSON: ${l}; - try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return i}return i})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,n){return this.request({method:"POST",url:e,body:t,...n})}async put(e,t,n){return this.request({method:"PUT",url:e,body:t,...n})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function ei(e){return E({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(t=>new qs(t))}var zi=null;async function Vo(e,t){var n;return zi===null&&(zi=await ei()),zi.request({url:e,method:(n=t==null?void 0:t.method)!=null?n:"GET",...t})}function Vl(e,t,n){const i=e.slice();return i[12]=t[n],i[14]=n,i}function Bl(e){let t,n,i,l,o,u,d,c,f,b,k,g,w,_,v,S,D,U=e[5],O=[];for(let T=0;TIe(O[T],1,1,()=>{O[T]=null});let W=!e[3]&&$l(),C=!e[3]&&e[8]&&Kl();return{c(){t=a("span"),n=a("span"),i=A(e[6]),l=h(),o=a("ul");for(let T=0;T{b[_]=null}),ii(),o=b[l],o?o.p(g,w):(o=b[l]=f[l](g),o.c()),Se(o,1),o.m(t,u))},i(g){d||(Se(o),d=!0)},o(g){Ie(o),d=!1},d(g){g&&p(t),c&&c.d(),b[l].d()}}}function $l(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Kl(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Xo(e){let t,n,i=e[5].length&&Bl(e);return{c(){i&&i.c(),t=ti()},m(l,o){i&&i.m(l,o),m(l,t,o),n=!0},p(l,[o]){l[5].length?i?(i.p(l,o),o&32&&Se(i,1)):(i=Bl(l),i.c(),Se(i,1),i.m(t.parentNode,t)):i&&(ni(),Ie(i,1,1,()=>{i=null}),ii())},i(l){n||(Se(i),n=!0)},o(l){Ie(i),n=!1},d(l){i&&i.d(l),l&&p(t)}}}const Yo="...";function $o(e,t,n){let{json:i}=t,{depth:l=1/0}=t,{_lvl:o=0}=t,{_last:u=!0}=t;const d=v=>v===null?"null":typeof v;let c,f,b,k,g;const w=v=>{switch(d(v)){case"string":return`"${v}"`;case"function":return"f () {...}";case"symbol":return v.toString();default:return v}},_=()=>{n(8,g=!g)};return e.$$set=v=>{"json"in v&&n(0,i=v.json),"depth"in v&&n(1,l=v.depth),"_lvl"in v&&n(2,o=v._lvl),"_last"in v&&n(3,u=v._last)},e.$$.update=()=>{e.$$.dirty&17&&(n(5,c=d(i)==="object"?Object.keys(i):[]),n(4,f=Array.isArray(i)),n(6,b=f?"[":"{"),n(7,k=f?"]":"}")),e.$$.dirty&6&&n(8,g=le[9].call(n)),r(k,"class","input h-auto w-100%"),r(k,"id","request-body"),r(k,"placeholder","Request body"),r(k,"rows","5"),r(v,"class","btn"),r(v,"id","make-request"),r(C,"class","input"),r(H,"class","input"),r(W,"class","flex gap-2 children:grow"),r(ne,"type","checkbox"),r(X,"class","btn"),r(X,"type","button")},m(z,G){m(z,t,G),s(t,n),s(n,i),s(n,l),s(n,o),s(n,u),s(n,d),Wt(n,e[0]),s(t,c),s(t,f),s(t,b),s(t,k),q(k,e[1]),s(t,g),s(t,w),s(t,_),s(t,v),m(z,S,G),m(z,D,G),m(z,U,G),m(z,O,G),m(z,F,G),m(z,W,G),s(W,C),q(C,e[2]),s(W,T),s(W,H),q(H,e[3]),m(z,M,G),m(z,I,G),m(z,j,G),m(z,J,G),s(J,ne),ne.checked=e[5],s(J,ce),m(z,te,G),m(z,Y,G),m(z,se,G),m(z,ee,G),m(z,R,G),m(z,X,G),m(z,Z,G),m(z,_e,G),m(z,fe,G),m(z,pe,G),m(z,ye,G),Bt(oe,z,G),x=!0,me||(Le=[L(n,"change",e[9]),L(k,"input",e[10]),L(t,"submit",Wi(e[6])),L(C,"input",e[11]),L(H,"input",e[12]),L(ne,"change",e[13]),L(X,"click",e[7])],me=!0)},p(z,[G]){G&1&&Wt(n,z[0]),G&2&&q(k,z[1]),G&4&&C.value!==z[2]&&q(C,z[2]),G&8&&H.value!==z[3]&&q(H,z[3]),G&32&&(ne.checked=z[5]);const Ae={};G&16&&(Ae.json=z[4]),oe.$set(Ae)},i(z){x||(Se(oe.$$.fragment,z),x=!0)},o(z){Ie(oe.$$.fragment,z),x=!1},d(z){z&&p(t),z&&p(S),z&&p(D),z&&p(U),z&&p(O),z&&p(F),z&&p(W),z&&p(M),z&&p(I),z&&p(j),z&&p(J),z&&p(te),z&&p(Y),z&&p(se),z&&p(ee),z&&p(R),z&&p(X),z&&p(Z),z&&p(_e),z&&p(fe),z&&p(pe),z&&p(ye),Jt(oe,z),me=!1,ue(Le)}}}function Qo(e,t,n){let i="GET",l="",{onMessage:o}=t;async function u(){const D=await ei().catch(F=>{throw o(F),F}),O={url:"http://localhost:3003",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?O.body=it.json(JSON.parse(l)):l!==""&&(O.body=it.text(l)),D.request(O).then(o).catch(o)}let d="baz",c="qux",f=null,b=!0;async function k(){const D=await ei().catch(U=>{throw o(U),U});n(4,f=await D.request({url:"http://localhost:3003",method:"POST",body:it.form({foo:d,bar:c}),headers:b?{"Content-Type":"multipart/form-data"}:void 0,responseType:Fi.Text}))}function g(){i=Pi(this),n(0,i)}function w(){l=this.value,n(1,l)}function _(){d=this.value,n(2,d)}function v(){c=this.value,n(3,c)}function S(){b=this.checked,n(5,b)}return e.$$set=D=>{"onMessage"in D&&n(8,o=D.onMessage)},[i,l,d,c,f,b,u,k,o,g,w,_,v,S]}class Zo extends Me{constructor(t){super(),ke(this,t,Qo,Ko,ge,{onMessage:8})}}function xo(e){let t,n,i;return{c(){t=a("button"),t.textContent="Send test notification",r(t,"class","btn"),r(t,"id","notification")},m(l,o){m(l,t,o),n||(i=L(t,"click",ea),n=!0)},p:V,i:V,o:V,d(l){l&&p(t),n=!1,i()}}}function ea(){new Notification("Notification title",{body:"This is the notification body"})}function ta(e,t,n){let{onMessage:i}=t;return e.$$set=l=>{"onMessage"in l&&n(0,i=l.onMessage)},[i]}class na extends Me{constructor(t){super(),ke(this,t,ta,xo,ge,{onMessage:0})}}function Ql(e,t,n){const i=e.slice();return i[69]=t[n],i}function Zl(e,t,n){const i=e.slice();return i[72]=t[n],i}function xl(e){let t,n,i,l,o,u,d=Object.keys(e[1]),c=[];for(let f=0;fe[40].call(i))},m(f,b){m(f,t,b),m(f,n,b),m(f,i,b),s(i,l);for(let k=0;ke[59].call(qe)),r(Ze,"class","input"),r(Ze,"type","number"),r(xe,"class","input"),r(xe,"type","number"),r(je,"class","flex gap-2"),r(et,"class","input grow"),r(et,"id","title"),r(Ut,"class","btn"),r(Ut,"type","submit"),r(ut,"class","flex gap-1"),r(tt,"class","input grow"),r(tt,"id","url"),r(jt,"class","btn"),r(jt,"id","open-url"),r(ct,"class","flex gap-1"),r(rt,"class","flex flex-col gap-1")},m(y,P){m(y,t,P),m(y,n,P),m(y,i,P),s(i,l),s(i,o),s(i,u),s(i,d),s(i,c),s(i,f),s(i,b),s(i,k),s(i,g),m(y,w,P),m(y,_,P),m(y,v,P),m(y,S,P),s(S,D),s(D,U),s(D,O),O.checked=e[3],s(S,F),s(S,W),s(W,C),s(W,T),T.checked=e[2],s(S,H),s(S,M),s(M,I),s(M,j),j.checked=e[4],s(S,J),s(S,ne),s(ne,ce),s(ne,te),te.checked=e[5],s(S,Y),s(S,se),s(se,ee),s(se,R),R.checked=e[6],s(S,X),s(S,Z),s(Z,_e),s(Z,fe),fe.checked=e[7],m(y,pe,P),m(y,ye,P),m(y,oe,P),m(y,x,P),s(x,me),s(me,Le),s(Le,z),s(Le,G),q(G,e[14]),s(me,Ae),s(me,ve),s(ve,ae),s(ve,de),q(de,e[15]),s(x,re),s(x,we),s(we,Ne),s(Ne,Pe),s(Ne,Q),q(Q,e[8]),s(we,N),s(we,ie),s(ie,B),s(ie,he),q(he,e[9]),s(x,$t),s(x,Ge),s(Ge,_t),s(_t,Kt),s(_t,De),q(De,e[10]),s(Ge,Qt),s(Ge,bt),s(bt,Zt),s(bt,Re),q(Re,e[11]),s(x,xt),s(x,Ve),s(Ve,$),s($,Ot),s($,Ee),q(Ee,e[12]),s(Ve,Dt),s(Ve,lt),s(lt,Rt),s(lt,ze),q(ze,e[13]),m(y,gt,P),m(y,yt,P),m(y,vt,P),m(y,Ce,P),s(Ce,He),s(He,Oe),s(Oe,st),s(Oe,It),s(Oe,ot),s(ot,Nt),s(ot,wt),s(Oe,en),s(Oe,tn),s(tn,Vi),s(tn,si),s(He,Bi),s(He,Be),s(Be,ln),s(Be,Ji),s(Be,sn),s(sn,Xi),s(sn,oi),s(Be,Yi),s(Be,an),s(an,$i),s(an,ai),s(Ce,Ki),s(Ce,kt),s(kt,Je),s(Je,un),s(Je,Qi),s(Je,cn),s(cn,Zi),s(cn,ri),s(Je,xi),s(Je,fn),s(fn,el),s(fn,ui),s(kt,tl),s(kt,Xe),s(Xe,mn),s(Xe,nl),s(Xe,hn),s(hn,il),s(hn,ci),s(Xe,ll),s(Xe,bn),s(bn,sl),s(bn,di),s(Ce,ol),s(Ce,Mt),s(Mt,Ye),s(Ye,yn),s(Ye,al),s(Ye,vn),s(vn,rl),s(vn,fi),s(Ye,ul),s(Ye,kn),s(kn,cl),s(kn,pi),s(Mt,dl),s(Mt,$e),s($e,Tn),s($e,fl),s($e,Cn),s(Cn,pl),s(Cn,mi),s($e,ml),s($e,Ln),s(Ln,hl),s(Ln,hi),s(Ce,_l),s(Ce,Tt),s(Tt,Ke),s(Ke,En),s(Ke,bl),s(Ke,zn),s(zn,gl),s(zn,_i),s(Ke,yl),s(Ke,Pn),s(Pn,vl),s(Pn,bi),s(Tt,wl),s(Tt,Qe),s(Qe,Dn),s(Qe,kl),s(Qe,Rn),s(Rn,Ml),s(Rn,gi),s(Qe,Tl),s(Qe,Nn),s(Nn,Cl),s(Nn,yi),m(y,vi,P),m(y,wi,P),m(y,ki,P),m(y,Ht,P),m(y,Mi,P),m(y,Ue,P),s(Ue,Un),s(Un,Ct),Ct.checked=e[16],s(Un,Sl),s(Ue,Ll),s(Ue,jn),s(jn,St),St.checked=e[17],s(jn,Al),s(Ue,El),s(Ue,qn),s(qn,Lt),Lt.checked=e[21],s(qn,zl),m(y,Ti,P),m(y,je,P),s(je,Fn),s(Fn,Wl),s(Fn,qe);for(let be=0;be=1,b,k,g,w=f&&xl(e),_=e[1][e[0]]&&ts(e);return{c(){t=a("div"),n=a("div"),i=a("input"),l=h(),o=a("button"),o.textContent="New window",u=h(),d=a("br"),c=h(),w&&w.c(),b=h(),_&&_.c(),r(i,"class","input grow"),r(i,"type","text"),r(i,"placeholder","New Window label.."),r(o,"class","btn"),r(n,"class","flex gap-1"),r(t,"class","flex flex-col children:grow gap-2")},m(v,S){m(v,t,S),s(t,n),s(n,i),q(i,e[22]),s(n,l),s(n,o),s(t,u),s(t,d),s(t,c),w&&w.m(t,null),s(t,b),_&&_.m(t,null),k||(g=[L(i,"input",e[39]),L(o,"click",e[36])],k=!0)},p(v,S){S[0]&4194304&&i.value!==v[22]&&q(i,v[22]),S[0]&2&&(f=Object.keys(v[1]).length>=1),f?w?w.p(v,S):(w=xl(v),w.c(),w.m(t,b)):w&&(w.d(1),w=null),v[1][v[0]]?_?_.p(v,S):(_=ts(v),_.c(),_.m(t,null)):_&&(_.d(1),_=null)},i:V,o:V,d(v){v&&p(t),w&&w.d(),_&&_.d(),k=!1,ue(g)}}}function la(e,t,n){let i=Fe.label;const l={[Fe.label]:Fe},o=["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,d,c="https://tauri.app",f=!0,b=!1,k=!0,g=!1,w=!0,_=!1,v=null,S=null,D=null,U=null,O=null,F=null,W=null,C=null,T=1,H=new nt(W,C),M=new nt(W,C),I=new pt(v,S),j=new pt(v,S),J,ne,ce=!1,te=!0,Y=null,se=null,ee="default",R=!1,X="Awesome Tauri Example!";function Z(){Ii(c)}function _e(){l[i].setTitle(X)}function fe(){l[i].hide(),setTimeout(l[i].show,2e3)}function pe(){l[i].minimize(),setTimeout(l[i].unminimize,2e3)}function ye(){qi({multiple:!1}).then($=>{typeof $=="string"&&l[i].setIcon($)})}function oe(){if(!d)return;const $=new ht(d);n(1,l[d]=$,l),$.once("tauri://error",function(){u("Error creating new webview")})}function x(){l[i].innerSize().then($=>{n(27,I=$),n(8,v=I.width),n(9,S=I.height)}),l[i].outerSize().then($=>{n(28,j=$)})}function me(){l[i].innerPosition().then($=>{n(25,H=$)}),l[i].outerPosition().then($=>{n(26,M=$),n(14,W=M.x),n(15,C=M.y)})}async function Le($){!$||(J&&J(),ne&&ne(),ne=await $.listen("tauri://move",me),J=await $.listen("tauri://resize",x))}async function z(){await l[i].minimize(),await l[i].requestUserAttention(Hi.Critical),await new Promise($=>setTimeout($,3e3)),await l[i].requestUserAttention(null)}function G(){d=this.value,n(22,d)}function Ae(){i=Pi(this),n(0,i),n(1,l)}const ve=()=>l[i].center();function ae(){b=this.checked,n(3,b)}function de(){f=this.checked,n(2,f)}function re(){k=this.checked,n(4,k)}function we(){g=this.checked,n(5,g)}function Ne(){w=this.checked,n(6,w)}function Pe(){_=this.checked,n(7,_)}function Q(){W=le(this.value),n(14,W)}function N(){C=le(this.value),n(15,C)}function ie(){v=le(this.value),n(8,v)}function B(){S=le(this.value),n(9,S)}function he(){D=le(this.value),n(10,D)}function $t(){U=le(this.value),n(11,U)}function Ge(){O=le(this.value),n(12,O)}function _t(){F=le(this.value),n(13,F)}function Kt(){ce=this.checked,n(16,ce)}function De(){te=this.checked,n(17,te)}function Qt(){R=this.checked,n(21,R)}function bt(){ee=Pi(this),n(20,ee),n(30,o)}function Zt(){Y=le(this.value),n(18,Y)}function Re(){se=le(this.value),n(19,se)}function xt(){X=this.value,n(29,X)}function Ve(){c=this.value,n(23,c)}return e.$$set=$=>{"onMessage"in $&&n(38,u=$.onMessage)},e.$$.update=()=>{var $,Ot,Ee,Dt,lt,Rt,ze,gt,yt,vt,Ce,He,Oe,st,It,ot,Nt,at,wt;e.$$.dirty[0]&3&&(l[i],me(),x()),e.$$.dirty[0]&7&&(($=l[i])==null||$.setResizable(f)),e.$$.dirty[0]&11&&(b?(Ot=l[i])==null||Ot.maximize():(Ee=l[i])==null||Ee.unmaximize()),e.$$.dirty[0]&19&&((Dt=l[i])==null||Dt.setDecorations(k)),e.$$.dirty[0]&35&&((lt=l[i])==null||lt.setAlwaysOnTop(g)),e.$$.dirty[0]&67&&((Rt=l[i])==null||Rt.setContentProtected(w)),e.$$.dirty[0]&131&&((ze=l[i])==null||ze.setFullscreen(_)),e.$$.dirty[0]&771&&v&&S&&((gt=l[i])==null||gt.setSize(new pt(v,S))),e.$$.dirty[0]&3075&&(D&&U?(yt=l[i])==null||yt.setMinSize(new xn(D,U)):(vt=l[i])==null||vt.setMinSize(null)),e.$$.dirty[0]&12291&&(O>800&&F>400?(Ce=l[i])==null||Ce.setMaxSize(new xn(O,F)):(He=l[i])==null||He.setMaxSize(null)),e.$$.dirty[0]&49155&&W!==null&&C!==null&&((Oe=l[i])==null||Oe.setPosition(new nt(W,C))),e.$$.dirty[0]&3&&((st=l[i])==null||st.scaleFactor().then(en=>n(24,T=en))),e.$$.dirty[0]&3&&Le(l[i]),e.$$.dirty[0]&65539&&((It=l[i])==null||It.setCursorGrab(ce)),e.$$.dirty[0]&131075&&((ot=l[i])==null||ot.setCursorVisible(te)),e.$$.dirty[0]&1048579&&((Nt=l[i])==null||Nt.setCursorIcon(ee)),e.$$.dirty[0]&786435&&Y!==null&&se!==null&&((at=l[i])==null||at.setCursorPosition(new nt(Y,se))),e.$$.dirty[0]&2097155&&((wt=l[i])==null||wt.setIgnoreCursorEvents(R))},[i,l,f,b,k,g,w,_,v,S,D,U,O,F,W,C,ce,te,Y,se,ee,R,d,c,T,H,M,I,j,X,o,Z,_e,fe,pe,ye,oe,z,u,G,Ae,ve,ae,de,re,we,Ne,Pe,Q,N,ie,B,he,$t,Ge,_t,Kt,De,Qt,bt,Zt,Re,xt,Ve]}class sa extends Me{constructor(t){super(),ke(this,t,la,ia,ge,{onMessage:38},null,[-1,-1,-1])}}var oa={};We(oa,{isRegistered:()=>ra,register:()=>Gs,registerAll:()=>aa,unregister:()=>Vs,unregisterAll:()=>Bs});async function Gs(e,t){return E({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:mt(t)}})}async function aa(e,t){return E({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:mt(t)}})}async function ra(e){return E({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})}async function Vs(e){return E({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})}async function Bs(){return E({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}function is(e,t,n){const i=e.slice();return i[9]=t[n],i}function ls(e){let t,n=e[9]+"",i,l,o,u,d;function c(){return e[8](e[9])}return{c(){t=a("div"),i=A(n),l=h(),o=a("button"),o.textContent="Unregister",r(o,"class","btn"),r(o,"type","button"),r(t,"class","flex justify-between")},m(f,b){m(f,t,b),s(t,i),s(t,l),s(t,o),u||(d=L(o,"click",c),u=!0)},p(f,b){e=f,b&2&&n!==(n=e[9]+"")&&K(i,n)},d(f){f&&p(t),u=!1,d()}}}function ss(e){let t,n,i,l,o;return{c(){t=a("br"),n=h(),i=a("button"),i.textContent="Unregister all",r(i,"class","btn"),r(i,"type","button")},m(u,d){m(u,t,d),m(u,n,d),m(u,i,d),l||(o=L(i,"click",e[5]),l=!0)},p:V,d(u){u&&p(t),u&&p(n),u&&p(i),l=!1,o()}}}function ua(e){let t,n,i,l,o,u,d,c,f,b,k,g=e[1],w=[];for(let v=0;v1&&ss(e);return{c(){t=a("div"),n=a("input"),i=h(),l=a("button"),l.textContent="Register",o=h(),u=a("br"),d=h(),c=a("div");for(let v=0;v1?_?_.p(v,S):(_=ss(v),_.c(),_.m(c,null)):_&&(_.d(1),_=null)},i:V,o:V,d(v){v&&p(t),v&&p(o),v&&p(u),v&&p(d),v&&p(c),zt(w,v),_&&_.d(),b=!1,ue(k)}}}function ca(e,t,n){let i,{onMessage:l}=t;const o=ys([]);_s(e,o,g=>n(1,i=g));let u="CmdOrControl+X";function d(){const g=u;Gs(g,()=>{l(`Shortcut ${g} triggered`)}).then(()=>{o.update(w=>[...w,g]),l(`Shortcut ${g} registered successfully`)}).catch(l)}function c(g){const w=g;Vs(w).then(()=>{o.update(_=>_.filter(v=>v!==w)),l(`Shortcut ${w} unregistered`)}).catch(l)}function f(){Bs().then(()=>{o.update(()=>[]),l("Unregistered all shortcuts")}).catch(l)}function b(){u=this.value,n(0,u)}const k=g=>c(g);return e.$$set=g=>{"onMessage"in g&&n(6,l=g.onMessage)},[u,i,o,d,c,f,l,b,k]}class da extends Me{constructor(t){super(),ke(this,t,ca,ua,ge,{onMessage:6})}}function os(e){let t,n,i,l,o,u,d;return{c(){t=a("br"),n=h(),i=a("input"),l=h(),o=a("button"),o.textContent="Write",r(i,"class","input"),r(i,"placeholder","write to stdin"),r(o,"class","btn")},m(c,f){m(c,t,f),m(c,n,f),m(c,i,f),q(i,e[4]),m(c,l,f),m(c,o,f),u||(d=[L(i,"input",e[14]),L(o,"click",e[8])],u=!0)},p(c,f){f&16&&i.value!==c[4]&&q(i,c[4])},d(c){c&&p(t),c&&p(n),c&&p(i),c&&p(l),c&&p(o),u=!1,ue(d)}}}function fa(e){let t,n,i,l,o,u,d,c,f,b,k,g,w,_,v,S,D,U,O,F,W,C,T,H,M=e[5]&&os(e);return{c(){t=a("div"),n=a("div"),i=A(`Script: - `),l=a("input"),o=h(),u=a("div"),d=A(`Encoding: - `),c=a("input"),f=h(),b=a("div"),k=A(`Working directory: - `),g=a("input"),w=h(),_=a("div"),v=A(`Arguments: - `),S=a("input"),D=h(),U=a("div"),O=a("button"),O.textContent="Run",F=h(),W=a("button"),W.textContent="Kill",C=h(),M&&M.c(),r(l,"class","grow input"),r(n,"class","flex items-center gap-1"),r(c,"class","grow input"),r(u,"class","flex items-center gap-1"),r(g,"class","grow input"),r(g,"placeholder","Working directory"),r(b,"class","flex items-center gap-1"),r(S,"class","grow input"),r(S,"placeholder","Environment variables"),r(_,"class","flex items-center gap-1"),r(O,"class","btn"),r(W,"class","btn"),r(U,"class","flex children:grow gap-1"),r(t,"class","flex flex-col childre:grow gap-1")},m(I,j){m(I,t,j),s(t,n),s(n,i),s(n,l),q(l,e[0]),s(t,o),s(t,u),s(u,d),s(u,c),q(c,e[3]),s(t,f),s(t,b),s(b,k),s(b,g),q(g,e[1]),s(t,w),s(t,_),s(_,v),s(_,S),q(S,e[2]),s(t,D),s(t,U),s(U,O),s(U,F),s(U,W),s(t,C),M&&M.m(t,null),T||(H=[L(l,"input",e[10]),L(c,"input",e[11]),L(g,"input",e[12]),L(S,"input",e[13]),L(O,"click",e[6]),L(W,"click",e[7])],T=!0)},p(I,[j]){j&1&&l.value!==I[0]&&q(l,I[0]),j&8&&c.value!==I[3]&&q(c,I[3]),j&2&&g.value!==I[1]&&q(g,I[1]),j&4&&S.value!==I[2]&&q(S,I[2]),I[5]?M?M.p(I,j):(M=os(I),M.c(),M.m(t,null)):M&&(M.d(1),M=null)},i:V,o:V,d(I){I&&p(t),M&&M.d(),T=!1,ue(H)}}}function pa(e,t,n){const i=navigator.userAgent.includes("Windows");let l=i?"cmd":"sh",o=i?["/C"]:["-c"],{onMessage:u}=t,d='echo "hello world"',c=null,f="SOMETHING=value ANOTHER=2",b="",k="",g;function w(){return f.split(" ").reduce((C,T)=>{let[H,M]=T.split("=");return{...C,[H]:M}},{})}function _(){n(5,g=null);const C=Zn.create(l,[...o,d],{cwd:c||null,env:w(),encoding:b||void 0});C.on("close",T=>{u(`command finished with code ${T.code} and signal ${T.signal}`),n(5,g=null)}),C.on("error",T=>u(`command error: "${T}"`)),C.stdout.on("data",T=>u(`command stdout: "${T}"`)),C.stderr.on("data",T=>u(`command stderr: "${T}"`)),C.spawn().then(T=>{n(5,g=T)}).catch(u)}function v(){g.kill().then(()=>u("killed child process")).catch(u)}function S(){g.write(k).catch(u)}function D(){d=this.value,n(0,d)}function U(){b=this.value,n(3,b)}function O(){c=this.value,n(1,c)}function F(){f=this.value,n(2,f)}function W(){k=this.value,n(4,k)}return e.$$set=C=>{"onMessage"in C&&n(9,u=C.onMessage)},[d,c,f,b,k,g,_,v,S,u,D,U,O,F,W]}class ma extends Me{constructor(t){super(),ke(this,t,pa,fa,ge,{onMessage:9})}}var ha={};We(ha,{checkUpdate:()=>Xs,installUpdate:()=>Js,onUpdaterEvent:()=>Gi});async function Gi(e){return Yt("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function Js(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(o){if(o.error){t(),i(o.error);return}o.status==="DONE"&&(t(),n())}Gi(l).then(o=>{e=o}).catch(o=>{throw t(),o}),li("tauri://update-install").catch(o=>{throw t(),o})})}async function Xs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(u){t(),n({manifest:u,shouldUpdate:!0})}function o(u){if(u.error){t(),i(u.error);return}u.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}Cs("tauri://update-available",u=>{l(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),Gi(o).then(u=>{e=u}).catch(u=>{throw t(),u}),li("tauri://update").catch(u=>{throw t(),u})})}function _a(e){let t;return{c(){t=a("button"),t.innerHTML='
',r(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){m(n,t,i)},p:V,d(n){n&&p(t)}}}function ba(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[4]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function ga(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",r(t,"class","btn")},m(l,o){m(l,t,o),n||(i=L(t,"click",e[3]),n=!0)},p:V,d(l){l&&p(t),n=!1,i()}}}function ya(e){let t;function n(o,u){return!o[0]&&!o[2]?ga:!o[1]&&o[2]?ba:_a}let i=n(e),l=i(e);return{c(){t=a("div"),l.c(),r(t,"class","flex children:grow children:h10")},m(o,u){m(o,t,u),l.m(t,null)},p(o,[u]){i===(i=n(o))&&l?l.p(o,u):(l.d(1),l=i(o),l&&(l.c(),l.m(t,null)))},i:V,o:V,d(o){o&&p(t),l.d()}}}function va(e,t,n){let{onMessage:i}=t,l;dt(async()=>{l=await Yt("tauri://update-status",i)}),Ri(()=>{l&&l()});let o,u,d;async function c(){n(0,o=!0);try{const{shouldUpdate:b,manifest:k}=await Xs();i(`Should update: ${b}`),i(k),n(2,d=b)}catch(b){i(b)}finally{n(0,o=!1)}}async function f(){n(1,u=!0);try{await Js(),i("Installation complete, restart required."),await ji()}catch(b){i(b)}finally{n(1,u=!1)}}return e.$$set=b=>{"onMessage"in b&&n(5,i=b.onMessage)},[o,u,d,c,f,i]}class wa extends Me{constructor(t){super(),ke(this,t,va,ya,ge,{onMessage:5})}}var ka={};We(ka,{readText:()=>$s,writeText:()=>Ys});async function Ys(e){return E({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})}async function $s(){return E({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}function Ma(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("input"),i=h(),l=a("button"),l.textContent="Write",o=h(),u=a("button"),u.textContent="Read",r(n,"class","grow input"),r(n,"placeholder","Text to write to the clipboard"),r(l,"class","btn"),r(l,"type","button"),r(u,"class","btn"),r(u,"type","button"),r(t,"class","flex gap-1")},m(f,b){m(f,t,b),s(t,n),q(n,e[0]),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[L(n,"input",e[4]),L(l,"click",e[1]),L(u,"click",e[2])],d=!0)},p(f,[b]){b&1&&n.value!==f[0]&&q(n,f[0])},i:V,o:V,d(f){f&&p(t),d=!1,ue(c)}}}function Ta(e,t,n){let{onMessage:i}=t,l="clipboard message";function o(){Ys(l).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){$s().then(c=>{i(`Clipboard contents: ${c}`)}).catch(i)}function d(){l=this.value,n(0,l)}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,o,u,i,d]}class Ca extends Me{constructor(t){super(),ke(this,t,Ta,Ma,ge,{onMessage:3})}}function Sa(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
- `,r(t,"class","flex flex-col gap-2")},m(n,i){m(n,t,i)},p:V,i:V,o:V,d(n){n&&p(t)}}}function La(e,t,n){let{onMessage:i}=t;const l=window.constraints={audio:!0,video:!0};function o(d){const c=document.querySelector("video"),f=d.getVideoTracks();i("Got stream with constraints:",l),i(`Using video device: ${f[0].label}`),window.stream=d,c.srcObject=d}function u(d){if(d.name==="ConstraintNotSatisfiedError"){const c=l.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else d.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: ${d.name}`,d)}return dt(async()=>{try{const d=await navigator.mediaDevices.getUserMedia(l);o(d)}catch(d){u(d)}}),Ri(()=>{window.stream.getTracks().forEach(function(d){d.stop()})}),e.$$set=d=>{"onMessage"in d&&n(0,i=d.onMessage)},[i]}class Aa extends Me{constructor(t){super(),ke(this,t,La,Sa,ge,{onMessage:0})}}function Ea(e){let t,n,i,l,o,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=h(),l=a("button"),l.textContent="Hide",r(n,"class","btn"),r(n,"id","show"),r(n,"title","Hides and shows the app after 2 seconds"),r(l,"class","btn"),r(l,"id","hide")},m(d,c){m(d,t,c),s(t,n),s(t,i),s(t,l),o||(u=[L(n,"click",e[0]),L(l,"click",e[1])],o=!0)},p:V,i:V,o:V,d(d){d&&p(t),o=!1,ue(u)}}}function za(e,t,n){let{onMessage:i}=t;function l(){o().then(()=>{setTimeout(()=>{Rs().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function o(){return Is().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[l,o,i]}class Wa extends Me{constructor(t){super(),ke(this,t,za,Ea,ge,{onMessage:2})}}function as(e,t,n){const i=e.slice();return i[32]=t[n],i}function rs(e,t,n){const i=e.slice();return i[35]=t[n],i}function us(e){let t,n,i,l,o,u,d,c,f,b,k,g,w,_,v;function S(C,T){return C[3]?Oa:Pa}let D=S(e),U=D(e);function O(C,T){return C[2]?Ra:Da}let F=O(e),W=F(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=h(),l=a("span"),o=a("span"),U.c(),d=h(),c=a("span"),c.innerHTML='
',f=h(),b=a("span"),W.c(),g=h(),w=a("span"),w.innerHTML='
',r(n,"class","lt-sm:pl-10 text-darkPrimaryText"),r(o,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),r(o,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(c,"title","Minimize"),r(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(b,"title",k=e[2]?"Restore":"Maximize"),r(b,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(w,"title","Close"),r(w,"class","hover:bg-red-700 dark:hover:bg-red-700 hover:text-darkPrimaryText active:bg-red-700/90 dark:active:bg-red-700/90 active:text-darkPrimaryText "),r(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),r(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),r(t,"data-tauri-drag-region","")},m(C,T){m(C,t,T),s(t,n),s(t,i),s(t,l),s(l,o),U.m(o,null),s(l,d),s(l,c),s(l,f),s(l,b),W.m(b,null),s(l,g),s(l,w),_||(v=[L(o,"click",e[12]),L(c,"click",e[9]),L(b,"click",e[10]),L(w,"click",e[11])],_=!0)},p(C,T){D!==(D=S(C))&&(U.d(1),U=D(C),U&&(U.c(),U.m(o,null))),T[0]&8&&u!==(u=C[3]?"Switch to Light mode":"Switch to Dark mode")&&r(o,"title",u),F!==(F=O(C))&&(W.d(1),W=F(C),W&&(W.c(),W.m(b,null))),T[0]&4&&k!==(k=C[2]?"Restore":"Maximize")&&r(b,"title",k)},d(C){C&&p(t),U.d(),W.d(),_=!1,ue(v)}}}function Pa(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-moon")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Oa(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-sun")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Da(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-maximize")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Ra(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-restore")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Ia(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function Na(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){m(n,t,i)},d(n){n&&p(t)}}}function cs(e){let t,n,i,l,o,u,d,c,f;function b(w,_){return w[3]?Ua:Ha}let k=b(e),g=k(e);return{c(){t=a("a"),g.c(),n=h(),i=a("br"),l=h(),o=a("div"),u=h(),d=a("br"),r(t,"href","##"),r(t,"class","nv justify-between h-8"),r(o,"class","bg-white/5 h-2px")},m(w,_){m(w,t,_),g.m(t,null),m(w,n,_),m(w,i,_),m(w,l,_),m(w,o,_),m(w,u,_),m(w,d,_),c||(f=L(t,"click",e[12]),c=!0)},p(w,_){k!==(k=b(w))&&(g.d(1),g=k(w),g&&(g.c(),g.m(t,null)))},d(w){w&&p(t),g.d(),w&&p(n),w&&p(i),w&&p(l),w&&p(o),w&&p(u),w&&p(d),c=!1,f()}}}function Ha(e){let t,n;return{c(){t=A(`Switch to Dark mode - `),n=a("div"),r(n,"class","i-ph-moon")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function Ua(e){let t,n;return{c(){t=A(`Switch to Light mode - `),n=a("div"),r(n,"class","i-ph-sun")},m(i,l){m(i,t,l),m(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function ja(e){let t,n,i,l,o=e[35].label+"",u,d,c,f;function b(){return e[20](e[35])}return{c(){t=a("a"),n=a("div"),i=h(),l=a("p"),u=A(o),r(n,"class",e[35].icon+" mr-2"),r(t,"href","##"),r(t,"class",d="nv "+(e[1]===e[35]?"nv_selected":""))},m(k,g){m(k,t,g),s(t,n),s(t,i),s(t,l),s(l,u),c||(f=L(t,"click",b),c=!0)},p(k,g){e=k,g[0]&2&&d!==(d="nv "+(e[1]===e[35]?"nv_selected":""))&&r(t,"class",d)},d(k){k&&p(t),c=!1,f()}}}function ds(e){let t,n=e[35]&&ja(e);return{c(){n&&n.c(),t=ti()},m(i,l){n&&n.m(i,l),m(i,t,l)},p(i,l){i[35]&&n.p(i,l)},d(i){n&&n.d(i),i&&p(t)}}}function fs(e){let t,n=e[32].html+"",i;return{c(){t=new no(!1),i=ti(),t.a=i},m(l,o){t.m(n,l,o),m(l,i,o)},p(l,o){o[0]&64&&n!==(n=l[32].html+"")&&t.p(n)},d(l){l&&p(i),l&&t.d()}}}function qa(e){let t,n,i,l,o,u,d,c,f,b,k,g,w,_,v,S,D,U,O,F,W,C,T,H,M,I,j=e[1].label+"",J,ne,ce,te,Y,se,ee,R,X,Z,_e,fe,pe,ye,oe,x,me,Le,z=e[5]&&us(e);function G(N,ie){return N[0]?Na:Ia}let Ae=G(e),ve=Ae(e),ae=!e[5]&&cs(e),de=e[7],re=[];for(let N=0;N`,k=h(),g=a("a"),g.innerHTML=`GitHub - `,w=h(),_=a("a"),_.innerHTML=`Source - `,v=h(),S=a("br"),D=h(),U=a("div"),O=h(),F=a("br"),W=h(),C=a("div");for(let N=0;N',ye=h(),oe=a("div");for(let N=0;N{Jt(B,1)}),ii()}we?(Y=new we(Ne(N)),Qn(Y.$$.fragment),Se(Y.$$.fragment,1),Bt(Y,te,null)):Y=null}if(ie[0]&64){Pe=N[6];let B;for(B=0;B{await confirm("Are you sure?")||R.preventDefault()}),Fe.onFileDropEvent(R=>{D(`File drop: ${JSON.stringify(R.payload)}`)});const l=navigator.userAgent.toLowerCase(),o=l.includes("android")||l.includes("iphone"),u=[{label:"Welcome",component:zo,icon:"i-ph-hand-waving"},{label:"Communication",component:Io,icon:"i-codicon-radio-tower"},!o&&{label:"CLI",component:Oo,icon:"i-codicon-terminal"},!o&&{label:"Dialog",component:Fo,icon:"i-codicon-multiple-windows"},{label:"HTTP",component:Zo,icon:"i-ph-globe-hemisphere-west"},!o&&{label:"Notifications",component:na,icon:"i-codicon-bell-dot"},!o&&{label:"App",component:Wa,icon:"i-codicon-hubot"},!o&&{label:"Window",component:sa,icon:"i-codicon-window"},!o&&{label:"Shortcuts",component:da,icon:"i-codicon-record-keys"},{label:"Shell",component:ma,icon:"i-codicon-terminal-bash"},!o&&{label:"Updater",component:wa,icon:"i-codicon-cloud-download"},!o&&{label:"Clipboard",component:Ca,icon:"i-codicon-clippy"},{label:"WebRTC",component:Aa,icon:"i-ph-broadcast"}];let d=u[0];function c(R){n(1,d=R)}let f;dt(async()=>{const R=Ft();n(2,f=await R.isMaximized()),Yt("tauri://resize",async()=>{n(2,f=await R.isMaximized())})});function b(){Ft().minimize()}async function k(){const R=Ft();await R.isMaximized()?R.unmaximize():R.maximize()}let g=!1;async function w(){g||(g=await Us("Are you sure that you want to close this window?",{title:"Tauri API"}),g&&Ft().close())}let _;dt(()=>{n(3,_=localStorage&&localStorage.getItem("theme")=="dark"),ms(_)});function v(){n(3,_=!_),ms(_)}let S=ys([]);_s(e,S,R=>n(6,i=R));function D(R){S.update(X=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof R=="string"?R:JSON.stringify(R,null,1))+"
"},...X])}function U(R){S.update(X=>[{html:`
[${new Date().toLocaleTimeString()}]: `+R+"
"},...X])}function O(){S.update(()=>[])}let F,W,C;function T(R){C=R.clientY;const X=window.getComputedStyle(F);W=parseInt(X.height,10);const Z=fe=>{const pe=fe.clientY-C,ye=W-pe;n(4,F.style.height=`${ye{document.removeEventListener("mouseup",_e),document.removeEventListener("mousemove",Z)};document.addEventListener("mouseup",_e),document.addEventListener("mousemove",Z)}let H;dt(async()=>{n(5,H=await Ws()==="win32")});let M=!1,I,j,J=!1,ne=0,ce=0;const te=(R,X,Z)=>Math.min(Math.max(X,R),Z);dt(()=>{n(18,I=document.querySelector("#sidebar")),j=document.querySelector("#sidebarToggle"),document.addEventListener("click",R=>{j.contains(R.target)?n(0,M=!M):M&&!I.contains(R.target)&&n(0,M=!1)}),document.addEventListener("touchstart",R=>{if(j.contains(R.target))return;const X=R.touches[0].clientX;(0{if(J){const X=R.touches[0].clientX;ce=X;const Z=(X-ne)/10;I.style.setProperty("--translate-x",`-${te(0,M?0-Z:18.75-Z,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(J){const R=(ce-ne)/10;n(0,M=M?R>-(18.75/2):R>18.75/2)}J=!1})});const Y=()=>Ii("https://tauri.app/"),se=R=>{c(R),n(0,M=!1)};function ee(R){Oi[R?"unshift":"push"](()=>{F=R,n(4,F)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const R=document.querySelector("#sidebar");R&&Fa(R,M)}},[M,d,f,_,F,H,i,u,c,b,k,w,v,S,D,U,O,T,I,Y,se,ee]}class Va extends Me{constructor(t){super(),ke(this,t,Ga,qa,ge,{},null,[-1,-1])}}new Va({target:document.querySelector("#app")}); + Additionally, it has a update --background subcommand.`,n=m(),i=a("br"),l=m(),o=a("div"),o.textContent="Note that the arguments are only parsed, not implemented.",u=m(),d=a("br"),c=m(),f=a("br"),g=m(),k=a("button"),k.textContent="Get matches",r(o,"class","note"),r(k,"class","btn"),r(k,"id","cli-matches")},m(v,y){h(v,t,y),h(v,n,y),h(v,i,y),h(v,l,y),h(v,o,y),h(v,u,y),h(v,d,y),h(v,c,y),h(v,f,y),h(v,g,y),h(v,k,y),_||(w=A(k,"click",e[0]),_=!0)},p:B,i:B,o:B,d(v){v&&p(t),v&&p(n),v&&p(i),v&&p(l),v&&p(o),v&&p(u),v&&p(d),v&&p(c),v&&p(f),v&&p(g),v&&p(k),_=!1,w()}}}function Eo(e,t,n){let{onMessage:i}=t;function l(){$t("plugin:cli|cli_matches").then(i).catch(i)}return e.$$set=o=>{"onMessage"in o&&n(1,i=o.onMessage)},[l,i]}class Wo extends Me{constructor(t){super(),ke(this,t,Eo,zo,ve,{onMessage:1})}}function Po(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=m(),l=a("button"),l.textContent="Call Request (async) API",o=m(),u=a("button"),u.textContent="Send event to Rust",r(n,"class","btn"),r(n,"id","log"),r(l,"class","btn"),r(l,"id","request"),r(u,"class","btn"),r(u,"id","event")},m(f,g){h(f,t,g),s(t,n),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[A(n,"click",e[0]),A(l,"click",e[1]),A(u,"click",e[2])],d=!0)},p:B,i:B,o:B,d(f){f&&p(t),d=!1,de(c)}}}function Oo(e,t,n){let{onMessage:i}=t,l;ct(async()=>{l=await Jt("rust-event",i)}),Ri(()=>{l&&l()});function o(){$t("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){$t("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function d(){li("js-event","this is the payload string")}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[o,u,d,i]}class Do extends Me{constructor(t){super(),ke(this,t,Oo,Po,ve,{onMessage:3})}}var Ro={};We(Ro,{Body:()=>nt,Client:()=>Hs,Response:()=>Ns,ResponseType:()=>qi,fetch:()=>Io,getClient:()=>ei});var qi=(e=>(e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary",e))(qi||{}),nt=class{constructor(e,t){this.type=e,this.payload=t}static form(e){let t={},n=(i,l)=>{if(l!==null){let o;typeof l=="string"?o=l:l instanceof Uint8Array||Array.isArray(l)?o=Array.from(l):l instanceof File?o={file:l.name,mime:l.type,fileName:l.name}:typeof l.file=="string"?o={file:l.file,mime:l.mime,fileName:l.fileName}:o={file:Array.from(l.file),mime:l.mime,fileName:l.fileName},t[String(i)]=o}};if(e instanceof FormData)for(let[i,l]of e)n(i,l);else for(let[i,l]of Object.entries(e))n(i,l);return new nt("Form",t)}static json(e){return new nt("Json",e)}static text(e){return new nt("Text",e)}static bytes(e){return new nt("Bytes",Array.from(e instanceof ArrayBuffer?new Uint8Array(e):e))}},Ns=class{constructor(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.rawHeaders=e.rawHeaders,this.data=e.data}},Hs=class{constructor(e){this.id=e}async drop(){return S({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})}async request(e){let t=!e.responseType||e.responseType===1;return t&&(e.responseType=2),S({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:e}}).then(n=>{let i=new Ns(n);if(t){try{i.data=JSON.parse(i.data)}catch(l){if(i.ok&&i.data==="")i.data={};else if(i.ok)throw Error(`Failed to parse response \`${i.data}\` as JSON: ${l}; + try setting the \`responseType\` option to \`ResponseType.Text\` or \`ResponseType.Binary\` if the API does not return a JSON response.`)}return i}return i})}async get(e,t){return this.request({method:"GET",url:e,...t})}async post(e,t,n){return this.request({method:"POST",url:e,body:t,...n})}async put(e,t,n){return this.request({method:"PUT",url:e,body:t,...n})}async patch(e,t){return this.request({method:"PATCH",url:e,...t})}async delete(e,t){return this.request({method:"DELETE",url:e,...t})}};async function ei(e){return S({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(t=>new Hs(t))}var Ei=null;async function Io(e,t){var n;return Ei===null&&(Ei=await ei()),Ei.request({url:e,method:(n=t==null?void 0:t.method)!=null?n:"GET",...t})}function Gl(e,t,n){const i=e.slice();return i[12]=t[n],i[14]=n,i}function Vl(e){let t,n,i,l,o,u,d,c,f,g,k,_,w,v,y,C,H,U=e[5],z=[];for(let M=0;MIe(z[M],1,1,()=>{z[M]=null});let P=!e[3]&&Xl(),O=!e[3]&&e[8]&&Yl();return{c(){t=a("span"),n=a("span"),i=T(e[6]),l=m(),o=a("ul");for(let M=0;M{g[v]=null}),ii(),o=g[l],o?o.p(_,w):(o=g[l]=f[l](_),o.c()),Ce(o,1),o.m(t,u))},i(_){d||(Ce(o),d=!0)},o(_){Ie(o),d=!1},d(_){_&&p(t),c&&c.d(),g[l].d()}}}function Xl(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Yl(e){let t;return{c(){t=a("span"),t.textContent=",",r(t,"class","comma svelte-gbh3pt")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Uo(e){let t,n,i=e[5].length&&Vl(e);return{c(){i&&i.c(),t=ti()},m(l,o){i&&i.m(l,o),h(l,t,o),n=!0},p(l,[o]){l[5].length?i?(i.p(l,o),o&32&&Ce(i,1)):(i=Vl(l),i.c(),Ce(i,1),i.m(t.parentNode,t)):i&&(ni(),Ie(i,1,1,()=>{i=null}),ii())},i(l){n||(Ce(i),n=!0)},o(l){Ie(i),n=!1},d(l){i&&i.d(l),l&&p(t)}}}const jo="...";function qo(e,t,n){let{json:i}=t,{depth:l=1/0}=t,{_lvl:o=0}=t,{_last:u=!0}=t;const d=y=>y===null?"null":typeof y;let c,f,g,k,_;const w=y=>{switch(d(y)){case"string":return`"${y}"`;case"function":return"f () {...}";case"symbol":return y.toString();default:return y}},v=()=>{n(8,_=!_)};return e.$$set=y=>{"json"in y&&n(0,i=y.json),"depth"in y&&n(1,l=y.depth),"_lvl"in y&&n(2,o=y._lvl),"_last"in y&&n(3,u=y._last)},e.$$.update=()=>{e.$$.dirty&17&&(n(5,c=d(i)==="object"?Object.keys(i):[]),n(4,f=Array.isArray(i)),n(6,g=f?"[":"{"),n(7,k=f?"]":"}")),e.$$.dirty&6&&n(8,_=le[9].call(n)),r(k,"class","input h-auto w-100%"),r(k,"id","request-body"),r(k,"placeholder","Request body"),r(k,"rows","5"),r(y,"class","btn"),r(y,"id","make-request"),r(O,"class","input"),r(R,"class","input"),r(P,"class","flex gap-2 children:grow"),r(ie,"type","checkbox"),r(te,"class","btn"),r(te,"type","button")},m(L,F){h(L,t,F),s(t,n),s(n,i),s(n,l),s(n,o),s(n,u),s(n,d),Wt(n,e[0]),s(t,c),s(t,f),s(t,g),s(t,k),q(k,e[1]),s(t,_),s(t,w),s(t,v),s(t,y),h(L,C,F),h(L,H,F),h(L,U,F),h(L,z,F),h(L,j,F),h(L,P,F),s(P,O),q(O,e[2]),s(P,M),s(P,R),q(R,e[3]),h(L,W,F),h(L,G,F),h(L,N,F),h(L,J,F),s(J,ie),ie.checked=e[5],s(J,fe),h(L,ee,F),h(L,X,F),h(L,I,F),h(L,$,F),h(L,K,F),h(L,te,F),h(L,se,F),h(L,_e,F),h(L,ue,F),h(L,be,F),h(L,Se,F),Vt(oe,L,F),x=!0,pe||(Le=[A(n,"change",e[9]),A(k,"input",e[10]),A(t,"submit",Wi(e[6])),A(O,"input",e[11]),A(R,"input",e[12]),A(ie,"change",e[13]),A(te,"click",e[7])],pe=!0)},p(L,[F]){F&1&&Wt(n,L[0]),F&2&&q(k,L[1]),F&4&&O.value!==L[2]&&q(O,L[2]),F&8&&R.value!==L[3]&&q(R,L[3]),F&32&&(ie.checked=L[5]);const Ae={};F&16&&(Ae.json=L[4]),oe.$set(Ae)},i(L){x||(Ce(oe.$$.fragment,L),x=!0)},o(L){Ie(oe.$$.fragment,L),x=!1},d(L){L&&p(t),L&&p(C),L&&p(H),L&&p(U),L&&p(z),L&&p(j),L&&p(P),L&&p(W),L&&p(G),L&&p(N),L&&p(J),L&&p(ee),L&&p(X),L&&p(I),L&&p($),L&&p(K),L&&p(te),L&&p(se),L&&p(_e),L&&p(ue),L&&p(be),L&&p(Se),Bt(oe,L),pe=!1,de(Le)}}}function Go(e,t,n){let i="GET",l="",{onMessage:o}=t;async function u(){const H=await ei().catch(j=>{throw o(j),j}),z={url:"http://localhost:3003",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?z.body=nt.json(JSON.parse(l)):l!==""&&(z.body=nt.text(l)),H.request(z).then(o).catch(o)}let d="baz",c="qux",f=null,g=!0;async function k(){const H=await ei().catch(U=>{throw o(U),U});n(4,f=await H.request({url:"http://localhost:3003",method:"POST",body:nt.form({foo:d,bar:c}),headers:g?{"Content-Type":"multipart/form-data"}:void 0,responseType:qi.Text}))}function _(){i=Pi(this),n(0,i)}function w(){l=this.value,n(1,l)}function v(){d=this.value,n(2,d)}function y(){c=this.value,n(3,c)}function C(){g=this.checked,n(5,g)}return e.$$set=H=>{"onMessage"in H&&n(8,o=H.onMessage)},[i,l,d,c,f,g,u,k,o,_,w,v,y,C]}class Vo extends Me{constructor(t){super(),ke(this,t,Go,Fo,ve,{onMessage:8})}}function Bo(e){let t,n,i;return{c(){t=a("button"),t.textContent="Send test notification",r(t,"class","btn"),r(t,"id","notification")},m(l,o){h(l,t,o),n||(i=A(t,"click",$o),n=!0)},p:B,i:B,o:B,d(l){l&&p(t),n=!1,i()}}}function $o(){new Notification("Notification title",{body:"This is the notification body"})}function Jo(e,t,n){let{onMessage:i}=t;return e.$$set=l=>{"onMessage"in l&&n(0,i=l.onMessage)},[i]}class Xo extends Me{constructor(t){super(),ke(this,t,Jo,Bo,ve,{onMessage:0})}}var Yo={};We(Yo,{ask:()=>Zo,confirm:()=>xo,message:()=>Qo,open:()=>js,save:()=>Ko});async function js(e={}){return typeof e=="object"&&Object.freeze(e),S({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})}async function Ko(e={}){return typeof e=="object"&&Object.freeze(e),S({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})}async function Qo(e,t){var i,l;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabel:(l=n==null?void 0:n.okLabel)==null?void 0:l.toString()}})}async function Zo(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"askDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Yes",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"No"]}})}async function xo(e,t){var i,l,o,u,d;let n=typeof t=="string"?{title:t}:t;return S({__tauriModule:"Dialog",message:{cmd:"confirmDialog",message:e.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type:n==null?void 0:n.type,buttonLabels:[(o=(l=n==null?void 0:n.okLabel)==null?void 0:l.toString())!=null?o:"Ok",(d=(u=n==null?void 0:n.cancelLabel)==null?void 0:u.toString())!=null?d:"Cancel"]}})}function Kl(e,t,n){const i=e.slice();return i[69]=t[n],i}function Ql(e,t,n){const i=e.slice();return i[72]=t[n],i}function Zl(e){let t,n,i,l,o,u,d=Object.keys(e[1]),c=[];for(let f=0;fe[40].call(i))},m(f,g){h(f,t,g),h(f,n,g),h(f,i,g),s(i,l);for(let k=0;ke[59].call(qe)),r(Qe,"class","input"),r(Qe,"type","number"),r(Ze,"class","input"),r(Ze,"type","number"),r(je,"class","flex gap-2"),r(xe,"class","input grow"),r(xe,"id","title"),r(Ut,"class","btn"),r(Ut,"type","submit"),r(rt,"class","flex gap-1"),r(et,"class","input grow"),r(et,"id","url"),r(jt,"class","btn"),r(jt,"id","open-url"),r(ut,"class","flex gap-1"),r(at,"class","flex flex-col gap-1")},m(b,E){h(b,t,E),h(b,n,E),h(b,i,E),s(i,l),s(i,o),s(i,u),s(i,d),s(i,c),s(i,f),s(i,g),s(i,k),s(i,_),h(b,w,E),h(b,v,E),h(b,y,E),h(b,C,E),s(C,H),s(H,U),s(H,z),z.checked=e[3],s(C,j),s(C,P),s(P,O),s(P,M),M.checked=e[2],s(C,R),s(C,W),s(W,G),s(W,N),N.checked=e[4],s(C,J),s(C,ie),s(ie,fe),s(ie,ee),ee.checked=e[5],s(C,X),s(C,I),s(I,$),s(I,K),K.checked=e[6],s(C,te),s(C,se),s(se,_e),s(se,ue),ue.checked=e[7],h(b,be,E),h(b,Se,E),h(b,oe,E),h(b,x,E),s(x,pe),s(pe,Le),s(Le,L),s(Le,F),q(F,e[14]),s(pe,Ae),s(pe,ge),s(ge,ae),s(ge,ce),q(ce,e[15]),s(x,re),s(x,ye),s(ye,Ne),s(Ne,Pe),s(Ne,Z),q(Z,e[8]),s(ye,D),s(ye,ne),s(ne,V),s(ne,me),q(me,e[9]),s(x,Xt),s(x,Fe),s(Fe,_t),s(_t,Yt),s(_t,De),q(De,e[10]),s(Fe,Kt),s(Fe,bt),s(bt,Qt),s(bt,Re),q(Re,e[11]),s(x,Zt),s(x,Ge),s(Ge,Y),s(Y,Ot),s(Y,ze),q(ze,e[12]),s(Ge,Dt),s(Ge,it),s(it,Rt),s(it,Ee),q(Ee,e[13]),h(b,gt,E),h(b,yt,E),h(b,vt,E),h(b,Te,E),s(Te,He),s(He,Oe),s(Oe,lt),s(Oe,It),s(Oe,st),s(st,Nt),s(st,wt),s(Oe,xt),s(Oe,en),s(en,Gi),s(en,si),s(He,Vi),s(He,Ve),s(Ve,nn),s(Ve,Bi),s(Ve,ln),s(ln,$i),s(ln,oi),s(Ve,Ji),s(Ve,on),s(on,Xi),s(on,ai),s(Te,Yi),s(Te,kt),s(kt,Be),s(Be,rn),s(Be,Ki),s(Be,un),s(un,Qi),s(un,ri),s(Be,Zi),s(Be,dn),s(dn,xi),s(dn,ui),s(kt,el),s(kt,$e),s($e,pn),s($e,tl),s($e,mn),s(mn,nl),s(mn,ci),s($e,il),s($e,_n),s(_n,ll),s(_n,di),s(Te,sl),s(Te,Mt),s(Mt,Je),s(Je,gn),s(Je,ol),s(Je,yn),s(yn,al),s(yn,fi),s(Je,rl),s(Je,wn),s(wn,ul),s(wn,pi),s(Mt,cl),s(Mt,Xe),s(Xe,Mn),s(Xe,dl),s(Xe,Tn),s(Tn,fl),s(Tn,mi),s(Xe,pl),s(Xe,Sn),s(Sn,ml),s(Sn,hi),s(Te,hl),s(Te,Tt),s(Tt,Ye),s(Ye,An),s(Ye,_l),s(Ye,zn),s(zn,bl),s(zn,_i),s(Ye,gl),s(Ye,Wn),s(Wn,yl),s(Wn,bi),s(Tt,vl),s(Tt,Ke),s(Ke,On),s(Ke,wl),s(Ke,Dn),s(Dn,kl),s(Dn,gi),s(Ke,Ml),s(Ke,In),s(In,Tl),s(In,yi),h(b,vi,E),h(b,wi,E),h(b,ki,E),h(b,Ht,E),h(b,Mi,E),h(b,Ue,E),s(Ue,Hn),s(Hn,Ct),Ct.checked=e[16],s(Hn,Cl),s(Ue,Sl),s(Ue,Un),s(Un,St),St.checked=e[17],s(Un,Ll),s(Ue,Al),s(Ue,jn),s(jn,Lt),Lt.checked=e[21],s(jn,zl),h(b,Ti,E),h(b,je,E),s(je,qn),s(qn,El),s(qn,qe);for(let he=0;he=1,g,k,_,w=f&&Zl(e),v=e[1][e[0]]&&es(e);return{c(){t=a("div"),n=a("div"),i=a("input"),l=m(),o=a("button"),o.textContent="New window",u=m(),d=a("br"),c=m(),w&&w.c(),g=m(),v&&v.c(),r(i,"class","input grow"),r(i,"type","text"),r(i,"placeholder","New Window label.."),r(o,"class","btn"),r(n,"class","flex gap-1"),r(t,"class","flex flex-col children:grow gap-2")},m(y,C){h(y,t,C),s(t,n),s(n,i),q(i,e[22]),s(n,l),s(n,o),s(t,u),s(t,d),s(t,c),w&&w.m(t,null),s(t,g),v&&v.m(t,null),k||(_=[A(i,"input",e[39]),A(o,"click",e[36])],k=!0)},p(y,C){C[0]&4194304&&i.value!==y[22]&&q(i,y[22]),C[0]&2&&(f=Object.keys(y[1]).length>=1),f?w?w.p(y,C):(w=Zl(y),w.c(),w.m(t,g)):w&&(w.d(1),w=null),y[1][y[0]]?v?v.p(y,C):(v=es(y),v.c(),v.m(t,null)):v&&(v.d(1),v=null)},i:B,o:B,d(y){y&&p(t),w&&w.d(),v&&v.d(),k=!1,de(_)}}}function ta(e,t,n){let i=pt.label;const l={[pt.label]:pt},o=["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,d,c="https://tauri.app",f=!0,g=!1,k=!0,_=!1,w=!0,v=!1,y=null,C=null,H=null,U=null,z=null,j=null,P=null,O=null,M=1,R=new tt(P,O),W=new tt(P,O),G=new ft(y,C),N=new ft(y,C),J,ie,fe=!1,ee=!0,X=null,I=null,$="default",K=!1,te="Awesome Tauri Example!";function se(){Ii(c)}function _e(){l[i].setTitle(te)}function ue(){l[i].hide(),setTimeout(l[i].show,2e3)}function be(){l[i].minimize(),setTimeout(l[i].unminimize,2e3)}function Se(){js({multiple:!1}).then(Y=>{typeof Y=="string"&&l[i].setIcon(Y)})}function oe(){if(!d)return;const Y=new ht(d);n(1,l[d]=Y,l),Y.once("tauri://error",function(){u("Error creating new webview")})}function x(){l[i].innerSize().then(Y=>{n(27,G=Y),n(8,y=G.width),n(9,C=G.height)}),l[i].outerSize().then(Y=>{n(28,N=Y)})}function pe(){l[i].innerPosition().then(Y=>{n(25,R=Y)}),l[i].outerPosition().then(Y=>{n(26,W=Y),n(14,P=W.x),n(15,O=W.y)})}async function Le(Y){!Y||(J&&J(),ie&&ie(),ie=await Y.listen("tauri://move",pe),J=await Y.listen("tauri://resize",x))}async function L(){await l[i].minimize(),await l[i].requestUserAttention(Hi.Critical),await new Promise(Y=>setTimeout(Y,3e3)),await l[i].requestUserAttention(null)}function F(){d=this.value,n(22,d)}function Ae(){i=Pi(this),n(0,i),n(1,l)}const ge=()=>l[i].center();function ae(){g=this.checked,n(3,g)}function ce(){f=this.checked,n(2,f)}function re(){k=this.checked,n(4,k)}function ye(){_=this.checked,n(5,_)}function Ne(){w=this.checked,n(6,w)}function Pe(){v=this.checked,n(7,v)}function Z(){P=le(this.value),n(14,P)}function D(){O=le(this.value),n(15,O)}function ne(){y=le(this.value),n(8,y)}function V(){C=le(this.value),n(9,C)}function me(){H=le(this.value),n(10,H)}function Xt(){U=le(this.value),n(11,U)}function Fe(){z=le(this.value),n(12,z)}function _t(){j=le(this.value),n(13,j)}function Yt(){fe=this.checked,n(16,fe)}function De(){ee=this.checked,n(17,ee)}function Kt(){K=this.checked,n(21,K)}function bt(){$=Pi(this),n(20,$),n(30,o)}function Qt(){X=le(this.value),n(18,X)}function Re(){I=le(this.value),n(19,I)}function Zt(){te=this.value,n(29,te)}function Ge(){c=this.value,n(23,c)}return e.$$set=Y=>{"onMessage"in Y&&n(38,u=Y.onMessage)},e.$$.update=()=>{var Y,Ot,ze,Dt,it,Rt,Ee,gt,yt,vt,Te,He,Oe,lt,It,st,Nt,ot,wt;e.$$.dirty[0]&3&&(l[i],pe(),x()),e.$$.dirty[0]&7&&((Y=l[i])==null||Y.setResizable(f)),e.$$.dirty[0]&11&&(g?(Ot=l[i])==null||Ot.maximize():(ze=l[i])==null||ze.unmaximize()),e.$$.dirty[0]&19&&((Dt=l[i])==null||Dt.setDecorations(k)),e.$$.dirty[0]&35&&((it=l[i])==null||it.setAlwaysOnTop(_)),e.$$.dirty[0]&67&&((Rt=l[i])==null||Rt.setContentProtected(w)),e.$$.dirty[0]&131&&((Ee=l[i])==null||Ee.setFullscreen(v)),e.$$.dirty[0]&771&&y&&C&&((gt=l[i])==null||gt.setSize(new ft(y,C))),e.$$.dirty[0]&3075&&(H&&U?(yt=l[i])==null||yt.setMinSize(new xn(H,U)):(vt=l[i])==null||vt.setMinSize(null)),e.$$.dirty[0]&12291&&(z>800&&j>400?(Te=l[i])==null||Te.setMaxSize(new xn(z,j)):(He=l[i])==null||He.setMaxSize(null)),e.$$.dirty[0]&49155&&P!==null&&O!==null&&((Oe=l[i])==null||Oe.setPosition(new tt(P,O))),e.$$.dirty[0]&3&&((lt=l[i])==null||lt.scaleFactor().then(xt=>n(24,M=xt))),e.$$.dirty[0]&3&&Le(l[i]),e.$$.dirty[0]&65539&&((It=l[i])==null||It.setCursorGrab(fe)),e.$$.dirty[0]&131075&&((st=l[i])==null||st.setCursorVisible(ee)),e.$$.dirty[0]&1048579&&((Nt=l[i])==null||Nt.setCursorIcon($)),e.$$.dirty[0]&786435&&X!==null&&I!==null&&((ot=l[i])==null||ot.setCursorPosition(new tt(X,I))),e.$$.dirty[0]&2097155&&((wt=l[i])==null||wt.setIgnoreCursorEvents(K))},[i,l,f,g,k,_,w,v,y,C,H,U,z,j,P,O,fe,ee,X,I,$,K,d,c,M,R,W,G,N,te,o,se,_e,ue,be,Se,oe,L,u,F,Ae,ge,ae,ce,re,ye,Ne,Pe,Z,D,ne,V,me,Xt,Fe,_t,Yt,De,Kt,bt,Qt,Re,Zt,Ge]}class na extends Me{constructor(t){super(),ke(this,t,ta,ea,ve,{onMessage:38},null,[-1,-1,-1])}}var ia={};We(ia,{isRegistered:()=>sa,register:()=>qs,registerAll:()=>la,unregister:()=>Fs,unregisterAll:()=>Gs});async function qs(e,t){return S({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:mt(t)}})}async function la(e,t){return S({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:mt(t)}})}async function sa(e){return S({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})}async function Fs(e){return S({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})}async function Gs(){return S({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})}function ns(e,t,n){const i=e.slice();return i[9]=t[n],i}function is(e){let t,n=e[9]+"",i,l,o,u,d;function c(){return e[8](e[9])}return{c(){t=a("div"),i=T(n),l=m(),o=a("button"),o.textContent="Unregister",r(o,"class","btn"),r(o,"type","button"),r(t,"class","flex justify-between")},m(f,g){h(f,t,g),s(t,i),s(t,l),s(t,o),u||(d=A(o,"click",c),u=!0)},p(f,g){e=f,g&2&&n!==(n=e[9]+"")&&Q(i,n)},d(f){f&&p(t),u=!1,d()}}}function ls(e){let t,n,i,l,o;return{c(){t=a("br"),n=m(),i=a("button"),i.textContent="Unregister all",r(i,"class","btn"),r(i,"type","button")},m(u,d){h(u,t,d),h(u,n,d),h(u,i,d),l||(o=A(i,"click",e[5]),l=!0)},p:B,d(u){u&&p(t),u&&p(n),u&&p(i),l=!1,o()}}}function oa(e){let t,n,i,l,o,u,d,c,f,g,k,_=e[1],w=[];for(let y=0;y<_.length;y+=1)w[y]=is(ns(e,_,y));let v=e[1].length>1&&ls(e);return{c(){t=a("div"),n=a("input"),i=m(),l=a("button"),l.textContent="Register",o=m(),u=a("br"),d=m(),c=a("div");for(let y=0;y1?v?v.p(y,C):(v=ls(y),v.c(),v.m(c,null)):v&&(v.d(1),v=null)},i:B,o:B,d(y){y&&p(t),y&&p(o),y&&p(u),y&&p(d),y&&p(c),Et(w,y),v&&v.d(),g=!1,de(k)}}}function aa(e,t,n){let i,{onMessage:l}=t;const o=gs([]);hs(e,o,_=>n(1,i=_));let u="CmdOrControl+X";function d(){const _=u;qs(_,()=>{l(`Shortcut ${_} triggered`)}).then(()=>{o.update(w=>[...w,_]),l(`Shortcut ${_} registered successfully`)}).catch(l)}function c(_){const w=_;Fs(w).then(()=>{o.update(v=>v.filter(y=>y!==w)),l(`Shortcut ${w} unregistered`)}).catch(l)}function f(){Gs().then(()=>{o.update(()=>[]),l("Unregistered all shortcuts")}).catch(l)}function g(){u=this.value,n(0,u)}const k=_=>c(_);return e.$$set=_=>{"onMessage"in _&&n(6,l=_.onMessage)},[u,i,o,d,c,f,l,g,k]}class ra extends Me{constructor(t){super(),ke(this,t,aa,oa,ve,{onMessage:6})}}function ss(e){let t,n,i,l,o,u,d;return{c(){t=a("br"),n=m(),i=a("input"),l=m(),o=a("button"),o.textContent="Write",r(i,"class","input"),r(i,"placeholder","write to stdin"),r(o,"class","btn")},m(c,f){h(c,t,f),h(c,n,f),h(c,i,f),q(i,e[4]),h(c,l,f),h(c,o,f),u||(d=[A(i,"input",e[14]),A(o,"click",e[8])],u=!0)},p(c,f){f&16&&i.value!==c[4]&&q(i,c[4])},d(c){c&&p(t),c&&p(n),c&&p(i),c&&p(l),c&&p(o),u=!1,de(d)}}}function ua(e){let t,n,i,l,o,u,d,c,f,g,k,_,w,v,y,C,H,U,z,j,P,O,M,R,W=e[5]&&ss(e);return{c(){t=a("div"),n=a("div"),i=T(`Script: + `),l=a("input"),o=m(),u=a("div"),d=T(`Encoding: + `),c=a("input"),f=m(),g=a("div"),k=T(`Working directory: + `),_=a("input"),w=m(),v=a("div"),y=T(`Arguments: + `),C=a("input"),H=m(),U=a("div"),z=a("button"),z.textContent="Run",j=m(),P=a("button"),P.textContent="Kill",O=m(),W&&W.c(),r(l,"class","grow input"),r(n,"class","flex items-center gap-1"),r(c,"class","grow input"),r(u,"class","flex items-center gap-1"),r(_,"class","grow input"),r(_,"placeholder","Working directory"),r(g,"class","flex items-center gap-1"),r(C,"class","grow input"),r(C,"placeholder","Environment variables"),r(v,"class","flex items-center gap-1"),r(z,"class","btn"),r(P,"class","btn"),r(U,"class","flex children:grow gap-1"),r(t,"class","flex flex-col childre:grow gap-1")},m(G,N){h(G,t,N),s(t,n),s(n,i),s(n,l),q(l,e[0]),s(t,o),s(t,u),s(u,d),s(u,c),q(c,e[3]),s(t,f),s(t,g),s(g,k),s(g,_),q(_,e[1]),s(t,w),s(t,v),s(v,y),s(v,C),q(C,e[2]),s(t,H),s(t,U),s(U,z),s(U,j),s(U,P),s(t,O),W&&W.m(t,null),M||(R=[A(l,"input",e[10]),A(c,"input",e[11]),A(_,"input",e[12]),A(C,"input",e[13]),A(z,"click",e[6]),A(P,"click",e[7])],M=!0)},p(G,[N]){N&1&&l.value!==G[0]&&q(l,G[0]),N&8&&c.value!==G[3]&&q(c,G[3]),N&2&&_.value!==G[1]&&q(_,G[1]),N&4&&C.value!==G[2]&&q(C,G[2]),G[5]?W?W.p(G,N):(W=ss(G),W.c(),W.m(t,null)):W&&(W.d(1),W=null)},i:B,o:B,d(G){G&&p(t),W&&W.d(),M=!1,de(R)}}}function ca(e,t,n){const i=navigator.userAgent.includes("Windows");let l=i?"cmd":"sh",o=i?["/C"]:["-c"],{onMessage:u}=t,d='echo "hello world"',c=null,f="SOMETHING=value ANOTHER=2",g="",k="",_;function w(){return f.split(" ").reduce((O,M)=>{let[R,W]=M.split("=");return{...O,[R]:W}},{})}function v(){n(5,_=null);const O=Zn.create(l,[...o,d],{cwd:c||null,env:w(),encoding:g||void 0});O.on("close",M=>{u(`command finished with code ${M.code} and signal ${M.signal}`),n(5,_=null)}),O.on("error",M=>u(`command error: "${M}"`)),O.stdout.on("data",M=>u(`command stdout: "${M}"`)),O.stderr.on("data",M=>u(`command stderr: "${M}"`)),O.spawn().then(M=>{n(5,_=M)}).catch(u)}function y(){_.kill().then(()=>u("killed child process")).catch(u)}function C(){_.write(k).catch(u)}function H(){d=this.value,n(0,d)}function U(){g=this.value,n(3,g)}function z(){c=this.value,n(1,c)}function j(){f=this.value,n(2,f)}function P(){k=this.value,n(4,k)}return e.$$set=O=>{"onMessage"in O&&n(9,u=O.onMessage)},[d,c,f,g,k,_,v,y,C,u,H,U,z,j,P]}class da extends Me{constructor(t){super(),ke(this,t,ca,ua,ve,{onMessage:9})}}var fa={};We(fa,{checkUpdate:()=>Bs,installUpdate:()=>Vs,onUpdaterEvent:()=>Fi});async function Fi(e){return Jt("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function Vs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(o){if(o.error){t(),i(o.error);return}o.status==="DONE"&&(t(),n())}Fi(l).then(o=>{e=o}).catch(o=>{throw t(),o}),li("tauri://update-install").catch(o=>{throw t(),o})})}async function Bs(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function l(u){t(),n({manifest:u,shouldUpdate:!0})}function o(u){if(u.error){t(),i(u.error);return}u.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}Ts("tauri://update-available",u=>{l(u==null?void 0:u.payload)}).catch(u=>{throw t(),u}),Fi(o).then(u=>{e=u}).catch(u=>{throw t(),u}),li("tauri://update").catch(u=>{throw t(),u})})}function pa(e){let t;return{c(){t=a("button"),t.innerHTML='
',r(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){h(n,t,i)},p:B,d(n){n&&p(t)}}}function ma(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",r(t,"class","btn")},m(l,o){h(l,t,o),n||(i=A(t,"click",e[4]),n=!0)},p:B,d(l){l&&p(t),n=!1,i()}}}function ha(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",r(t,"class","btn")},m(l,o){h(l,t,o),n||(i=A(t,"click",e[3]),n=!0)},p:B,d(l){l&&p(t),n=!1,i()}}}function _a(e){let t;function n(o,u){return!o[0]&&!o[2]?ha:!o[1]&&o[2]?ma:pa}let i=n(e),l=i(e);return{c(){t=a("div"),l.c(),r(t,"class","flex children:grow children:h10")},m(o,u){h(o,t,u),l.m(t,null)},p(o,[u]){i===(i=n(o))&&l?l.p(o,u):(l.d(1),l=i(o),l&&(l.c(),l.m(t,null)))},i:B,o:B,d(o){o&&p(t),l.d()}}}function ba(e,t,n){let{onMessage:i}=t,l;ct(async()=>{l=await Jt("tauri://update-status",i)}),Ri(()=>{l&&l()});let o,u,d;async function c(){n(0,o=!0);try{const{shouldUpdate:g,manifest:k}=await Bs();i(`Should update: ${g}`),i(k),n(2,d=g)}catch(g){i(g)}finally{n(0,o=!1)}}async function f(){n(1,u=!0);try{await Vs(),i("Installation complete, restart required."),await ji()}catch(g){i(g)}finally{n(1,u=!1)}}return e.$$set=g=>{"onMessage"in g&&n(5,i=g.onMessage)},[o,u,d,c,f,i]}class ga extends Me{constructor(t){super(),ke(this,t,ba,_a,ve,{onMessage:5})}}var ya={};We(ya,{readText:()=>Js,writeText:()=>$s});async function $s(e){return S({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})}async function Js(){return S({__tauriModule:"Clipboard",message:{cmd:"readText",data:null}})}function va(e){let t,n,i,l,o,u,d,c;return{c(){t=a("div"),n=a("input"),i=m(),l=a("button"),l.textContent="Write",o=m(),u=a("button"),u.textContent="Read",r(n,"class","grow input"),r(n,"placeholder","Text to write to the clipboard"),r(l,"class","btn"),r(l,"type","button"),r(u,"class","btn"),r(u,"type","button"),r(t,"class","flex gap-1")},m(f,g){h(f,t,g),s(t,n),q(n,e[0]),s(t,i),s(t,l),s(t,o),s(t,u),d||(c=[A(n,"input",e[4]),A(l,"click",e[1]),A(u,"click",e[2])],d=!0)},p(f,[g]){g&1&&n.value!==f[0]&&q(n,f[0])},i:B,o:B,d(f){f&&p(t),d=!1,de(c)}}}function wa(e,t,n){let{onMessage:i}=t,l="clipboard message";function o(){$s(l).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){Js().then(c=>{i(`Clipboard contents: ${c}`)}).catch(i)}function d(){l=this.value,n(0,l)}return e.$$set=c=>{"onMessage"in c&&n(3,i=c.onMessage)},[l,o,u,i,d]}class ka extends Me{constructor(t){super(),ke(this,t,wa,va,ve,{onMessage:3})}}function Ma(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
+ `,r(t,"class","flex flex-col gap-2")},m(n,i){h(n,t,i)},p:B,i:B,o:B,d(n){n&&p(t)}}}function Ta(e,t,n){let{onMessage:i}=t;const l=window.constraints={audio:!0,video:!0};function o(d){const c=document.querySelector("video"),f=d.getVideoTracks();i("Got stream with constraints:",l),i(`Using video device: ${f[0].label}`),window.stream=d,c.srcObject=d}function u(d){if(d.name==="ConstraintNotSatisfiedError"){const c=l.video;i(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else d.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: ${d.name}`,d)}return ct(async()=>{try{const d=await navigator.mediaDevices.getUserMedia(l);o(d)}catch(d){u(d)}}),Ri(()=>{window.stream.getTracks().forEach(function(d){d.stop()})}),e.$$set=d=>{"onMessage"in d&&n(0,i=d.onMessage)},[i]}class Ca extends Me{constructor(t){super(),ke(this,t,Ta,Ma,ve,{onMessage:0})}}function Sa(e){let t,n,i,l,o,u;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=m(),l=a("button"),l.textContent="Hide",r(n,"class","btn"),r(n,"id","show"),r(n,"title","Hides and shows the app after 2 seconds"),r(l,"class","btn"),r(l,"id","hide")},m(d,c){h(d,t,c),s(t,n),s(t,i),s(t,l),o||(u=[A(n,"click",e[0]),A(l,"click",e[1])],o=!0)},p:B,i:B,o:B,d(d){d&&p(t),o=!1,de(u)}}}function La(e,t,n){let{onMessage:i}=t;function l(){o().then(()=>{setTimeout(()=>{Ds().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function o(){return Rs().then(()=>i("Hide app")).catch(i)}return e.$$set=u=>{"onMessage"in u&&n(2,i=u.onMessage)},[l,o,i]}class Aa extends Me{constructor(t){super(),ke(this,t,La,Sa,ve,{onMessage:2})}}function os(e,t,n){const i=e.slice();return i[30]=t[n],i}function as(e,t,n){const i=e.slice();return i[33]=t[n],i}function rs(e){let t,n,i,l,o,u,d,c,f,g,k,_,w;function v(j,P){return j[3]?Ea:za}let y=v(e),C=y(e);function H(j,P){return j[2]?Pa:Wa}let U=H(e),z=U(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=m(),l=a("span"),o=a("span"),C.c(),d=m(),c=a("span"),c.innerHTML='
',f=m(),g=a("span"),z.c(),r(n,"class","lt-sm:pl-10 text-darkPrimaryText"),r(o,"title",u=e[3]?"Switch to Light mode":"Switch to Dark mode"),r(o,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(c,"title","Minimize"),r(c,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(g,"title",k=e[2]?"Restore":"Maximize"),r(g,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),r(l,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),r(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),r(t,"data-tauri-drag-region","")},m(j,P){h(j,t,P),s(t,n),s(t,i),s(t,l),s(l,o),C.m(o,null),s(l,d),s(l,c),s(l,f),s(l,g),z.m(g,null),_||(w=[A(o,"click",e[11]),A(c,"click",e[9]),A(g,"click",e[10])],_=!0)},p(j,P){y!==(y=v(j))&&(C.d(1),C=y(j),C&&(C.c(),C.m(o,null))),P[0]&8&&u!==(u=j[3]?"Switch to Light mode":"Switch to Dark mode")&&r(o,"title",u),U!==(U=H(j))&&(z.d(1),z=U(j),z&&(z.c(),z.m(g,null))),P[0]&4&&k!==(k=j[2]?"Restore":"Maximize")&&r(g,"title",k)},d(j){j&&p(t),C.d(),z.d(),_=!1,de(w)}}}function za(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-moon")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Ea(e){let t;return{c(){t=a("div"),r(t,"class","i-ph-sun")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Wa(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-maximize")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Pa(e){let t;return{c(){t=a("div"),r(t,"class","i-codicon-chrome-restore")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Oa(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function Da(e){let t;return{c(){t=a("span"),r(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){h(n,t,i)},d(n){n&&p(t)}}}function us(e){let t,n,i,l,o,u,d,c,f;function g(w,v){return w[3]?Ia:Ra}let k=g(e),_=k(e);return{c(){t=a("a"),_.c(),n=m(),i=a("br"),l=m(),o=a("div"),u=m(),d=a("br"),r(t,"href","##"),r(t,"class","nv justify-between h-8"),r(o,"class","bg-white/5 h-2px")},m(w,v){h(w,t,v),_.m(t,null),h(w,n,v),h(w,i,v),h(w,l,v),h(w,o,v),h(w,u,v),h(w,d,v),c||(f=A(t,"click",e[11]),c=!0)},p(w,v){k!==(k=g(w))&&(_.d(1),_=k(w),_&&(_.c(),_.m(t,null)))},d(w){w&&p(t),_.d(),w&&p(n),w&&p(i),w&&p(l),w&&p(o),w&&p(u),w&&p(d),c=!1,f()}}}function Ra(e){let t,n;return{c(){t=T(`Switch to Dark mode + `),n=a("div"),r(n,"class","i-ph-moon")},m(i,l){h(i,t,l),h(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function Ia(e){let t,n;return{c(){t=T(`Switch to Light mode + `),n=a("div"),r(n,"class","i-ph-sun")},m(i,l){h(i,t,l),h(i,n,l)},d(i){i&&p(t),i&&p(n)}}}function Na(e){let t,n,i,l,o=e[33].label+"",u,d,c,f;function g(){return e[19](e[33])}return{c(){t=a("a"),n=a("div"),i=m(),l=a("p"),u=T(o),r(n,"class",e[33].icon+" mr-2"),r(t,"href","##"),r(t,"class",d="nv "+(e[1]===e[33]?"nv_selected":""))},m(k,_){h(k,t,_),s(t,n),s(t,i),s(t,l),s(l,u),c||(f=A(t,"click",g),c=!0)},p(k,_){e=k,_[0]&2&&d!==(d="nv "+(e[1]===e[33]?"nv_selected":""))&&r(t,"class",d)},d(k){k&&p(t),c=!1,f()}}}function cs(e){let t,n=e[33]&&Na(e);return{c(){n&&n.c(),t=ti()},m(i,l){n&&n.m(i,l),h(i,t,l)},p(i,l){i[33]&&n.p(i,l)},d(i){n&&n.d(i),i&&p(t)}}}function ds(e){let t,n=e[30].html+"",i;return{c(){t=new eo(!1),i=ti(),t.a=i},m(l,o){t.m(n,l,o),h(l,i,o)},p(l,o){o[0]&64&&n!==(n=l[30].html+"")&&t.p(n)},d(l){l&&p(i),l&&t.d()}}}function Ha(e){let t,n,i,l,o,u,d,c,f,g,k,_,w,v,y,C,H,U,z,j,P,O,M,R,W,G,N=e[1].label+"",J,ie,fe,ee,X,I,$,K,te,se,_e,ue,be,Se,oe,x,pe,Le,L=e[5]&&rs(e);function F(D,ne){return D[0]?Da:Oa}let Ae=F(e),ge=Ae(e),ae=!e[5]&&us(e),ce=e[7],re=[];for(let D=0;D`,k=m(),_=a("a"),_.innerHTML=`GitHub + `,w=m(),v=a("a"),v.innerHTML=`Source + `,y=m(),C=a("br"),H=m(),U=a("div"),z=m(),j=a("br"),P=m(),O=a("div");for(let D=0;D',Se=m(),oe=a("div");for(let D=0;D{Bt(V,1)}),ii()}ye?(X=new ye(Ne(D)),Qn(X.$$.fragment),Ce(X.$$.fragment,1),Vt(X,ee,null)):X=null}if(ne[0]&64){Pe=D[6];let V;for(V=0;V{y(`File drop: ${JSON.stringify(I.payload)}`)});const l=navigator.userAgent.toLowerCase(),o=l.includes("android")||l.includes("iphone"),u=[{label:"Welcome",component:Ao,icon:"i-ph-hand-waving"},{label:"Communication",component:Do,icon:"i-codicon-radio-tower"},!o&&{label:"CLI",component:Wo,icon:"i-codicon-terminal"},{label:"HTTP",component:Vo,icon:"i-ph-globe-hemisphere-west"},!o&&{label:"Notifications",component:Xo,icon:"i-codicon-bell-dot"},!o&&{label:"App",component:Aa,icon:"i-codicon-hubot"},!o&&{label:"Window",component:na,icon:"i-codicon-window"},!o&&{label:"Shortcuts",component:ra,icon:"i-codicon-record-keys"},{label:"Shell",component:da,icon:"i-codicon-terminal-bash"},!o&&{label:"Updater",component:ga,icon:"i-codicon-cloud-download"},!o&&{label:"Clipboard",component:ka,icon:"i-codicon-clippy"},{label:"WebRTC",component:Ca,icon:"i-ph-broadcast"}];let d=u[0];function c(I){n(1,d=I)}let f;ct(async()=>{const I=Kn();n(2,f=await I.isMaximized()),Jt("tauri://resize",async()=>{n(2,f=await I.isMaximized())})});function g(){Kn().minimize()}async function k(){const I=Kn();await I.isMaximized()?I.unmaximize():I.maximize()}let _;ct(()=>{n(3,_=localStorage&&localStorage.getItem("theme")=="dark"),ps(_)});function w(){n(3,_=!_),ps(_)}let v=gs([]);hs(e,v,I=>n(6,i=I));function y(I){v.update($=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof I=="string"?I:JSON.stringify(I,null,1))+"
"},...$])}function C(I){v.update($=>[{html:`
[${new Date().toLocaleTimeString()}]: `+I+"
"},...$])}function H(){v.update(()=>[])}let U,z,j;function P(I){j=I.clientY;const $=window.getComputedStyle(U);z=parseInt($.height,10);const K=se=>{const _e=se.clientY-j,ue=z-_e;n(4,U.style.height=`${ue{document.removeEventListener("mouseup",te),document.removeEventListener("mousemove",K)};document.addEventListener("mouseup",te),document.addEventListener("mousemove",K)}let O;ct(async()=>{n(5,O=await Es()==="win32")});let M=!1,R,W,G=!1,N=0,J=0;const ie=(I,$,K)=>Math.min(Math.max($,I),K);ct(()=>{n(17,R=document.querySelector("#sidebar")),W=document.querySelector("#sidebarToggle"),document.addEventListener("click",I=>{W.contains(I.target)?n(0,M=!M):M&&!R.contains(I.target)&&n(0,M=!1)}),document.addEventListener("touchstart",I=>{if(W.contains(I.target))return;const $=I.touches[0].clientX;(0<$&&$<20&&!M||M)&&(G=!0,N=$)}),document.addEventListener("touchmove",I=>{if(G){const $=I.touches[0].clientX;J=$;const K=($-N)/10;R.style.setProperty("--translate-x",`-${ie(0,M?0-K:18.75-K,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(G){const I=(J-N)/10;n(0,M=M?I>-(18.75/2):I>18.75/2)}G=!1})});const fe=()=>Ii("https://tauri.app/"),ee=I=>{c(I),n(0,M=!1)};function X(I){Oi[I?"unshift":"push"](()=>{U=I,n(4,U)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const I=document.querySelector("#sidebar");I&&Ua(I,M)}},[M,d,f,_,U,O,i,u,c,g,k,w,v,y,C,H,P,R,fe,ee,X]}class qa extends Me{constructor(t){super(),ke(this,t,ja,Ha,ve,{},null,[-1,-1])}}new qa({target:document.querySelector("#app")}); diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 7a9c3cfcf7a..18c18d39e47 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -2785,29 +2785,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "rfd" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2583255eadc4e0d816cb7648371cc91e49cbac85b0748b6ab417093bff4040" -dependencies = [ - "block", - "dispatch", - "glib-sys", - "gobject-sys", - "gtk-sys", - "js-sys", - "log", - "objc", - "objc-foundation", - "objc_id", - "raw-window-handle", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows 0.44.0", -] - [[package]] name = "rustc_version" version = "0.3.3" @@ -3357,7 +3334,6 @@ dependencies = [ "raw-window-handle", "regex", "reqwest", - "rfd", "semver 1.0.16", "serde", "serde_json", diff --git a/examples/api/src-tauri/src/tray.rs b/examples/api/src-tauri/src/tray.rs index c4e2ba82aa9..2a1e07951d0 100644 --- a/examples/api/src-tauri/src/tray.rs +++ b/examples/api/src-tauri/src/tray.rs @@ -4,10 +4,6 @@ use std::sync::atomic::{AtomicBool, Ordering}; use tauri::{ - api::{ - dialog::{MessageDialogBuilder, MessageDialogButtons}, - shell, - }, CustomMenuItem, Manager, SystemTray, SystemTrayEvent, SystemTrayMenu, WindowBuilder, WindowUrl, }; @@ -25,7 +21,6 @@ pub fn create_tray(app: &tauri::App) -> tauri::Result<()> { tray_menu1 = tray_menu1 .add_item(CustomMenuItem::new("switch_menu", "Switch Menu")) - .add_item(CustomMenuItem::new("about", "About")) .add_item(CustomMenuItem::new("exit_app", "Quit")) .add_item(CustomMenuItem::new("destroy", "Destroy")); @@ -33,7 +28,6 @@ pub fn create_tray(app: &tauri::App) -> tauri::Result<()> { .add_item(CustomMenuItem::new("toggle", "Toggle")) .add_item(CustomMenuItem::new("new", "New window")) .add_item(CustomMenuItem::new("switch_menu", "Switch Menu")) - .add_item(CustomMenuItem::new("about", "About")) .add_item(CustomMenuItem::new("exit_app", "Quit")) .add_item(CustomMenuItem::new("destroy", "Destroy")); let is_menu1 = AtomicBool::new(true); @@ -118,20 +112,6 @@ pub fn create_tray(app: &tauri::App) -> tauri::Result<()> { tray_handle.set_tooltip(tooltip).unwrap(); is_menu1.store(!flag, Ordering::Relaxed); } - "about" => { - let window = handle.get_window("main").unwrap(); - MessageDialogBuilder::new("About app", "Tauri demo app") - .parent(&window) - .buttons(MessageDialogButtons::OkCancelWithLabels( - "Homepage".into(), - "know it".into(), - )) - .show(move |ok| { - if ok { - shell::open(&window.shell_scope(), "https://tauri.app/", None).unwrap(); - } - }); - } _ => {} } } diff --git a/examples/api/src-tauri/tauri.conf.json b/examples/api/src-tauri/tauri.conf.json index 826f466db62..75fd2aa335d 100644 --- a/examples/api/src-tauri/tauri.conf.json +++ b/examples/api/src-tauri/tauri.conf.json @@ -83,7 +83,6 @@ }, "updater": { "active": true, - "dialog": false, "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK", "endpoints": [ "https://tauri-update-server.vercel.app/update/{{target}}/{{current_version}}" @@ -93,8 +92,14 @@ "all": true, "fs": { "scope": { - "allow": ["$APPDATA/db/**", "$DOWNLOAD/**", "$RESOURCE/**"], - "deny": ["$APPDATA/db/*.stronghold"] + "allow": [ + "$APPDATA/db/**", + "$DOWNLOAD/**", + "$RESOURCE/**" + ], + "deny": [ + "$APPDATA/db/*.stronghold" + ] } }, "shell": { @@ -103,31 +108,50 @@ { "name": "sh", "cmd": "sh", - "args": ["-c", { "validator": "\\S+" }] + "args": [ + "-c", + { + "validator": "\\S+" + } + ] }, { "name": "cmd", "cmd": "cmd", - "args": ["/C", { "validator": "\\S+" }] + "args": [ + "/C", + { + "validator": "\\S+" + } + ] } ] }, "protocol": { "asset": true, "assetScope": { - "allow": ["$APPDATA/db/**", "$RESOURCE/**"], - "deny": ["$APPDATA/db/*.stronghold"] + "allow": [ + "$APPDATA/db/**", + "$RESOURCE/**" + ], + "deny": [ + "$APPDATA/db/*.stronghold" + ] } }, "http": { - "scope": ["http://localhost:3003"] + "scope": [ + "http://localhost:3003" + ] } }, "windows": [], "security": { "csp": { "default-src": "'self' customprotocol: asset:", - "font-src": ["https://fonts.gstatic.com"], + "font-src": [ + "https://fonts.gstatic.com" + ], "img-src": "'self' asset: https://asset.localhost blob: data:", "style-src": "'unsafe-inline' 'self' https://fonts.googleapis.com" }, @@ -139,4 +163,4 @@ "menuOnLeftClick": false } } -} +} \ No newline at end of file diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte index 868c5ce2b9c..16b99f6edf1 100644 --- a/examples/api/src/App.svelte +++ b/examples/api/src/App.svelte @@ -7,7 +7,6 @@ import Welcome from './views/Welcome.svelte' import Cli from './views/Cli.svelte' import Communication from './views/Communication.svelte' - import Dialog from './views/Dialog.svelte' import Http from './views/Http.svelte' import Notifications from './views/Notifications.svelte' import Window from './views/Window.svelte' @@ -19,17 +18,6 @@ import { onMount } from 'svelte' import { listen } from '@tauri-apps/api/event' - import { ask } from '@tauri-apps/api/dialog' - - if (appWindow.label !== 'main') { - appWindow.onCloseRequested(async (event) => { - const confirmed = await confirm('Are you sure?') - if (!confirmed) { - // user did not confirm closing the window; let's prevent it - event.preventDefault() - } - }) - } appWindow.onFileDropEvent((event) => { onMessage(`File drop: ${JSON.stringify(event.payload)}`) @@ -54,11 +42,6 @@ component: Cli, icon: 'i-codicon-terminal' }, - !isMobile && { - label: 'Dialog', - component: Dialog, - icon: 'i-codicon-multiple-windows' - }, { label: 'HTTP', component: Http, @@ -125,21 +108,6 @@ ;(await window.isMaximized()) ? window.unmaximize() : window.maximize() } - let confirmed_close = false - async function close() { - if (!confirmed_close) { - confirmed_close = await ask( - 'Are you sure that you want to close this window?', - { - title: 'Tauri API' - } - ) - if (confirmed_close) { - getCurrent().close() - } - } - } - // dark/light let isDark onMount(() => { @@ -326,13 +294,6 @@
{/if} - -
-
{/if} diff --git a/examples/api/src/views/Dialog.svelte b/examples/api/src/views/Dialog.svelte deleted file mode 100644 index 8649606b1a5..00000000000 --- a/examples/api/src/views/Dialog.svelte +++ /dev/null @@ -1,87 +0,0 @@ - - -
- - -
- -
-
- - -
-
- - -
-
- - diff --git a/examples/updater/src-tauri/tauri.conf.json b/examples/updater/src-tauri/tauri.conf.json index 797800ee3c1..6852d94d867 100644 --- a/examples/updater/src-tauri/tauri.conf.json +++ b/examples/updater/src-tauri/tauri.conf.json @@ -63,7 +63,6 @@ }, "updater": { "active": true, - "dialog": true, "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDE5QzMxNjYwNTM5OEUwNTgKUldSWTRKaFRZQmJER1h4d1ZMYVA3dnluSjdpN2RmMldJR09hUFFlZDY0SlFqckkvRUJhZDJVZXAK", "endpoints": [ "https://tauri-update-server.vercel.app/update/{{target}}/{{current_version}}" diff --git a/tooling/api/docs/js-api.json b/tooling/api/docs/js-api.json index 4927a8546fd..4baf08dc596 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/9f223491c/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/9f223491c/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/9f223491c/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/9f223491c/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/9f223491c/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/9f223491c/tooling/api/src/app.ts#L29"}]},{"id":12,"name":"dialog","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Native system dialogs for opening and saving files.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.dialog`"},{"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.dialog`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.dialog) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"dialog\": {\n \"all\": true, // enable all dialog APIs\n \"ask\": true, // enable dialog ask API\n \"confirm\": true, // enable dialog confirm API\n \"message\": true, // enable dialog message API\n \"open\": true, // enable file open API\n \"save\": true // enable file save API\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":31,"name":"ConfirmDialogOptions","kind":256,"kindString":"Interface","flags":{},"children":[{"id":35,"name":"cancelLabel","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The label of the cancel button."}]},"sources":[{"fileName":"dialog.ts","line":112,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L112"}],"type":{"type":"intrinsic","name":"string"}},{"id":34,"name":"okLabel","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The label of the confirm button."}]},"sources":[{"fileName":"dialog.ts","line":110,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L110"}],"type":{"type":"intrinsic","name":"string"}},{"id":32,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The title of the dialog. Defaults to the app name."}]},"sources":[{"fileName":"dialog.ts","line":106,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L106"}],"type":{"type":"intrinsic","name":"string"}},{"id":33,"name":"type","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The type of the dialog. Defaults to "},{"kind":"code","text":"`info`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"dialog.ts","line":108,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L108"}],"type":{"type":"union","types":[{"type":"literal","value":"info"},{"type":"literal","value":"warning"},{"type":"literal","value":"error"}]}}],"groups":[{"title":"Properties","children":[35,34,32,33]}],"sources":[{"fileName":"dialog.ts","line":104,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L104"}]},{"id":13,"name":"DialogFilter","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Extension filters for the file dialog."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":15,"name":"extensions","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Extensions to filter, without a "},{"kind":"code","text":"`.`"},{"kind":"text","text":" prefix."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nextensions: ['svg', 'png']\n```"}]}]},"sources":[{"fileName":"dialog.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L48"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":14,"name":"name","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Filter name."}]},"sources":[{"fileName":"dialog.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L40"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[15,14]}],"sources":[{"fileName":"dialog.ts","line":38,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L38"}]},{"id":27,"name":"MessageDialogOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":30,"name":"okLabel","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The label of the confirm button."}]},"sources":[{"fileName":"dialog.ts","line":101,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L101"}],"type":{"type":"intrinsic","name":"string"}},{"id":28,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The title of the dialog. Defaults to the app name."}]},"sources":[{"fileName":"dialog.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L97"}],"type":{"type":"intrinsic","name":"string"}},{"id":29,"name":"type","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The type of the dialog. Defaults to "},{"kind":"code","text":"`info`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"dialog.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L99"}],"type":{"type":"union","types":[{"type":"literal","value":"info"},{"type":"literal","value":"warning"},{"type":"literal","value":"error"}]}}],"groups":[{"title":"Properties","children":[30,28,29]}],"sources":[{"fileName":"dialog.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L95"}]},{"id":16,"name":"OpenDialogOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options for the open dialog."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":19,"name":"defaultPath","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Initial directory or file path."}]},"sources":[{"fileName":"dialog.ts","line":62,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L62"}],"type":{"type":"intrinsic","name":"string"}},{"id":21,"name":"directory","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the dialog is a directory selection or not."}]},"sources":[{"fileName":"dialog.ts","line":66,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L66"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":18,"name":"filters","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The filters of the dialog."}]},"sources":[{"fileName":"dialog.ts","line":60,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L60"}],"type":{"type":"array","elementType":{"type":"reference","id":13,"name":"DialogFilter"}}},{"id":20,"name":"multiple","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the dialog allows multiple selection or not."}]},"sources":[{"fileName":"dialog.ts","line":64,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L64"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":22,"name":"recursive","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`directory`"},{"kind":"text","text":" is true, indicates that it will be read recursively later.\nDefines whether subdirectories will be allowed on the scope or not."}]},"sources":[{"fileName":"dialog.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L71"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":17,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The title of the dialog window."}]},"sources":[{"fileName":"dialog.ts","line":58,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L58"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[19,21,18,20,22,17]}],"sources":[{"fileName":"dialog.ts","line":56,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L56"}]},{"id":23,"name":"SaveDialogOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options for the save dialog."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":26,"name":"defaultPath","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Initial directory or file path.\nIf it's a directory path, the dialog interface will change to that folder.\nIf it's not an existing directory, the file name will be set to the dialog's file name input and the dialog will be set to the parent folder."}]},"sources":[{"fileName":"dialog.ts","line":89,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L89"}],"type":{"type":"intrinsic","name":"string"}},{"id":25,"name":"filters","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The filters of the dialog."}]},"sources":[{"fileName":"dialog.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L83"}],"type":{"type":"array","elementType":{"type":"reference","id":13,"name":"DialogFilter"}}},{"id":24,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The title of the dialog window."}]},"sources":[{"fileName":"dialog.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L81"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[26,25,24]}],"sources":[{"fileName":"dialog.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L79"}]},{"id":54,"name":"ask","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":257,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L257"}],"signatures":[{"id":55,"name":"ask","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows a question dialog with "},{"kind":"code","text":"`Yes`"},{"kind":"text","text":" and "},{"kind":"code","text":"`No`"},{"kind":"text","text":" buttons."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { ask } from '@tauri-apps/api/dialog';\nconst yes = await ask('Are you sure?', 'Tauri');\nconst yes2 = await ask('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a boolean indicating whether "},{"kind":"code","text":"`Yes`"},{"kind":"text","text":" was clicked or not."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":56,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The message to show."}]},"type":{"type":"intrinsic","name":"string"}},{"id":57,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The dialog's options. If a string, it represents the dialog title."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":31,"name":"ConfirmDialogOptions"}]}}],"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":58,"name":"confirm","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":293,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L293"}],"signatures":[{"id":59,"name":"confirm","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows a question dialog with "},{"kind":"code","text":"`Ok`"},{"kind":"text","text":" and "},{"kind":"code","text":"`Cancel`"},{"kind":"text","text":" buttons."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { confirm } from '@tauri-apps/api/dialog';\nconst confirmed = await confirm('Are you sure?', 'Tauri');\nconst confirmed2 = await confirm('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a boolean indicating whether "},{"kind":"code","text":"`Ok`"},{"kind":"text","text":" was clicked or not."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":60,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The message to show."}]},"type":{"type":"intrinsic","name":"string"}},{"id":61,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The dialog's options. If a string, it represents the dialog title."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":31,"name":"ConfirmDialogOptions"}]}}],"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":50,"name":"message","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":224,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L224"}],"signatures":[{"id":51,"name":"message","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Shows a message dialog with an "},{"kind":"code","text":"`Ok`"},{"kind":"text","text":" button."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { message } from '@tauri-apps/api/dialog';\nawait message('Tauri is awesome', 'Tauri');\nawait message('File not found', { title: 'Tauri', type: 'error' });\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":52,"name":"message","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The message to show."}]},"type":{"type":"intrinsic","name":"string"}},{"id":53,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The dialog's options. If a string, it represents the dialog title."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":27,"name":"MessageDialogOptions"}]}}],"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":36,"name":"open","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":144,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L144"},{"fileName":"dialog.ts","line":147,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L147"},{"fileName":"dialog.ts","line":150,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L150"},{"fileName":"dialog.ts","line":153,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L153"}],"signatures":[{"id":37,"name":"open","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Open a file/directory selection dialog.\n\nThe selected paths are added to the filesystem and asset protocol allowlist scopes.\nWhen security is more important than the easy of use of this API,\nprefer writing a dedicated command instead.\n\nNote that the allowlist scope change is not persisted, so the values are cleared when the application is restarted.\nYou can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope)."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { open } from '@tauri-apps/api/dialog';\n// Open a selection dialog for image files\nconst selected = await open({\n multiple: true,\n filters: [{\n name: 'Image',\n extensions: ['png', 'jpeg']\n }]\n});\n```"},{"kind":"text","text":"\nNote that the "},{"kind":"code","text":"`open`"},{"kind":"text","text":" function returns a conditional type depending on the "},{"kind":"code","text":"`multiple`"},{"kind":"text","text":" option:\n- false (default) -> "},{"kind":"code","text":"`Promise`"},{"kind":"text","text":"\n- true -> "},{"kind":"code","text":"`Promise`"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the selected path(s)"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":38,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":16,"name":"OpenDialogOptions"},{"type":"reflection","declaration":{"id":39,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":40,"name":"multiple","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"dialog.ts","line":145,"character":34,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L145"}],"type":{"type":"literal","value":false}}],"groups":[{"title":"Properties","children":[40]}],"sources":[{"fileName":"dialog.ts","line":145,"character":32,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L145"}]}}]}}],"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"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":41,"name":"open","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":42,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":16,"name":"OpenDialogOptions"},{"type":"reflection","declaration":{"id":43,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":44,"name":"multiple","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"dialog.ts","line":148,"character":34,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L148"}],"type":{"type":"literal","value":true}}],"groups":[{"title":"Properties","children":[44]}],"sources":[{"fileName":"dialog.ts","line":148,"character":32,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L148"}]}}]}}],"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"array","elementType":{"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":45,"name":"open","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":46,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":16,"name":"OpenDialogOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"array","elementType":{"type":"intrinsic","name":"string"}},{"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":47,"name":"save","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"dialog.ts","line":193,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L193"}],"signatures":[{"id":48,"name":"save","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Open a file/directory save dialog.\n\nThe selected path is added to the filesystem and asset protocol allowlist scopes.\nWhen security is more important than the easy of use of this API,\nprefer writing a dedicated command instead.\n\nNote that the allowlist scope change is not persisted, so the values are cleared when the application is restarted.\nYou can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope)."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { save } from '@tauri-apps/api/dialog';\nconst filePath = await save({\n filters: [{\n name: 'Image',\n extensions: ['png', 'jpeg']\n }]\n});\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the selected path."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":49,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":23,"name":"SaveDialogOptions"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"intrinsic","name":"string"},{"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":"Interfaces","children":[31,13,27,16,23]},{"title":"Functions","children":[54,58,50,36,47]}],"sources":[{"fileName":"dialog.ts","line":31,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/dialog.ts#L31"}]},{"id":62,"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":64,"name":"TauriEvent","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":78,"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/9f223491c/tooling/api/src/event.ts#L34"}],"type":{"type":"literal","value":"tauri://update"}},{"id":82,"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/9f223491c/tooling/api/src/event.ts#L38"}],"type":{"type":"literal","value":"tauri://update-download-progress"}},{"id":80,"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/9f223491c/tooling/api/src/event.ts#L36"}],"type":{"type":"literal","value":"tauri://update-install"}},{"id":77,"name":"MENU","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/event.ts#L33"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":81,"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/9f223491c/tooling/api/src/event.ts#L37"}],"type":{"type":"literal","value":"tauri://update-status"}},{"id":79,"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/9f223491c/tooling/api/src/event.ts#L35"}],"type":{"type":"literal","value":"tauri://update-available"}},{"id":71,"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/9f223491c/tooling/api/src/event.ts#L27"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":67,"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/9f223491c/tooling/api/src/event.ts#L23"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":68,"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/9f223491c/tooling/api/src/event.ts#L24"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":69,"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/9f223491c/tooling/api/src/event.ts#L25"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":74,"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/9f223491c/tooling/api/src/event.ts#L30"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":76,"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/9f223491c/tooling/api/src/event.ts#L32"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":75,"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/9f223491c/tooling/api/src/event.ts#L31"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":70,"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/9f223491c/tooling/api/src/event.ts#L26"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":66,"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/9f223491c/tooling/api/src/event.ts#L22"}],"type":{"type":"literal","value":"tauri://move"}},{"id":65,"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/9f223491c/tooling/api/src/event.ts#L21"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":72,"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/9f223491c/tooling/api/src/event.ts#L28"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":73,"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/9f223491c/tooling/api/src/event.ts#L29"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[78,82,80,77,81,79,71,67,68,69,74,76,75,70,66,65,72,73]}],"sources":[{"fileName":"event.ts","line":20,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/event.ts#L20"}]},{"id":1075,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":1076,"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/9f223491c/tooling/api/src/helpers/event.ts#L12"}],"type":{"type":"reference","id":63,"name":"EventName"}},{"id":1078,"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/9f223491c/tooling/api/src/helpers/event.ts#L16"}],"type":{"type":"intrinsic","name":"number"}},{"id":1079,"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/9f223491c/tooling/api/src/helpers/event.ts#L18"}],"type":{"type":"reference","id":1080,"name":"T"}},{"id":1077,"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/9f223491c/tooling/api/src/helpers/event.ts#L14"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[1076,1078,1079,1077]}],"sources":[{"fileName":"helpers/event.ts","line":10,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/helpers/event.ts#L10"}],"typeParameters":[{"id":1080,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":1081,"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/9f223491c/tooling/api/src/helpers/event.ts#L21"}],"typeParameters":[{"id":1085,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":1082,"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/9f223491c/tooling/api/src/helpers/event.ts#L21"}],"signatures":[{"id":1083,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":1084,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1075,"typeArguments":[{"type":"reference","id":1085,"name":"T"}],"name":"Event"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":63,"name":"EventName","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"event.ts","line":15,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/event.ts#L15"}],"type":{"type":"union","types":[{"type":"template-literal","head":"","tail":[[{"type":"reference","id":64,"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":1086,"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/9f223491c/tooling/api/src/helpers/event.ts#L23"}],"type":{"type":"reflection","declaration":{"id":1087,"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/9f223491c/tooling/api/src/helpers/event.ts#L23"}],"signatures":[{"id":1088,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":93,"name":"emit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":112,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/event.ts#L112"}],"signatures":[{"id":94,"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":95,"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":96,"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":83,"name":"listen","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":62,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/event.ts#L62"}],"signatures":[{"id":84,"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":85,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":86,"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":63,"name":"EventName"}},{"id":87,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","id":1081,"typeArguments":[{"type":"reference","id":85,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1086,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":88,"name":"once","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":93,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/event.ts#L93"}],"signatures":[{"id":89,"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":90,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":91,"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":63,"name":"EventName"}},{"id":92,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1081,"typeArguments":[{"type":"reference","id":90,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1086,"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":[64]},{"title":"Interfaces","children":[1075]},{"title":"Type Aliases","children":[1081,63,1086]},{"title":"Functions","children":[93,83,88]}],"sources":[{"fileName":"event.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/event.ts#L12"}]},{"id":97,"name":"http","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Access the HTTP client written in Rust.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.http`"},{"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 allowlisted on "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"http\": {\n \"all\": true, // enable all http APIs\n \"request\": true // enable HTTP request API\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 URLs and paths that can be accessed using glob patterns.\n\nFor instance, this scope configuration only allows making HTTP requests to the GitHub API for the "},{"kind":"code","text":"`tauri-apps`"},{"kind":"text","text":" organization:\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"http\": {\n \"scope\": [\"https://api.github.com/repos/tauri-apps/*\"]\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nTrying to execute any API with a URL not configured on the scope results in a promise rejection due to denied access."}]},"children":[{"id":193,"name":"ResponseType","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":196,"name":"Binary","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"http.ts","line":74,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L74"}],"type":{"type":"literal","value":3}},{"id":194,"name":"JSON","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"http.ts","line":72,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L72"}],"type":{"type":"literal","value":1}},{"id":195,"name":"Text","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"http.ts","line":73,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L73"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[196,194,195]}],"sources":[{"fileName":"http.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L71"}]},{"id":124,"name":"Body","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"The body object to be used on POST and PUT requests."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":142,"name":"payload","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L95"}],"type":{"type":"intrinsic","name":"unknown"}},{"id":141,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":94,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L94"}],"type":{"type":"intrinsic","name":"string"}},{"id":134,"name":"bytes","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":217,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L217"}],"signatures":[{"id":135,"name":"bytes","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new byte array body."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nBody.bytes(new Uint8Array([1, 2, 3]));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":136,"name":"bytes","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body byte array."}]},"type":{"type":"union","types":[{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Iterable","qualifiedName":"Iterable","package":"typescript"},{"type":"reference","name":"ArrayBuffer","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","qualifiedName":"ArrayBuffer","package":"typescript"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"ArrayLike","qualifiedName":"ArrayLike","package":"typescript"}]}}],"type":{"type":"reference","id":124,"name":"Body"}}]},{"id":125,"name":"form","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":134,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L134"}],"signatures":[{"id":126,"name":"form","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new form data body. The form data is an object where each key is the entry name,\nand the value is either a string or a file object.\n\nBy default it sets the "},{"kind":"code","text":"`application/x-www-form-urlencoded`"},{"kind":"text","text":" Content-Type header,\nbut you can set it to "},{"kind":"code","text":"`multipart/form-data`"},{"kind":"text","text":" if the Cargo feature "},{"kind":"code","text":"`http-multipart`"},{"kind":"text","text":" is enabled.\n\nNote that a file path must be allowed in the "},{"kind":"code","text":"`fs`"},{"kind":"text","text":" allowlist scope."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nconst body = Body.form({\n key: 'value',\n image: {\n file: '/path/to/file', // either a path or an array buffer of the file contents\n mime: 'image/jpeg', // optional\n fileName: 'image.jpg' // optional\n }\n});\n\n// alternatively, use a FormData:\nconst form = new FormData();\nform.append('key', 'value');\nform.append('image', file, 'image.png');\nconst formBody = Body.form(form);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":127,"name":"data","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body data."}]},"type":{"type":"union","types":[{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"reference","id":104,"name":"Part"}],"name":"Record","qualifiedName":"Record","package":"typescript"},{"type":"reference","name":"FormData","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/API/FormData","qualifiedName":"FormData","package":"typescript"}]}}],"type":{"type":"reference","id":124,"name":"Body"}}]},{"id":128,"name":"json","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":185,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L185"}],"signatures":[{"id":129,"name":"json","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new JSON body."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nBody.json({\n registered: true,\n name: 'tauri'\n});\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":130,"name":"data","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body JSON object."}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"reference","id":124,"name":"Body"}}]},{"id":131,"name":"text","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":201,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L201"}],"signatures":[{"id":132,"name":"text","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new UTF-8 string body."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nBody.text('The body content as a string');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":133,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body string."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","id":124,"name":"Body"}}]}],"groups":[{"title":"Properties","children":[142,141]},{"title":"Methods","children":[134,125,128,131]}],"sources":[{"fileName":"http.ts","line":93,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L93"}]},{"id":143,"name":"Client","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":147,"name":"id","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":303,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L303"}],"type":{"type":"intrinsic","name":"number"}},{"id":176,"name":"delete","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L484"}],"signatures":[{"id":177,"name":"delete","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a DELETE request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.delete('http://localhost:3003/users/1');\n```"}]}]},"typeParameter":[{"id":178,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":179,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":180,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":114,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":181,"typeArguments":[{"type":"reference","id":178,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":148,"name":"drop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":318,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L318"}],"signatures":[{"id":149,"name":"drop","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Drops the client instance."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\nawait client.drop();\n```"}]}]},"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":154,"name":"get","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":389,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L389"}],"signatures":[{"id":155,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a GET request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, ResponseType } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.get('http://localhost:3003/users', {\n timeout: 30,\n // the expected response type\n responseType: ResponseType.JSON\n});\n```"}]}]},"typeParameter":[{"id":156,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":157,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":158,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":114,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":181,"typeArguments":[{"type":"reference","id":156,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":171,"name":"patch","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":467,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L467"}],"signatures":[{"id":172,"name":"patch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a PATCH request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, Body } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.patch('http://localhost:3003/users/1', {\n body: Body.json({ email: 'contact@tauri.app' })\n});\n```"}]}]},"typeParameter":[{"id":173,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":174,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":175,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":114,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":181,"typeArguments":[{"type":"reference","id":173,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":159,"name":"post","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":413,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L413"}],"signatures":[{"id":160,"name":"post","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a POST request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, Body, ResponseType } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.post('http://localhost:3003/users', {\n body: Body.json({\n name: 'tauri',\n password: 'awesome'\n }),\n // in this case the server returns a simple string\n responseType: ResponseType.Text,\n});\n```"}]}]},"typeParameter":[{"id":161,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":162,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":163,"name":"body","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":124,"name":"Body"}},{"id":164,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":114,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":181,"typeArguments":[{"type":"reference","id":161,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":165,"name":"put","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":443,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L443"}],"signatures":[{"id":166,"name":"put","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a PUT request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, Body } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.put('http://localhost:3003/users/1', {\n body: Body.form({\n file: {\n file: '/home/tauri/avatar.png',\n mime: 'image/png',\n fileName: 'avatar.png'\n }\n })\n});\n```"}]}]},"typeParameter":[{"id":167,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":168,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":169,"name":"body","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":124,"name":"Body"}},{"id":170,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":114,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":181,"typeArguments":[{"type":"reference","id":167,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":150,"name":"request","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":340,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L340"}],"signatures":[{"id":151,"name":"request","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes an HTTP request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.request({\n method: 'GET',\n url: 'http://localhost:3003/users',\n});\n```"}]}]},"typeParameter":[{"id":152,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":153,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":106,"name":"HttpOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":181,"typeArguments":[{"type":"reference","id":152,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Properties","children":[147]},{"title":"Methods","children":[176,148,154,171,159,165,150]}],"sources":[{"fileName":"http.ts","line":302,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L302"}]},{"id":181,"name":"Response","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"Response object."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":191,"name":"data","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response data."}]},"sources":[{"fileName":"http.ts","line":286,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L286"}],"type":{"type":"reference","name":"T"}},{"id":189,"name":"headers","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response headers."}]},"sources":[{"fileName":"http.ts","line":282,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L282"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"string"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":188,"name":"ok","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"A boolean indicating whether the response was successful (status in the range 200–299) or not."}]},"sources":[{"fileName":"http.ts","line":280,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L280"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":190,"name":"rawHeaders","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response raw headers."}]},"sources":[{"fileName":"http.ts","line":284,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L284"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":187,"name":"status","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response status code."}]},"sources":[{"fileName":"http.ts","line":278,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L278"}],"type":{"type":"intrinsic","name":"number"}},{"id":186,"name":"url","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The request URL."}]},"sources":[{"fileName":"http.ts","line":276,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L276"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[191,189,188,190,187,186]}],"sources":[{"fileName":"http.ts","line":274,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L274"}],"typeParameters":[{"id":192,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":101,"name":"ClientOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":103,"name":"connectTimeout","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":65,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L65"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"number"},{"type":"reference","id":98,"name":"Duration"}]}},{"id":102,"name":"maxRedirections","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Defines the maximum number of redirects the client should follow.\nIf set to 0, no redirects will be followed."}]},"sources":[{"fileName":"http.ts","line":64,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L64"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[103,102]}],"sources":[{"fileName":"http.ts","line":59,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L59"}]},{"id":98,"name":"Duration","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":100,"name":"nanos","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L53"}],"type":{"type":"intrinsic","name":"number"}},{"id":99,"name":"secs","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L52"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[100,99]}],"sources":[{"fileName":"http.ts","line":51,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L51"}]},{"id":197,"name":"FilePart","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":198,"name":"file","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L81"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":201,"name":"T"}]}},{"id":200,"name":"fileName","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L83"}],"type":{"type":"intrinsic","name":"string"}},{"id":199,"name":"mime","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":82,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L82"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[198,200,199]}],"sources":[{"fileName":"http.ts","line":80,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L80"}],"typeParameters":[{"id":201,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":106,"name":"HttpOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options object sent to the backend."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":111,"name":"body","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":250,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L250"}],"type":{"type":"reference","id":124,"name":"Body"}},{"id":109,"name":"headers","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":248,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L248"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":107,"name":"method","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":246,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L246"}],"type":{"type":"reference","id":105,"name":"HttpVerb"}},{"id":110,"name":"query","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":249,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L249"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":113,"name":"responseType","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":252,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L252"}],"type":{"type":"reference","id":193,"name":"ResponseType"}},{"id":112,"name":"timeout","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":251,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L251"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"number"},{"type":"reference","id":98,"name":"Duration"}]}},{"id":108,"name":"url","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":247,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L247"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[111,109,107,110,113,112,108]}],"sources":[{"fileName":"http.ts","line":245,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L245"}]},{"id":115,"name":"FetchOptions","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Options for the "},{"kind":"code","text":"`fetch`"},{"kind":"text","text":" API."}]},"sources":[{"fileName":"http.ts","line":258,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L258"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":106,"name":"HttpOptions"},{"type":"literal","value":"url"}],"name":"Omit","qualifiedName":"Omit","package":"typescript"}},{"id":105,"name":"HttpVerb","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"The request HTTP verb."}]},"sources":[{"fileName":"http.ts","line":229,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L229"}],"type":{"type":"union","types":[{"type":"literal","value":"GET"},{"type":"literal","value":"POST"},{"type":"literal","value":"PUT"},{"type":"literal","value":"DELETE"},{"type":"literal","value":"PATCH"},{"type":"literal","value":"HEAD"},{"type":"literal","value":"OPTIONS"},{"type":"literal","value":"CONNECT"},{"type":"literal","value":"TRACE"}]}},{"id":104,"name":"Part","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"http.ts","line":86,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L86"}],"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":"reference","id":197,"typeArguments":[{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}],"name":"FilePart"}]}},{"id":114,"name":"RequestOptions","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Request options."}]},"sources":[{"fileName":"http.ts","line":256,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L256"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":106,"name":"HttpOptions"},{"type":"union","types":[{"type":"literal","value":"method"},{"type":"literal","value":"url"}]}],"name":"Omit","qualifiedName":"Omit","package":"typescript"}},{"id":119,"name":"fetch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"http.ts","line":531,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L531"}],"signatures":[{"id":120,"name":"fetch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Perform an HTTP request using the default client."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { fetch } from '@tauri-apps/api/http';\nconst response = await fetch('http://localhost:3003/users/2', {\n method: 'GET',\n timeout: 30,\n});\n```"}]}]},"typeParameter":[{"id":121,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":122,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":123,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":115,"name":"FetchOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":181,"typeArguments":[{"type":"reference","id":121,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":116,"name":"getClient","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"http.ts","line":507,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L507"}],"signatures":[{"id":117,"name":"getClient","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new client using the specified options."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the client instance."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":118,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Client configuration."}]},"type":{"type":"reference","id":101,"name":"ClientOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":143,"name":"Client"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[193]},{"title":"Classes","children":[124,143,181]},{"title":"Interfaces","children":[101,98,197,106]},{"title":"Type Aliases","children":[115,105,104,114]},{"title":"Functions","children":[119,116]}],"sources":[{"fileName":"http.ts","line":46,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/http.ts#L46"}]},{"id":202,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":214,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":171,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/mocks.ts#L171"}],"signatures":[{"id":215,"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":203,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":65,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/mocks.ts#L65"}],"signatures":[{"id":204,"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":205,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":206,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":66,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/mocks.ts#L66"}],"signatures":[{"id":207,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":208,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":209,"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":210,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":135,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/mocks.ts#L135"}],"signatures":[{"id":211,"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":212,"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":213,"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":[214,203,210]}],"sources":[{"fileName":"mocks.ts","line":5,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/mocks.ts#L5"}]},{"id":216,"name":"notification","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Send toast notifications (brief auto-expiring OS window element) to your user.\nCan also be used with the Notification Web API.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.notification`"},{"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.notification`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.notification) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"notification\": {\n \"all\": true // enable all notification 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":217,"name":"Options","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options to send a notification."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":219,"name":"body","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Optional notification body."}]},"sources":[{"fileName":"notification.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/notification.ts#L38"}],"type":{"type":"intrinsic","name":"string"}},{"id":220,"name":"icon","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Optional notification icon."}]},"sources":[{"fileName":"notification.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/notification.ts#L40"}],"type":{"type":"intrinsic","name":"string"}},{"id":218,"name":"title","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Notification title."}]},"sources":[{"fileName":"notification.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/notification.ts#L36"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[219,220,218]}],"sources":[{"fileName":"notification.ts","line":34,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/notification.ts#L34"}]},{"id":221,"name":"Permission","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Possible permission values."}]},"sources":[{"fileName":"notification.ts","line":44,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/notification.ts#L44"}],"type":{"type":"union","types":[{"type":"literal","value":"granted"},{"type":"literal","value":"denied"},{"type":"literal","value":"default"}]}},{"id":227,"name":"isPermissionGranted","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"notification.ts","line":56,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/notification.ts#L56"}],"signatures":[{"id":228,"name":"isPermissionGranted","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Checks if the permission to send notifications is granted."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isPermissionGranted } from '@tauri-apps/api/notification';\nconst permissionGranted = await isPermissionGranted();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.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"}}]},{"id":225,"name":"requestPermission","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"notification.ts","line":84,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/notification.ts#L84"}],"signatures":[{"id":226,"name":"requestPermission","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Requests the permission to send notifications."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isPermissionGranted, requestPermission } from '@tauri-apps/api/notification';\nlet permissionGranted = await isPermissionGranted();\nif (!permissionGranted) {\n const permission = await requestPermission();\n permissionGranted = permission === 'granted';\n}\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to whether the user granted the permission or not."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":221,"name":"Permission"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":222,"name":"sendNotification","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"notification.ts","line":106,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/notification.ts#L106"}],"signatures":[{"id":223,"name":"sendNotification","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sends a notification to the user."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isPermissionGranted, requestPermission, sendNotification } from '@tauri-apps/api/notification';\nlet permissionGranted = await isPermissionGranted();\nif (!permissionGranted) {\n const permission = await requestPermission();\n permissionGranted = permission === 'granted';\n}\nif (permissionGranted) {\n sendNotification('Tauri is awesome!');\n sendNotification({ title: 'TAURI', body: 'Tauri is awesome!' });\n}\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":224,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":217,"name":"Options"}]}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Interfaces","children":[217]},{"title":"Type Aliases","children":[221]},{"title":"Functions","children":[227,225,222]}],"sources":[{"fileName":"notification.ts","line":27,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/notification.ts#L27"}]},{"id":229,"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":243,"name":"Arch","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":43,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/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":242,"name":"OsType","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":41,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/os.ts#L41"}],"type":{"type":"union","types":[{"type":"literal","value":"Linux"},{"type":"literal","value":"Darwin"},{"type":"literal","value":"Windows_NT"}]}},{"id":241,"name":"Platform","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":29,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/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":230,"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/9f223491c/tooling/api/src/os.ts#L63"}],"type":{"type":"union","types":[{"type":"literal","value":"\n"},{"type":"literal","value":"\r\n"}]},"defaultValue":"..."},{"id":237,"name":"arch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":135,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/os.ts#L135"}],"signatures":[{"id":238,"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":243,"name":"Arch"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":231,"name":"platform","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":77,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/os.ts#L77"}],"signatures":[{"id":232,"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":241,"name":"Platform"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":239,"name":"tempdir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":154,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/os.ts#L154"}],"signatures":[{"id":240,"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":235,"name":"type","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":115,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/os.ts#L115"}],"signatures":[{"id":236,"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":242,"name":"OsType"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":233,"name":"version","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":96,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/os.ts#L96"}],"signatures":[{"id":234,"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":[243,242,241]},{"title":"Variables","children":[230]},{"title":"Functions","children":[237,231,239,235,233]}],"sources":[{"fileName":"os.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/os.ts#L26"}]},{"id":244,"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":245,"name":"BaseDirectory","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":261,"name":"AppCache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L48"}],"type":{"type":"literal","value":16}},{"id":258,"name":"AppConfig","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":45,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L45"}],"type":{"type":"literal","value":13}},{"id":259,"name":"AppData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":46,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L46"}],"type":{"type":"literal","value":14}},{"id":260,"name":"AppLocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L47"}],"type":{"type":"literal","value":15}},{"id":262,"name":"AppLog","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L49"}],"type":{"type":"literal","value":17}},{"id":246,"name":"Audio","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L33"}],"type":{"type":"literal","value":1}},{"id":247,"name":"Cache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L34"}],"type":{"type":"literal","value":2}},{"id":248,"name":"Config","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L35"}],"type":{"type":"literal","value":3}},{"id":249,"name":"Data","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L36"}],"type":{"type":"literal","value":4}},{"id":263,"name":"Desktop","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L51"}],"type":{"type":"literal","value":18}},{"id":251,"name":"Document","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L38"}],"type":{"type":"literal","value":6}},{"id":252,"name":"Download","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L39"}],"type":{"type":"literal","value":7}},{"id":264,"name":"Executable","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L52"}],"type":{"type":"literal","value":19}},{"id":265,"name":"Font","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L53"}],"type":{"type":"literal","value":20}},{"id":266,"name":"Home","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L54"}],"type":{"type":"literal","value":21}},{"id":250,"name":"LocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L37"}],"type":{"type":"literal","value":5}},{"id":253,"name":"Picture","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L40"}],"type":{"type":"literal","value":8}},{"id":254,"name":"Public","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L41"}],"type":{"type":"literal","value":9}},{"id":256,"name":"Resource","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L43"}],"type":{"type":"literal","value":11}},{"id":267,"name":"Runtime","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L55"}],"type":{"type":"literal","value":22}},{"id":257,"name":"Temp","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":44,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L44"}],"type":{"type":"literal","value":12}},{"id":268,"name":"Template","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L56"}],"type":{"type":"literal","value":23}},{"id":255,"name":"Video","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L42"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[261,258,259,260,262,246,247,248,249,263,251,252,264,265,266,250,253,254,256,267,257,268,255]}],"sources":[{"fileName":"path.ts","line":32,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L32"}]},{"id":317,"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/9f223491c/tooling/api/src/path.ts#L555"}],"type":{"type":"union","types":[{"type":"literal","value":";"},{"type":"literal","value":":"}]},"defaultValue":"..."},{"id":316,"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/9f223491c/tooling/api/src/path.ts#L546"}],"type":{"type":"union","types":[{"type":"literal","value":"\\"},{"type":"literal","value":"/"}]},"defaultValue":"..."},{"id":275,"name":"appCacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":121,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L121"}],"signatures":[{"id":276,"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":269,"name":"appConfigDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":70,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L70"}],"signatures":[{"id":270,"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":271,"name":"appDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L87"}],"signatures":[{"id":272,"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":273,"name":"appLocalDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":104,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L104"}],"signatures":[{"id":274,"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":277,"name":"appLogDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":533,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L533"}],"signatures":[{"id":278,"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":279,"name":"audioDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":143,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L143"}],"signatures":[{"id":280,"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":333,"name":"basename","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":647,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L647"}],"signatures":[{"id":334,"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":335,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":336,"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":281,"name":"cacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":165,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L165"}],"signatures":[{"id":282,"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":283,"name":"configDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":187,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L187"}],"signatures":[{"id":284,"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":285,"name":"dataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":209,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L209"}],"signatures":[{"id":286,"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":287,"name":"desktopDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":231,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L231"}],"signatures":[{"id":288,"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":327,"name":"dirname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":613,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L613"}],"signatures":[{"id":328,"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":329,"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":289,"name":"documentDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":253,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L253"}],"signatures":[{"id":290,"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":291,"name":"downloadDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":275,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L275"}],"signatures":[{"id":292,"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":293,"name":"executableDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":297,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L297"}],"signatures":[{"id":294,"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":330,"name":"extname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":629,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L629"}],"signatures":[{"id":331,"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":332,"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":295,"name":"fontDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":319,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L319"}],"signatures":[{"id":296,"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":297,"name":"homeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":341,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L341"}],"signatures":[{"id":298,"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":337,"name":"isAbsolute","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":661,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L661"}],"signatures":[{"id":338,"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":339,"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":324,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":598,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L598"}],"signatures":[{"id":325,"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":326,"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":299,"name":"localDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":363,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L363"}],"signatures":[{"id":300,"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":321,"name":"normalize","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":583,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L583"}],"signatures":[{"id":322,"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":323,"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":301,"name":"pictureDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":385,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L385"}],"signatures":[{"id":302,"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":303,"name":"publicDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":407,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L407"}],"signatures":[{"id":304,"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":318,"name":"resolve","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":568,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L568"}],"signatures":[{"id":319,"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":320,"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":307,"name":"resolveResource","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":444,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L444"}],"signatures":[{"id":308,"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":309,"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":305,"name":"resourceDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":424,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L424"}],"signatures":[{"id":306,"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":310,"name":"runtimeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":467,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L467"}],"signatures":[{"id":311,"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":312,"name":"templateDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":489,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L489"}],"signatures":[{"id":313,"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":314,"name":"videoDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":511,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L511"}],"signatures":[{"id":315,"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":[245]},{"title":"Variables","children":[317,316]},{"title":"Functions","children":[275,269,271,273,277,279,333,281,283,285,287,327,289,291,293,330,295,297,337,324,299,321,301,303,318,307,305,310,312,314]}],"sources":[{"fileName":"path.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/path.ts#L26"}]},{"id":340,"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":341,"name":"exit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"process.ts","line":27,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/process.ts#L27"}],"signatures":[{"id":342,"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":343,"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":344,"name":"relaunch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"process.ts","line":49,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/process.ts#L49"}],"signatures":[{"id":345,"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":[341,344]}],"sources":[{"fileName":"process.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/process.ts#L12"}]},{"id":346,"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":552},{"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":552},{"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":347},{"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":348},{"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":464,"name":"Child","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":465,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"shell.ts","line":346,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L346"}],"signatures":[{"id":466,"name":"new Child","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":467,"name":"pid","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":464,"name":"Child"}}]},{"id":468,"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/9f223491c/tooling/api/src/shell.ts#L344"}],"type":{"type":"intrinsic","name":"number"}},{"id":472,"name":"kill","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":382,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L382"}],"signatures":[{"id":473,"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":469,"name":"write","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":365,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L365"}],"signatures":[{"id":470,"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":471,"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":556,"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":[465]},{"title":"Properties","children":[468]},{"title":"Methods","children":[472,469]}],"sources":[{"fileName":"shell.ts","line":342,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L342"}]},{"id":347,"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":386,"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/9f223491c/tooling/api/src/shell.ts#L433"}],"type":{"type":"reference","id":474,"typeArguments":[{"type":"reference","id":563,"typeArguments":[{"type":"reference","name":"O"}],"name":"OutputEvents"}],"name":"EventEmitter"},"defaultValue":"..."},{"id":385,"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/9f223491c/tooling/api/src/shell.ts#L431"}],"type":{"type":"reference","id":474,"typeArguments":[{"type":"reference","id":563,"typeArguments":[{"type":"reference","name":"O"}],"name":"OutputEvents"}],"name":"EventEmitter"},"defaultValue":"..."},{"id":394,"name":"addListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L164"}],"signatures":[{"id":395,"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":396,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":557,"name":"CommandEvents"}}}],"parameters":[{"id":397,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":396,"name":"N"}},{"id":398,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":399,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":166,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L166"}],"signatures":[{"id":400,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":401,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":396,"name":"N"},"objectType":{"type":"reference","id":557,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":347,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":483,"name":"EventEmitter.addListener"}}],"inheritedFrom":{"type":"reference","id":482,"name":"EventEmitter.addListener"}},{"id":389,"name":"execute","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":564,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L564"}],"signatures":[{"id":390,"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":566,"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":443,"name":"listenerCount","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":287,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L287"}],"signatures":[{"id":444,"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":445,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":557,"name":"CommandEvents"}}}],"parameters":[{"id":446,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":445,"name":"N"}}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","id":532,"name":"EventEmitter.listenerCount"}}],"inheritedFrom":{"type":"reference","id":531,"name":"EventEmitter.listenerCount"}},{"id":426,"name":"off","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":233,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L233"}],"signatures":[{"id":427,"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":428,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":557,"name":"CommandEvents"}}}],"parameters":[{"id":429,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":428,"name":"N"}},{"id":430,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":431,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":235,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L235"}],"signatures":[{"id":432,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":433,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":428,"name":"N"},"objectType":{"type":"reference","id":557,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":347,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":515,"name":"EventEmitter.off"}}],"inheritedFrom":{"type":"reference","id":514,"name":"EventEmitter.off"}},{"id":410,"name":"on","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":193,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L193"}],"signatures":[{"id":411,"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":412,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":557,"name":"CommandEvents"}}}],"parameters":[{"id":413,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":412,"name":"N"}},{"id":414,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":415,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":195,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L195"}],"signatures":[{"id":416,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":417,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":412,"name":"N"},"objectType":{"type":"reference","id":557,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":347,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":499,"name":"EventEmitter.on"}}],"inheritedFrom":{"type":"reference","id":498,"name":"EventEmitter.on"}},{"id":418,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":215,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L215"}],"signatures":[{"id":419,"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":420,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":557,"name":"CommandEvents"}}}],"parameters":[{"id":421,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":420,"name":"N"}},{"id":422,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":423,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":217,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L217"}],"signatures":[{"id":424,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":425,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":420,"name":"N"},"objectType":{"type":"reference","id":557,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":347,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":507,"name":"EventEmitter.once"}}],"inheritedFrom":{"type":"reference","id":506,"name":"EventEmitter.once"}},{"id":447,"name":"prependListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":304,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L304"}],"signatures":[{"id":448,"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":449,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":557,"name":"CommandEvents"}}}],"parameters":[{"id":450,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":449,"name":"N"}},{"id":451,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":452,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":306,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L306"}],"signatures":[{"id":453,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":454,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":449,"name":"N"},"objectType":{"type":"reference","id":557,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":347,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":536,"name":"EventEmitter.prependListener"}}],"inheritedFrom":{"type":"reference","id":535,"name":"EventEmitter.prependListener"}},{"id":455,"name":"prependOnceListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":326,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L326"}],"signatures":[{"id":456,"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":457,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":557,"name":"CommandEvents"}}}],"parameters":[{"id":458,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":457,"name":"N"}},{"id":459,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":460,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":328,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L328"}],"signatures":[{"id":461,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":462,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":457,"name":"N"},"objectType":{"type":"reference","id":557,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":347,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":544,"name":"EventEmitter.prependOnceListener"}}],"inheritedFrom":{"type":"reference","id":543,"name":"EventEmitter.prependOnceListener"}},{"id":434,"name":"removeAllListeners","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":253,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L253"}],"signatures":[{"id":435,"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":436,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":557,"name":"CommandEvents"}}}],"parameters":[{"id":437,"name":"event","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":436,"name":"N"}}],"type":{"type":"reference","id":347,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":523,"name":"EventEmitter.removeAllListeners"}}],"inheritedFrom":{"type":"reference","id":522,"name":"EventEmitter.removeAllListeners"}},{"id":402,"name":"removeListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L176"}],"signatures":[{"id":403,"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":404,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":557,"name":"CommandEvents"}}}],"parameters":[{"id":405,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":404,"name":"N"}},{"id":406,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":407,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":178,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L178"}],"signatures":[{"id":408,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":409,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":404,"name":"N"},"objectType":{"type":"reference","id":557,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":347,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":491,"name":"EventEmitter.removeListener"}}],"inheritedFrom":{"type":"reference","id":490,"name":"EventEmitter.removeListener"}},{"id":387,"name":"spawn","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":526,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L526"}],"signatures":[{"id":388,"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":464,"name":"Child"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":348,"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/9f223491c/tooling/api/src/shell.ts#L455"},{"fileName":"shell.ts","line":456,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L456"},{"fileName":"shell.ts","line":461,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L461"},{"fileName":"shell.ts","line":479,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L479"}],"signatures":[{"id":349,"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":350,"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":351,"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":347,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}},{"id":352,"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":353,"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":354,"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":355,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":572,"name":"SpawnOptions"},{"type":"reflection","declaration":{"id":356,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":357,"name":"encoding","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":459,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L459"}],"type":{"type":"literal","value":"raw"}}],"groups":[{"title":"Properties","children":[357]}],"sources":[{"fileName":"shell.ts","line":459,"character":29,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L459"}]}}]}}],"type":{"type":"reference","id":347,"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":358,"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":359,"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":360,"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":361,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":572,"name":"SpawnOptions"}}],"type":{"type":"reference","id":347,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}}]},{"id":362,"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/9f223491c/tooling/api/src/shell.ts#L487"},{"fileName":"shell.ts","line":488,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L488"},{"fileName":"shell.ts","line":493,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L493"},{"fileName":"shell.ts","line":511,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L511"}],"signatures":[{"id":363,"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":364,"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":365,"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":347,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}},{"id":366,"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":367,"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":368,"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":369,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":572,"name":"SpawnOptions"},{"type":"reflection","declaration":{"id":370,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":371,"name":"encoding","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":491,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L491"}],"type":{"type":"literal","value":"raw"}}],"groups":[{"title":"Properties","children":[371]}],"sources":[{"fileName":"shell.ts","line":491,"character":29,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L491"}]}}]}}],"type":{"type":"reference","id":347,"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":372,"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":373,"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":374,"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":375,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":572,"name":"SpawnOptions"}}],"type":{"type":"reference","id":347,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}}]}],"groups":[{"title":"Properties","children":[386,385]},{"title":"Methods","children":[394,389,443,426,410,418,447,455,434,402,387,348,362]}],"sources":[{"fileName":"shell.ts","line":423,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L423"}],"typeParameters":[{"id":463,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":556,"name":"IOPayload"}}],"extendedTypes":[{"type":"reference","id":474,"typeArguments":[{"type":"reference","id":557,"name":"CommandEvents"}],"name":"EventEmitter"}]},{"id":474,"name":"EventEmitter","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":475,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"signatures":[{"id":476,"name":"new EventEmitter","kind":16384,"kindString":"Constructor signature","flags":{},"typeParameter":[{"id":477,"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":474,"typeArguments":[{"type":"reference","id":477,"name":"E"}],"name":"EventEmitter"}}]},{"id":482,"name":"addListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L164"}],"signatures":[{"id":483,"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":484,"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":485,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":396,"name":"N"}},{"id":486,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":487,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":166,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L166"}],"signatures":[{"id":488,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":489,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":396,"name":"N"},"objectType":{"type":"reference","id":477,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":474,"typeArguments":[{"type":"reference","id":477,"name":"E"}],"name":"EventEmitter"}}]},{"id":531,"name":"listenerCount","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":287,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L287"}],"signatures":[{"id":532,"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":533,"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":534,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":445,"name":"N"}}],"type":{"type":"intrinsic","name":"number"}}]},{"id":514,"name":"off","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":233,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L233"}],"signatures":[{"id":515,"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":516,"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":517,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":428,"name":"N"}},{"id":518,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":519,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":235,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L235"}],"signatures":[{"id":520,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":521,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":428,"name":"N"},"objectType":{"type":"reference","id":477,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":474,"typeArguments":[{"type":"reference","id":477,"name":"E"}],"name":"EventEmitter"}}]},{"id":498,"name":"on","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":193,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L193"}],"signatures":[{"id":499,"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":500,"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":501,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":412,"name":"N"}},{"id":502,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":503,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":195,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L195"}],"signatures":[{"id":504,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":505,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":412,"name":"N"},"objectType":{"type":"reference","id":477,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":474,"typeArguments":[{"type":"reference","id":477,"name":"E"}],"name":"EventEmitter"}}]},{"id":506,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":215,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L215"}],"signatures":[{"id":507,"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":508,"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":509,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":420,"name":"N"}},{"id":510,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":511,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":217,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L217"}],"signatures":[{"id":512,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":513,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":420,"name":"N"},"objectType":{"type":"reference","id":477,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":474,"typeArguments":[{"type":"reference","id":477,"name":"E"}],"name":"EventEmitter"}}]},{"id":535,"name":"prependListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":304,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L304"}],"signatures":[{"id":536,"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":537,"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":538,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":449,"name":"N"}},{"id":539,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":540,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":306,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L306"}],"signatures":[{"id":541,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":542,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":449,"name":"N"},"objectType":{"type":"reference","id":477,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":474,"typeArguments":[{"type":"reference","id":477,"name":"E"}],"name":"EventEmitter"}}]},{"id":543,"name":"prependOnceListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":326,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L326"}],"signatures":[{"id":544,"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":545,"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":546,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":457,"name":"N"}},{"id":547,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":548,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":328,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L328"}],"signatures":[{"id":549,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":550,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":457,"name":"N"},"objectType":{"type":"reference","id":477,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":474,"typeArguments":[{"type":"reference","id":477,"name":"E"}],"name":"EventEmitter"}}]},{"id":522,"name":"removeAllListeners","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":253,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L253"}],"signatures":[{"id":523,"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":524,"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":525,"name":"event","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":436,"name":"N"}}],"type":{"type":"reference","id":474,"typeArguments":[{"type":"reference","id":477,"name":"E"}],"name":"EventEmitter"}}]},{"id":490,"name":"removeListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L176"}],"signatures":[{"id":491,"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":492,"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":493,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":404,"name":"N"}},{"id":494,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":495,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":178,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L178"}],"signatures":[{"id":496,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":497,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":404,"name":"N"},"objectType":{"type":"reference","id":477,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":474,"typeArguments":[{"type":"reference","id":477,"name":"E"}],"name":"EventEmitter"}}]}],"groups":[{"title":"Constructors","children":[475]},{"title":"Methods","children":[482,531,514,498,506,535,543,522,490]}],"sources":[{"fileName":"shell.ts","line":153,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L153"}],"typeParameters":[{"id":551,"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":347,"name":"Command"}]},{"id":566,"name":"ChildProcess","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":567,"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/9f223491c/tooling/api/src/shell.ts#L109"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":568,"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/9f223491c/tooling/api/src/shell.ts#L111"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":570,"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/9f223491c/tooling/api/src/shell.ts#L115"}],"type":{"type":"reference","id":571,"name":"O"}},{"id":569,"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/9f223491c/tooling/api/src/shell.ts#L113"}],"type":{"type":"reference","id":571,"name":"O"}}],"groups":[{"title":"Properties","children":[567,568,570,569]}],"sources":[{"fileName":"shell.ts","line":107,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L107"}],"typeParameters":[{"id":571,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":556,"name":"IOPayload"}}]},{"id":557,"name":"CommandEvents","kind":256,"kindString":"Interface","flags":{},"children":[{"id":558,"name":"close","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":394,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L394"}],"type":{"type":"reference","id":560,"name":"TerminatedPayload"}},{"id":559,"name":"error","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":395,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L395"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[558,559]}],"sources":[{"fileName":"shell.ts","line":393,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L393"}]},{"id":563,"name":"OutputEvents","kind":256,"kindString":"Interface","flags":{},"children":[{"id":564,"name":"data","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":399,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L399"}],"type":{"type":"reference","id":565,"name":"O"}}],"groups":[{"title":"Properties","children":[564]}],"sources":[{"fileName":"shell.ts","line":398,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L398"}],"typeParameters":[{"id":565,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":556,"name":"IOPayload"}}]},{"id":572,"name":"SpawnOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":573,"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/9f223491c/tooling/api/src/shell.ts#L88"}],"type":{"type":"intrinsic","name":"string"}},{"id":575,"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/9f223491c/tooling/api/src/shell.ts#L96"}],"type":{"type":"intrinsic","name":"string"}},{"id":574,"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/9f223491c/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":[573,575,574]}],"sources":[{"fileName":"shell.ts","line":86,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L86"}]},{"id":560,"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":561,"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/9f223491c/tooling/api/src/shell.ts#L615"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":562,"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/9f223491c/tooling/api/src/shell.ts#L617"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Properties","children":[561,562]}],"sources":[{"fileName":"shell.ts","line":613,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L613"}]},{"id":556,"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/9f223491c/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":552,"name":"open","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"shell.ts","line":656,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L656"}],"signatures":[{"id":553,"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":554,"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":555,"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":[464,347,474]},{"title":"Interfaces","children":[566,557,563,572,560]},{"title":"Type Aliases","children":[556]},{"title":"Functions","children":[552]}],"sources":[{"fileName":"shell.ts","line":80,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/shell.ts#L80"}]},{"id":576,"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":577,"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/9f223491c/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":590,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":129,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/tauri.ts#L129"}],"signatures":[{"id":591,"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":592,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":593,"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":585,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":79,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/tauri.ts#L79"}],"signatures":[{"id":586,"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":587,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":588,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":589,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":577,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":587,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":578,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":579,"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":580,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":581,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":582,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":583,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":584,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Type Aliases","children":[577]},{"title":"Functions","children":[590,585,578]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/tauri.ts#L13"}]},{"id":594,"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":599,"name":"UpdateManifest","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":602,"name":"body","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L34"}],"type":{"type":"intrinsic","name":"string"}},{"id":601,"name":"date","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L33"}],"type":{"type":"intrinsic","name":"string"}},{"id":600,"name":"version","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L32"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[602,601,600]}],"sources":[{"fileName":"updater.ts","line":31,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L31"}]},{"id":603,"name":"UpdateResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":604,"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/9f223491c/tooling/api/src/updater.ts#L41"}],"type":{"type":"reference","id":599,"name":"UpdateManifest"}},{"id":605,"name":"shouldUpdate","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L42"}],"type":{"type":"intrinsic","name":"boolean"}}],"groups":[{"title":"Properties","children":[604,605]}],"sources":[{"fileName":"updater.ts","line":40,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L40"}]},{"id":596,"name":"UpdateStatusResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":597,"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/9f223491c/tooling/api/src/updater.ts#L24"}],"type":{"type":"intrinsic","name":"string"}},{"id":598,"name":"status","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L25"}],"type":{"type":"reference","id":595,"name":"UpdateStatus"}}],"groups":[{"title":"Properties","children":[597,598]}],"sources":[{"fileName":"updater.ts","line":23,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L23"}]},{"id":595,"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/9f223491c/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":614,"name":"checkUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":146,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L146"}],"signatures":[{"id":615,"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":603,"name":"UpdateResult"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":612,"name":"installUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L87"}],"signatures":[{"id":613,"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":606,"name":"onUpdaterEvent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":63,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L63"}],"signatures":[{"id":607,"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":608,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":609,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"updater.ts","line":64,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L64"}],"signatures":[{"id":610,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":611,"name":"status","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":596,"name":"UpdateStatusResult"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1086,"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":[599,603,596]},{"title":"Type Aliases","children":[595]},{"title":"Functions","children":[614,612,606]}],"sources":[{"fileName":"updater.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/updater.ts#L12"}]},{"id":616,"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":1017,"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":1018,"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/9f223491c/tooling/api/src/window.ts#L226"}],"type":{"type":"literal","value":1}},{"id":1019,"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/9f223491c/tooling/api/src/window.ts#L232"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[1018,1019]}],"sources":[{"fileName":"window.ts","line":220,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L220"}]},{"id":962,"name":"CloseRequestedEvent","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":963,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":1963,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1963"}],"signatures":[{"id":964,"name":"new CloseRequestedEvent","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":965,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1075,"typeArguments":[{"type":"literal","value":null}],"name":"Event"}}],"type":{"type":"reference","id":962,"name":"CloseRequestedEvent"}}]},{"id":969,"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/9f223491c/tooling/api/src/window.ts#L1961"}],"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"},{"id":966,"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/9f223491c/tooling/api/src/window.ts#L1956"}],"type":{"type":"reference","id":63,"name":"EventName"}},{"id":968,"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/9f223491c/tooling/api/src/window.ts#L1960"}],"type":{"type":"intrinsic","name":"number"}},{"id":967,"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/9f223491c/tooling/api/src/window.ts#L1958"}],"type":{"type":"intrinsic","name":"string"}},{"id":972,"name":"isPreventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1973,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1973"}],"signatures":[{"id":973,"name":"isPreventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"boolean"}}]},{"id":970,"name":"preventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1969,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1969"}],"signatures":[{"id":971,"name":"preventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[963]},{"title":"Properties","children":[969,966,968,967]},{"title":"Methods","children":[972,970]}],"sources":[{"fileName":"window.ts","line":1954,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1954"}]},{"id":998,"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":999,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L164"}],"signatures":[{"id":1000,"name":"new LogicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":1001,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":1002,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":998,"name":"LogicalPosition"}}]},{"id":1003,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L160"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":1004,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L161"}],"type":{"type":"intrinsic","name":"number"}},{"id":1005,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":162,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L162"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[999]},{"title":"Properties","children":[1003,1004,1005]}],"sources":[{"fileName":"window.ts","line":159,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L159"}]},{"id":979,"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":980,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":118,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L118"}],"signatures":[{"id":981,"name":"new LogicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":982,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":983,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":979,"name":"LogicalSize"}}]},{"id":986,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L116"}],"type":{"type":"intrinsic","name":"number"}},{"id":984,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":114,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L114"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":985,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L115"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[980]},{"title":"Properties","children":[986,984,985]}],"sources":[{"fileName":"window.ts","line":113,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L113"}]},{"id":1006,"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":1007,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":180,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L180"}],"signatures":[{"id":1008,"name":"new PhysicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":1009,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":1010,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":1006,"name":"PhysicalPosition"}}]},{"id":1011,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L176"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":1012,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L177"}],"type":{"type":"intrinsic","name":"number"}},{"id":1013,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":178,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L178"}],"type":{"type":"intrinsic","name":"number"}},{"id":1014,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L195"}],"signatures":[{"id":1015,"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":1016,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":998,"name":"LogicalPosition"}}]}],"groups":[{"title":"Constructors","children":[1007]},{"title":"Properties","children":[1011,1012,1013]},{"title":"Methods","children":[1014]}],"sources":[{"fileName":"window.ts","line":175,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L175"}]},{"id":987,"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":988,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":134,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L134"}],"signatures":[{"id":989,"name":"new PhysicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":990,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":991,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":987,"name":"PhysicalSize"}}]},{"id":994,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L132"}],"type":{"type":"intrinsic","name":"number"}},{"id":992,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L130"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":993,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L131"}],"type":{"type":"intrinsic","name":"number"}},{"id":995,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L149"}],"signatures":[{"id":996,"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":997,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":979,"name":"LogicalSize"}}]}],"groups":[{"title":"Constructors","children":[988]},{"title":"Properties","children":[994,992,993]},{"title":"Methods","children":[995]}],"sources":[{"fileName":"window.ts","line":129,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L129"}]},{"id":619,"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":623,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":2031,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L2031"}],"signatures":[{"id":624,"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":625,"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":626,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1045,"name":"WindowOptions"},"defaultValue":"{}"}],"type":{"type":"reference","id":619,"name":"WebviewWindow"},"overwrites":{"type":"reference","name":"WindowManager.constructor"}}],"overwrites":{"type":"reference","name":"WindowManager.constructor"}},{"id":759,"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/9f223491c/tooling/api/src/window.ts#L316"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","name":"WindowManager.label"}},{"id":760,"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/9f223491c/tooling/api/src/window.ts#L318"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"reference","id":1081,"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"EventCallback"}}],"name":"Record","qualifiedName":"Record","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listeners"}},{"id":653,"name":"center","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":780,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L780"}],"signatures":[{"id":654,"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":678,"name":"close","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1081,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1081"}],"signatures":[{"id":679,"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":771,"name":"emit","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":400,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L400"}],"signatures":[{"id":772,"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":773,"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":774,"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":676,"name":"hide","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1056,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1056"}],"signatures":[{"id":677,"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":629,"name":"innerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":470,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L470"}],"signatures":[{"id":630,"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":1006,"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":633,"name":"innerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":521,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L521"}],"signatures":[{"id":634,"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":987,"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":643,"name":"isDecorated","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":647,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L647"}],"signatures":[{"id":644,"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":637,"name":"isFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":572,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L572"}],"signatures":[{"id":638,"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":641,"name":"isMaximized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":622,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L622"}],"signatures":[{"id":642,"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":639,"name":"isMinimized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":597,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L597"}],"signatures":[{"id":640,"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":645,"name":"isResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":672,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L672"}],"signatures":[{"id":646,"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":647,"name":"isVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":697,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L697"}],"signatures":[{"id":648,"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":761,"name":"listen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":345,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L345"}],"signatures":[{"id":762,"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":763,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":764,"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":63,"name":"EventName"}},{"id":765,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":1081,"typeArguments":[{"type":"reference","id":763,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1086,"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":664,"name":"maximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":906,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L906"}],"signatures":[{"id":665,"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":670,"name":"minimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":981,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L981"}],"signatures":[{"id":671,"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":738,"name":"onCloseRequested","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1763,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1763"}],"signatures":[{"id":739,"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":740,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":741,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"window.ts","line":1764,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1764"}],"signatures":[{"id":742,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":743,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":962,"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":1086,"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":753,"name":"onFileDropEvent","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1896,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1896"}],"signatures":[{"id":754,"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":755,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1081,"typeArguments":[{"type":"reference","id":1036,"name":"FileDropEvent"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1086,"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":744,"name":"onFocusChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1795,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1795"}],"signatures":[{"id":745,"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":746,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1081,"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1086,"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":750,"name":"onMenuClicked","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1865,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1865"}],"signatures":[{"id":751,"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":752,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1081,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1086,"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":735,"name":"onMoved","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1735,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1735"}],"signatures":[{"id":736,"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":737,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1081,"typeArguments":[{"type":"reference","id":1006,"name":"PhysicalPosition"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1086,"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":732,"name":"onResized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1712,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1712"}],"signatures":[{"id":733,"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":734,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1081,"typeArguments":[{"type":"reference","id":987,"name":"PhysicalSize"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1086,"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":747,"name":"onScaleChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1837,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1837"}],"signatures":[{"id":748,"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":749,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1081,"typeArguments":[{"type":"reference","id":1033,"name":"ScaleFactorChanged"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1086,"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":756,"name":"onThemeChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1946,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1946"}],"signatures":[{"id":757,"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":758,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1081,"typeArguments":[{"type":"reference","id":1026,"name":"Theme"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1086,"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":766,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":378,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L378"}],"signatures":[{"id":767,"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":768,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":769,"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":770,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":1081,"typeArguments":[{"type":"reference","id":768,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1086,"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":631,"name":"outerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":495,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L495"}],"signatures":[{"id":632,"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":1006,"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":635,"name":"outerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":547,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L547"}],"signatures":[{"id":636,"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":987,"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":655,"name":"requestUserAttention","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":816,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L816"}],"signatures":[{"id":656,"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":657,"name":"requestType","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":1017,"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":627,"name":"scaleFactor","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":445,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L445"}],"signatures":[{"id":628,"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":686,"name":"setAlwaysOnTop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1171,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1171"}],"signatures":[{"id":687,"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":688,"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":689,"name":"setContentProtected","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1199,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1199"}],"signatures":[{"id":690,"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":691,"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":715,"name":"setCursorGrab","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1519,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1519"}],"signatures":[{"id":716,"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":717,"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":721,"name":"setCursorIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1579,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1579"}],"signatures":[{"id":722,"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":723,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor icon."}]},"type":{"type":"reference","id":617,"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":724,"name":"setCursorPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1606,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1606"}],"signatures":[{"id":725,"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":726,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor position."}]},"type":{"type":"union","types":[{"type":"reference","id":1006,"name":"PhysicalPosition"},{"type":"reference","id":998,"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":718,"name":"setCursorVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1552,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1552"}],"signatures":[{"id":719,"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":720,"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":680,"name":"setDecorations","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1107,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1107"}],"signatures":[{"id":681,"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":682,"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":707,"name":"setFocus","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1417,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1417"}],"signatures":[{"id":708,"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":704,"name":"setFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1391,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1391"}],"signatures":[{"id":705,"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":706,"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":709,"name":"setIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1450,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1450"}],"signatures":[{"id":710,"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":711,"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":727,"name":"setIgnoreCursorEvents","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1650,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1650"}],"signatures":[{"id":728,"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":729,"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":698,"name":"setMaxSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1306,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1306"}],"signatures":[{"id":699,"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":700,"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":987,"name":"PhysicalSize"},{"type":"reference","id":979,"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":695,"name":"setMinSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1264,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1264"}],"signatures":[{"id":696,"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":697,"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":987,"name":"PhysicalSize"},{"type":"reference","id":979,"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":701,"name":"setPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1348,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1348"}],"signatures":[{"id":702,"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":703,"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":1006,"name":"PhysicalPosition"},{"type":"reference","id":998,"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":658,"name":"setResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":853,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L853"}],"signatures":[{"id":659,"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":660,"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":683,"name":"setShadow","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1144,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1144"}],"signatures":[{"id":684,"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":685,"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":692,"name":"setSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1226,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1226"}],"signatures":[{"id":693,"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":694,"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":987,"name":"PhysicalSize"},{"type":"reference","id":979,"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":712,"name":"setSkipTaskbar","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1484"}],"signatures":[{"id":713,"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":714,"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":661,"name":"setTitle","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":880,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L880"}],"signatures":[{"id":662,"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":663,"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":674,"name":"show","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1031,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1031"}],"signatures":[{"id":675,"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":730,"name":"startDragging","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1676,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1676"}],"signatures":[{"id":731,"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":651,"name":"theme","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":752,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L752"}],"signatures":[{"id":652,"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":1026,"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":649,"name":"title","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":722,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L722"}],"signatures":[{"id":650,"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":668,"name":"toggleMaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":956,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L956"}],"signatures":[{"id":669,"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":666,"name":"unmaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":931,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L931"}],"signatures":[{"id":667,"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":672,"name":"unminimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1006,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L1006"}],"signatures":[{"id":673,"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":620,"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/9f223491c/tooling/api/src/window.ts#L2063"}],"signatures":[{"id":621,"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":622,"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":619,"name":"WebviewWindow"}]}}]}],"groups":[{"title":"Constructors","children":[623]},{"title":"Properties","children":[759,760]},{"title":"Methods","children":[653,678,771,676,629,633,643,637,641,639,645,647,761,664,670,738,753,744,750,735,732,747,756,766,631,635,655,627,686,689,715,721,724,718,680,707,704,709,727,698,695,701,658,683,692,712,661,674,730,651,649,668,666,672,620]}],"sources":[{"fileName":"window.ts","line":2011,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L2011"}],"extendedTypes":[{"type":"reference","name":"WindowManager"}]},{"id":1028,"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":1029,"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/9f223491c/tooling/api/src/window.ts#L81"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}},{"id":1031,"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/9f223491c/tooling/api/src/window.ts#L85"}],"type":{"type":"reference","id":1006,"name":"PhysicalPosition"}},{"id":1032,"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/9f223491c/tooling/api/src/window.ts#L87"}],"type":{"type":"intrinsic","name":"number"}},{"id":1030,"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/9f223491c/tooling/api/src/window.ts#L83"}],"type":{"type":"reference","id":987,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[1029,1031,1032,1030]}],"sources":[{"fileName":"window.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L79"}]},{"id":1033,"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":1034,"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/9f223491c/tooling/api/src/window.ts#L97"}],"type":{"type":"intrinsic","name":"number"}},{"id":1035,"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/9f223491c/tooling/api/src/window.ts#L99"}],"type":{"type":"reference","id":987,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[1034,1035]}],"sources":[{"fileName":"window.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L95"}]},{"id":1045,"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":1072,"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/9f223491c/tooling/api/src/window.ts#L2187"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1064,"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/9f223491c/tooling/api/src/window.ts#L2145"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1047,"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/9f223491c/tooling/api/src/window.ts#L2107"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1065,"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/9f223491c/tooling/api/src/window.ts#L2147"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1063,"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/9f223491c/tooling/api/src/window.ts#L2143"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1068,"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/9f223491c/tooling/api/src/window.ts#L2169"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1059,"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/9f223491c/tooling/api/src/window.ts#L2131"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1058,"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/9f223491c/tooling/api/src/window.ts#L2129"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1051,"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/9f223491c/tooling/api/src/window.ts#L2115"}],"type":{"type":"intrinsic","name":"number"}},{"id":1071,"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/9f223491c/tooling/api/src/window.ts#L2183"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1055,"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/9f223491c/tooling/api/src/window.ts#L2123"}],"type":{"type":"intrinsic","name":"number"}},{"id":1054,"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/9f223491c/tooling/api/src/window.ts#L2121"}],"type":{"type":"intrinsic","name":"number"}},{"id":1061,"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/9f223491c/tooling/api/src/window.ts#L2139"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1053,"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/9f223491c/tooling/api/src/window.ts#L2119"}],"type":{"type":"intrinsic","name":"number"}},{"id":1052,"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/9f223491c/tooling/api/src/window.ts#L2117"}],"type":{"type":"intrinsic","name":"number"}},{"id":1056,"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/9f223491c/tooling/api/src/window.ts#L2125"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1067,"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/9f223491c/tooling/api/src/window.ts#L2163"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1066,"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/9f223491c/tooling/api/src/window.ts#L2149"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1073,"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/9f223491c/tooling/api/src/window.ts#L2194"}],"type":{"type":"intrinsic","name":"string"}},{"id":1069,"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/9f223491c/tooling/api/src/window.ts#L2175"}],"type":{"type":"reference","id":1026,"name":"Theme"}},{"id":1057,"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/9f223491c/tooling/api/src/window.ts#L2127"}],"type":{"type":"intrinsic","name":"string"}},{"id":1070,"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/9f223491c/tooling/api/src/window.ts#L2179"}],"type":{"type":"reference","id":1027,"name":"TitleBarStyle"}},{"id":1060,"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/9f223491c/tooling/api/src/window.ts#L2137"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1046,"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/9f223491c/tooling/api/src/window.ts#L2105"}],"type":{"type":"intrinsic","name":"string"}},{"id":1074,"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/9f223491c/tooling/api/src/window.ts#L2198"}],"type":{"type":"intrinsic","name":"string"}},{"id":1062,"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/9f223491c/tooling/api/src/window.ts#L2141"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1050,"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/9f223491c/tooling/api/src/window.ts#L2113"}],"type":{"type":"intrinsic","name":"number"}},{"id":1048,"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/9f223491c/tooling/api/src/window.ts#L2109"}],"type":{"type":"intrinsic","name":"number"}},{"id":1049,"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/9f223491c/tooling/api/src/window.ts#L2111"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[1072,1064,1047,1065,1063,1068,1059,1058,1051,1071,1055,1054,1061,1053,1052,1056,1067,1066,1073,1069,1057,1070,1060,1046,1074,1062,1050,1048,1049]}],"sources":[{"fileName":"window.ts","line":2097,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L2097"}]},{"id":617,"name":"CursorIcon","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":235,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/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":1036,"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/9f223491c/tooling/api/src/window.ts#L103"}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":1037,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":1039,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":21,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L104"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":1038,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L104"}],"type":{"type":"literal","value":"hover"}}],"groups":[{"title":"Properties","children":[1039,1038]}],"sources":[{"fileName":"window.ts","line":104,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L104"}]}},{"type":"reflection","declaration":{"id":1040,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":1042,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L105"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":1041,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L105"}],"type":{"type":"literal","value":"drop"}}],"groups":[{"title":"Properties","children":[1042,1041]}],"sources":[{"fileName":"window.ts","line":105,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L105"}]}},{"type":"reflection","declaration":{"id":1043,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":1044,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":106,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L106"}],"type":{"type":"literal","value":"cancel"}}],"groups":[{"title":"Properties","children":[1044]}],"sources":[{"fileName":"window.ts","line":106,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L106"}]}}]}},{"id":1026,"name":"Theme","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L71"}],"type":{"type":"union","types":[{"type":"literal","value":"light"},{"type":"literal","value":"dark"}]}},{"id":1027,"name":"TitleBarStyle","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":72,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L72"}],"type":{"type":"union","types":[{"type":"literal","value":"visible"},{"type":"literal","value":"transparent"},{"type":"literal","value":"overlay"}]}},{"id":978,"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/9f223491c/tooling/api/src/window.ts#L2073"}],"type":{"type":"reference","id":619,"name":"WebviewWindow"}},{"id":1024,"name":"availableMonitors","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2272,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L2272"}],"signatures":[{"id":1025,"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":1028,"name":"Monitor"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":1020,"name":"currentMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2223,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L2223"}],"signatures":[{"id":1021,"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":1028,"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":976,"name":"getAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":293,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L293"}],"signatures":[{"id":977,"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":619,"name":"WebviewWindow"}}}]},{"id":974,"name":"getCurrent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":281,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L281"}],"signatures":[{"id":975,"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":619,"name":"WebviewWindow"}}]},{"id":1022,"name":"primaryMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2248,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L2248"}],"signatures":[{"id":1023,"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":1028,"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":[1017]},{"title":"Classes","children":[962,998,979,1006,987,619]},{"title":"Interfaces","children":[1028,1033,1045]},{"title":"Type Aliases","children":[617,1036,1026,1027]},{"title":"Variables","children":[978]},{"title":"Functions","children":[1024,1020,976,974,1022]}],"sources":[{"fileName":"window.ts","line":66,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/9f223491c/tooling/api/src/window.ts#L66"}]}],"groups":[{"title":"Modules","children":[1,12,62,97,202,216,229,244,340,346,576,594,616]}]} \ 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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/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/ee836f009/tooling/api/src/event.ts#L20"}]},{"id":1025,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":1026,"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/ee836f009/tooling/api/src/helpers/event.ts#L12"}],"type":{"type":"reference","id":13,"name":"EventName"}},{"id":1028,"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/ee836f009/tooling/api/src/helpers/event.ts#L16"}],"type":{"type":"intrinsic","name":"number"}},{"id":1029,"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/ee836f009/tooling/api/src/helpers/event.ts#L18"}],"type":{"type":"reference","id":1030,"name":"T"}},{"id":1027,"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/ee836f009/tooling/api/src/helpers/event.ts#L14"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[1026,1028,1029,1027]}],"sources":[{"fileName":"helpers/event.ts","line":10,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/helpers/event.ts#L10"}],"typeParameters":[{"id":1030,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":1031,"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/ee836f009/tooling/api/src/helpers/event.ts#L21"}],"typeParameters":[{"id":1035,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":1032,"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/ee836f009/tooling/api/src/helpers/event.ts#L21"}],"signatures":[{"id":1033,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":1034,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1025,"typeArguments":[{"type":"reference","id":1035,"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/ee836f009/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":1036,"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/ee836f009/tooling/api/src/helpers/event.ts#L23"}],"type":{"type":"reflection","declaration":{"id":1037,"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/ee836f009/tooling/api/src/helpers/event.ts#L23"}],"signatures":[{"id":1038,"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/ee836f009/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/ee836f009/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":1031,"typeArguments":[{"type":"reference","id":35,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1036,"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/ee836f009/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":1031,"typeArguments":[{"type":"reference","id":40,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1036,"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":[1025]},{"title":"Type Aliases","children":[1031,13,1036]},{"title":"Functions","children":[43,33,38]}],"sources":[{"fileName":"event.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/event.ts#L12"}]},{"id":47,"name":"http","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Access the HTTP client written in Rust.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.http`"},{"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 allowlisted on "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"http\": {\n \"all\": true, // enable all http APIs\n \"request\": true // enable HTTP request API\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 URLs and paths that can be accessed using glob patterns.\n\nFor instance, this scope configuration only allows making HTTP requests to the GitHub API for the "},{"kind":"code","text":"`tauri-apps`"},{"kind":"text","text":" organization:\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"http\": {\n \"scope\": [\"https://api.github.com/repos/tauri-apps/*\"]\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nTrying to execute any API with a URL not configured on the scope results in a promise rejection due to denied access."}]},"children":[{"id":143,"name":"ResponseType","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":146,"name":"Binary","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"http.ts","line":74,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L74"}],"type":{"type":"literal","value":3}},{"id":144,"name":"JSON","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"http.ts","line":72,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L72"}],"type":{"type":"literal","value":1}},{"id":145,"name":"Text","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"http.ts","line":73,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L73"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[146,144,145]}],"sources":[{"fileName":"http.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L71"}]},{"id":74,"name":"Body","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"The body object to be used on POST and PUT requests."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":92,"name":"payload","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L95"}],"type":{"type":"intrinsic","name":"unknown"}},{"id":91,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":94,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L94"}],"type":{"type":"intrinsic","name":"string"}},{"id":84,"name":"bytes","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":217,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L217"}],"signatures":[{"id":85,"name":"bytes","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new byte array body."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nBody.bytes(new Uint8Array([1, 2, 3]));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":86,"name":"bytes","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body byte array."}]},"type":{"type":"union","types":[{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Iterable","qualifiedName":"Iterable","package":"typescript"},{"type":"reference","name":"ArrayBuffer","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer","qualifiedName":"ArrayBuffer","package":"typescript"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"ArrayLike","qualifiedName":"ArrayLike","package":"typescript"}]}}],"type":{"type":"reference","id":74,"name":"Body"}}]},{"id":75,"name":"form","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":134,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L134"}],"signatures":[{"id":76,"name":"form","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new form data body. The form data is an object where each key is the entry name,\nand the value is either a string or a file object.\n\nBy default it sets the "},{"kind":"code","text":"`application/x-www-form-urlencoded`"},{"kind":"text","text":" Content-Type header,\nbut you can set it to "},{"kind":"code","text":"`multipart/form-data`"},{"kind":"text","text":" if the Cargo feature "},{"kind":"code","text":"`http-multipart`"},{"kind":"text","text":" is enabled.\n\nNote that a file path must be allowed in the "},{"kind":"code","text":"`fs`"},{"kind":"text","text":" allowlist scope."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nconst body = Body.form({\n key: 'value',\n image: {\n file: '/path/to/file', // either a path or an array buffer of the file contents\n mime: 'image/jpeg', // optional\n fileName: 'image.jpg' // optional\n }\n});\n\n// alternatively, use a FormData:\nconst form = new FormData();\nform.append('key', 'value');\nform.append('image', file, 'image.png');\nconst formBody = Body.form(form);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":77,"name":"data","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body data."}]},"type":{"type":"union","types":[{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"reference","id":54,"name":"Part"}],"name":"Record","qualifiedName":"Record","package":"typescript"},{"type":"reference","name":"FormData","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/API/FormData","qualifiedName":"FormData","package":"typescript"}]}}],"type":{"type":"reference","id":74,"name":"Body"}}]},{"id":78,"name":"json","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":185,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L185"}],"signatures":[{"id":79,"name":"json","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new JSON body."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nBody.json({\n registered: true,\n name: 'tauri'\n});\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":80,"name":"data","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body JSON object."}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"any"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"reference","id":74,"name":"Body"}}]},{"id":81,"name":"text","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"http.ts","line":201,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L201"}],"signatures":[{"id":82,"name":"text","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new UTF-8 string body."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { Body } from \"@tauri-apps/api/http\"\nBody.text('The body content as a string');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The body object ready to be used on the POST and PUT requests."}]}]},"parameters":[{"id":83,"name":"value","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The body string."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","id":74,"name":"Body"}}]}],"groups":[{"title":"Properties","children":[92,91]},{"title":"Methods","children":[84,75,78,81]}],"sources":[{"fileName":"http.ts","line":93,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L93"}]},{"id":93,"name":"Client","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":97,"name":"id","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":303,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L303"}],"type":{"type":"intrinsic","name":"number"}},{"id":126,"name":"delete","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L484"}],"signatures":[{"id":127,"name":"delete","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a DELETE request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.delete('http://localhost:3003/users/1');\n```"}]}]},"typeParameter":[{"id":128,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":129,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":130,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":64,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":131,"typeArguments":[{"type":"reference","id":128,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":98,"name":"drop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":318,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L318"}],"signatures":[{"id":99,"name":"drop","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Drops the client instance."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\nawait client.drop();\n```"}]}]},"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":104,"name":"get","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":389,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L389"}],"signatures":[{"id":105,"name":"get","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a GET request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, ResponseType } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.get('http://localhost:3003/users', {\n timeout: 30,\n // the expected response type\n responseType: ResponseType.JSON\n});\n```"}]}]},"typeParameter":[{"id":106,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":107,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":108,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":64,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":131,"typeArguments":[{"type":"reference","id":106,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":121,"name":"patch","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":467,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L467"}],"signatures":[{"id":122,"name":"patch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a PATCH request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, Body } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.patch('http://localhost:3003/users/1', {\n body: Body.json({ email: 'contact@tauri.app' })\n});\n```"}]}]},"typeParameter":[{"id":123,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":124,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":125,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":64,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":131,"typeArguments":[{"type":"reference","id":123,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":109,"name":"post","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":413,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L413"}],"signatures":[{"id":110,"name":"post","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a POST request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, Body, ResponseType } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.post('http://localhost:3003/users', {\n body: Body.json({\n name: 'tauri',\n password: 'awesome'\n }),\n // in this case the server returns a simple string\n responseType: ResponseType.Text,\n});\n```"}]}]},"typeParameter":[{"id":111,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":112,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":113,"name":"body","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":74,"name":"Body"}},{"id":114,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":64,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":131,"typeArguments":[{"type":"reference","id":111,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":115,"name":"put","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":443,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L443"}],"signatures":[{"id":116,"name":"put","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes a PUT request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient, Body } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.put('http://localhost:3003/users/1', {\n body: Body.form({\n file: {\n file: '/home/tauri/avatar.png',\n mime: 'image/png',\n fileName: 'avatar.png'\n }\n })\n});\n```"}]}]},"typeParameter":[{"id":117,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":118,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":119,"name":"body","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":74,"name":"Body"}},{"id":120,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":64,"name":"RequestOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":131,"typeArguments":[{"type":"reference","id":117,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":100,"name":"request","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"http.ts","line":340,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L340"}],"signatures":[{"id":101,"name":"request","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Makes an HTTP request."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\nconst response = await client.request({\n method: 'GET',\n url: 'http://localhost:3003/users',\n});\n```"}]}]},"typeParameter":[{"id":102,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":103,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":56,"name":"HttpOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":131,"typeArguments":[{"type":"reference","id":102,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Properties","children":[97]},{"title":"Methods","children":[126,98,104,121,109,115,100]}],"sources":[{"fileName":"http.ts","line":302,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L302"}]},{"id":131,"name":"Response","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"Response object."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":141,"name":"data","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response data."}]},"sources":[{"fileName":"http.ts","line":286,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L286"}],"type":{"type":"reference","name":"T"}},{"id":139,"name":"headers","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response headers."}]},"sources":[{"fileName":"http.ts","line":282,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L282"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"string"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":138,"name":"ok","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"A boolean indicating whether the response was successful (status in the range 200–299) or not."}]},"sources":[{"fileName":"http.ts","line":280,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L280"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":140,"name":"rawHeaders","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response raw headers."}]},"sources":[{"fileName":"http.ts","line":284,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L284"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"intrinsic","name":"string"}}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":137,"name":"status","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The response status code."}]},"sources":[{"fileName":"http.ts","line":278,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L278"}],"type":{"type":"intrinsic","name":"number"}},{"id":136,"name":"url","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The request URL."}]},"sources":[{"fileName":"http.ts","line":276,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L276"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[141,139,138,140,137,136]}],"sources":[{"fileName":"http.ts","line":274,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L274"}],"typeParameters":[{"id":142,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":51,"name":"ClientOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":53,"name":"connectTimeout","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":65,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L65"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"number"},{"type":"reference","id":48,"name":"Duration"}]}},{"id":52,"name":"maxRedirections","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Defines the maximum number of redirects the client should follow.\nIf set to 0, no redirects will be followed."}]},"sources":[{"fileName":"http.ts","line":64,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L64"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[53,52]}],"sources":[{"fileName":"http.ts","line":59,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L59"}]},{"id":48,"name":"Duration","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":50,"name":"nanos","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L53"}],"type":{"type":"intrinsic","name":"number"}},{"id":49,"name":"secs","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L52"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[50,49]}],"sources":[{"fileName":"http.ts","line":51,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L51"}]},{"id":147,"name":"FilePart","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":148,"name":"file","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L81"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":151,"name":"T"}]}},{"id":150,"name":"fileName","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L83"}],"type":{"type":"intrinsic","name":"string"}},{"id":149,"name":"mime","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":82,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L82"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[148,150,149]}],"sources":[{"fileName":"http.ts","line":80,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L80"}],"typeParameters":[{"id":151,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":56,"name":"HttpOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options object sent to the backend."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":61,"name":"body","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":250,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L250"}],"type":{"type":"reference","id":74,"name":"Body"}},{"id":59,"name":"headers","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":248,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L248"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":57,"name":"method","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":246,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L246"}],"type":{"type":"reference","id":55,"name":"HttpVerb"}},{"id":60,"name":"query","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":249,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L249"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"any"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":63,"name":"responseType","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":252,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L252"}],"type":{"type":"reference","id":143,"name":"ResponseType"}},{"id":62,"name":"timeout","kind":1024,"kindString":"Property","flags":{"isOptional":true},"sources":[{"fileName":"http.ts","line":251,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L251"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"number"},{"type":"reference","id":48,"name":"Duration"}]}},{"id":58,"name":"url","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"http.ts","line":247,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L247"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[61,59,57,60,63,62,58]}],"sources":[{"fileName":"http.ts","line":245,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L245"}]},{"id":65,"name":"FetchOptions","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Options for the "},{"kind":"code","text":"`fetch`"},{"kind":"text","text":" API."}]},"sources":[{"fileName":"http.ts","line":258,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L258"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":56,"name":"HttpOptions"},{"type":"literal","value":"url"}],"name":"Omit","qualifiedName":"Omit","package":"typescript"}},{"id":55,"name":"HttpVerb","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"The request HTTP verb."}]},"sources":[{"fileName":"http.ts","line":229,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L229"}],"type":{"type":"union","types":[{"type":"literal","value":"GET"},{"type":"literal","value":"POST"},{"type":"literal","value":"PUT"},{"type":"literal","value":"DELETE"},{"type":"literal","value":"PATCH"},{"type":"literal","value":"HEAD"},{"type":"literal","value":"OPTIONS"},{"type":"literal","value":"CONNECT"},{"type":"literal","value":"TRACE"}]}},{"id":54,"name":"Part","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"http.ts","line":86,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L86"}],"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":"reference","id":147,"typeArguments":[{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}],"name":"FilePart"}]}},{"id":64,"name":"RequestOptions","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Request options."}]},"sources":[{"fileName":"http.ts","line":256,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L256"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":56,"name":"HttpOptions"},{"type":"union","types":[{"type":"literal","value":"method"},{"type":"literal","value":"url"}]}],"name":"Omit","qualifiedName":"Omit","package":"typescript"}},{"id":69,"name":"fetch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"http.ts","line":531,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L531"}],"signatures":[{"id":70,"name":"fetch","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Perform an HTTP request using the default client."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { fetch } from '@tauri-apps/api/http';\nconst response = await fetch('http://localhost:3003/users/2', {\n method: 'GET',\n timeout: 30,\n});\n```"}]}]},"typeParameter":[{"id":71,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":72,"name":"url","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":73,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":65,"name":"FetchOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":131,"typeArguments":[{"type":"reference","id":71,"name":"T"}],"name":"Response"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":66,"name":"getClient","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"http.ts","line":507,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L507"}],"signatures":[{"id":67,"name":"getClient","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new client using the specified options."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { getClient } from '@tauri-apps/api/http';\nconst client = await getClient();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to the client instance."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":68,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Client configuration."}]},"type":{"type":"reference","id":51,"name":"ClientOptions"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":93,"name":"Client"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[143]},{"title":"Classes","children":[74,93,131]},{"title":"Interfaces","children":[51,48,147,56]},{"title":"Type Aliases","children":[65,55,54,64]},{"title":"Functions","children":[69,66]}],"sources":[{"fileName":"http.ts","line":46,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/http.ts#L46"}]},{"id":152,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":164,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":171,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/mocks.ts#L171"}],"signatures":[{"id":165,"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":153,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":65,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/mocks.ts#L65"}],"signatures":[{"id":154,"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":155,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":156,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":66,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/mocks.ts#L66"}],"signatures":[{"id":157,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":158,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":159,"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":160,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":135,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/mocks.ts#L135"}],"signatures":[{"id":161,"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":162,"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":163,"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":[164,153,160]}],"sources":[{"fileName":"mocks.ts","line":5,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/mocks.ts#L5"}]},{"id":166,"name":"notification","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Send toast notifications (brief auto-expiring OS window element) to your user.\nCan also be used with the Notification Web API.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.notification`"},{"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.notification`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.notification) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"notification\": {\n \"all\": true // enable all notification 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":167,"name":"Options","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Options to send a notification."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":169,"name":"body","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Optional notification body."}]},"sources":[{"fileName":"notification.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/notification.ts#L38"}],"type":{"type":"intrinsic","name":"string"}},{"id":170,"name":"icon","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Optional notification icon."}]},"sources":[{"fileName":"notification.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/notification.ts#L40"}],"type":{"type":"intrinsic","name":"string"}},{"id":168,"name":"title","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Notification title."}]},"sources":[{"fileName":"notification.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/notification.ts#L36"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[169,170,168]}],"sources":[{"fileName":"notification.ts","line":34,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/notification.ts#L34"}]},{"id":171,"name":"Permission","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Possible permission values."}]},"sources":[{"fileName":"notification.ts","line":44,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/notification.ts#L44"}],"type":{"type":"union","types":[{"type":"literal","value":"granted"},{"type":"literal","value":"denied"},{"type":"literal","value":"default"}]}},{"id":177,"name":"isPermissionGranted","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"notification.ts","line":56,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/notification.ts#L56"}],"signatures":[{"id":178,"name":"isPermissionGranted","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Checks if the permission to send notifications is granted."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isPermissionGranted } from '@tauri-apps/api/notification';\nconst permissionGranted = await isPermissionGranted();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.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"}}]},{"id":175,"name":"requestPermission","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"notification.ts","line":84,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/notification.ts#L84"}],"signatures":[{"id":176,"name":"requestPermission","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Requests the permission to send notifications."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isPermissionGranted, requestPermission } from '@tauri-apps/api/notification';\nlet permissionGranted = await isPermissionGranted();\nif (!permissionGranted) {\n const permission = await requestPermission();\n permissionGranted = permission === 'granted';\n}\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to whether the user granted the permission or not."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":171,"name":"Permission"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":172,"name":"sendNotification","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"notification.ts","line":106,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/notification.ts#L106"}],"signatures":[{"id":173,"name":"sendNotification","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sends a notification to the user."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isPermissionGranted, requestPermission, sendNotification } from '@tauri-apps/api/notification';\nlet permissionGranted = await isPermissionGranted();\nif (!permissionGranted) {\n const permission = await requestPermission();\n permissionGranted = permission === 'granted';\n}\nif (permissionGranted) {\n sendNotification('Tauri is awesome!');\n sendNotification({ title: 'TAURI', body: 'Tauri is awesome!' });\n}\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":174,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","id":167,"name":"Options"}]}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Interfaces","children":[167]},{"title":"Type Aliases","children":[171]},{"title":"Functions","children":[177,175,172]}],"sources":[{"fileName":"notification.ts","line":27,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/notification.ts#L27"}]},{"id":179,"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":193,"name":"Arch","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":43,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/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":192,"name":"OsType","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":41,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/os.ts#L41"}],"type":{"type":"union","types":[{"type":"literal","value":"Linux"},{"type":"literal","value":"Darwin"},{"type":"literal","value":"Windows_NT"}]}},{"id":191,"name":"Platform","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"os.ts","line":29,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/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":180,"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/ee836f009/tooling/api/src/os.ts#L63"}],"type":{"type":"union","types":[{"type":"literal","value":"\n"},{"type":"literal","value":"\r\n"}]},"defaultValue":"..."},{"id":187,"name":"arch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":135,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/os.ts#L135"}],"signatures":[{"id":188,"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":193,"name":"Arch"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":181,"name":"platform","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":77,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/os.ts#L77"}],"signatures":[{"id":182,"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":191,"name":"Platform"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":189,"name":"tempdir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":154,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/os.ts#L154"}],"signatures":[{"id":190,"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":185,"name":"type","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":115,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/os.ts#L115"}],"signatures":[{"id":186,"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":192,"name":"OsType"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":183,"name":"version","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"os.ts","line":96,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/os.ts#L96"}],"signatures":[{"id":184,"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":[193,192,191]},{"title":"Variables","children":[180]},{"title":"Functions","children":[187,181,189,185,183]}],"sources":[{"fileName":"os.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/os.ts#L26"}]},{"id":194,"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":195,"name":"BaseDirectory","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":211,"name":"AppCache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L48"}],"type":{"type":"literal","value":16}},{"id":208,"name":"AppConfig","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":45,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L45"}],"type":{"type":"literal","value":13}},{"id":209,"name":"AppData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":46,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L46"}],"type":{"type":"literal","value":14}},{"id":210,"name":"AppLocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L47"}],"type":{"type":"literal","value":15}},{"id":212,"name":"AppLog","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L49"}],"type":{"type":"literal","value":17}},{"id":196,"name":"Audio","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L33"}],"type":{"type":"literal","value":1}},{"id":197,"name":"Cache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L34"}],"type":{"type":"literal","value":2}},{"id":198,"name":"Config","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L35"}],"type":{"type":"literal","value":3}},{"id":199,"name":"Data","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L36"}],"type":{"type":"literal","value":4}},{"id":213,"name":"Desktop","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L51"}],"type":{"type":"literal","value":18}},{"id":201,"name":"Document","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L38"}],"type":{"type":"literal","value":6}},{"id":202,"name":"Download","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L39"}],"type":{"type":"literal","value":7}},{"id":214,"name":"Executable","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L52"}],"type":{"type":"literal","value":19}},{"id":215,"name":"Font","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L53"}],"type":{"type":"literal","value":20}},{"id":216,"name":"Home","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L54"}],"type":{"type":"literal","value":21}},{"id":200,"name":"LocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L37"}],"type":{"type":"literal","value":5}},{"id":203,"name":"Picture","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L40"}],"type":{"type":"literal","value":8}},{"id":204,"name":"Public","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L41"}],"type":{"type":"literal","value":9}},{"id":206,"name":"Resource","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L43"}],"type":{"type":"literal","value":11}},{"id":217,"name":"Runtime","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L55"}],"type":{"type":"literal","value":22}},{"id":207,"name":"Temp","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":44,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L44"}],"type":{"type":"literal","value":12}},{"id":218,"name":"Template","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L56"}],"type":{"type":"literal","value":23}},{"id":205,"name":"Video","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L42"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[211,208,209,210,212,196,197,198,199,213,201,202,214,215,216,200,203,204,206,217,207,218,205]}],"sources":[{"fileName":"path.ts","line":32,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L32"}]},{"id":267,"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/ee836f009/tooling/api/src/path.ts#L555"}],"type":{"type":"union","types":[{"type":"literal","value":";"},{"type":"literal","value":":"}]},"defaultValue":"..."},{"id":266,"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/ee836f009/tooling/api/src/path.ts#L546"}],"type":{"type":"union","types":[{"type":"literal","value":"\\"},{"type":"literal","value":"/"}]},"defaultValue":"..."},{"id":225,"name":"appCacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":121,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L121"}],"signatures":[{"id":226,"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":219,"name":"appConfigDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":70,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L70"}],"signatures":[{"id":220,"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":221,"name":"appDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L87"}],"signatures":[{"id":222,"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":223,"name":"appLocalDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":104,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L104"}],"signatures":[{"id":224,"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":227,"name":"appLogDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":533,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L533"}],"signatures":[{"id":228,"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":229,"name":"audioDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":143,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L143"}],"signatures":[{"id":230,"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":283,"name":"basename","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":647,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L647"}],"signatures":[{"id":284,"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":285,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":286,"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":231,"name":"cacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":165,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L165"}],"signatures":[{"id":232,"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":233,"name":"configDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":187,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L187"}],"signatures":[{"id":234,"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":235,"name":"dataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":209,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L209"}],"signatures":[{"id":236,"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":237,"name":"desktopDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":231,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L231"}],"signatures":[{"id":238,"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":277,"name":"dirname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":613,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L613"}],"signatures":[{"id":278,"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":279,"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":239,"name":"documentDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":253,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L253"}],"signatures":[{"id":240,"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":241,"name":"downloadDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":275,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L275"}],"signatures":[{"id":242,"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":243,"name":"executableDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":297,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L297"}],"signatures":[{"id":244,"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":280,"name":"extname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":629,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L629"}],"signatures":[{"id":281,"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":282,"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":245,"name":"fontDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":319,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L319"}],"signatures":[{"id":246,"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":247,"name":"homeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":341,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L341"}],"signatures":[{"id":248,"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":287,"name":"isAbsolute","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":661,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L661"}],"signatures":[{"id":288,"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":289,"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":274,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":598,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L598"}],"signatures":[{"id":275,"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":276,"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":249,"name":"localDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":363,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L363"}],"signatures":[{"id":250,"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":271,"name":"normalize","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":583,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L583"}],"signatures":[{"id":272,"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":273,"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":251,"name":"pictureDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":385,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L385"}],"signatures":[{"id":252,"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":253,"name":"publicDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":407,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L407"}],"signatures":[{"id":254,"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":268,"name":"resolve","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":568,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L568"}],"signatures":[{"id":269,"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":270,"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":257,"name":"resolveResource","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":444,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L444"}],"signatures":[{"id":258,"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":259,"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":255,"name":"resourceDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":424,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L424"}],"signatures":[{"id":256,"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":260,"name":"runtimeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":467,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L467"}],"signatures":[{"id":261,"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":262,"name":"templateDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":489,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L489"}],"signatures":[{"id":263,"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":264,"name":"videoDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":511,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L511"}],"signatures":[{"id":265,"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":[195]},{"title":"Variables","children":[267,266]},{"title":"Functions","children":[225,219,221,223,227,229,283,231,233,235,237,277,239,241,243,280,245,247,287,274,249,271,251,253,268,257,255,260,262,264]}],"sources":[{"fileName":"path.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/path.ts#L26"}]},{"id":290,"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":291,"name":"exit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"process.ts","line":27,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/process.ts#L27"}],"signatures":[{"id":292,"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":293,"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":294,"name":"relaunch","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"process.ts","line":49,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/process.ts#L49"}],"signatures":[{"id":295,"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":[291,294]}],"sources":[{"fileName":"process.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/process.ts#L12"}]},{"id":296,"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":502},{"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":502},{"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":297},{"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":298},{"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":414,"name":"Child","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":415,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"shell.ts","line":346,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L346"}],"signatures":[{"id":416,"name":"new Child","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":417,"name":"pid","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":414,"name":"Child"}}]},{"id":418,"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/ee836f009/tooling/api/src/shell.ts#L344"}],"type":{"type":"intrinsic","name":"number"}},{"id":422,"name":"kill","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":382,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L382"}],"signatures":[{"id":423,"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":419,"name":"write","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":365,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L365"}],"signatures":[{"id":420,"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":421,"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":506,"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":[415]},{"title":"Properties","children":[418]},{"title":"Methods","children":[422,419]}],"sources":[{"fileName":"shell.ts","line":342,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L342"}]},{"id":297,"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":336,"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/ee836f009/tooling/api/src/shell.ts#L433"}],"type":{"type":"reference","id":424,"typeArguments":[{"type":"reference","id":513,"typeArguments":[{"type":"reference","name":"O"}],"name":"OutputEvents"}],"name":"EventEmitter"},"defaultValue":"..."},{"id":335,"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/ee836f009/tooling/api/src/shell.ts#L431"}],"type":{"type":"reference","id":424,"typeArguments":[{"type":"reference","id":513,"typeArguments":[{"type":"reference","name":"O"}],"name":"OutputEvents"}],"name":"EventEmitter"},"defaultValue":"..."},{"id":344,"name":"addListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L164"}],"signatures":[{"id":345,"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":346,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":507,"name":"CommandEvents"}}}],"parameters":[{"id":347,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":346,"name":"N"}},{"id":348,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":349,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":166,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L166"}],"signatures":[{"id":350,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":351,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":346,"name":"N"},"objectType":{"type":"reference","id":507,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":297,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":433,"name":"EventEmitter.addListener"}}],"inheritedFrom":{"type":"reference","id":432,"name":"EventEmitter.addListener"}},{"id":339,"name":"execute","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":564,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L564"}],"signatures":[{"id":340,"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":516,"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":393,"name":"listenerCount","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":287,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L287"}],"signatures":[{"id":394,"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":395,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":507,"name":"CommandEvents"}}}],"parameters":[{"id":396,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":395,"name":"N"}}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","id":482,"name":"EventEmitter.listenerCount"}}],"inheritedFrom":{"type":"reference","id":481,"name":"EventEmitter.listenerCount"}},{"id":376,"name":"off","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":233,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L233"}],"signatures":[{"id":377,"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":378,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":507,"name":"CommandEvents"}}}],"parameters":[{"id":379,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":378,"name":"N"}},{"id":380,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":381,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":235,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L235"}],"signatures":[{"id":382,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":383,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":378,"name":"N"},"objectType":{"type":"reference","id":507,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":297,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":465,"name":"EventEmitter.off"}}],"inheritedFrom":{"type":"reference","id":464,"name":"EventEmitter.off"}},{"id":360,"name":"on","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":193,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L193"}],"signatures":[{"id":361,"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":362,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":507,"name":"CommandEvents"}}}],"parameters":[{"id":363,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":362,"name":"N"}},{"id":364,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":365,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":195,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L195"}],"signatures":[{"id":366,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":367,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":362,"name":"N"},"objectType":{"type":"reference","id":507,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":297,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":449,"name":"EventEmitter.on"}}],"inheritedFrom":{"type":"reference","id":448,"name":"EventEmitter.on"}},{"id":368,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":215,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L215"}],"signatures":[{"id":369,"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":370,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":507,"name":"CommandEvents"}}}],"parameters":[{"id":371,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":370,"name":"N"}},{"id":372,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":373,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":217,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L217"}],"signatures":[{"id":374,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":375,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":370,"name":"N"},"objectType":{"type":"reference","id":507,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":297,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":457,"name":"EventEmitter.once"}}],"inheritedFrom":{"type":"reference","id":456,"name":"EventEmitter.once"}},{"id":397,"name":"prependListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":304,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L304"}],"signatures":[{"id":398,"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":399,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":507,"name":"CommandEvents"}}}],"parameters":[{"id":400,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":399,"name":"N"}},{"id":401,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":402,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":306,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L306"}],"signatures":[{"id":403,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":404,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":399,"name":"N"},"objectType":{"type":"reference","id":507,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":297,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":486,"name":"EventEmitter.prependListener"}}],"inheritedFrom":{"type":"reference","id":485,"name":"EventEmitter.prependListener"}},{"id":405,"name":"prependOnceListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":326,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L326"}],"signatures":[{"id":406,"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":407,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":507,"name":"CommandEvents"}}}],"parameters":[{"id":408,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":407,"name":"N"}},{"id":409,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":410,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":328,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L328"}],"signatures":[{"id":411,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":412,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":407,"name":"N"},"objectType":{"type":"reference","id":507,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":297,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":494,"name":"EventEmitter.prependOnceListener"}}],"inheritedFrom":{"type":"reference","id":493,"name":"EventEmitter.prependOnceListener"}},{"id":384,"name":"removeAllListeners","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":253,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L253"}],"signatures":[{"id":385,"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":386,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":507,"name":"CommandEvents"}}}],"parameters":[{"id":387,"name":"event","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":386,"name":"N"}}],"type":{"type":"reference","id":297,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":473,"name":"EventEmitter.removeAllListeners"}}],"inheritedFrom":{"type":"reference","id":472,"name":"EventEmitter.removeAllListeners"}},{"id":352,"name":"removeListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L176"}],"signatures":[{"id":353,"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":354,"name":"N","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"typeOperator","operator":"keyof","target":{"type":"reference","id":507,"name":"CommandEvents"}}}],"parameters":[{"id":355,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":354,"name":"N"}},{"id":356,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":357,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":178,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L178"}],"signatures":[{"id":358,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":359,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":354,"name":"N"},"objectType":{"type":"reference","id":507,"name":"CommandEvents"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":297,"typeArguments":[{"type":"reference","name":"O"}],"name":"Command"},"inheritedFrom":{"type":"reference","id":441,"name":"EventEmitter.removeListener"}}],"inheritedFrom":{"type":"reference","id":440,"name":"EventEmitter.removeListener"}},{"id":337,"name":"spawn","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":526,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L526"}],"signatures":[{"id":338,"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":414,"name":"Child"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":298,"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/ee836f009/tooling/api/src/shell.ts#L455"},{"fileName":"shell.ts","line":456,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L456"},{"fileName":"shell.ts","line":461,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L461"},{"fileName":"shell.ts","line":479,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L479"}],"signatures":[{"id":299,"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":300,"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":301,"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":297,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}},{"id":302,"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":303,"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":304,"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":305,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":522,"name":"SpawnOptions"},{"type":"reflection","declaration":{"id":306,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":307,"name":"encoding","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":459,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L459"}],"type":{"type":"literal","value":"raw"}}],"groups":[{"title":"Properties","children":[307]}],"sources":[{"fileName":"shell.ts","line":459,"character":29,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L459"}]}}]}}],"type":{"type":"reference","id":297,"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":308,"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":309,"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":310,"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":311,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":522,"name":"SpawnOptions"}}],"type":{"type":"reference","id":297,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}}]},{"id":312,"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/ee836f009/tooling/api/src/shell.ts#L487"},{"fileName":"shell.ts","line":488,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L488"},{"fileName":"shell.ts","line":493,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L493"},{"fileName":"shell.ts","line":511,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L511"}],"signatures":[{"id":313,"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":314,"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":315,"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":297,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}},{"id":316,"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":317,"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":318,"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":319,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intersection","types":[{"type":"reference","id":522,"name":"SpawnOptions"},{"type":"reflection","declaration":{"id":320,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":321,"name":"encoding","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":491,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L491"}],"type":{"type":"literal","value":"raw"}}],"groups":[{"title":"Properties","children":[321]}],"sources":[{"fileName":"shell.ts","line":491,"character":29,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L491"}]}}]}}],"type":{"type":"reference","id":297,"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":322,"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":323,"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":324,"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":325,"name":"options","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":522,"name":"SpawnOptions"}}],"type":{"type":"reference","id":297,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Command"}}]}],"groups":[{"title":"Properties","children":[336,335]},{"title":"Methods","children":[344,339,393,376,360,368,397,405,384,352,337,298,312]}],"sources":[{"fileName":"shell.ts","line":423,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L423"}],"typeParameters":[{"id":413,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":506,"name":"IOPayload"}}],"extendedTypes":[{"type":"reference","id":424,"typeArguments":[{"type":"reference","id":507,"name":"CommandEvents"}],"name":"EventEmitter"}]},{"id":424,"name":"EventEmitter","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":425,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"signatures":[{"id":426,"name":"new EventEmitter","kind":16384,"kindString":"Constructor signature","flags":{},"typeParameter":[{"id":427,"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":424,"typeArguments":[{"type":"reference","id":427,"name":"E"}],"name":"EventEmitter"}}]},{"id":432,"name":"addListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L164"}],"signatures":[{"id":433,"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":434,"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":435,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":346,"name":"N"}},{"id":436,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":437,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":166,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L166"}],"signatures":[{"id":438,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":439,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":346,"name":"N"},"objectType":{"type":"reference","id":427,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":424,"typeArguments":[{"type":"reference","id":427,"name":"E"}],"name":"EventEmitter"}}]},{"id":481,"name":"listenerCount","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":287,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L287"}],"signatures":[{"id":482,"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":483,"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":484,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":395,"name":"N"}}],"type":{"type":"intrinsic","name":"number"}}]},{"id":464,"name":"off","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":233,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L233"}],"signatures":[{"id":465,"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":466,"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":467,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":378,"name":"N"}},{"id":468,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":469,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":235,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L235"}],"signatures":[{"id":470,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":471,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":378,"name":"N"},"objectType":{"type":"reference","id":427,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":424,"typeArguments":[{"type":"reference","id":427,"name":"E"}],"name":"EventEmitter"}}]},{"id":448,"name":"on","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":193,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L193"}],"signatures":[{"id":449,"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":450,"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":451,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":362,"name":"N"}},{"id":452,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":453,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":195,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L195"}],"signatures":[{"id":454,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":455,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":362,"name":"N"},"objectType":{"type":"reference","id":427,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":424,"typeArguments":[{"type":"reference","id":427,"name":"E"}],"name":"EventEmitter"}}]},{"id":456,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":215,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L215"}],"signatures":[{"id":457,"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":458,"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":459,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":370,"name":"N"}},{"id":460,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":461,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":217,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L217"}],"signatures":[{"id":462,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":463,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":370,"name":"N"},"objectType":{"type":"reference","id":427,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":424,"typeArguments":[{"type":"reference","id":427,"name":"E"}],"name":"EventEmitter"}}]},{"id":485,"name":"prependListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":304,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L304"}],"signatures":[{"id":486,"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":487,"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":488,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":399,"name":"N"}},{"id":489,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":490,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":306,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L306"}],"signatures":[{"id":491,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":492,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":399,"name":"N"},"objectType":{"type":"reference","id":427,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":424,"typeArguments":[{"type":"reference","id":427,"name":"E"}],"name":"EventEmitter"}}]},{"id":493,"name":"prependOnceListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":326,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L326"}],"signatures":[{"id":494,"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":495,"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":496,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":407,"name":"N"}},{"id":497,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":498,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":328,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L328"}],"signatures":[{"id":499,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":500,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":407,"name":"N"},"objectType":{"type":"reference","id":427,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":424,"typeArguments":[{"type":"reference","id":427,"name":"E"}],"name":"EventEmitter"}}]},{"id":472,"name":"removeAllListeners","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":253,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L253"}],"signatures":[{"id":473,"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":474,"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":475,"name":"event","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reference","id":386,"name":"N"}}],"type":{"type":"reference","id":424,"typeArguments":[{"type":"reference","id":427,"name":"E"}],"name":"EventEmitter"}}]},{"id":440,"name":"removeListener","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"shell.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L176"}],"signatures":[{"id":441,"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":442,"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":443,"name":"eventName","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":354,"name":"N"}},{"id":444,"name":"listener","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":445,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"shell.ts","line":178,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L178"}],"signatures":[{"id":446,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":447,"name":"arg","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"indexedAccess","indexType":{"type":"reference","id":354,"name":"N"},"objectType":{"type":"reference","id":427,"name":"E"}}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","id":424,"typeArguments":[{"type":"reference","id":427,"name":"E"}],"name":"EventEmitter"}}]}],"groups":[{"title":"Constructors","children":[425]},{"title":"Methods","children":[432,481,464,448,456,485,493,472,440]}],"sources":[{"fileName":"shell.ts","line":153,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L153"}],"typeParameters":[{"id":501,"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":297,"name":"Command"}]},{"id":516,"name":"ChildProcess","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":517,"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/ee836f009/tooling/api/src/shell.ts#L109"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":518,"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/ee836f009/tooling/api/src/shell.ts#L111"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":520,"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/ee836f009/tooling/api/src/shell.ts#L115"}],"type":{"type":"reference","id":521,"name":"O"}},{"id":519,"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/ee836f009/tooling/api/src/shell.ts#L113"}],"type":{"type":"reference","id":521,"name":"O"}}],"groups":[{"title":"Properties","children":[517,518,520,519]}],"sources":[{"fileName":"shell.ts","line":107,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L107"}],"typeParameters":[{"id":521,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":506,"name":"IOPayload"}}]},{"id":507,"name":"CommandEvents","kind":256,"kindString":"Interface","flags":{},"children":[{"id":508,"name":"close","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":394,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L394"}],"type":{"type":"reference","id":510,"name":"TerminatedPayload"}},{"id":509,"name":"error","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":395,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L395"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[508,509]}],"sources":[{"fileName":"shell.ts","line":393,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L393"}]},{"id":513,"name":"OutputEvents","kind":256,"kindString":"Interface","flags":{},"children":[{"id":514,"name":"data","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"shell.ts","line":399,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L399"}],"type":{"type":"reference","id":515,"name":"O"}}],"groups":[{"title":"Properties","children":[514]}],"sources":[{"fileName":"shell.ts","line":398,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L398"}],"typeParameters":[{"id":515,"name":"O","kind":131072,"kindString":"Type parameter","flags":{},"type":{"type":"reference","id":506,"name":"IOPayload"}}]},{"id":522,"name":"SpawnOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":523,"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/ee836f009/tooling/api/src/shell.ts#L88"}],"type":{"type":"intrinsic","name":"string"}},{"id":525,"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/ee836f009/tooling/api/src/shell.ts#L96"}],"type":{"type":"intrinsic","name":"string"}},{"id":524,"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/ee836f009/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":[523,525,524]}],"sources":[{"fileName":"shell.ts","line":86,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L86"}]},{"id":510,"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":511,"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/ee836f009/tooling/api/src/shell.ts#L615"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}},{"id":512,"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/ee836f009/tooling/api/src/shell.ts#L617"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"number"}]}}],"groups":[{"title":"Properties","children":[511,512]}],"sources":[{"fileName":"shell.ts","line":613,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L613"}]},{"id":506,"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/ee836f009/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":502,"name":"open","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"shell.ts","line":656,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L656"}],"signatures":[{"id":503,"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":504,"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":505,"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":[414,297,424]},{"title":"Interfaces","children":[516,507,513,522,510]},{"title":"Type Aliases","children":[506]},{"title":"Functions","children":[502]}],"sources":[{"fileName":"shell.ts","line":80,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/shell.ts#L80"}]},{"id":526,"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":527,"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/ee836f009/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":540,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":129,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/tauri.ts#L129"}],"signatures":[{"id":541,"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":542,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":543,"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":535,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":79,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/tauri.ts#L79"}],"signatures":[{"id":536,"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":537,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":538,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":539,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":527,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":537,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":528,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":529,"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":530,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":531,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":532,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":533,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":534,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Type Aliases","children":[527]},{"title":"Functions","children":[540,535,528]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/tauri.ts#L13"}]},{"id":544,"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":549,"name":"UpdateManifest","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":552,"name":"body","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L34"}],"type":{"type":"intrinsic","name":"string"}},{"id":551,"name":"date","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L33"}],"type":{"type":"intrinsic","name":"string"}},{"id":550,"name":"version","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L32"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[552,551,550]}],"sources":[{"fileName":"updater.ts","line":31,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L31"}]},{"id":553,"name":"UpdateResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":554,"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/ee836f009/tooling/api/src/updater.ts#L41"}],"type":{"type":"reference","id":549,"name":"UpdateManifest"}},{"id":555,"name":"shouldUpdate","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L42"}],"type":{"type":"intrinsic","name":"boolean"}}],"groups":[{"title":"Properties","children":[554,555]}],"sources":[{"fileName":"updater.ts","line":40,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L40"}]},{"id":546,"name":"UpdateStatusResult","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":547,"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/ee836f009/tooling/api/src/updater.ts#L24"}],"type":{"type":"intrinsic","name":"string"}},{"id":548,"name":"status","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"updater.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L25"}],"type":{"type":"reference","id":545,"name":"UpdateStatus"}}],"groups":[{"title":"Properties","children":[547,548]}],"sources":[{"fileName":"updater.ts","line":23,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L23"}]},{"id":545,"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/ee836f009/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":564,"name":"checkUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":146,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L146"}],"signatures":[{"id":565,"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":553,"name":"UpdateResult"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":562,"name":"installUpdate","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L87"}],"signatures":[{"id":563,"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":556,"name":"onUpdaterEvent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"updater.ts","line":63,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L63"}],"signatures":[{"id":557,"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":558,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":559,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"updater.ts","line":64,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L64"}],"signatures":[{"id":560,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":561,"name":"status","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":546,"name":"UpdateStatusResult"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1036,"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":[549,553,546]},{"title":"Type Aliases","children":[545]},{"title":"Functions","children":[564,562,556]}],"sources":[{"fileName":"updater.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/updater.ts#L12"}]},{"id":566,"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":967,"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":968,"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/ee836f009/tooling/api/src/window.ts#L226"}],"type":{"type":"literal","value":1}},{"id":969,"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/ee836f009/tooling/api/src/window.ts#L232"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[968,969]}],"sources":[{"fileName":"window.ts","line":220,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L220"}]},{"id":912,"name":"CloseRequestedEvent","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":913,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":1963,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1963"}],"signatures":[{"id":914,"name":"new CloseRequestedEvent","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":915,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1025,"typeArguments":[{"type":"literal","value":null}],"name":"Event"}}],"type":{"type":"reference","id":912,"name":"CloseRequestedEvent"}}]},{"id":919,"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/ee836f009/tooling/api/src/window.ts#L1961"}],"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"},{"id":916,"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/ee836f009/tooling/api/src/window.ts#L1956"}],"type":{"type":"reference","id":13,"name":"EventName"}},{"id":918,"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/ee836f009/tooling/api/src/window.ts#L1960"}],"type":{"type":"intrinsic","name":"number"}},{"id":917,"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/ee836f009/tooling/api/src/window.ts#L1958"}],"type":{"type":"intrinsic","name":"string"}},{"id":922,"name":"isPreventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1973,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1973"}],"signatures":[{"id":923,"name":"isPreventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"boolean"}}]},{"id":920,"name":"preventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1969,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1969"}],"signatures":[{"id":921,"name":"preventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[913]},{"title":"Properties","children":[919,916,918,917]},{"title":"Methods","children":[922,920]}],"sources":[{"fileName":"window.ts","line":1954,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1954"}]},{"id":948,"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":949,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L164"}],"signatures":[{"id":950,"name":"new LogicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":951,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":952,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":948,"name":"LogicalPosition"}}]},{"id":953,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L160"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":954,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L161"}],"type":{"type":"intrinsic","name":"number"}},{"id":955,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":162,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L162"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[949]},{"title":"Properties","children":[953,954,955]}],"sources":[{"fileName":"window.ts","line":159,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L159"}]},{"id":929,"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":930,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":118,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L118"}],"signatures":[{"id":931,"name":"new LogicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":932,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":933,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":929,"name":"LogicalSize"}}]},{"id":936,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L116"}],"type":{"type":"intrinsic","name":"number"}},{"id":934,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":114,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L114"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":935,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L115"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[930]},{"title":"Properties","children":[936,934,935]}],"sources":[{"fileName":"window.ts","line":113,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L113"}]},{"id":956,"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":957,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":180,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L180"}],"signatures":[{"id":958,"name":"new PhysicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":959,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":960,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":956,"name":"PhysicalPosition"}}]},{"id":961,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L176"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":962,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L177"}],"type":{"type":"intrinsic","name":"number"}},{"id":963,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":178,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L178"}],"type":{"type":"intrinsic","name":"number"}},{"id":964,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L195"}],"signatures":[{"id":965,"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":966,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":948,"name":"LogicalPosition"}}]}],"groups":[{"title":"Constructors","children":[957]},{"title":"Properties","children":[961,962,963]},{"title":"Methods","children":[964]}],"sources":[{"fileName":"window.ts","line":175,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L175"}]},{"id":937,"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":938,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":134,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L134"}],"signatures":[{"id":939,"name":"new PhysicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":940,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":941,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":937,"name":"PhysicalSize"}}]},{"id":944,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L132"}],"type":{"type":"intrinsic","name":"number"}},{"id":942,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L130"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":943,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L131"}],"type":{"type":"intrinsic","name":"number"}},{"id":945,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L149"}],"signatures":[{"id":946,"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":947,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":929,"name":"LogicalSize"}}]}],"groups":[{"title":"Constructors","children":[938]},{"title":"Properties","children":[944,942,943]},{"title":"Methods","children":[945]}],"sources":[{"fileName":"window.ts","line":129,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L129"}]},{"id":569,"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":573,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":2031,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L2031"}],"signatures":[{"id":574,"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":575,"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":576,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":995,"name":"WindowOptions"},"defaultValue":"{}"}],"type":{"type":"reference","id":569,"name":"WebviewWindow"},"overwrites":{"type":"reference","name":"WindowManager.constructor"}}],"overwrites":{"type":"reference","name":"WindowManager.constructor"}},{"id":709,"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/ee836f009/tooling/api/src/window.ts#L316"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","name":"WindowManager.label"}},{"id":710,"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/ee836f009/tooling/api/src/window.ts#L318"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"reference","id":1031,"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"EventCallback"}}],"name":"Record","qualifiedName":"Record","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listeners"}},{"id":603,"name":"center","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":780,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L780"}],"signatures":[{"id":604,"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":628,"name":"close","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1081,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1081"}],"signatures":[{"id":629,"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":721,"name":"emit","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":400,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L400"}],"signatures":[{"id":722,"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":723,"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":724,"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":626,"name":"hide","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1056,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1056"}],"signatures":[{"id":627,"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":579,"name":"innerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":470,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L470"}],"signatures":[{"id":580,"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":956,"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":583,"name":"innerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":521,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L521"}],"signatures":[{"id":584,"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":937,"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":593,"name":"isDecorated","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":647,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L647"}],"signatures":[{"id":594,"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":587,"name":"isFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":572,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L572"}],"signatures":[{"id":588,"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":591,"name":"isMaximized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":622,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L622"}],"signatures":[{"id":592,"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":589,"name":"isMinimized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":597,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L597"}],"signatures":[{"id":590,"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":595,"name":"isResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":672,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L672"}],"signatures":[{"id":596,"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":597,"name":"isVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":697,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L697"}],"signatures":[{"id":598,"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":711,"name":"listen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":345,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L345"}],"signatures":[{"id":712,"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":713,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":714,"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":715,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":1031,"typeArguments":[{"type":"reference","id":713,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1036,"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":614,"name":"maximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":906,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L906"}],"signatures":[{"id":615,"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":620,"name":"minimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":981,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L981"}],"signatures":[{"id":621,"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":688,"name":"onCloseRequested","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1763,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1763"}],"signatures":[{"id":689,"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":690,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":691,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"window.ts","line":1764,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1764"}],"signatures":[{"id":692,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":693,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":912,"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":1036,"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":703,"name":"onFileDropEvent","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1896,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1896"}],"signatures":[{"id":704,"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":705,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1031,"typeArguments":[{"type":"reference","id":986,"name":"FileDropEvent"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1036,"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":694,"name":"onFocusChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1795,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1795"}],"signatures":[{"id":695,"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":696,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1031,"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1036,"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":700,"name":"onMenuClicked","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1865,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1865"}],"signatures":[{"id":701,"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":702,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1031,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1036,"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":685,"name":"onMoved","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1735,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1735"}],"signatures":[{"id":686,"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":687,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1031,"typeArguments":[{"type":"reference","id":956,"name":"PhysicalPosition"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1036,"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":682,"name":"onResized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1712,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1712"}],"signatures":[{"id":683,"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":684,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1031,"typeArguments":[{"type":"reference","id":937,"name":"PhysicalSize"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1036,"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":697,"name":"onScaleChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1837,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1837"}],"signatures":[{"id":698,"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":699,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1031,"typeArguments":[{"type":"reference","id":983,"name":"ScaleFactorChanged"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1036,"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":706,"name":"onThemeChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1946,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1946"}],"signatures":[{"id":707,"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":708,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":1031,"typeArguments":[{"type":"reference","id":976,"name":"Theme"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1036,"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":716,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":378,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L378"}],"signatures":[{"id":717,"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":718,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":719,"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":720,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":1031,"typeArguments":[{"type":"reference","id":718,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":1036,"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":581,"name":"outerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":495,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L495"}],"signatures":[{"id":582,"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":956,"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":585,"name":"outerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":547,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L547"}],"signatures":[{"id":586,"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":937,"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":605,"name":"requestUserAttention","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":816,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L816"}],"signatures":[{"id":606,"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":607,"name":"requestType","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":967,"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":577,"name":"scaleFactor","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":445,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L445"}],"signatures":[{"id":578,"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":636,"name":"setAlwaysOnTop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1171,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1171"}],"signatures":[{"id":637,"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":638,"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":639,"name":"setContentProtected","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1199,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1199"}],"signatures":[{"id":640,"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":641,"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":665,"name":"setCursorGrab","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1519,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1519"}],"signatures":[{"id":666,"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":667,"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":671,"name":"setCursorIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1579,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1579"}],"signatures":[{"id":672,"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":673,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor icon."}]},"type":{"type":"reference","id":567,"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":674,"name":"setCursorPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1606,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1606"}],"signatures":[{"id":675,"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":676,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor position."}]},"type":{"type":"union","types":[{"type":"reference","id":956,"name":"PhysicalPosition"},{"type":"reference","id":948,"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":668,"name":"setCursorVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1552,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1552"}],"signatures":[{"id":669,"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":670,"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":630,"name":"setDecorations","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1107,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1107"}],"signatures":[{"id":631,"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":632,"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":657,"name":"setFocus","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1417,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1417"}],"signatures":[{"id":658,"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":654,"name":"setFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1391,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1391"}],"signatures":[{"id":655,"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":656,"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":659,"name":"setIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1450,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1450"}],"signatures":[{"id":660,"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":661,"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":677,"name":"setIgnoreCursorEvents","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1650,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1650"}],"signatures":[{"id":678,"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":679,"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":648,"name":"setMaxSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1306,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1306"}],"signatures":[{"id":649,"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":650,"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":937,"name":"PhysicalSize"},{"type":"reference","id":929,"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":645,"name":"setMinSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1264,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1264"}],"signatures":[{"id":646,"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":647,"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":937,"name":"PhysicalSize"},{"type":"reference","id":929,"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":651,"name":"setPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1348,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1348"}],"signatures":[{"id":652,"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":653,"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":956,"name":"PhysicalPosition"},{"type":"reference","id":948,"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":608,"name":"setResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":853,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L853"}],"signatures":[{"id":609,"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":610,"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":633,"name":"setShadow","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1144,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1144"}],"signatures":[{"id":634,"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":635,"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":642,"name":"setSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1226,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1226"}],"signatures":[{"id":643,"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":644,"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":937,"name":"PhysicalSize"},{"type":"reference","id":929,"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":662,"name":"setSkipTaskbar","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1484"}],"signatures":[{"id":663,"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":664,"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":611,"name":"setTitle","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":880,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L880"}],"signatures":[{"id":612,"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":613,"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":624,"name":"show","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1031,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1031"}],"signatures":[{"id":625,"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":680,"name":"startDragging","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1676,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1676"}],"signatures":[{"id":681,"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":601,"name":"theme","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":752,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L752"}],"signatures":[{"id":602,"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":976,"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":599,"name":"title","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":722,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L722"}],"signatures":[{"id":600,"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":618,"name":"toggleMaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":956,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L956"}],"signatures":[{"id":619,"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":616,"name":"unmaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":931,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L931"}],"signatures":[{"id":617,"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":622,"name":"unminimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1006,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L1006"}],"signatures":[{"id":623,"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":570,"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/ee836f009/tooling/api/src/window.ts#L2063"}],"signatures":[{"id":571,"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":572,"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":569,"name":"WebviewWindow"}]}}]}],"groups":[{"title":"Constructors","children":[573]},{"title":"Properties","children":[709,710]},{"title":"Methods","children":[603,628,721,626,579,583,593,587,591,589,595,597,711,614,620,688,703,694,700,685,682,697,706,716,581,585,605,577,636,639,665,671,674,668,630,657,654,659,677,648,645,651,608,633,642,662,611,624,680,601,599,618,616,622,570]}],"sources":[{"fileName":"window.ts","line":2011,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L2011"}],"extendedTypes":[{"type":"reference","name":"WindowManager"}]},{"id":978,"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":979,"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/ee836f009/tooling/api/src/window.ts#L81"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}},{"id":981,"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/ee836f009/tooling/api/src/window.ts#L85"}],"type":{"type":"reference","id":956,"name":"PhysicalPosition"}},{"id":982,"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/ee836f009/tooling/api/src/window.ts#L87"}],"type":{"type":"intrinsic","name":"number"}},{"id":980,"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/ee836f009/tooling/api/src/window.ts#L83"}],"type":{"type":"reference","id":937,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[979,981,982,980]}],"sources":[{"fileName":"window.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L79"}]},{"id":983,"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":984,"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/ee836f009/tooling/api/src/window.ts#L97"}],"type":{"type":"intrinsic","name":"number"}},{"id":985,"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/ee836f009/tooling/api/src/window.ts#L99"}],"type":{"type":"reference","id":937,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[984,985]}],"sources":[{"fileName":"window.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L95"}]},{"id":995,"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":1022,"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/ee836f009/tooling/api/src/window.ts#L2187"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1014,"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/ee836f009/tooling/api/src/window.ts#L2145"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":997,"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/ee836f009/tooling/api/src/window.ts#L2107"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1015,"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/ee836f009/tooling/api/src/window.ts#L2147"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1013,"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/ee836f009/tooling/api/src/window.ts#L2143"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1018,"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/ee836f009/tooling/api/src/window.ts#L2169"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1009,"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/ee836f009/tooling/api/src/window.ts#L2131"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1008,"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/ee836f009/tooling/api/src/window.ts#L2129"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1001,"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/ee836f009/tooling/api/src/window.ts#L2115"}],"type":{"type":"intrinsic","name":"number"}},{"id":1021,"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/ee836f009/tooling/api/src/window.ts#L2183"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1005,"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/ee836f009/tooling/api/src/window.ts#L2123"}],"type":{"type":"intrinsic","name":"number"}},{"id":1004,"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/ee836f009/tooling/api/src/window.ts#L2121"}],"type":{"type":"intrinsic","name":"number"}},{"id":1011,"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/ee836f009/tooling/api/src/window.ts#L2139"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1003,"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/ee836f009/tooling/api/src/window.ts#L2119"}],"type":{"type":"intrinsic","name":"number"}},{"id":1002,"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/ee836f009/tooling/api/src/window.ts#L2117"}],"type":{"type":"intrinsic","name":"number"}},{"id":1006,"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/ee836f009/tooling/api/src/window.ts#L2125"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1017,"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/ee836f009/tooling/api/src/window.ts#L2163"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1016,"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/ee836f009/tooling/api/src/window.ts#L2149"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1023,"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/ee836f009/tooling/api/src/window.ts#L2194"}],"type":{"type":"intrinsic","name":"string"}},{"id":1019,"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/ee836f009/tooling/api/src/window.ts#L2175"}],"type":{"type":"reference","id":976,"name":"Theme"}},{"id":1007,"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/ee836f009/tooling/api/src/window.ts#L2127"}],"type":{"type":"intrinsic","name":"string"}},{"id":1020,"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/ee836f009/tooling/api/src/window.ts#L2179"}],"type":{"type":"reference","id":977,"name":"TitleBarStyle"}},{"id":1010,"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/ee836f009/tooling/api/src/window.ts#L2137"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":996,"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/ee836f009/tooling/api/src/window.ts#L2105"}],"type":{"type":"intrinsic","name":"string"}},{"id":1024,"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/ee836f009/tooling/api/src/window.ts#L2198"}],"type":{"type":"intrinsic","name":"string"}},{"id":1012,"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/ee836f009/tooling/api/src/window.ts#L2141"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":1000,"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/ee836f009/tooling/api/src/window.ts#L2113"}],"type":{"type":"intrinsic","name":"number"}},{"id":998,"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/ee836f009/tooling/api/src/window.ts#L2109"}],"type":{"type":"intrinsic","name":"number"}},{"id":999,"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/ee836f009/tooling/api/src/window.ts#L2111"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[1022,1014,997,1015,1013,1018,1009,1008,1001,1021,1005,1004,1011,1003,1002,1006,1017,1016,1023,1019,1007,1020,1010,996,1024,1012,1000,998,999]}],"sources":[{"fileName":"window.ts","line":2097,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L2097"}]},{"id":567,"name":"CursorIcon","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":235,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/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":986,"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/ee836f009/tooling/api/src/window.ts#L103"}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":987,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":989,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":21,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L104"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":988,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L104"}],"type":{"type":"literal","value":"hover"}}],"groups":[{"title":"Properties","children":[989,988]}],"sources":[{"fileName":"window.ts","line":104,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L104"}]}},{"type":"reflection","declaration":{"id":990,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":992,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L105"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":991,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L105"}],"type":{"type":"literal","value":"drop"}}],"groups":[{"title":"Properties","children":[992,991]}],"sources":[{"fileName":"window.ts","line":105,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L105"}]}},{"type":"reflection","declaration":{"id":993,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":994,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":106,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L106"}],"type":{"type":"literal","value":"cancel"}}],"groups":[{"title":"Properties","children":[994]}],"sources":[{"fileName":"window.ts","line":106,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L106"}]}}]}},{"id":976,"name":"Theme","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L71"}],"type":{"type":"union","types":[{"type":"literal","value":"light"},{"type":"literal","value":"dark"}]}},{"id":977,"name":"TitleBarStyle","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":72,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L72"}],"type":{"type":"union","types":[{"type":"literal","value":"visible"},{"type":"literal","value":"transparent"},{"type":"literal","value":"overlay"}]}},{"id":928,"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/ee836f009/tooling/api/src/window.ts#L2073"}],"type":{"type":"reference","id":569,"name":"WebviewWindow"}},{"id":974,"name":"availableMonitors","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2272,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L2272"}],"signatures":[{"id":975,"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":978,"name":"Monitor"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":970,"name":"currentMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2223,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L2223"}],"signatures":[{"id":971,"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":978,"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":926,"name":"getAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":293,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L293"}],"signatures":[{"id":927,"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":569,"name":"WebviewWindow"}}}]},{"id":924,"name":"getCurrent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":281,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L281"}],"signatures":[{"id":925,"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":569,"name":"WebviewWindow"}}]},{"id":972,"name":"primaryMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2248,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L2248"}],"signatures":[{"id":973,"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":978,"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":[967]},{"title":"Classes","children":[912,948,929,956,937,569]},{"title":"Interfaces","children":[978,983,995]},{"title":"Type Aliases","children":[567,986,976,977]},{"title":"Variables","children":[928]},{"title":"Functions","children":[974,970,926,924,972]}],"sources":[{"fileName":"window.ts","line":66,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ee836f009/tooling/api/src/window.ts#L66"}]}],"groups":[{"title":"Modules","children":[1,12,47,152,166,179,194,290,296,526,544,566]}]} \ No newline at end of file diff --git a/tooling/api/src/dialog.ts b/tooling/api/src/dialog.ts deleted file mode 100644 index 08b3d4703e8..00000000000 --- a/tooling/api/src/dialog.ts +++ /dev/null @@ -1,321 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -/** - * Native system dialogs for opening and saving files. - * - * This package is also accessible with `window.__TAURI__.dialog` 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.dialog`](https://tauri.app/v1/api/config/#allowlistconfig.dialog) in `tauri.conf.json`: - * ```json - * { - * "tauri": { - * "allowlist": { - * "dialog": { - * "all": true, // enable all dialog APIs - * "ask": true, // enable dialog ask API - * "confirm": true, // enable dialog confirm API - * "message": true, // enable dialog message API - * "open": true, // enable file open API - * "save": true // enable file save API - * } - * } - * } - * } - * ``` - * It is recommended to allowlist only the APIs you use for optimal bundle size and security. - * @module - */ - -import { invokeTauriCommand } from './helpers/tauri' - -/** - * Extension filters for the file dialog. - * - * @since 1.0.0 - */ -interface DialogFilter { - /** Filter name. */ - name: string - /** - * Extensions to filter, without a `.` prefix. - * @example - * ```typescript - * extensions: ['svg', 'png'] - * ``` - */ - extensions: string[] -} - -/** - * Options for the open dialog. - * - * @since 1.0.0 - */ -interface OpenDialogOptions { - /** The title of the dialog window. */ - title?: string - /** The filters of the dialog. */ - filters?: DialogFilter[] - /** Initial directory or file path. */ - defaultPath?: string - /** Whether the dialog allows multiple selection or not. */ - multiple?: boolean - /** Whether the dialog is a directory selection or not. */ - directory?: boolean - /** - * If `directory` is true, indicates that it will be read recursively later. - * Defines whether subdirectories will be allowed on the scope or not. - */ - recursive?: boolean -} - -/** - * Options for the save dialog. - * - * @since 1.0.0 - */ -interface SaveDialogOptions { - /** The title of the dialog window. */ - title?: string - /** The filters of the dialog. */ - filters?: DialogFilter[] - /** - * Initial directory or file path. - * If it's a directory path, the dialog interface will change to that folder. - * If it's not an existing directory, the file name will be set to the dialog's file name input and the dialog will be set to the parent folder. - */ - defaultPath?: string -} - -/** - * @since 1.0.0 - */ -interface MessageDialogOptions { - /** The title of the dialog. Defaults to the app name. */ - title?: string - /** The type of the dialog. Defaults to `info`. */ - type?: 'info' | 'warning' | 'error' - /** The label of the confirm button. */ - okLabel?: string -} - -interface ConfirmDialogOptions { - /** The title of the dialog. Defaults to the app name. */ - title?: string - /** The type of the dialog. Defaults to `info`. */ - type?: 'info' | 'warning' | 'error' - /** The label of the confirm button. */ - okLabel?: string - /** The label of the cancel button. */ - cancelLabel?: string -} - -/** - * Open a file/directory selection dialog. - * - * The selected paths are added to the filesystem and asset protocol allowlist scopes. - * When security is more important than the easy of use of this API, - * prefer writing a dedicated command instead. - * - * Note that the allowlist scope change is not persisted, so the values are cleared when the application is restarted. - * You can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope). - * @example - * ```typescript - * import { open } from '@tauri-apps/api/dialog'; - * // Open a selection dialog for image files - * const selected = await open({ - * multiple: true, - * filters: [{ - * name: 'Image', - * extensions: ['png', 'jpeg'] - * }] - * }); - * ``` - * Note that the `open` function returns a conditional type depending on the `multiple` option: - * - false (default) -> `Promise` - * - true -> `Promise` - * - * @returns A promise resolving to the selected path(s) - * - * @since 1.0.0 - */ -async function open( - options?: OpenDialogOptions & { multiple?: false } -): Promise -async function open( - options?: OpenDialogOptions & { multiple?: true } -): Promise -async function open( - options: OpenDialogOptions -): Promise -async function open( - options: OpenDialogOptions = {} -): Promise { - if (typeof options === 'object') { - Object.freeze(options) - } - - return invokeTauriCommand({ - __tauriModule: 'Dialog', - message: { - cmd: 'openDialog', - options - } - }) -} - -/** - * Open a file/directory save dialog. - * - * The selected path is added to the filesystem and asset protocol allowlist scopes. - * When security is more important than the easy of use of this API, - * prefer writing a dedicated command instead. - * - * Note that the allowlist scope change is not persisted, so the values are cleared when the application is restarted. - * You can save it to the filesystem using [tauri-plugin-persisted-scope](https://github.com/tauri-apps/tauri-plugin-persisted-scope). - * @example - * ```typescript - * import { save } from '@tauri-apps/api/dialog'; - * const filePath = await save({ - * filters: [{ - * name: 'Image', - * extensions: ['png', 'jpeg'] - * }] - * }); - * ``` - * - * @returns A promise resolving to the selected path. - * - * @since 1.0.0 - */ -async function save(options: SaveDialogOptions = {}): Promise { - if (typeof options === 'object') { - Object.freeze(options) - } - - return invokeTauriCommand({ - __tauriModule: 'Dialog', - message: { - cmd: 'saveDialog', - options - } - }) -} - -/** - * Shows a message dialog with an `Ok` button. - * @example - * ```typescript - * import { message } from '@tauri-apps/api/dialog'; - * await message('Tauri is awesome', 'Tauri'); - * await message('File not found', { title: 'Tauri', type: 'error' }); - * ``` - * - * @param message The message to show. - * @param options The dialog's options. If a string, it represents the dialog title. - * - * @returns A promise indicating the success or failure of the operation. - * - * @since 1.0.0 - * - */ -async function message( - message: string, - options?: string | MessageDialogOptions -): Promise { - const opts = typeof options === 'string' ? { title: options } : options - return invokeTauriCommand({ - __tauriModule: 'Dialog', - message: { - cmd: 'messageDialog', - message: message.toString(), - title: opts?.title?.toString(), - type: opts?.type, - buttonLabel: opts?.okLabel?.toString() - } - }) -} - -/** - * Shows a question dialog with `Yes` and `No` buttons. - * @example - * ```typescript - * import { ask } from '@tauri-apps/api/dialog'; - * const yes = await ask('Are you sure?', 'Tauri'); - * const yes2 = await ask('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' }); - * ``` - * - * @param message The message to show. - * @param options The dialog's options. If a string, it represents the dialog title. - * - * @returns A promise resolving to a boolean indicating whether `Yes` was clicked or not. - * - * @since 1.0.0 - */ -async function ask( - message: string, - options?: string | ConfirmDialogOptions -): Promise { - const opts = typeof options === 'string' ? { title: options } : options - return invokeTauriCommand({ - __tauriModule: 'Dialog', - message: { - cmd: 'askDialog', - message: message.toString(), - title: opts?.title?.toString(), - type: opts?.type, - buttonLabels: [ - opts?.okLabel?.toString() ?? 'Yes', - opts?.cancelLabel?.toString() ?? 'No' - ] - } - }) -} - -/** - * Shows a question dialog with `Ok` and `Cancel` buttons. - * @example - * ```typescript - * import { confirm } from '@tauri-apps/api/dialog'; - * const confirmed = await confirm('Are you sure?', 'Tauri'); - * const confirmed2 = await confirm('This action cannot be reverted. Are you sure?', { title: 'Tauri', type: 'warning' }); - * ``` - * - * @param message The message to show. - * @param options The dialog's options. If a string, it represents the dialog title. - * - * @returns A promise resolving to a boolean indicating whether `Ok` was clicked or not. - * - * @since 1.0.0 - */ -async function confirm( - message: string, - options?: string | ConfirmDialogOptions -): Promise { - const opts = typeof options === 'string' ? { title: options } : options - return invokeTauriCommand({ - __tauriModule: 'Dialog', - message: { - cmd: 'confirmDialog', - message: message.toString(), - title: opts?.title?.toString(), - type: opts?.type, - buttonLabels: [ - opts?.okLabel?.toString() ?? 'Ok', - opts?.cancelLabel?.toString() ?? 'Cancel' - ] - } - }) -} - -export type { - DialogFilter, - OpenDialogOptions, - SaveDialogOptions, - MessageDialogOptions, - ConfirmDialogOptions -} - -export { open, save, message, ask, confirm } diff --git a/tooling/api/src/index.ts b/tooling/api/src/index.ts index 55a5a751b74..c27a5c15adc 100644 --- a/tooling/api/src/index.ts +++ b/tooling/api/src/index.ts @@ -14,7 +14,6 @@ */ import * as app from './app' -import * as dialog from './dialog' import * as event from './event' import * as http from './http' import * as notification from './notification' @@ -32,7 +31,6 @@ const invoke = tauri.invoke export { invoke, app, - dialog, event, http, notification, diff --git a/tooling/bundler/src/bundle/settings.rs b/tooling/bundler/src/bundle/settings.rs index 15e97dc8d78..7661cbe7d69 100644 --- a/tooling/bundler/src/bundle/settings.rs +++ b/tooling/bundler/src/bundle/settings.rs @@ -141,8 +141,6 @@ pub struct UpdaterSettings { pub endpoints: Option>, /// Signature public key. pub pubkey: String, - /// Display built-in dialog or use event system if disabled. - pub dialog: bool, /// Args to pass to `msiexec.exe` to run the updater on Windows. pub msiexec_args: Option<&'static [&'static str]>, } diff --git a/tooling/cli/schema.json b/tooling/cli/schema.json index 904148a0b35..7e741e67358 100644 --- a/tooling/cli/schema.json +++ b/tooling/cli/schema.json @@ -172,7 +172,6 @@ }, "updater": { "active": false, - "dialog": true, "pubkey": "", "windows": { "installMode": "passive", @@ -426,7 +425,6 @@ "description": "The updater configuration.", "default": { "active": false, - "dialog": true, "pubkey": "", "windows": { "installMode": "passive", @@ -2476,11 +2474,6 @@ "default": false, "type": "boolean" }, - "dialog": { - "description": "Display built-in dialog or use event system if disabled.", - "default": true, - "type": "boolean" - }, "endpoints": { "description": "The updater endpoints. TLS is enforced on production.\n\nThe updater URL can contain the following variables: - {{current_version}}: The version of the app that is requesting the update - {{target}}: The operating system name (one of `linux`, `windows` or `darwin`). - {{arch}}: The architecture of the machine (one of `x86_64`, `i686`, `aarch64` or `armv7`).\n\n# Examples - \"https://my.cdn.com/latest.json\": a raw JSON endpoint that returns the latest version and download links for each platform. - \"https://updates.app.dev/{{target}}?version={{current_version}}&arch={{arch}}\": a dedicated API with positional and query string arguments.", "type": [ diff --git a/tooling/cli/src/interface/rust.rs b/tooling/cli/src/interface/rust.rs index 010610b95cb..dff3f721460 100644 --- a/tooling/cli/src/interface/rust.rs +++ b/tooling/cli/src/interface/rust.rs @@ -1160,9 +1160,6 @@ fn tauri_config_to_bundle_settings( }, updater: Some(UpdaterSettings { active: updater_config.active, - // we set it to true by default we shouldn't have to use - // unwrap_or as we have a default value but used to prevent any failing - dialog: updater_config.dialog, pubkey: updater_config.pubkey, endpoints: updater_config .endpoints