From 39f1b04f7be4966488484829cd54c8ce72a04200 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Fri, 12 May 2023 03:55:39 -0700 Subject: [PATCH] refactor(core): move event JS API to a core plugin (#6943) --- .changes/move-event.md | 8 + core/tauri-runtime-wry/src/lib.rs | 12 +- core/tauri-runtime/src/window.rs | 20 +-- core/tauri/scripts/bundle.global.js | 4 +- core/tauri/src/api/ipc.rs | 2 +- core/tauri/src/app.rs | 1 + core/tauri/src/endpoints.rs | 8 - core/tauri/src/endpoints/event.rs | 161 ------------------ core/tauri/src/event/commands.rs | 86 ++++++++++ .../tauri/src/{event.rs => event/listener.rs} | 102 +---------- core/tauri/src/event/mod.rs | 120 +++++++++++++ core/tauri/src/manager.rs | 49 +++--- core/tauri/src/test/mock_runtime.rs | 2 - core/tauri/src/window.rs | 55 +++++- examples/api/dist/assets/index.js | 44 ++--- examples/api/src-tauri/Cargo.lock | 33 ---- tooling/api/docs/js-api.json | 2 +- tooling/api/src/helpers/event.ts | 37 ++-- 18 files changed, 328 insertions(+), 418 deletions(-) create mode 100644 .changes/move-event.md delete mode 100644 core/tauri/src/endpoints/event.rs create mode 100644 core/tauri/src/event/commands.rs rename core/tauri/src/{event.rs => event/listener.rs} (72%) create mode 100644 core/tauri/src/event/mod.rs diff --git a/.changes/move-event.md b/.changes/move-event.md new file mode 100644 index 00000000000..6594578f1e1 --- /dev/null +++ b/.changes/move-event.md @@ -0,0 +1,8 @@ +--- +"api": patch +"tauri": patch +"tauri-runtime": patch +"tauri-runtime-wry": patch +--- + +Moved the `event` JS APIs to a plugin. diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index 55e7cb3bee1..d9b4ce5199d 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -12,7 +12,7 @@ use tauri_runtime::{ webview::{WebviewIpcHandler, WindowBuilder, WindowBuilderBase}, window::{ dpi::{LogicalPosition, LogicalSize, PhysicalPosition, PhysicalSize, Position, Size}, - CursorIcon, DetachedWindow, FileDropEvent, JsEventListenerKey, PendingWindow, WindowEvent, + CursorIcon, DetachedWindow, FileDropEvent, PendingWindow, WindowEvent, }, DeviceEventFilter, Dispatch, Error, EventLoopProxy, ExitRequestedEventAction, Icon, Result, RunEvent, RunIteration, Runtime, RuntimeHandle, UserAttentionType, UserEvent, @@ -90,7 +90,7 @@ use std::{ cell::RefCell, collections::{ hash_map::Entry::{Occupied, Vacant}, - HashMap, HashSet, + HashMap, }, fmt, ops::Deref, @@ -206,7 +206,6 @@ impl Context { let label = pending.label.clone(); let current_url = pending.current_url.clone(); let menu_ids = pending.menu_ids.clone(); - let js_event_listeners = pending.js_event_listeners.clone(); let context = self.clone(); let window_id = rand::random(); @@ -229,7 +228,6 @@ impl Context { current_url, dispatcher, menu_ids, - js_event_listeners, }) } } @@ -1944,7 +1942,6 @@ impl Runtime for Wry { let label = pending.label.clone(); let current_url = pending.current_url.clone(); let menu_ids = pending.menu_ids.clone(); - let js_event_listeners = pending.js_event_listeners.clone(); let window_id = rand::random(); let webview = create_webview( @@ -1972,7 +1969,6 @@ impl Runtime for Wry { current_url, dispatcher, menu_ids, - js_event_listeners, }) } @@ -2942,7 +2938,6 @@ fn create_webview( label, current_url, menu_ids, - js_event_listeners, #[cfg(target_os = "android")] on_webview_created, .. @@ -3028,7 +3023,6 @@ fn create_webview( label.clone(), current_url, menu_ids, - js_event_listeners, handler, )); } @@ -3152,7 +3146,6 @@ fn create_ipc_handler( label: String, current_url: Arc>, menu_ids: Arc>>, - js_event_listeners: Arc>>>, handler: WebviewIpcHandler>, ) -> Box { Box::new(move |window, request| { @@ -3166,7 +3159,6 @@ fn create_ipc_handler( }, label: label.clone(), menu_ids: menu_ids.clone(), - js_event_listeners: js_event_listeners.clone(), }, request, ); diff --git a/core/tauri-runtime/src/window.rs b/core/tauri-runtime/src/window.rs index 4835303cd75..fee411ef5d3 100644 --- a/core/tauri-runtime/src/window.rs +++ b/core/tauri-runtime/src/window.rs @@ -15,7 +15,7 @@ use tauri_utils::{config::WindowConfig, Theme}; use url::Url; use std::{ - collections::{HashMap, HashSet}, + collections::HashMap, hash::{Hash, Hasher}, path::PathBuf, sync::{mpsc::Sender, Arc, Mutex}, @@ -230,9 +230,6 @@ pub struct PendingWindow> { /// Maps runtime id to a string menu id. pub menu_ids: Arc>>, - /// A HashMap mapping JS event names with associated listener ids. - pub js_event_listeners: Arc>>>, - /// A handler to decide if incoming url is allowed to navigate. pub navigation_handler: Option bool + Send>>, @@ -280,7 +277,6 @@ impl> PendingWindow { label, ipc_handler: None, menu_ids: Arc::new(Mutex::new(menu_ids)), - js_event_listeners: Default::default(), navigation_handler: Default::default(), current_url: Arc::new(Mutex::new("tauri://localhost".parse().unwrap())), #[cfg(target_os = "android")] @@ -312,7 +308,6 @@ impl> PendingWindow { label, ipc_handler: None, menu_ids: Arc::new(Mutex::new(menu_ids)), - js_event_listeners: Default::default(), navigation_handler: Default::default(), current_url: Arc::new(Mutex::new("tauri://localhost".parse().unwrap())), #[cfg(target_os = "android")] @@ -356,15 +351,6 @@ impl> PendingWindow { } } -/// Key for a JS event listener. -#[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct JsEventListenerKey { - /// The associated window label. - pub window_label: Option, - /// The event name. - pub event: String, -} - /// A webview window that is not yet managed by Tauri. #[derive(Debug)] pub struct DetachedWindow> { @@ -379,9 +365,6 @@ pub struct DetachedWindow> { /// Maps runtime id to a string menu id. pub menu_ids: Arc>>, - - /// A HashMap mapping JS event names with associated listener ids. - pub js_event_listeners: Arc>>>, } impl> Clone for DetachedWindow { @@ -391,7 +374,6 @@ impl> Clone for DetachedWindow { label: self.label.clone(), dispatcher: self.dispatcher.clone(), menu_ids: self.menu_ids.clone(), - js_event_listeners: self.js_event_listeners.clone(), } } } diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index d70f1131358..e34b86a27de 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,3 +1,3 @@ -"use strict";var __TAURI_IIFE__=(()=>{var E=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var Z=Object.prototype.hasOwnProperty;var g=(n,e)=>{for(var t in e)E(n,t,{get:e[t],enumerable:!0})},J=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Q(e))!Z.call(n,s)&&s!==t&&E(n,s,{get:()=>e[s],enumerable:!(o=q(e,s))||o.enumerable});return n};var K=n=>J(E({},"__esModule",{value:!0}),n);var k=(n,e,t)=>{if(!e.has(n))throw TypeError("Cannot "+t)};var C=(n,e,t)=>(k(n,e,"read from private field"),t?t.call(n):e.get(n)),F=(n,e,t)=>{if(e.has(n))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(n):e.set(n,t)},O=(n,e,t,o)=>(k(n,e,"write to private field"),o?o.call(n,t):e.set(n,t),t);var Ue={};g(Ue,{event:()=>R,invoke:()=>Ne,path:()=>S,tauri:()=>T,window:()=>I});var R={};g(R,{TauriEvent:()=>A,emit:()=>ne,listen:()=>ee,once:()=>te});var T={};g(T,{Channel:()=>D,convertFileSrc:()=>X,invoke:()=>r,transformCallback:()=>m});function Y(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function m(n,e=!1){let t=Y(),o=`_${t}`;return Object.defineProperty(window,o,{value:s=>(e&&Reflect.deleteProperty(window,o),n?.(s)),writable:!1,configurable:!0}),t}var d,D=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;F(this,d,()=>{});this.id=m(e=>{C(this,d).call(this,e)})}set onmessage(e){O(this,d,e)}get onmessage(){return C(this,d)}toJSON(){return`__CHANNEL__:${this.id}`}};d=new WeakMap;async function r(n,e={}){return new Promise((t,o)=>{let s=m(M=>{t(M),Reflect.deleteProperty(window,`_${c}`)},!0),c=m(M=>{o(M),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:n,callback:s,error:c,...e})})}function X(n,e="asset"){let t=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${t}`:`${e}://localhost/${t}`}async function i(n){return r("tauri",n)}async function N(n,e){return i({__tauriModule:"Event",message:{cmd:"unlisten",event:n,eventId:e}})}async function b(n,e,t){await i({__tauriModule:"Event",message:{cmd:"emit",event:n,windowLabel:e,payload:t}})}async function h(n,e,t){return i({__tauriModule:"Event",message:{cmd:"listen",event:n,windowLabel:e,handler:m(t)}}).then(o=>async()=>N(n,o))}async function _(n,e,t){return h(n,e,o=>{t(o),N(n,o.id).catch(()=>{})})}var A=(l=>(l.WINDOW_RESIZED="tauri://resize",l.WINDOW_MOVED="tauri://move",l.WINDOW_CLOSE_REQUESTED="tauri://close-requested",l.WINDOW_CREATED="tauri://window-created",l.WINDOW_DESTROYED="tauri://destroyed",l.WINDOW_FOCUS="tauri://focus",l.WINDOW_BLUR="tauri://blur",l.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",l.WINDOW_THEME_CHANGED="tauri://theme-changed",l.WINDOW_FILE_DROP="tauri://file-drop",l.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",l.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",l.MENU="tauri://menu",l))(A||{});async function ee(n,e){return h(n,null,e)}async function te(n,e){return _(n,null,e)}async function ne(n,e){return b(n,void 0,e)}var S={};g(S,{BaseDirectory:()=>U,appCacheDir:()=>oe,appConfigDir:()=>ie,appDataDir:()=>ae,appLocalDataDir:()=>re,appLogDir:()=>Ee,audioDir:()=>se,basename:()=>xe,cacheDir:()=>le,configDir:()=>ce,dataDir:()=>ue,delimiter:()=>De,desktopDir:()=>de,dirname:()=>ze,documentDir:()=>me,downloadDir:()=>pe,executableDir:()=>ye,extname:()=>Se,fontDir:()=>ge,homeDir:()=>he,isAbsolute:()=>Le,join:()=>Re,localDataDir:()=>be,normalize:()=>Ae,pictureDir:()=>_e,publicDir:()=>we,resolve:()=>Te,resolveResource:()=>ve,resourceDir:()=>Pe,runtimeDir:()=>fe,sep:()=>Ce,templateDir:()=>We,videoDir:()=>Me});function z(){return navigator.appVersion.includes("Win")}var U=(a=>(a[a.Audio=1]="Audio",a[a.Cache=2]="Cache",a[a.Config=3]="Config",a[a.Data=4]="Data",a[a.LocalData=5]="LocalData",a[a.Document=6]="Document",a[a.Download=7]="Download",a[a.Picture=8]="Picture",a[a.Public=9]="Public",a[a.Video=10]="Video",a[a.Resource=11]="Resource",a[a.Temp=12]="Temp",a[a.AppConfig=13]="AppConfig",a[a.AppData=14]="AppData",a[a.AppLocalData=15]="AppLocalData",a[a.AppCache=16]="AppCache",a[a.AppLog=17]="AppLog",a[a.Desktop=18]="Desktop",a[a.Executable=19]="Executable",a[a.Font=20]="Font",a[a.Home=21]="Home",a[a.Runtime=22]="Runtime",a[a.Template=23]="Template",a))(U||{});async function ie(){return r("plugin:path|resolve_directory",{directory:13})}async function ae(){return r("plugin:path|resolve_directory",{directory:14})}async function re(){return r("plugin:path|resolve_directory",{directory:15})}async function oe(){return r("plugin:path|resolve_directory",{directory:16})}async function se(){return r("plugin:path|resolve_directory",{directory:1})}async function le(){return r("plugin:path|resolve_directory",{directory:2})}async function ce(){return r("plugin:path|resolve_directory",{directory:3})}async function ue(){return r("plugin:path|resolve_directory",{directory:4})}async function de(){return r("plugin:path|resolve_directory",{directory:18})}async function me(){return r("plugin:path|resolve_directory",{directory:6})}async function pe(){return r("plugin:path|resolve_directory",{directory:7})}async function ye(){return r("plugin:path|resolve_directory",{directory:19})}async function ge(){return r("plugin:path|resolve_directory",{directory:20})}async function he(){return r("plugin:path|resolve_directory",{directory:21})}async function be(){return r("plugin:path|resolve_directory",{directory:5})}async function _e(){return r("plugin:path|resolve_directory",{directory:8})}async function we(){return r("plugin:path|resolve_directory",{directory:9})}async function Pe(){return r("plugin:path|resolve_directory",{directory:11})}async function ve(n){return r("plugin:path|resolve_directory",{directory:11,path:n})}async function fe(){return r("plugin:path|resolve_directory",{directory:22})}async function We(){return r("plugin:path|resolve_directory",{directory:23})}async function Me(){return r("plugin:path|resolve_directory",{directory:10})}async function Ee(){return r("plugin:path|resolve_directory",{directory:17})}var Ce=z()?"\\":"/",De=z()?";":":";async function Te(...n){return r("plugin:path|resolve",{paths:n})}async function Ae(n){return r("plugin:path|normalize",{path:n})}async function Re(...n){return r("plugin:path|join",{paths:n})}async function ze(n){return r("plugin:path|dirname",{path:n})}async function Se(n){return r("plugin:path|extname",{path:n})}async function xe(n,e){return r("plugin:path|basename",{path:n,ext:e})}async function Le(n){return r("plugin:path|isAbsolute",{path:n})}var I={};g(I,{CloseRequestedEvent:()=>W,LogicalPosition:()=>P,LogicalSize:()=>w,PhysicalPosition:()=>y,PhysicalSize:()=>p,UserAttentionType:()=>V,WebviewWindow:()=>u,WebviewWindowHandle:()=>v,WindowManager:()=>f,appWindow:()=>x,availableMonitors:()=>Oe,currentMonitor:()=>ke,getAll:()=>$,getCurrent:()=>Ie,primaryMonitor:()=>Fe});var w=class{constructor(e,t){this.type="Logical";this.width=e,this.height=t}},p=class{constructor(e,t){this.type="Physical";this.width=e,this.height=t}toLogical(e){return new w(this.width/e,this.height/e)}},P=class{constructor(e,t){this.type="Logical";this.x=e,this.y=t}},y=class{constructor(e,t){this.type="Physical";this.x=e,this.y=t}toLogical(e){return new P(this.x/e,this.y/e)}},V=(t=>(t[t.Critical=1]="Critical",t[t.Informational=2]="Informational",t))(V||{});function Ie(){return new u(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function $(){return window.__TAURI_METADATA__.__windows.map(n=>new u(n.label,{skip:!0}))}var H=["tauri://created","tauri://error"],v=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(t),1)}):h(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(t),1)}):_(e,this.label,t)}async emit(e,t){if(H.includes(e)){for(let o of this.listeners[e]||[])o({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return b(e,this.label,t)}_handleTauriEvent(e,t){return H.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},f=class extends v{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 y(e,t))}async outerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new y(e,t))}async innerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new p(e,t))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new p(e,t))}async isFullscreen(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",t=>{t.payload=j(t.payload),e(t)})}async onMoved(e){return this.listen("tauri://move",t=>{t.payload=G(t.payload),e(t)})}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let o=new W(t);Promise.resolve(e(o)).then(()=>{if(!o.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",s=>{e({...s,payload:!0})}),o=await this.listen("tauri://blur",s=>{e({...s,payload:!1})});return()=>{t(),o()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",c=>{e({...c,payload:{type:"drop",paths:c.payload}})}),o=await this.listen("tauri://file-drop-hover",c=>{e({...c,payload:{type:"hover",paths:c.payload}})}),s=await this.listen("tauri://file-drop-cancelled",c=>{e({...c,payload:{type:"cancel"}})});return()=>{t(),o(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},W=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},u=class extends f{constructor(e,t={}){super(e),t?.skip||i({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async o=>this.emit("tauri://error",o))}static getByLabel(e){return $().some(t=>t.label===e)?new u(e,{skip:!0}):null}},x;"__TAURI_METADATA__"in window?x=new u(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. -Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),x=new u("main",{skip:!0}));function L(n){return n===null?null:{name:n.name,scaleFactor:n.scaleFactor,position:G(n.position),size:j(n.size)}}function G(n){return new y(n.x,n.y)}function j(n){return new p(n.width,n.height)}async function ke(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(L)}async function Fe(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(L)}async function Oe(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(n=>n.map(L))}var Ne=r;return K(Ue);})(); +"use strict";var __TAURI_IIFE__=(()=>{var E=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var Q=Object.getOwnPropertyNames;var Z=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var n in e)E(t,n,{get:e[n],enumerable:!0})},J=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Q(e))!Z.call(t,s)&&s!==n&&E(t,s,{get:()=>e[s],enumerable:!(o=q(e,s))||o.enumerable});return t};var K=t=>J(E({},"__esModule",{value:!0}),t);var k=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var C=(t,e,n)=>(k(t,e,"read from private field"),n?n.call(t):e.get(t)),F=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},O=(t,e,n,o)=>(k(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n);var Ue={};g(Ue,{event:()=>R,invoke:()=>Ne,path:()=>S,tauri:()=>T,window:()=>I});var R={};g(R,{TauriEvent:()=>A,emit:()=>te,listen:()=>ee,once:()=>ne});var T={};g(T,{Channel:()=>D,convertFileSrc:()=>X,invoke:()=>r,transformCallback:()=>m});function Y(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function m(t,e=!1){let n=Y(),o=`_${n}`;return Object.defineProperty(window,o,{value:s=>(e&&Reflect.deleteProperty(window,o),t?.(s)),writable:!1,configurable:!0}),n}var d,D=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;F(this,d,()=>{});this.id=m(e=>{C(this,d).call(this,e)})}set onmessage(e){O(this,d,e)}get onmessage(){return C(this,d)}toJSON(){return`__CHANNEL__:${this.id}`}};d=new WeakMap;async function r(t,e={}){return new Promise((n,o)=>{let s=m(M=>{n(M),Reflect.deleteProperty(window,`_${c}`)},!0),c=m(M=>{o(M),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:t,callback:s,error:c,...e})})}function X(t,e="asset"){let n=encodeURIComponent(t);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${n}`:`${e}://localhost/${n}`}async function N(t,e){await r("plugin:event|unlisten",{event:t,eventId:e})}async function b(t,e,n){await r("plugin:event|emit",{event:t,windowLabel:e,payload:n})}async function h(t,e,n){return r("plugin:event|listen",{event:t,windowLabel:e,handler:m(n)}).then(o=>async()=>N(t,o))}async function _(t,e,n){return h(t,e,o=>{n(o),N(t,o.id).catch(()=>{})})}var A=(l=>(l.WINDOW_RESIZED="tauri://resize",l.WINDOW_MOVED="tauri://move",l.WINDOW_CLOSE_REQUESTED="tauri://close-requested",l.WINDOW_CREATED="tauri://window-created",l.WINDOW_DESTROYED="tauri://destroyed",l.WINDOW_FOCUS="tauri://focus",l.WINDOW_BLUR="tauri://blur",l.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",l.WINDOW_THEME_CHANGED="tauri://theme-changed",l.WINDOW_FILE_DROP="tauri://file-drop",l.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",l.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",l.MENU="tauri://menu",l))(A||{});async function ee(t,e){return h(t,null,e)}async function ne(t,e){return _(t,null,e)}async function te(t,e){return b(t,void 0,e)}var S={};g(S,{BaseDirectory:()=>U,appCacheDir:()=>oe,appConfigDir:()=>ie,appDataDir:()=>ae,appLocalDataDir:()=>re,appLogDir:()=>Ee,audioDir:()=>se,basename:()=>xe,cacheDir:()=>le,configDir:()=>ce,dataDir:()=>ue,delimiter:()=>De,desktopDir:()=>de,dirname:()=>ze,documentDir:()=>me,downloadDir:()=>pe,executableDir:()=>ye,extname:()=>Se,fontDir:()=>ge,homeDir:()=>he,isAbsolute:()=>Le,join:()=>Re,localDataDir:()=>be,normalize:()=>Ae,pictureDir:()=>_e,publicDir:()=>we,resolve:()=>Te,resolveResource:()=>ve,resourceDir:()=>Pe,runtimeDir:()=>fe,sep:()=>Ce,templateDir:()=>We,videoDir:()=>Me});function z(){return navigator.appVersion.includes("Win")}var U=(a=>(a[a.Audio=1]="Audio",a[a.Cache=2]="Cache",a[a.Config=3]="Config",a[a.Data=4]="Data",a[a.LocalData=5]="LocalData",a[a.Document=6]="Document",a[a.Download=7]="Download",a[a.Picture=8]="Picture",a[a.Public=9]="Public",a[a.Video=10]="Video",a[a.Resource=11]="Resource",a[a.Temp=12]="Temp",a[a.AppConfig=13]="AppConfig",a[a.AppData=14]="AppData",a[a.AppLocalData=15]="AppLocalData",a[a.AppCache=16]="AppCache",a[a.AppLog=17]="AppLog",a[a.Desktop=18]="Desktop",a[a.Executable=19]="Executable",a[a.Font=20]="Font",a[a.Home=21]="Home",a[a.Runtime=22]="Runtime",a[a.Template=23]="Template",a))(U||{});async function ie(){return r("plugin:path|resolve_directory",{directory:13})}async function ae(){return r("plugin:path|resolve_directory",{directory:14})}async function re(){return r("plugin:path|resolve_directory",{directory:15})}async function oe(){return r("plugin:path|resolve_directory",{directory:16})}async function se(){return r("plugin:path|resolve_directory",{directory:1})}async function le(){return r("plugin:path|resolve_directory",{directory:2})}async function ce(){return r("plugin:path|resolve_directory",{directory:3})}async function ue(){return r("plugin:path|resolve_directory",{directory:4})}async function de(){return r("plugin:path|resolve_directory",{directory:18})}async function me(){return r("plugin:path|resolve_directory",{directory:6})}async function pe(){return r("plugin:path|resolve_directory",{directory:7})}async function ye(){return r("plugin:path|resolve_directory",{directory:19})}async function ge(){return r("plugin:path|resolve_directory",{directory:20})}async function he(){return r("plugin:path|resolve_directory",{directory:21})}async function be(){return r("plugin:path|resolve_directory",{directory:5})}async function _e(){return r("plugin:path|resolve_directory",{directory:8})}async function we(){return r("plugin:path|resolve_directory",{directory:9})}async function Pe(){return r("plugin:path|resolve_directory",{directory:11})}async function ve(t){return r("plugin:path|resolve_directory",{directory:11,path:t})}async function fe(){return r("plugin:path|resolve_directory",{directory:22})}async function We(){return r("plugin:path|resolve_directory",{directory:23})}async function Me(){return r("plugin:path|resolve_directory",{directory:10})}async function Ee(){return r("plugin:path|resolve_directory",{directory:17})}var Ce=z()?"\\":"/",De=z()?";":":";async function Te(...t){return r("plugin:path|resolve",{paths:t})}async function Ae(t){return r("plugin:path|normalize",{path:t})}async function Re(...t){return r("plugin:path|join",{paths:t})}async function ze(t){return r("plugin:path|dirname",{path:t})}async function Se(t){return r("plugin:path|extname",{path:t})}async function xe(t,e){return r("plugin:path|basename",{path:t,ext:e})}async function Le(t){return r("plugin:path|isAbsolute",{path:t})}var I={};g(I,{CloseRequestedEvent:()=>W,LogicalPosition:()=>P,LogicalSize:()=>w,PhysicalPosition:()=>y,PhysicalSize:()=>p,UserAttentionType:()=>V,WebviewWindow:()=>u,WebviewWindowHandle:()=>v,WindowManager:()=>f,appWindow:()=>x,availableMonitors:()=>Oe,currentMonitor:()=>ke,getAll:()=>$,getCurrent:()=>Ie,primaryMonitor:()=>Fe});async function i(t){return r("tauri",t)}var w=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},p=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new w(this.width/e,this.height/e)}},P=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},y=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new P(this.x/e,this.y/e)}},V=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(V||{});function Ie(){return new u(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function $(){return window.__TAURI_METADATA__.__windows.map(t=>new u(t.label,{skip:!0}))}var H=["tauri://created","tauri://error"],v=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(n),1)}):h(e,this.label,n)}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(n),1)}):_(e,this.label,n)}async emit(e,n){if(H.includes(e)){for(let o of this.listeners[e]||[])o({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return b(e,this.label,n)}_handleTauriEvent(e,n){return H.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}},f=class extends v{async scaleFactor(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:n})=>new y(e,n))}async outerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:n})=>new y(e,n))}async innerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:n})=>new p(e,n))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:n})=>new p(e,n))}async isFullscreen(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:n}}}})}async setResizable(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=j(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=G(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let o=new W(n);Promise.resolve(e(o)).then(()=>{if(!o.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",s=>{e({...s,payload:!0})}),o=await this.listen("tauri://blur",s=>{e({...s,payload:!1})});return()=>{n(),o()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",c=>{e({...c,payload:{type:"drop",paths:c.payload}})}),o=await this.listen("tauri://file-drop-hover",c=>{e({...c,payload:{type:"hover",paths:c.payload}})}),s=await this.listen("tauri://file-drop-cancelled",c=>{e({...c,payload:{type:"cancel"}})});return()=>{n(),o(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},W=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},u=class extends f{constructor(e,n={}){super(e),n?.skip||i({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...n}}}}).then(async()=>this.emit("tauri://created")).catch(async o=>this.emit("tauri://error",o))}static getByLabel(e){return $().some(n=>n.label===e)?new u(e,{skip:!0}):null}},x;"__TAURI_METADATA__"in window?x=new u(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. +Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),x=new u("main",{skip:!0}));function L(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:G(t.position),size:j(t.size)}}function G(t){return new y(t.x,t.y)}function j(t){return new p(t.width,t.height)}async function ke(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(L)}async function Fe(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(L)}async function Oe(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(t=>t.map(L))}var Ne=r;return K(Ue);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/api/ipc.rs b/core/tauri/src/api/ipc.rs index 542157c47ba..fda6910f842 100644 --- a/core/tauri/src/api/ipc.rs +++ b/core/tauri/src/api/ipc.rs @@ -67,7 +67,7 @@ impl<'de, R: Runtime> CommandArg<'de, R> for Channel { } /// The `Callback` type is the return value of the `transformCallback` JavaScript function. -#[derive(Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Serialize, Deserialize)] pub struct CallbackFn(pub usize); /// The information about this is quite limited. On Chrome/Edge and Firefox, [the maximum string size is approximately 1 GB](https://stackoverflow.com/a/34958490). diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 4cfc1b0cd57..65159def905 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -612,6 +612,7 @@ shared_app_impl!(AppHandle); impl App { fn register_core_plugins(&self) -> crate::Result<()> { self.handle.plugin(crate::path::init())?; + self.handle.plugin(crate::event::init())?; Ok(()) } diff --git a/core/tauri/src/endpoints.rs b/core/tauri/src/endpoints.rs index 73600422443..2bd7bb586df 100644 --- a/core/tauri/src/endpoints.rs +++ b/core/tauri/src/endpoints.rs @@ -12,7 +12,6 @@ use serde_json::Value as JsonValue; use std::sync::Arc; -mod event; mod window; /// The context passed to the invoke handler. @@ -50,7 +49,6 @@ impl From for InvokeResponse { #[serde(tag = "module", content = "message")] enum Module { Window(Box), - Event(event::Cmd), } impl Module { @@ -74,12 +72,6 @@ impl Module { .and_then(|r| r.json) .map_err(InvokeError::from_anyhow) }), - Self::Event(cmd) => resolver.respond_async(async move { - cmd - .run(context) - .and_then(|r| r.json) - .map_err(InvokeError::from_anyhow) - }), } } } diff --git a/core/tauri/src/endpoints/event.rs b/core/tauri/src/endpoints/event.rs deleted file mode 100644 index 78287191ac2..00000000000 --- a/core/tauri/src/endpoints/event.rs +++ /dev/null @@ -1,161 +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; -use crate::{ - api::ipc::CallbackFn, - event::is_event_name_valid, - event::{listen_js, unlisten_js}, - runtime::window::is_label_valid, - sealed::ManagerBase, - Manager, Runtime, -}; -use serde::{de::Deserializer, Deserialize}; -use serde_json::Value as JsonValue; -use tauri_macros::{command_enum, CommandModule}; - -pub struct EventId(String); - -impl<'de> Deserialize<'de> for EventId { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let event_id = String::deserialize(deserializer)?; - if is_event_name_valid(&event_id) { - Ok(EventId(event_id)) - } else { - Err(serde::de::Error::custom( - "Event name must include only alphanumeric characters, `-`, `/`, `:` and `_`.", - )) - } - } -} - -pub struct WindowLabel(String); - -impl<'de> Deserialize<'de> for WindowLabel { - fn deserialize(deserializer: D) -> Result - where - D: Deserializer<'de>, - { - let event_id = String::deserialize(deserializer)?; - if is_label_valid(&event_id) { - Ok(WindowLabel(event_id)) - } else { - Err(serde::de::Error::custom( - "Window label must include only alphanumeric characters, `-`, `/`, `:` and `_`.", - )) - } - } -} - -/// The API descriptor. -#[command_enum] -#[derive(Deserialize, CommandModule)] -#[serde(tag = "cmd", rename_all = "camelCase")] -pub enum Cmd { - /// Listen to an event. - #[serde(rename_all = "camelCase")] - Listen { - event: EventId, - window_label: Option, - handler: CallbackFn, - }, - /// Unlisten to an event. - #[serde(rename_all = "camelCase")] - Unlisten { event: EventId, event_id: u64 }, - /// Emit an event to the webview associated with the given window. - /// If the window_label is omitted, the event will be triggered on all listeners. - #[serde(rename_all = "camelCase")] - Emit { - event: EventId, - window_label: Option, - payload: Option, - }, -} - -impl Cmd { - fn listen( - context: InvokeContext, - event: EventId, - window_label: Option, - handler: CallbackFn, - ) -> super::Result { - let event_id = rand::random(); - - let window_label = window_label.map(|l| l.0); - - context - .window - .eval(&listen_js( - context.window.manager().event_listeners_object_name(), - format!("'{}'", event.0), - event_id, - window_label.clone(), - format!("window['_{}']", handler.0), - )) - .map_err(crate::error::into_anyhow)?; - - context - .window - .register_js_listener(window_label, event.0, event_id); - - Ok(event_id) - } - - fn unlisten( - context: InvokeContext, - event: EventId, - event_id: u64, - ) -> super::Result<()> { - context - .window - .eval(&unlisten_js( - context.window.manager().event_listeners_object_name(), - event.0, - event_id, - )) - .map_err(crate::error::into_anyhow)?; - context.window.unregister_js_listener(event_id); - Ok(()) - } - - fn emit( - context: InvokeContext, - event: EventId, - window_label: Option, - payload: Option, - ) -> super::Result<()> { - // dispatch the event to Rust listeners - context.window.trigger( - &event.0, - // TODO: dispatch any serializable value instead of a string in v2 - payload.as_ref().and_then(|p| { - serde_json::to_string(&p) - .map_err(|e| { - #[cfg(debug_assertions)] - eprintln!("{e}"); - e - }) - .ok() - }), - ); - - if let Some(target) = window_label { - context - .window - .emit_to(&target.0, &event.0, payload) - .map_err(crate::error::into_anyhow)?; - } else { - context - .window - .emit_all(&event.0, payload) - .map_err(crate::error::into_anyhow)?; - } - Ok(()) - } -} diff --git a/core/tauri/src/event/commands.rs b/core/tauri/src/event/commands.rs new file mode 100644 index 00000000000..4a5cbeb5db3 --- /dev/null +++ b/core/tauri/src/event/commands.rs @@ -0,0 +1,86 @@ +use crate::{api::ipc::CallbackFn, command, Manager, Result, Runtime, Window}; +use serde::{Deserialize, Deserializer}; +use serde_json::Value as JsonValue; +use tauri_runtime::window::is_label_valid; + +use super::is_event_name_valid; + +pub struct EventId(String); + +impl<'de> Deserialize<'de> for EventId { + fn deserialize(deserializer: D) -> std::result::Result + where + D: Deserializer<'de>, + { + let event_id = String::deserialize(deserializer)?; + if is_event_name_valid(&event_id) { + Ok(EventId(event_id)) + } else { + Err(serde::de::Error::custom( + "Event name must include only alphanumeric characters, `-`, `/`, `:` and `_`.", + )) + } + } +} + +pub struct WindowLabel(String); + +impl<'de> Deserialize<'de> for WindowLabel { + fn deserialize(deserializer: D) -> std::result::Result + where + D: Deserializer<'de>, + { + let event_id = String::deserialize(deserializer)?; + if is_label_valid(&event_id) { + Ok(WindowLabel(event_id)) + } else { + Err(serde::de::Error::custom( + "Window label must include only alphanumeric characters, `-`, `/`, `:` and `_`.", + )) + } + } +} + +#[command(root = "crate")] +pub fn listen( + window: Window, + event: EventId, + window_label: Option, + handler: CallbackFn, +) -> Result { + window.listen_js(window_label.map(|l| l.0), event.0, handler) +} + +#[command(root = "crate")] +pub fn unlisten(window: Window, event: EventId, event_id: usize) -> Result<()> { + window.unlisten_js(event.0, event_id) +} + +#[command(root = "crate")] +pub fn emit( + window: Window, + event: EventId, + window_label: Option, + payload: Option, +) -> Result<()> { + // dispatch the event to Rust listeners + window.trigger( + &event.0, + payload.as_ref().and_then(|p| { + serde_json::to_string(&p) + .map_err(|e| { + #[cfg(debug_assertions)] + eprintln!("{e}"); + e + }) + .ok() + }), + ); + + // emit event to JS + if let Some(target) = window_label { + window.emit_to(&target.0, &event.0, payload) + } else { + window.emit_all(&event.0, payload) + } +} diff --git a/core/tauri/src/event.rs b/core/tauri/src/event/listener.rs similarity index 72% rename from core/tauri/src/event.rs rename to core/tauri/src/event/listener.rs index 7fb2110e727..6a3d556fb27 100644 --- a/core/tauri/src/event.rs +++ b/core/tauri/src/event/listener.rs @@ -1,60 +1,13 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT +use super::{Event, EventHandler}; use std::{ boxed::Box, cell::Cell, collections::HashMap, - fmt, - hash::Hash, sync::{Arc, Mutex}, }; use uuid::Uuid; -/// Checks if an event name is valid. -pub fn is_event_name_valid(event: &str) -> bool { - event - .chars() - .all(|c| c.is_alphanumeric() || c == '-' || c == '/' || c == ':' || c == '_') -} - -pub fn assert_event_name_is_valid(event: &str) { - assert!( - is_event_name_valid(event), - "Event name must include only alphanumeric characters, `-`, `/`, `:` and `_`." - ); -} - -/// Represents an event handler. -#[derive(Debug, Clone, Copy, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct EventHandler(Uuid); - -impl fmt::Display for EventHandler { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - self.0.fmt(f) - } -} - -/// An event that was triggered. -#[derive(Debug, Clone)] -pub struct Event { - id: EventHandler, - data: Option, -} - -impl Event { - /// The [`EventHandler`] that was triggered. - pub fn id(&self) -> EventHandler { - self.id - } - - /// The event payload. - pub fn payload(&self) -> Option<&str> { - self.data.as_deref() - } -} - /// What to do with the pending handler when resolving it? enum Pending { Unlisten(EventHandler), @@ -77,7 +30,7 @@ struct InnerListeners { } /// A self-contained event manager. -pub(crate) struct Listeners { +pub struct Listeners { inner: Arc, } @@ -299,54 +252,3 @@ mod test { } } } - -pub fn unlisten_js(listeners_object_name: String, event_name: String, event_id: u64) -> String { - format!( - " - (function () {{ - const listeners = (window['{listeners_object_name}'] || {{}})['{event_name}'] - if (listeners) {{ - const index = window['{listeners_object_name}']['{event_name}'].findIndex(e => e.id === {event_id}) - if (index > -1) {{ - window['{listeners_object_name}']['{event_name}'].splice(index, 1) - }} - }} - }})() - ", - ) -} - -pub fn listen_js( - listeners_object_name: String, - event: String, - event_id: u64, - window_label: Option, - handler: String, -) -> String { - format!( - " - (function () {{ - if (window['{listeners}'] === void 0) {{ - Object.defineProperty(window, '{listeners}', {{ value: Object.create(null) }}); - }} - if (window['{listeners}'][{event}] === void 0) {{ - Object.defineProperty(window['{listeners}'], {event}, {{ value: [] }}); - }} - const eventListeners = window['{listeners}'][{event}] - const listener = {{ - id: {event_id}, - windowLabel: {window_label}, - handler: {handler} - }}; - eventListeners.push(listener); - }})() - ", - listeners = listeners_object_name, - window_label = if let Some(l) = window_label { - crate::runtime::window::assert_label_is_valid(&l); - format!("'{l}'") - } else { - "null".to_owned() - }, - ) -} diff --git a/core/tauri/src/event/mod.rs b/core/tauri/src/event/mod.rs new file mode 100644 index 00000000000..ddc351d5486 --- /dev/null +++ b/core/tauri/src/event/mod.rs @@ -0,0 +1,120 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +use std::{fmt, hash::Hash}; +use uuid::Uuid; + +mod commands; +mod listener; +pub(crate) use listener::Listeners; + +use crate::{ + plugin::{Builder, TauriPlugin}, + Runtime, +}; + +/// Checks if an event name is valid. +pub fn is_event_name_valid(event: &str) -> bool { + event + .chars() + .all(|c| c.is_alphanumeric() || c == '-' || c == '/' || c == ':' || c == '_') +} + +pub fn assert_event_name_is_valid(event: &str) { + assert!( + is_event_name_valid(event), + "Event name must include only alphanumeric characters, `-`, `/`, `:` and `_`." + ); +} + +/// Represents an event handler. +#[derive(Debug, Clone, Copy, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct EventHandler(Uuid); + +impl fmt::Display for EventHandler { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.0.fmt(f) + } +} + +/// An event that was triggered. +#[derive(Debug, Clone)] +pub struct Event { + id: EventHandler, + data: Option, +} + +impl Event { + /// The [`EventHandler`] that was triggered. + pub fn id(&self) -> EventHandler { + self.id + } + + /// The event payload. + pub fn payload(&self) -> Option<&str> { + self.data.as_deref() + } +} + +/// Initializes the event plugin. +pub(crate) fn init() -> TauriPlugin { + Builder::new("event") + .invoke_handler(crate::generate_handler![ + commands::listen, + commands::unlisten, + commands::emit, + ]) + .build() +} + +pub fn unlisten_js(listeners_object_name: String, event_name: String, event_id: usize) -> String { + format!( + " + (function () {{ + const listeners = (window['{listeners_object_name}'] || {{}})['{event_name}'] + if (listeners) {{ + const index = window['{listeners_object_name}']['{event_name}'].findIndex(e => e.id === {event_id}) + if (index > -1) {{ + window['{listeners_object_name}']['{event_name}'].splice(index, 1) + }} + }} + }})() + ", + ) +} + +pub fn listen_js( + listeners_object_name: String, + event: String, + event_id: usize, + window_label: Option, + handler: String, +) -> String { + format!( + " + (function () {{ + if (window['{listeners}'] === void 0) {{ + Object.defineProperty(window, '{listeners}', {{ value: Object.create(null) }}); + }} + if (window['{listeners}'][{event}] === void 0) {{ + Object.defineProperty(window['{listeners}'], {event}, {{ value: [] }}); + }} + const eventListeners = window['{listeners}'][{event}] + const listener = {{ + id: {event_id}, + windowLabel: {window_label}, + handler: {handler} + }}; + eventListeners.push(listener); + }})() + ", + listeners = listeners_object_name, + window_label = if let Some(l) = window_label { + crate::runtime::window::assert_label_is_valid(&l); + format!("'{l}'") + } else { + "null".to_owned() + }, + ) +} diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index d745376118a..c9a1aec1f75 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -756,43 +756,40 @@ impl WindowManager { Ok(pending) } - fn prepare_ipc_handler( - &self, - app_handle: AppHandle, - ) -> WebviewIpcHandler { + fn prepare_ipc_handler(&self) -> WebviewIpcHandler { let manager = self.clone(); Box::new(move |window, #[allow(unused_mut)] mut request| { - let window = Window::new(manager.clone(), window, app_handle.clone()); + if let Some(window) = manager.get_window(&window.label) { + #[cfg(feature = "isolation")] + if let Pattern::Isolation { crypto_keys, .. } = manager.pattern() { + match RawIsolationPayload::try_from(request.as_str()) + .and_then(|raw| crypto_keys.decrypt(raw)) + { + Ok(json) => request = json, + Err(e) => { + let error: crate::Error = e.into(); + let _ = window.eval(&format!( + r#"console.error({})"#, + JsonValue::String(error.to_string()) + )); + return; + } + } + } - #[cfg(feature = "isolation")] - if let Pattern::Isolation { crypto_keys, .. } = manager.pattern() { - match RawIsolationPayload::try_from(request.as_str()) - .and_then(|raw| crypto_keys.decrypt(raw)) - { - Ok(json) => request = json, + match serde_json::from_str::(&request) { + Ok(message) => { + let _ = window.on_message(message); + } Err(e) => { let error: crate::Error = e.into(); let _ = window.eval(&format!( r#"console.error({})"#, JsonValue::String(error.to_string()) )); - return; } } } - - match serde_json::from_str::(&request) { - Ok(message) => { - let _ = window.on_message(message); - } - Err(e) => { - let error: crate::Error = e.into(); - let _ = window.eval(&format!( - r#"console.error({})"#, - JsonValue::String(error.to_string()) - )); - } - } }) } @@ -1327,7 +1324,7 @@ impl WindowManager { app_handle.clone(), web_resource_request_handler, )?; - pending.ipc_handler = Some(self.prepare_ipc_handler(app_handle.clone())); + pending.ipc_handler = Some(self.prepare_ipc_handler()); // in `Windows`, we need to force a data_directory // but we do respect user-specification diff --git a/core/tauri/src/test/mock_runtime.rs b/core/tauri/src/test/mock_runtime.rs index 0b62312184d..4c95107b152 100644 --- a/core/tauri/src/test/mock_runtime.rs +++ b/core/tauri/src/test/mock_runtime.rs @@ -72,7 +72,6 @@ impl RuntimeHandle for MockRuntimeHandle { last_evaluated_script: Default::default(), }, menu_ids: Default::default(), - js_event_listeners: Default::default(), }) } @@ -653,7 +652,6 @@ impl Runtime for MockRuntime { last_evaluated_script: Default::default(), }, menu_ids: Default::default(), - js_event_listeners: Default::default(), }) } diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index 7f0e4a7fc85..b59872d4c20 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -12,6 +12,7 @@ use url::Url; #[cfg(target_os = "macos")] use crate::TitleBarStyle; use crate::{ + api::ipc::CallbackFn, app::AppHandle, command::{CommandArg, CommandItem}, event::{Event, EventHandler}, @@ -23,7 +24,7 @@ use crate::{ webview::{WebviewAttributes, WindowBuilder as _}, window::{ dpi::{PhysicalPosition, PhysicalSize}, - DetachedWindow, JsEventListenerKey, PendingWindow, + DetachedWindow, PendingWindow, }, Dispatch, RuntimeHandle, }, @@ -50,10 +51,11 @@ use windows::Win32::Foundation::HWND; use tauri_macros::default_runtime; use std::{ + collections::{HashMap, HashSet}, fmt, hash::{Hash, Hasher}, path::PathBuf, - sync::Arc, + sync::{Arc, Mutex}, }; pub(crate) type WebResourceRequestHandler = dyn Fn(&HttpRequest, &mut HttpResponse) + Send + Sync; @@ -695,6 +697,15 @@ impl<'a, R: Runtime> WindowBuilder<'a, R> { } } +/// Key for a JS event listener. +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +struct JsEventListenerKey { + /// The associated window label. + pub window_label: Option, + /// The event name. + pub event: String, +} + // TODO: expand these docs since this is a pretty important type /// A webview window managed by Tauri. /// @@ -708,6 +719,7 @@ pub struct Window { /// The manager to associate this webview window with. manager: WindowManager, pub(crate) app_handle: AppHandle, + js_event_listeners: Arc>>>, } unsafe impl raw_window_handle::HasRawWindowHandle for Window { @@ -722,6 +734,7 @@ impl Clone for Window { window: self.window.clone(), manager: self.manager.clone(), app_handle: self.app_handle.clone(), + js_event_listeners: self.js_event_listeners.clone(), } } } @@ -873,6 +886,7 @@ impl Window { window, manager, app_handle, + js_event_listeners: Default::default(), } } @@ -1655,9 +1669,24 @@ impl Window { self.window.dispatcher.eval_script(js).map_err(Into::into) } - pub(crate) fn register_js_listener(&self, window_label: Option, event: String, id: u64) { + /// Register a JS event listener and return its identifier. + pub(crate) fn listen_js( + &self, + window_label: Option, + event: String, + handler: CallbackFn, + ) -> crate::Result { + let event_id = rand::random(); + + self.eval(&crate::event::listen_js( + self.manager().event_listeners_object_name(), + format!("'{}'", event), + event_id, + window_label.clone(), + format!("window['_{}']", handler.0), + ))?; + self - .window .js_event_listeners .lock() .unwrap() @@ -1666,12 +1695,21 @@ impl Window { event, }) .or_insert_with(Default::default) - .insert(id); + .insert(event_id); + + Ok(event_id) } - pub(crate) fn unregister_js_listener(&self, id: u64) { + /// Unregister a JS event listener. + pub(crate) fn unlisten_js(&self, event: String, id: usize) -> crate::Result<()> { + self.eval(&crate::event::unlisten_js( + self.manager().event_listeners_object_name(), + event, + id, + ))?; + let mut empty = None; - let mut js_listeners = self.window.js_event_listeners.lock().unwrap(); + let mut js_listeners = self.js_event_listeners.lock().unwrap(); let iter = js_listeners.iter_mut(); for (key, ids) in iter { if ids.contains(&id) { @@ -1686,12 +1724,13 @@ impl Window { if let Some(key) = empty { js_listeners.remove(&key); } + + Ok(()) } /// Whether this window registered a listener to an event from the given window and event name. pub(crate) fn has_js_listener(&self, window_label: Option, event: &str) -> bool { self - .window .js_event_listeners .lock() .unwrap() diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index d37596e51db..2a86bf4e6d4 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,34 +1,34 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const b of u.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&l(b)}).observe(document,{childList:!0,subtree:!0});function n(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerpolicy&&(u.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?u.credentials="include":s.crossorigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(s){if(s.ep)return;s.ep=!0;const u=n(s);fetch(s.href,u)}})();function V(){}function Al(e){return e()}function pl(){return Object.create(null)}function Le(e){e.forEach(Al)}function Jl(e){return typeof e=="function"}function it(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Sn;function Kl(e,t){return Sn||(Sn=document.createElement("a")),Sn.href=t,e===Sn.href}function Ql(e){return Object.keys(e).length===0}function Zl(e,...t){if(e==null)return V;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function $l(e,t,n){e.$$.on_destroy.push(Zl(t,n))}function i(e,t){e.appendChild(t)}function _(e,t,n){e.insertBefore(t,n||null)}function h(e){e.parentNode.removeChild(e)}function Dn(e,t){for(let n=0;ne.removeEventListener(t,n,l)}function ts(e){return function(t){return t.preventDefault(),e.call(this,t)}}function o(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Y(e){return e===""?null:+e}function ns(e){return Array.from(e.childNodes)}function K(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function U(e,t){e.value=t==null?"":t}function On(e,t){for(let n=0;n{Pn.delete(e),l&&(n&&e.d(1),l())}),e.o(t)}else l&&l()}function gl(e){e&&e.c()}function di(e,t,n,l){const{fragment:s,on_mount:u,on_destroy:b,after_update:p}=e.$$;s&&s.m(t,n),l||At(()=>{const f=u.map(Al).filter(Jl);b?b.push(...f):Le(f),e.$$.on_mount=[]}),p.forEach(At)}function fi(e,t){const n=e.$$;n.fragment!==null&&(Le(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function us(e,t){e.$$.dirty[0]===-1&&(St.push(e),ss(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const m=M.length?M[0]:W;return c.ctx&&s(c.ctx[y],c.ctx[y]=m)&&(!c.skip_bound&&c.bound[y]&&c.bound[y](m),z&&us(e,y)),W}):[],c.update(),z=!0,Le(c.before_update),c.fragment=l?l(c.ctx):!1,t.target){if(t.hydrate){const y=ns(t.target);c.fragment&&c.fragment.l(y),y.forEach(h)}else c.fragment&&c.fragment.c();t.intro&&ci(e.$$.fragment),di(e,t.target,t.anchor,t.customElement),Rl()}Tt(f)}class yt{$destroy(){fi(this,1),this.$destroy=V}$on(t,n){const l=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return l.push(n),()=>{const s=l.indexOf(n);s!==-1&&l.splice(s,1)}}$set(t){this.$$set&&!Ql(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const bt=[];function cs(e,t=V){let n;const l=new Set;function s(p){if(it(e,p)&&(e=p,n)){const f=!bt.length;for(const c of l)c[1](),bt.push(c,e);if(f){for(let c=0;c{l.delete(c),l.size===0&&(n(),n=null)}}return{set:s,update:u,subscribe:b}}var ds=Object.defineProperty,mi=(e,t)=>{for(var n in t)ds(e,n,{get:t[n],enumerable:!0})},fs={};mi(fs,{Channel:()=>ps,convertFileSrc:()=>hs,invoke:()=>Ot,transformCallback:()=>Dt});function ms(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function Dt(e,t=!1){let n=ms(),l=`_${n}`;return Object.defineProperty(window,l,{value:s=>(t&&Reflect.deleteProperty(window,l),e==null?void 0:e(s)),writable:!1,configurable:!0}),n}var ps=class{constructor(){this.onmessage=()=>{},this.id=Dt(e=>{this.onmessage(e)})}toJSON(){return`__CHANNEL__:${this.id}`}};async function Ot(e,t={}){return new Promise((n,l)=>{let s=Dt(b=>{n(b),Reflect.deleteProperty(window,`_${u}`)},!0),u=Dt(b=>{l(b),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:e,callback:s,error:u,...t})})}function hs(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}var _s={};mi(_s,{TauriEvent:()=>ql,emit:()=>Fl,listen:()=>hi,once:()=>bs});async function C(e){return Ot("tauri",e)}async function Hl(e,t){return C({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function Nl(e,t,n){await C({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function pi(e,t,n){return C({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:Dt(n)}}).then(l=>async()=>Hl(e,l))}async function Ul(e,t,n){return pi(e,t,l=>{n(l),Hl(e,l.id).catch(()=>{})})}var ql=(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))(ql||{});async function hi(e,t){return pi(e,null,t)}async function bs(e,t){return Ul(e,null,t)}async function Fl(e,t){return Nl(e,void 0,t)}var gs={};mi(gs,{CloseRequestedEvent:()=>Xl,LogicalPosition:()=>xl,LogicalSize:()=>In,PhysicalPosition:()=>Ye,PhysicalSize:()=>et,UserAttentionType:()=>_i,WebviewWindow:()=>nt,WebviewWindowHandle:()=>Vl,WindowManager:()=>Gl,appWindow:()=>tt,availableMonitors:()=>ws,currentMonitor:()=>ys,getAll:()=>jl,getCurrent:()=>An,primaryMonitor:()=>vs});var In=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},et=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new In(this.width/e,this.height/e)}},xl=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},Ye=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new xl(this.x/e,this.y/e)}},_i=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(_i||{});function An(){return new nt(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function jl(){return window.__TAURI_METADATA__.__windows.map(e=>new nt(e.label,{skip:!0}))}var yl=["tauri://created","tauri://error"],Vl=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)}):pi(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)}):Ul(e,this.label,t)}async emit(e,t){if(yl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return Nl(e,this.label,t)}_handleTauriEvent(e,t){return yl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Gl=class extends Vl{async scaleFactor(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new Ye(e,t))}async outerPosition(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new Ye(e,t))}async innerSize(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new et(e,t))}async outerSize(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new et(e,t))}async isFullscreen(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return C({__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"}),C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return C({__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 C({__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 C({__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 C({__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 C({__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 C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return C({__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 C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return C({__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 C({__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 C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",t=>{t.payload=Bl(t.payload),e(t)})}async onMoved(e){return this.listen("tauri://move",t=>{t.payload=Yl(t.payload),e(t)})}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new Xl(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),n=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",s=>{e({...s,payload:{type:"drop",paths:s.payload}})}),n=await this.listen("tauri://file-drop-hover",s=>{e({...s,payload:{type:"hover",paths:s.payload}})}),l=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{t(),n(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},Xl=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}},nt=class extends Gl{constructor(e,t={}){super(e),t!=null&&t.skip||C({__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 jl().some(t=>t.label===e)?new nt(e,{skip:!0}):null}},tt;"__TAURI_METADATA__"in window?tt=new nt(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.`),tt=new nt("main",{skip:!0}));function bi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:Yl(e.position),size:Bl(e.size)}}function Yl(e){return new Ye(e.x,e.y)}function Bl(e){return new et(e.width,e.height)}async function ys(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(bi)}async function vs(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(bi)}async function ws(){return C({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(bi))}function ks(e){let t,n,l,s,u,b,p;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 +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))l(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const b of u.addedNodes)b.tagName==="LINK"&&b.rel==="modulepreload"&&l(b)}).observe(document,{childList:!0,subtree:!0});function n(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerpolicy&&(u.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?u.credentials="include":s.crossorigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(s){if(s.ep)return;s.ep=!0;const u=n(s);fetch(s.href,u)}})();function V(){}function Dl(e){return e()}function hl(){return Object.create(null)}function Ce(e){e.forEach(Dl)}function Zl(e){return typeof e=="function"}function lt(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Tn;function $l(e,t){return Tn||(Tn=document.createElement("a")),Tn.href=t,e===Tn.href}function es(e){return Object.keys(e).length===0}function ts(e,...t){if(e==null)return V;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ns(e,t,n){e.$$.on_destroy.push(ts(t,n))}function i(e,t){e.appendChild(t)}function _(e,t,n){e.insertBefore(t,n||null)}function h(e){e.parentNode.removeChild(e)}function Dn(e,t){for(let n=0;ne.removeEventListener(t,n,l)}function ls(e){return function(t){return t.preventDefault(),e.call(this,t)}}function o(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Y(e){return e===""?null:+e}function ss(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 In(e,t){for(let n=0;n{An.delete(e),l&&(n&&e.d(1),l())}),e.o(t)}else l&&l()}function yl(e){e&&e.c()}function fi(e,t,n,l){const{fragment:s,on_mount:u,on_destroy:b,after_update:p}=e.$$;s&&s.m(t,n),l||Dt(()=>{const f=u.map(Dl).filter(Zl);b?b.push(...f):Ce(f),e.$$.on_mount=[]}),p.forEach(Dt)}function mi(e,t){const n=e.$$;n.fragment!==null&&(Ce(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function fs(e,t){e.$$.dirty[0]===-1&&(Tt.push(e),rs(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const m=M.length?M[0]:W;return c.ctx&&s(c.ctx[y],c.ctx[y]=m)&&(!c.skip_bound&&c.bound[y]&&c.bound[y](m),z&&fs(e,y)),W}):[],c.update(),z=!0,Ce(c.before_update),c.fragment=l?l(c.ctx):!1,t.target){if(t.hydrate){const y=ss(t.target);c.fragment&&c.fragment.l(y),y.forEach(h)}else c.fragment&&c.fragment.c();t.intro&&di(e.$$.fragment),fi(e,t.target,t.anchor,t.customElement),Nl()}Pt(f)}class vt{$destroy(){mi(this,1),this.$destroy=V}$on(t,n){const l=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return l.push(n),()=>{const s=l.indexOf(n);s!==-1&&l.splice(s,1)}}$set(t){this.$$set&&!es(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const gt=[];function ms(e,t=V){let n;const l=new Set;function s(p){if(lt(e,p)&&(e=p,n)){const f=!gt.length;for(const c of l)c[1](),gt.push(c,e);if(f){for(let c=0;c{l.delete(c),l.size===0&&(n(),n=null)}}return{set:s,update:u,subscribe:b}}var ps=Object.defineProperty,pi=(e,t)=>{for(var n in t)ps(e,n,{get:t[n],enumerable:!0})},ql=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},vl=(e,t,n)=>(ql(e,t,"read from private field"),n?n.call(e):t.get(e)),hs=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},_s=(e,t,n,l)=>(ql(e,t,"write to private field"),l?l.call(e,n):t.set(e,n),n),bs={};pi(bs,{Channel:()=>ys,convertFileSrc:()=>vs,invoke:()=>Be,transformCallback:()=>It});function gs(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function It(e,t=!1){let n=gs(),l=`_${n}`;return Object.defineProperty(window,l,{value:s=>(t&&Reflect.deleteProperty(window,l),e==null?void 0:e(s)),writable:!1,configurable:!0}),n}var Et,ys=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,hs(this,Et,()=>{}),this.id=It(e=>{vl(this,Et).call(this,e)})}set onmessage(e){_s(this,Et,e)}get onmessage(){return vl(this,Et)}toJSON(){return`__CHANNEL__:${this.id}`}};Et=new WeakMap;async function Be(e,t={}){return new Promise((n,l)=>{let s=It(b=>{n(b),Reflect.deleteProperty(window,`_${u}`)},!0),u=It(b=>{l(b),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:e,callback:s,error:u,...t})})}function vs(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}var ws={};pi(ws,{TauriEvent:()=>jl,emit:()=>Vl,listen:()=>_i,once:()=>ks});async function Fl(e,t){await Be("plugin:event|unlisten",{event:e,eventId:t})}async function Ul(e,t,n){await Be("plugin:event|emit",{event:e,windowLabel:t,payload:n})}async function hi(e,t,n){return Be("plugin:event|listen",{event:e,windowLabel:t,handler:It(n)}).then(l=>async()=>Fl(e,l))}async function xl(e,t,n){return hi(e,t,l=>{n(l),Fl(e,l.id).catch(()=>{})})}var jl=(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))(jl||{});async function _i(e,t){return hi(e,null,t)}async function ks(e,t){return xl(e,null,t)}async function Vl(e,t){return Ul(e,void 0,t)}var Ms={};pi(Ms,{CloseRequestedEvent:()=>Jl,LogicalPosition:()=>Gl,LogicalSize:()=>Rn,PhysicalPosition:()=>Ye,PhysicalSize:()=>tt,UserAttentionType:()=>bi,WebviewWindow:()=>it,WebviewWindowHandle:()=>Yl,WindowManager:()=>Bl,appWindow:()=>nt,availableMonitors:()=>Cs,currentMonitor:()=>zs,getAll:()=>Xl,getCurrent:()=>On,primaryMonitor:()=>Ws});async function L(e){return Be("tauri",e)}var Rn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},tt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new Rn(this.width/e,this.height/e)}},Gl=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},Ye=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Gl(this.x/e,this.y/e)}},bi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(bi||{});function On(){return new it(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Xl(){return window.__TAURI_METADATA__.__windows.map(e=>new it(e.label,{skip:!0}))}var wl=["tauri://created","tauri://error"],Yl=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)}):hi(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)}):xl(e,this.label,t)}async emit(e,t){if(wl.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return Ul(e,this.label,t)}_handleTauriEvent(e,t){return wl.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Bl=class extends Yl{async scaleFactor(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new Ye(e,t))}async outerPosition(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new Ye(e,t))}async innerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new tt(e,t))}async outerSize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new tt(e,t))}async isFullscreen(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",t=>{t.payload=Ql(t.payload),e(t)})}async onMoved(e){return this.listen("tauri://move",t=>{t.payload=Kl(t.payload),e(t)})}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new Jl(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),n=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",s=>{e({...s,payload:{type:"drop",paths:s.payload}})}),n=await this.listen("tauri://file-drop-hover",s=>{e({...s,payload:{type:"hover",paths:s.payload}})}),l=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{t(),n(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},Jl=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}},it=class extends Bl{constructor(e,t={}){super(e),t!=null&&t.skip||L({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return Xl().some(t=>t.label===e)?new it(e,{skip:!0}):null}},nt;"__TAURI_METADATA__"in window?nt=new it(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.`),nt=new it("main",{skip:!0}));function gi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:Kl(e.position),size:Ql(e.size)}}function Kl(e){return new Ye(e.x,e.y)}function Ql(e){return new tt(e.width,e.height)}async function zs(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(gi)}async function Ws(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(gi)}async function Cs(){return L({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(gi))}function Ls(e){let t,n,l,s,u,b,p;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=d(),l=a("br"),s=d(),u=a("br"),b=d(),p=a("br")},m(f,c){_(f,t,c),_(f,n,c),_(f,l,c),_(f,s,c),_(f,u,c),_(f,b,c),_(f,p,c)},p:V,i:V,o:V,d(f){f&&h(t),f&&h(n),f&&h(l),f&&h(s),f&&h(u),f&&h(b),f&&h(p)}}}class Ms extends yt{constructor(t){super(),gt(this,t,null,ks,it,{})}}function zs(e){let t,n,l,s,u,b,p,f,c,z,y,W,M;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments: + tests.`,n=d(),l=a("br"),s=d(),u=a("br"),b=d(),p=a("br")},m(f,c){_(f,t,c),_(f,n,c),_(f,l,c),_(f,s,c),_(f,u,c),_(f,b,c),_(f,p,c)},p:V,i:V,o:V,d(f){f&&h(t),f&&h(n),f&&h(l),f&&h(s),f&&h(u),f&&h(b),f&&h(p)}}}class Ss extends vt{constructor(t){super(),yt(this,t,null,Ls,lt,{})}}function Ts(e){let t,n,l,s,u,b,p,f,c,z,y,W,M;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments:
  --config <PATH>
   --theme <light|dark|system>
   --verbose
- Additionally, it has a update --background subcommand.`,n=d(),l=a("br"),s=d(),u=a("div"),u.textContent="Note that the arguments are only parsed, not implemented.",b=d(),p=a("br"),f=d(),c=a("br"),z=d(),y=a("button"),y.textContent="Get matches",o(u,"class","note"),o(y,"class","btn"),o(y,"id","cli-matches")},m(m,L){_(m,t,L),_(m,n,L),_(m,l,L),_(m,s,L),_(m,u,L),_(m,b,L),_(m,p,L),_(m,f,L),_(m,c,L),_(m,z,L),_(m,y,L),W||(M=T(y,"click",e[0]),W=!0)},p:V,i:V,o:V,d(m){m&&h(t),m&&h(n),m&&h(l),m&&h(s),m&&h(u),m&&h(b),m&&h(p),m&&h(f),m&&h(c),m&&h(z),m&&h(y),W=!1,M()}}}function Ws(e,t,n){let{onMessage:l}=t;function s(){Ot("plugin:cli|cli_matches").then(l).catch(l)}return e.$$set=u=>{"onMessage"in u&&n(1,l=u.onMessage)},[s,l]}class Ls extends yt{constructor(t){super(),gt(this,t,Ws,zs,it,{onMessage:1})}}function Cs(e){let t,n,l,s,u,b,p,f;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",l=d(),s=a("button"),s.textContent="Call Request (async) API",u=d(),b=a("button"),b.textContent="Send event to Rust",o(n,"class","btn"),o(n,"id","log"),o(s,"class","btn"),o(s,"id","request"),o(b,"class","btn"),o(b,"id","event")},m(c,z){_(c,t,z),i(t,n),i(t,l),i(t,s),i(t,u),i(t,b),p||(f=[T(n,"click",e[0]),T(s,"click",e[1]),T(b,"click",e[2])],p=!0)},p:V,i:V,o:V,d(c){c&&h(t),p=!1,Le(f)}}}function Ss(e,t,n){let{onMessage:l}=t,s;Et(async()=>{s=await hi("rust-event",l)}),Il(()=>{s&&s()});function u(){Ot("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function b(){Ot("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(l).catch(l)}function p(){Fl("js-event","this is the payload string")}return e.$$set=f=>{"onMessage"in f&&n(3,l=f.onMessage)},[u,b,p,l]}class Ts extends yt{constructor(t){super(),gt(this,t,Ss,Cs,it,{onMessage:3})}}function vl(e,t,n){const l=e.slice();return l[65]=t[n],l}function wl(e,t,n){const l=e.slice();return l[68]=t[n],l}function kl(e){let t,n,l,s,u,b,p=Object.keys(e[1]),f=[];for(let c=0;ce[37].call(l))},m(c,z){_(c,t,z),_(c,n,z),_(c,l,z),i(l,s);for(let y=0;yupdate --background subcommand.`,n=d(),l=a("br"),s=d(),u=a("div"),u.textContent="Note that the arguments are only parsed, not implemented.",b=d(),p=a("br"),f=d(),c=a("br"),z=d(),y=a("button"),y.textContent="Get matches",o(u,"class","note"),o(y,"class","btn"),o(y,"id","cli-matches")},m(m,C){_(m,t,C),_(m,n,C),_(m,l,C),_(m,s,C),_(m,u,C),_(m,b,C),_(m,p,C),_(m,f,C),_(m,c,C),_(m,z,C),_(m,y,C),W||(M=T(y,"click",e[0]),W=!0)},p:V,i:V,o:V,d(m){m&&h(t),m&&h(n),m&&h(l),m&&h(s),m&&h(u),m&&h(b),m&&h(p),m&&h(f),m&&h(c),m&&h(z),m&&h(y),W=!1,M()}}}function Es(e,t,n){let{onMessage:l}=t;function s(){Be("plugin:cli|cli_matches").then(l).catch(l)}return e.$$set=u=>{"onMessage"in u&&n(1,l=u.onMessage)},[s,l]}class Ps extends vt{constructor(t){super(),yt(this,t,Es,Ts,lt,{onMessage:1})}}function As(e){let t,n,l,s,u,b,p,f;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",l=d(),s=a("button"),s.textContent="Call Request (async) API",u=d(),b=a("button"),b.textContent="Send event to Rust",o(n,"class","btn"),o(n,"id","log"),o(s,"class","btn"),o(s,"id","request"),o(b,"class","btn"),o(b,"id","event")},m(c,z){_(c,t,z),i(t,n),i(t,l),i(t,s),i(t,u),i(t,b),p||(f=[T(n,"click",e[0]),T(s,"click",e[1]),T(b,"click",e[2])],p=!0)},p:V,i:V,o:V,d(c){c&&h(t),p=!1,Ce(f)}}}function Os(e,t,n){let{onMessage:l}=t,s;At(async()=>{s=await _i("rust-event",l)}),Hl(()=>{s&&s()});function u(){Be("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function b(){Be("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(l).catch(l)}function p(){Vl("js-event","this is the payload string")}return e.$$set=f=>{"onMessage"in f&&n(3,l=f.onMessage)},[u,b,p,l]}class Ds extends vt{constructor(t){super(),yt(this,t,Os,As,lt,{onMessage:3})}}function kl(e,t,n){const l=e.slice();return l[65]=t[n],l}function Ml(e,t,n){const l=e.slice();return l[68]=t[n],l}function zl(e){let t,n,l,s,u,b,p=Object.keys(e[1]),f=[];for(let c=0;ce[37].call(l))},m(c,z){_(c,t,z),_(c,n,z),_(c,l,z),i(l,s);for(let y=0;ye[56].call(Oe)),o(Ve,"class","input"),o(Ve,"type","number"),o(Ge,"class","input"),o(Ge,"type","number"),o(De,"class","flex gap-2"),o(Xe,"class","input grow"),o(Xe,"id","title"),o(Ct,"class","btn"),o(Ct,"type","submit"),o(Ze,"class","flex gap-1"),o(Lt,"class","flex flex-col gap-1")},m(r,v){_(r,t,v),_(r,n,v),_(r,l,v),i(l,s),i(l,u),i(l,b),i(l,p),i(l,f),i(l,c),i(l,z),_(r,y,v),_(r,W,v),_(r,M,v),_(r,m,v),i(m,L),i(L,P),i(L,G),G.checked=e[3],i(m,N),i(m,R),i(R,E),i(R,D),D.checked=e[2],i(m,de),i(m,q),i(q,B),i(q,F),F.checked=e[4],i(m,le),i(m,Q),i(Q,fe),i(Q,te),te.checked=e[5],i(m,se),i(m,J),i(J,g),i(J,A),A.checked=e[6],i(m,O),i(m,Z),i(Z,Ce),i(Z,$),$.checked=e[7],_(r,me,v),_(r,Ie,v),_(r,he,v),_(r,ee,v),i(ee,ae),i(ae,_e),i(_e,Re),i(_e,oe),U(oe,e[14]),i(ae,be),i(ae,Se),i(Se,Te),i(Se,X),U(X,e[15]),i(ee,ge),i(ee,ie),i(ie,x),i(x,we),i(x,re),U(re,e[8]),i(ie,ke),i(ie,j),i(j,k),i(j,I),U(I,e[9]),i(ee,S),i(ee,ue),i(ue,lt),i(lt,It),i(lt,ze),U(ze,e[10]),i(ue,Rt),i(ue,st),i(st,Ht),i(st,We),U(We,e[11]),i(ee,H),i(ee,Ee),i(Ee,Be),i(Be,vt),i(Be,ye),U(ye,e[12]),i(Ee,wt),i(Ee,Je),i(Je,kt),i(Je,ve),U(ve,e[13]),_(r,at,v),_(r,ot,v),_(r,rt,v),_(r,pe,v),i(pe,Pe),i(Pe,Me),i(Me,Ke),i(Me,Mt),i(Me,Qe),i(Qe,zt),i(Qe,Rn),i(Me,gi),i(Me,Nt),i(Nt,yi),i(Nt,Hn),i(Pe,vi),i(Pe,He),i(He,qt),i(He,wi),i(He,Ft),i(Ft,ki),i(Ft,Nn),i(He,Mi),i(He,jt),i(jt,zi),i(jt,Un),i(pe,Wi),i(pe,ct),i(ct,Ne),i(Ne,Gt),i(Ne,Li),i(Ne,Xt),i(Xt,Ci),i(Xt,qn),i(Ne,Si),i(Ne,Bt),i(Bt,Ti),i(Bt,Fn),i(ct,Ei),i(ct,Ue),i(Ue,Kt),i(Ue,Pi),i(Ue,Qt),i(Qt,Ai),i(Qt,xn),i(Ue,Di),i(Ue,$t),i($t,Oi),i($t,jn),i(pe,Ii),i(pe,dt),i(dt,qe),i(qe,tn),i(qe,Ri),i(qe,nn),i(nn,Hi),i(nn,Vn),i(qe,Ni),i(qe,sn),i(sn,Ui),i(sn,Gn),i(dt,qi),i(dt,Fe),i(Fe,on),i(Fe,Fi),i(Fe,rn),i(rn,xi),i(rn,Xn),i(Fe,ji),i(Fe,cn),i(cn,Vi),i(cn,Yn),i(pe,Gi),i(pe,ft),i(ft,xe),i(xe,fn),i(xe,Xi),i(xe,mn),i(mn,Yi),i(mn,Bn),i(xe,Bi),i(xe,hn),i(hn,Ji),i(hn,Jn),i(ft,Ki),i(ft,je),i(je,bn),i(je,Qi),i(je,gn),i(gn,Zi),i(gn,Kn),i(je,$i),i(je,vn),i(vn,el),i(vn,Qn),_(r,Zn,v),_(r,$n,v),_(r,ei,v),_(r,Wt,v),_(r,ti,v),_(r,Ae,v),i(Ae,kn),i(kn,mt),mt.checked=e[16],i(kn,tl),i(Ae,nl),i(Ae,Mn),i(Mn,pt),pt.checked=e[17],i(Mn,il),i(Ae,ll),i(Ae,zn),i(zn,ht),ht.checked=e[21],i(zn,sl),_(r,ni,v),_(r,De,v),i(De,Wn),i(Wn,al),i(Wn,Oe);for(let ne=0;ne=1,z,y,W,M=c&&kl(e),m=e[1][e[0]]&&zl(e);return{c(){t=a("div"),n=a("div"),l=a("input"),s=d(),u=a("button"),u.textContent="New window",b=d(),p=a("br"),f=d(),M&&M.c(),z=d(),m&&m.c(),o(l,"class","input grow"),o(l,"type","text"),o(l,"placeholder","New Window label.."),o(u,"class","btn"),o(n,"class","flex gap-1"),o(t,"class","flex flex-col children:grow gap-2")},m(L,P){_(L,t,P),i(t,n),i(n,l),U(l,e[22]),i(n,s),i(n,u),i(t,b),i(t,p),i(t,f),M&&M.m(t,null),i(t,z),m&&m.m(t,null),y||(W=[T(l,"input",e[36]),T(u,"click",e[33])],y=!0)},p(L,P){P[0]&4194304&&l.value!==L[22]&&U(l,L[22]),P[0]&2&&(c=Object.keys(L[1]).length>=1),c?M?M.p(L,P):(M=kl(L),M.c(),M.m(t,z)):M&&(M.d(1),M=null),L[1][L[0]]?m?m.p(L,P):(m=zl(L),m.c(),m.m(t,null)):m&&(m.d(1),m=null)},i:V,o:V,d(L){L&&h(t),M&&M.d(),m&&m.d(),y=!1,Le(W)}}}function Ps(e,t,n){let l=tt.label;const s={[tt.label]:tt},u=["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:b}=t,p,f=!0,c=!1,z=!0,y=!1,W=!0,M=!1,m=null,L=null,P=null,G=null,N=null,R=null,E=null,D=null,de=1,q=new Ye(E,D),B=new Ye(E,D),F=new et(m,L),le=new et(m,L),Q,fe,te=!1,se=!0,J=null,g=null,A="default",O=!1,Z="Awesome Tauri Example!";function Ce(){s[l].setTitle(Z)}function $(){s[l].hide(),setTimeout(s[l].show,2e3)}function me(){s[l].minimize(),setTimeout(s[l].unminimize,2e3)}function Ie(){if(!p)return;const H=new nt(p);n(1,s[p]=H,s),H.once("tauri://error",function(){b("Error creating new webview")})}function he(){s[l].innerSize().then(H=>{n(26,F=H),n(8,m=F.width),n(9,L=F.height)}),s[l].outerSize().then(H=>{n(27,le=H)})}function ee(){s[l].innerPosition().then(H=>{n(24,q=H)}),s[l].outerPosition().then(H=>{n(25,B=H),n(14,E=B.x),n(15,D=B.y)})}async function ae(H){!H||(Q&&Q(),fe&&fe(),fe=await H.listen("tauri://move",ee),Q=await H.listen("tauri://resize",he))}async function _e(){await s[l].minimize(),await s[l].requestUserAttention(_i.Critical),await new Promise(H=>setTimeout(H,3e3)),await s[l].requestUserAttention(null)}function Re(){p=this.value,n(22,p)}function oe(){l=hl(this),n(0,l),n(1,s)}const be=()=>s[l].center();function Se(){c=this.checked,n(3,c)}function Te(){f=this.checked,n(2,f)}function X(){z=this.checked,n(4,z)}function ge(){y=this.checked,n(5,y)}function ie(){W=this.checked,n(6,W)}function x(){M=this.checked,n(7,M)}function we(){E=Y(this.value),n(14,E)}function re(){D=Y(this.value),n(15,D)}function ke(){m=Y(this.value),n(8,m)}function j(){L=Y(this.value),n(9,L)}function k(){P=Y(this.value),n(10,P)}function I(){G=Y(this.value),n(11,G)}function S(){N=Y(this.value),n(12,N)}function ue(){R=Y(this.value),n(13,R)}function lt(){te=this.checked,n(16,te)}function It(){se=this.checked,n(17,se)}function ze(){O=this.checked,n(21,O)}function Rt(){A=hl(this),n(20,A),n(29,u)}function st(){J=Y(this.value),n(18,J)}function Ht(){g=Y(this.value),n(19,g)}function We(){Z=this.value,n(28,Z)}return e.$$set=H=>{"onMessage"in H&&n(35,b=H.onMessage)},e.$$.update=()=>{var H,Ee,Be,vt,ye,wt,Je,kt,ve,at,ot,rt,pe,Pe,Me,Ke,Mt,Qe,zt;e.$$.dirty[0]&3&&(s[l],ee(),he()),e.$$.dirty[0]&7&&((H=s[l])==null||H.setResizable(f)),e.$$.dirty[0]&11&&(c?(Ee=s[l])==null||Ee.maximize():(Be=s[l])==null||Be.unmaximize()),e.$$.dirty[0]&19&&((vt=s[l])==null||vt.setDecorations(z)),e.$$.dirty[0]&35&&((ye=s[l])==null||ye.setAlwaysOnTop(y)),e.$$.dirty[0]&67&&((wt=s[l])==null||wt.setContentProtected(W)),e.$$.dirty[0]&131&&((Je=s[l])==null||Je.setFullscreen(M)),e.$$.dirty[0]&771&&m&&L&&((kt=s[l])==null||kt.setSize(new et(m,L))),e.$$.dirty[0]&3075&&(P&&G?(ve=s[l])==null||ve.setMinSize(new In(P,G)):(at=s[l])==null||at.setMinSize(null)),e.$$.dirty[0]&12291&&(N>800&&R>400?(ot=s[l])==null||ot.setMaxSize(new In(N,R)):(rt=s[l])==null||rt.setMaxSize(null)),e.$$.dirty[0]&49155&&E!==null&&D!==null&&((pe=s[l])==null||pe.setPosition(new Ye(E,D))),e.$$.dirty[0]&3&&((Pe=s[l])==null||Pe.scaleFactor().then(ut=>n(23,de=ut))),e.$$.dirty[0]&3&&ae(s[l]),e.$$.dirty[0]&65539&&((Me=s[l])==null||Me.setCursorGrab(te)),e.$$.dirty[0]&131075&&((Ke=s[l])==null||Ke.setCursorVisible(se)),e.$$.dirty[0]&1048579&&((Mt=s[l])==null||Mt.setCursorIcon(A)),e.$$.dirty[0]&786435&&J!==null&&g!==null&&((Qe=s[l])==null||Qe.setCursorPosition(new Ye(J,g))),e.$$.dirty[0]&2097155&&((zt=s[l])==null||zt.setIgnoreCursorEvents(O))},[l,s,f,c,z,y,W,M,m,L,P,G,N,R,E,D,te,se,J,g,A,O,p,de,q,B,F,le,Z,u,Ce,$,me,Ie,_e,b,Re,oe,be,Se,Te,X,ge,ie,x,we,re,ke,j,k,I,S,ue,lt,It,ze,Rt,st,Ht,We]}class As extends yt{constructor(t){super(),gt(this,t,Ps,Es,it,{onMessage:35},null,[-1,-1,-1])}}function Ds(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
- `,o(t,"class","flex flex-col gap-2")},m(n,l){_(n,t,l)},p:V,i:V,o:V,d(n){n&&h(t)}}}function Os(e,t,n){let{onMessage:l}=t;const s=window.constraints={audio:!0,video:!0};function u(p){const f=document.querySelector("video"),c=p.getVideoTracks();l("Got stream with constraints:",s),l(`Using video device: ${c[0].label}`),window.stream=p,f.srcObject=p}function b(p){if(p.name==="ConstraintNotSatisfiedError"){const f=s.video;l(`The resolution ${f.width.exact}x${f.height.exact} px is not supported by your device.`)}else p.name==="PermissionDeniedError"&&l("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.");l(`getUserMedia error: ${p.name}`,p)}return Et(async()=>{try{const p=await navigator.mediaDevices.getUserMedia(s);u(p)}catch(p){b(p)}}),Il(()=>{window.stream.getTracks().forEach(function(p){p.stop()})}),e.$$set=p=>{"onMessage"in p&&n(0,l=p.onMessage)},[l]}class Is extends yt{constructor(t){super(),gt(this,t,Os,Ds,it,{onMessage:0})}}function Ll(e,t,n){const l=e.slice();return l[29]=t[n],l}function Cl(e,t,n){const l=e.slice();return l[32]=t[n],l}function Rs(e){let t,n,l,s,u,b,p,f,c,z,y,W,M;function m(E,D){return E[3]?Ns:Hs}let L=m(e),P=L(e);function G(E,D){return E[2]?qs:Us}let N=G(e),R=N(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",l=d(),s=a("span"),u=a("span"),P.c(),p=d(),f=a("span"),f.innerHTML='
',c=d(),z=a("span"),R.c(),o(n,"class","lt-sm:pl-10 text-darkPrimaryText"),o(u,"title",b=e[3]?"Switch to Light mode":"Switch to Dark mode"),o(u,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(f,"title","Minimize"),o(f,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(z,"title",y=e[2]?"Restore":"Maximize"),o(z,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(s,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),o(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),o(t,"data-tauri-drag-region","")},m(E,D){_(E,t,D),i(t,n),i(t,l),i(t,s),i(s,u),P.m(u,null),i(s,p),i(s,f),i(s,c),i(s,z),R.m(z,null),W||(M=[T(u,"click",e[10]),T(f,"click",e[8]),T(z,"click",e[9])],W=!0)},p(E,D){L!==(L=m(E))&&(P.d(1),P=L(E),P&&(P.c(),P.m(u,null))),D[0]&8&&b!==(b=E[3]?"Switch to Light mode":"Switch to Dark mode")&&o(u,"title",b),N!==(N=G(E))&&(R.d(1),R=N(E),R&&(R.c(),R.m(z,null))),D[0]&4&&y!==(y=E[2]?"Restore":"Maximize")&&o(z,"title",y)},d(E){E&&h(t),P.d(),R.d(),W=!1,Le(M)}}}function Hs(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-moon")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Ns(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-sun")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Us(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-maximize")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function qs(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-restore")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Fs(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function xs(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function js(e){let t,n,l,s,u,b,p,f,c;function z(M,m){return M[3]?Gs:Vs}let y=z(e),W=y(e);return{c(){t=a("a"),W.c(),n=d(),l=a("br"),s=d(),u=a("div"),b=d(),p=a("br"),o(t,"href","##"),o(t,"class","nv justify-between h-8"),o(u,"class","bg-white/5 h-2px")},m(M,m){_(M,t,m),W.m(t,null),_(M,n,m),_(M,l,m),_(M,s,m),_(M,u,m),_(M,b,m),_(M,p,m),f||(c=T(t,"click",e[10]),f=!0)},p(M,m){y!==(y=z(M))&&(W.d(1),W=y(M),W&&(W.c(),W.m(t,null)))},d(M){M&&h(t),W.d(),M&&h(n),M&&h(l),M&&h(s),M&&h(u),M&&h(b),M&&h(p),f=!1,c()}}}function Vs(e){let t,n;return{c(){t=w(`Switch to Dark mode - `),n=a("div"),o(n,"class","i-ph-moon")},m(l,s){_(l,t,s),_(l,n,s)},d(l){l&&h(t),l&&h(n)}}}function Gs(e){let t,n;return{c(){t=w(`Switch to Light mode - `),n=a("div"),o(n,"class","i-ph-sun")},m(l,s){_(l,t,s),_(l,n,s)},d(l){l&&h(t),l&&h(n)}}}function Xs(e){let t,n,l,s,u=e[32].label+"",b,p,f,c;function z(){return e[18](e[32])}return{c(){t=a("a"),n=a("div"),l=d(),s=a("p"),b=w(u),o(n,"class",e[32].icon+" mr-2"),o(t,"href","##"),o(t,"class",p="nv "+(e[1]===e[32]?"nv_selected":""))},m(y,W){_(y,t,W),i(t,n),i(t,l),i(t,s),i(s,b),f||(c=T(t,"click",z),f=!0)},p(y,W){e=y,W[0]&2&&p!==(p="nv "+(e[1]===e[32]?"nv_selected":""))&&o(t,"class",p)},d(y){y&&h(t),f=!1,c()}}}function Sl(e){let t,n=e[32]&&Xs(e);return{c(){n&&n.c(),t=Dl()},m(l,s){n&&n.m(l,s),_(l,t,s)},p(l,s){l[32]&&n.p(l,s)},d(l){n&&n.d(l),l&&h(t)}}}function Tl(e){let t,n=e[29].html+"",l;return{c(){t=new is(!1),l=Dl(),t.a=l},m(s,u){t.m(n,s,u),_(s,l,u)},p(s,u){u[0]&32&&n!==(n=s[29].html+"")&&t.p(n)},d(s){s&&h(l),s&&t.d()}}}function Ys(e){let t,n,l,s,u,b,p,f,c,z,y,W,M,m,L,P,G,N,R,E,D,de,q,B,F,le,Q=e[1].label+"",fe,te,se,J,g,A,O,Z,Ce,$,me,Ie,he,ee,ae,_e,Re,oe,be=e[16]&&Rs(e);function Se(k,I){return k[0]?xs:Fs}let Te=Se(e),X=Te(e),ge=!e[16]&&js(e),ie=e[6],x=[];for(let k=0;ke[56].call(De)),o(Ve,"class","input"),o(Ve,"type","number"),o(Ge,"class","input"),o(Ge,"type","number"),o(Oe,"class","flex gap-2"),o(Xe,"class","input grow"),o(Xe,"id","title"),o(St,"class","btn"),o(St,"type","submit"),o($e,"class","flex gap-1"),o(Lt,"class","flex flex-col gap-1")},m(r,v){_(r,t,v),_(r,n,v),_(r,l,v),i(l,s),i(l,u),i(l,b),i(l,p),i(l,f),i(l,c),i(l,z),_(r,y,v),_(r,W,v),_(r,M,v),_(r,m,v),i(m,C),i(C,P),i(C,G),G.checked=e[3],i(m,N),i(m,R),i(R,E),i(R,O),O.checked=e[2],i(m,de),i(m,F),i(F,B),i(F,U),U.checked=e[4],i(m,le),i(m,Q),i(Q,fe),i(Q,te),te.checked=e[5],i(m,se),i(m,J),i(J,g),i(J,A),A.checked=e[6],i(m,D),i(m,Z),i(Z,Le),i(Z,$),$.checked=e[7],_(r,me,v),_(r,Ie,v),_(r,he,v),_(r,ee,v),i(ee,ae),i(ae,_e),i(_e,Re),i(_e,oe),q(oe,e[14]),i(ae,be),i(ae,Se),i(Se,Te),i(Se,X),q(X,e[15]),i(ee,ge),i(ee,ie),i(ie,x),i(x,we),i(x,re),q(re,e[8]),i(ie,ke),i(ie,j),i(j,k),i(j,I),q(I,e[9]),i(ee,S),i(ee,ue),i(ue,st),i(st,Rt),i(st,ze),q(ze,e[10]),i(ue,Ht),i(ue,at),i(at,Nt),i(at,We),q(We,e[11]),i(ee,H),i(ee,Ee),i(Ee,Je),i(Je,wt),i(Je,ye),q(ye,e[12]),i(Ee,kt),i(Ee,Ke),i(Ke,Mt),i(Ke,ve),q(ve,e[13]),_(r,ot,v),_(r,rt,v),_(r,ut,v),_(r,pe,v),i(pe,Pe),i(Pe,Me),i(Me,Qe),i(Me,zt),i(Me,Ze),i(Ze,Wt),i(Ze,Hn),i(Me,yi),i(Me,qt),i(qt,vi),i(qt,Nn),i(Pe,wi),i(Pe,He),i(He,Ut),i(He,ki),i(He,xt),i(xt,Mi),i(xt,qn),i(He,zi),i(He,Vt),i(Vt,Wi),i(Vt,Fn),i(pe,Ci),i(pe,dt),i(dt,Ne),i(Ne,Xt),i(Ne,Li),i(Ne,Yt),i(Yt,Si),i(Yt,Un),i(Ne,Ti),i(Ne,Jt),i(Jt,Ei),i(Jt,xn),i(dt,Pi),i(dt,qe),i(qe,Qt),i(qe,Ai),i(qe,Zt),i(Zt,Oi),i(Zt,jn),i(qe,Di),i(qe,en),i(en,Ii),i(en,Vn),i(pe,Ri),i(pe,ft),i(ft,Fe),i(Fe,nn),i(Fe,Hi),i(Fe,ln),i(ln,Ni),i(ln,Gn),i(Fe,qi),i(Fe,an),i(an,Fi),i(an,Xn),i(ft,Ui),i(ft,Ue),i(Ue,rn),i(Ue,xi),i(Ue,un),i(un,ji),i(un,Yn),i(Ue,Vi),i(Ue,dn),i(dn,Gi),i(dn,Bn),i(pe,Xi),i(pe,mt),i(mt,xe),i(xe,mn),i(xe,Yi),i(xe,pn),i(pn,Bi),i(pn,Jn),i(xe,Ji),i(xe,_n),i(_n,Ki),i(_n,Kn),i(mt,Qi),i(mt,je),i(je,gn),i(je,Zi),i(je,yn),i(yn,$i),i(yn,Qn),i(je,el),i(je,wn),i(wn,tl),i(wn,Zn),_(r,$n,v),_(r,ei,v),_(r,ti,v),_(r,Ct,v),_(r,ni,v),_(r,Ae,v),i(Ae,Mn),i(Mn,pt),pt.checked=e[16],i(Mn,nl),i(Ae,il),i(Ae,zn),i(zn,ht),ht.checked=e[17],i(zn,ll),i(Ae,sl),i(Ae,Wn),i(Wn,_t),_t.checked=e[21],i(Wn,al),_(r,ii,v),_(r,Oe,v),i(Oe,Cn),i(Cn,ol),i(Cn,De);for(let ne=0;ne=1,z,y,W,M=c&&zl(e),m=e[1][e[0]]&&Cl(e);return{c(){t=a("div"),n=a("div"),l=a("input"),s=d(),u=a("button"),u.textContent="New window",b=d(),p=a("br"),f=d(),M&&M.c(),z=d(),m&&m.c(),o(l,"class","input grow"),o(l,"type","text"),o(l,"placeholder","New Window label.."),o(u,"class","btn"),o(n,"class","flex gap-1"),o(t,"class","flex flex-col children:grow gap-2")},m(C,P){_(C,t,P),i(t,n),i(n,l),q(l,e[22]),i(n,s),i(n,u),i(t,b),i(t,p),i(t,f),M&&M.m(t,null),i(t,z),m&&m.m(t,null),y||(W=[T(l,"input",e[36]),T(u,"click",e[33])],y=!0)},p(C,P){P[0]&4194304&&l.value!==C[22]&&q(l,C[22]),P[0]&2&&(c=Object.keys(C[1]).length>=1),c?M?M.p(C,P):(M=zl(C),M.c(),M.m(t,z)):M&&(M.d(1),M=null),C[1][C[0]]?m?m.p(C,P):(m=Cl(C),m.c(),m.m(t,null)):m&&(m.d(1),m=null)},i:V,o:V,d(C){C&&h(t),M&&M.d(),m&&m.d(),y=!1,Ce(W)}}}function Rs(e,t,n){let l=nt.label;const s={[nt.label]:nt},u=["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:b}=t,p,f=!0,c=!1,z=!0,y=!1,W=!0,M=!1,m=null,C=null,P=null,G=null,N=null,R=null,E=null,O=null,de=1,F=new Ye(E,O),B=new Ye(E,O),U=new tt(m,C),le=new tt(m,C),Q,fe,te=!1,se=!0,J=null,g=null,A="default",D=!1,Z="Awesome Tauri Example!";function Le(){s[l].setTitle(Z)}function $(){s[l].hide(),setTimeout(s[l].show,2e3)}function me(){s[l].minimize(),setTimeout(s[l].unminimize,2e3)}function Ie(){if(!p)return;const H=new it(p);n(1,s[p]=H,s),H.once("tauri://error",function(){b("Error creating new webview")})}function he(){s[l].innerSize().then(H=>{n(26,U=H),n(8,m=U.width),n(9,C=U.height)}),s[l].outerSize().then(H=>{n(27,le=H)})}function ee(){s[l].innerPosition().then(H=>{n(24,F=H)}),s[l].outerPosition().then(H=>{n(25,B=H),n(14,E=B.x),n(15,O=B.y)})}async function ae(H){!H||(Q&&Q(),fe&&fe(),fe=await H.listen("tauri://move",ee),Q=await H.listen("tauri://resize",he))}async function _e(){await s[l].minimize(),await s[l].requestUserAttention(bi.Critical),await new Promise(H=>setTimeout(H,3e3)),await s[l].requestUserAttention(null)}function Re(){p=this.value,n(22,p)}function oe(){l=_l(this),n(0,l),n(1,s)}const be=()=>s[l].center();function Se(){c=this.checked,n(3,c)}function Te(){f=this.checked,n(2,f)}function X(){z=this.checked,n(4,z)}function ge(){y=this.checked,n(5,y)}function ie(){W=this.checked,n(6,W)}function x(){M=this.checked,n(7,M)}function we(){E=Y(this.value),n(14,E)}function re(){O=Y(this.value),n(15,O)}function ke(){m=Y(this.value),n(8,m)}function j(){C=Y(this.value),n(9,C)}function k(){P=Y(this.value),n(10,P)}function I(){G=Y(this.value),n(11,G)}function S(){N=Y(this.value),n(12,N)}function ue(){R=Y(this.value),n(13,R)}function st(){te=this.checked,n(16,te)}function Rt(){se=this.checked,n(17,se)}function ze(){D=this.checked,n(21,D)}function Ht(){A=_l(this),n(20,A),n(29,u)}function at(){J=Y(this.value),n(18,J)}function Nt(){g=Y(this.value),n(19,g)}function We(){Z=this.value,n(28,Z)}return e.$$set=H=>{"onMessage"in H&&n(35,b=H.onMessage)},e.$$.update=()=>{var H,Ee,Je,wt,ye,kt,Ke,Mt,ve,ot,rt,ut,pe,Pe,Me,Qe,zt,Ze,Wt;e.$$.dirty[0]&3&&(s[l],ee(),he()),e.$$.dirty[0]&7&&((H=s[l])==null||H.setResizable(f)),e.$$.dirty[0]&11&&(c?(Ee=s[l])==null||Ee.maximize():(Je=s[l])==null||Je.unmaximize()),e.$$.dirty[0]&19&&((wt=s[l])==null||wt.setDecorations(z)),e.$$.dirty[0]&35&&((ye=s[l])==null||ye.setAlwaysOnTop(y)),e.$$.dirty[0]&67&&((kt=s[l])==null||kt.setContentProtected(W)),e.$$.dirty[0]&131&&((Ke=s[l])==null||Ke.setFullscreen(M)),e.$$.dirty[0]&771&&m&&C&&((Mt=s[l])==null||Mt.setSize(new tt(m,C))),e.$$.dirty[0]&3075&&(P&&G?(ve=s[l])==null||ve.setMinSize(new Rn(P,G)):(ot=s[l])==null||ot.setMinSize(null)),e.$$.dirty[0]&12291&&(N>800&&R>400?(rt=s[l])==null||rt.setMaxSize(new Rn(N,R)):(ut=s[l])==null||ut.setMaxSize(null)),e.$$.dirty[0]&49155&&E!==null&&O!==null&&((pe=s[l])==null||pe.setPosition(new Ye(E,O))),e.$$.dirty[0]&3&&((Pe=s[l])==null||Pe.scaleFactor().then(ct=>n(23,de=ct))),e.$$.dirty[0]&3&&ae(s[l]),e.$$.dirty[0]&65539&&((Me=s[l])==null||Me.setCursorGrab(te)),e.$$.dirty[0]&131075&&((Qe=s[l])==null||Qe.setCursorVisible(se)),e.$$.dirty[0]&1048579&&((zt=s[l])==null||zt.setCursorIcon(A)),e.$$.dirty[0]&786435&&J!==null&&g!==null&&((Ze=s[l])==null||Ze.setCursorPosition(new Ye(J,g))),e.$$.dirty[0]&2097155&&((Wt=s[l])==null||Wt.setIgnoreCursorEvents(D))},[l,s,f,c,z,y,W,M,m,C,P,G,N,R,E,O,te,se,J,g,A,D,p,de,F,B,U,le,Z,u,Le,$,me,Ie,_e,b,Re,oe,be,Se,Te,X,ge,ie,x,we,re,ke,j,k,I,S,ue,st,Rt,ze,Ht,at,Nt,We]}class Hs extends vt{constructor(t){super(),yt(this,t,Rs,Is,lt,{onMessage:35},null,[-1,-1,-1])}}function Ns(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
+ `,o(t,"class","flex flex-col gap-2")},m(n,l){_(n,t,l)},p:V,i:V,o:V,d(n){n&&h(t)}}}function qs(e,t,n){let{onMessage:l}=t;const s=window.constraints={audio:!0,video:!0};function u(p){const f=document.querySelector("video"),c=p.getVideoTracks();l("Got stream with constraints:",s),l(`Using video device: ${c[0].label}`),window.stream=p,f.srcObject=p}function b(p){if(p.name==="ConstraintNotSatisfiedError"){const f=s.video;l(`The resolution ${f.width.exact}x${f.height.exact} px is not supported by your device.`)}else p.name==="PermissionDeniedError"&&l("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.");l(`getUserMedia error: ${p.name}`,p)}return At(async()=>{try{const p=await navigator.mediaDevices.getUserMedia(s);u(p)}catch(p){b(p)}}),Hl(()=>{window.stream.getTracks().forEach(function(p){p.stop()})}),e.$$set=p=>{"onMessage"in p&&n(0,l=p.onMessage)},[l]}class Fs extends vt{constructor(t){super(),yt(this,t,qs,Ns,lt,{onMessage:0})}}function Sl(e,t,n){const l=e.slice();return l[29]=t[n],l}function Tl(e,t,n){const l=e.slice();return l[32]=t[n],l}function Us(e){let t,n,l,s,u,b,p,f,c,z,y,W,M;function m(E,O){return E[3]?js:xs}let C=m(e),P=C(e);function G(E,O){return E[2]?Gs:Vs}let N=G(e),R=N(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",l=d(),s=a("span"),u=a("span"),P.c(),p=d(),f=a("span"),f.innerHTML='
',c=d(),z=a("span"),R.c(),o(n,"class","lt-sm:pl-10 text-darkPrimaryText"),o(u,"title",b=e[3]?"Switch to Light mode":"Switch to Dark mode"),o(u,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(f,"title","Minimize"),o(f,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(z,"title",y=e[2]?"Restore":"Maximize"),o(z,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(s,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),o(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),o(t,"data-tauri-drag-region","")},m(E,O){_(E,t,O),i(t,n),i(t,l),i(t,s),i(s,u),P.m(u,null),i(s,p),i(s,f),i(s,c),i(s,z),R.m(z,null),W||(M=[T(u,"click",e[10]),T(f,"click",e[8]),T(z,"click",e[9])],W=!0)},p(E,O){C!==(C=m(E))&&(P.d(1),P=C(E),P&&(P.c(),P.m(u,null))),O[0]&8&&b!==(b=E[3]?"Switch to Light mode":"Switch to Dark mode")&&o(u,"title",b),N!==(N=G(E))&&(R.d(1),R=N(E),R&&(R.c(),R.m(z,null))),O[0]&4&&y!==(y=E[2]?"Restore":"Maximize")&&o(z,"title",y)},d(E){E&&h(t),P.d(),R.d(),W=!1,Ce(M)}}}function xs(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-moon")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function js(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-sun")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Vs(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-maximize")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Gs(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-restore")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Xs(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Ys(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,l){_(n,t,l)},d(n){n&&h(t)}}}function Bs(e){let t,n,l,s,u,b,p,f,c;function z(M,m){return M[3]?Ks:Js}let y=z(e),W=y(e);return{c(){t=a("a"),W.c(),n=d(),l=a("br"),s=d(),u=a("div"),b=d(),p=a("br"),o(t,"href","##"),o(t,"class","nv justify-between h-8"),o(u,"class","bg-white/5 h-2px")},m(M,m){_(M,t,m),W.m(t,null),_(M,n,m),_(M,l,m),_(M,s,m),_(M,u,m),_(M,b,m),_(M,p,m),f||(c=T(t,"click",e[10]),f=!0)},p(M,m){y!==(y=z(M))&&(W.d(1),W=y(M),W&&(W.c(),W.m(t,null)))},d(M){M&&h(t),W.d(),M&&h(n),M&&h(l),M&&h(s),M&&h(u),M&&h(b),M&&h(p),f=!1,c()}}}function Js(e){let t,n;return{c(){t=w(`Switch to Dark mode + `),n=a("div"),o(n,"class","i-ph-moon")},m(l,s){_(l,t,s),_(l,n,s)},d(l){l&&h(t),l&&h(n)}}}function Ks(e){let t,n;return{c(){t=w(`Switch to Light mode + `),n=a("div"),o(n,"class","i-ph-sun")},m(l,s){_(l,t,s),_(l,n,s)},d(l){l&&h(t),l&&h(n)}}}function Qs(e){let t,n,l,s,u=e[32].label+"",b,p,f,c;function z(){return e[18](e[32])}return{c(){t=a("a"),n=a("div"),l=d(),s=a("p"),b=w(u),o(n,"class",e[32].icon+" mr-2"),o(t,"href","##"),o(t,"class",p="nv "+(e[1]===e[32]?"nv_selected":""))},m(y,W){_(y,t,W),i(t,n),i(t,l),i(t,s),i(s,b),f||(c=T(t,"click",z),f=!0)},p(y,W){e=y,W[0]&2&&p!==(p="nv "+(e[1]===e[32]?"nv_selected":""))&&o(t,"class",p)},d(y){y&&h(t),f=!1,c()}}}function El(e){let t,n=e[32]&&Qs(e);return{c(){n&&n.c(),t=Il()},m(l,s){n&&n.m(l,s),_(l,t,s)},p(l,s){l[32]&&n.p(l,s)},d(l){n&&n.d(l),l&&h(t)}}}function Pl(e){let t,n=e[29].html+"",l;return{c(){t=new as(!1),l=Il(),t.a=l},m(s,u){t.m(n,s,u),_(s,l,u)},p(s,u){u[0]&32&&n!==(n=s[29].html+"")&&t.p(n)},d(s){s&&h(l),s&&t.d()}}}function Zs(e){let t,n,l,s,u,b,p,f,c,z,y,W,M,m,C,P,G,N,R,E,O,de,F,B,U,le,Q=e[1].label+"",fe,te,se,J,g,A,D,Z,Le,$,me,Ie,he,ee,ae,_e,Re,oe,be=e[16]&&Us(e);function Se(k,I){return k[0]?Ys:Xs}let Te=Se(e),X=Te(e),ge=!e[16]&&Bs(e),ie=e[6],x=[];for(let k=0;k`,y=d(),W=a("a"),W.innerHTML=`GitHub `,M=d(),m=a("a"),m.innerHTML=`Source - `,L=d(),P=a("br"),G=d(),N=a("div"),R=d(),E=a("br"),D=d(),de=a("div");for(let k=0;k',ee=d(),ae=a("div");for(let k=0;k{fi(S,1)}),rs()}we?(g=new we(re(k)),gl(g.$$.fragment),ci(g.$$.fragment,1),di(g,J,null)):g=null}if(I[0]&32){ke=k[5];let S;for(S=0;S{L(`File drop: ${JSON.stringify(g.payload)}`)});const s=navigator.userAgent.toLowerCase(),u=s.includes("android")||s.includes("iphone"),b=[{label:"Welcome",component:Ms,icon:"i-ph-hand-waving"},{label:"Communication",component:Ts,icon:"i-codicon-radio-tower"},!u&&{label:"CLI",component:Ls,icon:"i-codicon-terminal"},!u&&{label:"Window",component:As,icon:"i-codicon-window"},{label:"WebRTC",component:Is,icon:"i-ph-broadcast"}];let p=b[0];function f(g){n(1,p=g)}let c;Et(async()=>{const g=An();n(2,c=await g.isMaximized()),hi("tauri://resize",async()=>{n(2,c=await g.isMaximized())})});function z(){An().minimize()}async function y(){const g=An();await g.isMaximized()?g.unmaximize():g.maximize()}let W;Et(()=>{n(3,W=localStorage&&localStorage.getItem("theme")=="dark"),Pl(W)});function M(){n(3,W=!W),Pl(W)}let m=cs([]);$l(e,m,g=>n(5,l=g));function L(g){m.update(A=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof g=="string"?g:JSON.stringify(g,null,1))+"
"},...A])}function P(g){m.update(A=>[{html:`
[${new Date().toLocaleTimeString()}]: `+g+"
"},...A])}function G(){m.update(()=>[])}let N,R,E;function D(g){E=g.clientY;const A=window.getComputedStyle(N);R=parseInt(A.height,10);const O=Ce=>{const $=Ce.clientY-E,me=R-$;n(4,N.style.height=`${me{document.removeEventListener("mouseup",Z),document.removeEventListener("mousemove",O)};document.addEventListener("mouseup",Z),document.addEventListener("mousemove",O)}const de=navigator.appVersion.includes("Win");let q=!1,B,F,le=!1,Q=0,fe=0;const te=(g,A,O)=>Math.min(Math.max(A,g),O);Et(()=>{n(17,B=document.querySelector("#sidebar")),F=document.querySelector("#sidebarToggle"),document.addEventListener("click",g=>{F.contains(g.target)?n(0,q=!q):q&&!B.contains(g.target)&&n(0,q=!1)}),document.addEventListener("touchstart",g=>{if(F.contains(g.target))return;const A=g.touches[0].clientX;(0{if(le){const A=g.touches[0].clientX;fe=A;const O=(A-Q)/10;B.style.setProperty("--translate-x",`-${te(0,q?0-O:18.75-O,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(le){const g=(fe-Q)/10;n(0,q=q?g>-(18.75/2):g>18.75/2)}le=!1})});const se=g=>{f(g),n(0,q=!1)};function J(g){ri[g?"unshift":"push"](()=>{N=g,n(4,N)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const g=document.querySelector("#sidebar");g&&Bs(g,q)}},[q,p,c,W,N,l,b,f,z,y,M,m,L,P,G,D,de,B,se,J]}class Ks extends yt{constructor(t){super(),gt(this,t,Js,Ys,it,{},null,[-1,-1])}}new Ks({target:document.querySelector("#app")}); + `,C=d(),P=a("br"),G=d(),N=a("div"),R=d(),E=a("br"),O=d(),de=a("div");for(let k=0;k',ee=d(),ae=a("div");for(let k=0;k{mi(S,1)}),ds()}we?(g=new we(re(k)),yl(g.$$.fragment),di(g.$$.fragment,1),fi(g,J,null)):g=null}if(I[0]&32){ke=k[5];let S;for(S=0;S{C(`File drop: ${JSON.stringify(g.payload)}`)});const s=navigator.userAgent.toLowerCase(),u=s.includes("android")||s.includes("iphone"),b=[{label:"Welcome",component:Ss,icon:"i-ph-hand-waving"},{label:"Communication",component:Ds,icon:"i-codicon-radio-tower"},!u&&{label:"CLI",component:Ps,icon:"i-codicon-terminal"},!u&&{label:"Window",component:Hs,icon:"i-codicon-window"},{label:"WebRTC",component:Fs,icon:"i-ph-broadcast"}];let p=b[0];function f(g){n(1,p=g)}let c;At(async()=>{const g=On();n(2,c=await g.isMaximized()),_i("tauri://resize",async()=>{n(2,c=await g.isMaximized())})});function z(){On().minimize()}async function y(){const g=On();await g.isMaximized()?g.unmaximize():g.maximize()}let W;At(()=>{n(3,W=localStorage&&localStorage.getItem("theme")=="dark"),Ol(W)});function M(){n(3,W=!W),Ol(W)}let m=ms([]);ns(e,m,g=>n(5,l=g));function C(g){m.update(A=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof g=="string"?g:JSON.stringify(g,null,1))+"
"},...A])}function P(g){m.update(A=>[{html:`
[${new Date().toLocaleTimeString()}]: `+g+"
"},...A])}function G(){m.update(()=>[])}let N,R,E;function O(g){E=g.clientY;const A=window.getComputedStyle(N);R=parseInt(A.height,10);const D=Le=>{const $=Le.clientY-E,me=R-$;n(4,N.style.height=`${me{document.removeEventListener("mouseup",Z),document.removeEventListener("mousemove",D)};document.addEventListener("mouseup",Z),document.addEventListener("mousemove",D)}const de=navigator.appVersion.includes("Win");let F=!1,B,U,le=!1,Q=0,fe=0;const te=(g,A,D)=>Math.min(Math.max(A,g),D);At(()=>{n(17,B=document.querySelector("#sidebar")),U=document.querySelector("#sidebarToggle"),document.addEventListener("click",g=>{U.contains(g.target)?n(0,F=!F):F&&!B.contains(g.target)&&n(0,F=!1)}),document.addEventListener("touchstart",g=>{if(U.contains(g.target))return;const A=g.touches[0].clientX;(0{if(le){const A=g.touches[0].clientX;fe=A;const D=(A-Q)/10;B.style.setProperty("--translate-x",`-${te(0,F?0-D:18.75-D,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(le){const g=(fe-Q)/10;n(0,F=F?g>-(18.75/2):g>18.75/2)}le=!1})});const se=g=>{f(g),n(0,F=!1)};function J(g){ui[g?"unshift":"push"](()=>{N=g,n(4,N)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const g=document.querySelector("#sidebar");g&&$s(g,F)}},[F,p,c,W,N,l,b,f,z,y,M,m,C,P,G,O,de,B,se,J]}class ta extends vt{constructor(t){super(),yt(this,t,ea,Zs,lt,{},null,[-1,-1])}}new ta({target:document.querySelector("#app")}); diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 26c44f94495..a64a1f89ddb 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -1895,12 +1895,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minisign-verify" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" - [[package]] name = "miniz_oxide" version = "0.7.1" @@ -2083,17 +2077,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -[[package]] -name = "os_info" -version = "3.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" -dependencies = [ - "log", - "serde", - "winapi", -] - [[package]] name = "overload" version = "0.1.1" @@ -3059,7 +3042,6 @@ name = "tauri" version = "2.0.0-alpha.8" dependencies = [ "anyhow", - "base64 0.21.0", "bytes", "cocoa", "dirs-next", @@ -3078,10 +3060,8 @@ dependencies = [ "jni", "libc", "log", - "minisign-verify", "objc", "once_cell", - "os_info", "percent-encoding", "png", "rand 0.8.5", @@ -3102,14 +3082,12 @@ dependencies = [ "tauri-utils", "tempfile", "thiserror", - "time", "tokio", "url", "uuid", "webkit2gtk", "webview2-com", "windows 0.44.0", - "zip", ] [[package]] @@ -4252,14 +4230,3 @@ checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" dependencies = [ "libc", ] - -[[package]] -name = "zip" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e92305c174683d78035cbf1b70e18db6329cc0f1b9cae0a52ca90bf5bfe7125" -dependencies = [ - "byteorder", - "crc32fast", - "crossbeam-utils", -] diff --git a/tooling/api/docs/js-api.json b/tooling/api/docs/js-api.json index 41560461d72..820c877a976 100644 --- a/tooling/api/docs/js-api.json +++ b/tooling/api/docs/js-api.json @@ -1 +1 @@ -{"id":0,"name":"@tauri-apps/api","kind":1,"flags":{},"originalName":"","children":[{"id":1,"name":"event","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"The event system allows you to emit events to the backend and listen to events from it.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.event`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":3,"name":"TauriEvent","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":16,"name":"MENU","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L33"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":10,"name":"WINDOW_BLUR","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":27,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L27"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":6,"name":"WINDOW_CLOSE_REQUESTED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":23,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L23"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":7,"name":"WINDOW_CREATED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L24"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":8,"name":"WINDOW_DESTROYED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L25"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":13,"name":"WINDOW_FILE_DROP","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":30,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L30"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":15,"name":"WINDOW_FILE_DROP_CANCELLED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L32"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":14,"name":"WINDOW_FILE_DROP_HOVER","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":31,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L31"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":9,"name":"WINDOW_FOCUS","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":26,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L26"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":5,"name":"WINDOW_MOVED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L22"}],"type":{"type":"literal","value":"tauri://move"}},{"id":4,"name":"WINDOW_RESIZED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":21,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L21"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":11,"name":"WINDOW_SCALE_FACTOR_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":28,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L28"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":12,"name":"WINDOW_THEME_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L29"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[16,10,6,7,8,13,15,14,9,5,4,11,12]}],"sources":[{"fileName":"event.ts","line":20,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L20"}]},{"id":641,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":642,"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/0da817062/tooling/api/src/helpers/event.ts#L12"}],"type":{"type":"reference","id":2,"name":"EventName"}},{"id":644,"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/0da817062/tooling/api/src/helpers/event.ts#L16"}],"type":{"type":"intrinsic","name":"number"}},{"id":645,"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/0da817062/tooling/api/src/helpers/event.ts#L18"}],"type":{"type":"reference","id":646,"name":"T"}},{"id":643,"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/0da817062/tooling/api/src/helpers/event.ts#L14"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[642,644,645,643]}],"sources":[{"fileName":"helpers/event.ts","line":10,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/helpers/event.ts#L10"}],"typeParameters":[{"id":646,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":647,"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/0da817062/tooling/api/src/helpers/event.ts#L21"}],"typeParameters":[{"id":651,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":648,"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/0da817062/tooling/api/src/helpers/event.ts#L21"}],"signatures":[{"id":649,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":650,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":641,"typeArguments":[{"type":"reference","id":651,"name":"T"}],"name":"Event"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":2,"name":"EventName","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"event.ts","line":15,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L15"}],"type":{"type":"union","types":[{"type":"template-literal","head":"","tail":[[{"type":"reference","id":3,"name":"TauriEvent"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","qualifiedName":"Record","package":"typescript"}]}]}},{"id":652,"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/0da817062/tooling/api/src/helpers/event.ts#L23"}],"type":{"type":"reflection","declaration":{"id":653,"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/0da817062/tooling/api/src/helpers/event.ts#L23"}],"signatures":[{"id":654,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":27,"name":"emit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":107,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L107"}],"signatures":[{"id":28,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { emit } from '@tauri-apps/api/event';\nawait emit('frontend-loaded', { loggedIn: true, token: 'authToken' });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":29,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":30,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":17,"name":"listen","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":57,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L57"}],"signatures":[{"id":18,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { listen } from '@tauri-apps/api/event';\nconst unlisten = await listen('error', (event) => {\n console.log(`Got error in window ${event.windowLabel}, payload: ${event.payload}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":19,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":20,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":21,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":19,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":22,"name":"once","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":88,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L88"}],"signatures":[{"id":23,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { once } from '@tauri-apps/api/event';\ninterface LoadedPayload {\n loggedIn: boolean,\n token: string\n}\nconst unlisten = await once('loaded', (event) => {\n console.log(`App is loaded, loggedIn: ${event.payload.loggedIn}, token: ${event.payload.token}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":24,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":25,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":26,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":24,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[3]},{"title":"Interfaces","children":[641]},{"title":"Type Aliases","children":[647,2,652]},{"title":"Functions","children":[27,17,22]}],"sources":[{"fileName":"event.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/event.ts#L12"}]},{"id":31,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":43,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":171,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/mocks.ts#L171"}],"signatures":[{"id":44,"name":"clearMocks","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Clears mocked functions/data injected by the other functions in this module.\nWhen using a test runner that doesn't provide a fresh window object for each test, calling this function will reset tauri specific properties.\n\n# Example\n\n"},{"kind":"code","text":"```js\nimport { mockWindows, clearMocks } from \"@tauri-apps/api/mocks\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked windows\", () => {\n mockWindows(\"main\", \"second\", \"third\");\n\n expect(window).toHaveProperty(\"__TAURI_METADATA__\")\n})\n\ntest(\"no mocked windows\", () => {\n expect(window).not.toHaveProperty(\"__TAURI_METADATA__\")\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"intrinsic","name":"void"}}]},{"id":32,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":65,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/mocks.ts#L65"}],"signatures":[{"id":33,"name":"mockIPC","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Intercepts all IPC requests with the given mock handler.\n\nThis function can be used when testing tauri frontend applications or when running the frontend in a Node.js context during static site generation.\n\n# Examples\n\nTesting setup using vitest:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n switch (cmd) {\n case \"add\":\n return (args.a as number) + (args.b as number);\n default:\n break;\n }\n });\n\n expect(invoke('add', { a: 12, b: 15 })).resolves.toBe(27);\n})\n```"},{"kind":"text","text":"\n\nThe callback function can also return a Promise:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n if(cmd === \"get_data\") {\n return fetch(\"https://example.com/data.json\")\n .then((response) => response.json())\n }\n });\n\n expect(invoke('get_data')).resolves.toBe({ foo: 'bar' });\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":34,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":35,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":66,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/mocks.ts#L66"}],"signatures":[{"id":36,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":37,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":38,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":39,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":135,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/mocks.ts#L135"}],"signatures":[{"id":40,"name":"mockWindows","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Mocks one or many window labels.\nIn non-tauri context it is required to call this function *before* using the "},{"kind":"code","text":"`@tauri-apps/api/window`"},{"kind":"text","text":" module.\n\nThis function only mocks the *presence* of windows,\nwindow properties (e.g. width and height) can be mocked like regular IPC calls using the "},{"kind":"code","text":"`mockIPC`"},{"kind":"text","text":" function.\n\n# Examples\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\nimport { getCurrent } from \"@tauri-apps/api/window\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nconst win = getCurrent();\n\nwin.label // \"main\"\n```"},{"kind":"text","text":"\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nmockIPC((cmd, args) => {\n if (cmd === \"tauri\") {\n if (\n args?.__tauriModule === \"Window\" &&\n args?.message?.cmd === \"manage\" &&\n args?.message?.data?.cmd?.type === \"close\"\n ) {\n console.log('closing window!');\n }\n }\n});\n\nconst { getCurrent } = await import(\"@tauri-apps/api/window\");\n\nconst win = getCurrent();\nawait win.close(); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":41,"name":"current","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":42,"name":"additionalWindows","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"Label of additional windows the app has."}]},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Functions","children":[43,32,39]}],"sources":[{"fileName":"mocks.ts","line":5,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/mocks.ts#L5"}]},{"id":45,"name":"path","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"The path module provides utilities for working with file and directory paths.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.path`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":".\n\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.path`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.path) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"path\": {\n \"all\": true, // enable all Path APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":46,"name":"BaseDirectory","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":62,"name":"AppCache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L48"}],"type":{"type":"literal","value":16}},{"id":59,"name":"AppConfig","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":45,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L45"}],"type":{"type":"literal","value":13}},{"id":60,"name":"AppData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":46,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L46"}],"type":{"type":"literal","value":14}},{"id":61,"name":"AppLocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L47"}],"type":{"type":"literal","value":15}},{"id":63,"name":"AppLog","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L49"}],"type":{"type":"literal","value":17}},{"id":47,"name":"Audio","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L33"}],"type":{"type":"literal","value":1}},{"id":48,"name":"Cache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L34"}],"type":{"type":"literal","value":2}},{"id":49,"name":"Config","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L35"}],"type":{"type":"literal","value":3}},{"id":50,"name":"Data","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L36"}],"type":{"type":"literal","value":4}},{"id":64,"name":"Desktop","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L51"}],"type":{"type":"literal","value":18}},{"id":52,"name":"Document","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L38"}],"type":{"type":"literal","value":6}},{"id":53,"name":"Download","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L39"}],"type":{"type":"literal","value":7}},{"id":65,"name":"Executable","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L52"}],"type":{"type":"literal","value":19}},{"id":66,"name":"Font","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L53"}],"type":{"type":"literal","value":20}},{"id":67,"name":"Home","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L54"}],"type":{"type":"literal","value":21}},{"id":51,"name":"LocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L37"}],"type":{"type":"literal","value":5}},{"id":54,"name":"Picture","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L40"}],"type":{"type":"literal","value":8}},{"id":55,"name":"Public","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L41"}],"type":{"type":"literal","value":9}},{"id":57,"name":"Resource","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L43"}],"type":{"type":"literal","value":11}},{"id":68,"name":"Runtime","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L55"}],"type":{"type":"literal","value":22}},{"id":58,"name":"Temp","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":44,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L44"}],"type":{"type":"literal","value":12}},{"id":69,"name":"Template","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L56"}],"type":{"type":"literal","value":23}},{"id":56,"name":"Video","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L42"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[62,59,60,61,63,47,48,49,50,64,52,53,65,66,67,51,54,55,57,68,58,69,56]}],"sources":[{"fileName":"path.ts","line":32,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L32"}]},{"id":118,"name":"delimiter","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides the platform-specific path segment delimiter:\n- "},{"kind":"code","text":"`;`"},{"kind":"text","text":" on Windows\n- "},{"kind":"code","text":"`:`"},{"kind":"text","text":" on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":555,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L555"}],"type":{"type":"union","types":[{"type":"literal","value":";"},{"type":"literal","value":":"}]},"defaultValue":"..."},{"id":117,"name":"sep","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides the platform-specific path segment separator:\n- "},{"kind":"code","text":"`\\` on Windows\n- `"},{"kind":"text","text":"/` on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":546,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L546"}],"type":{"type":"union","types":[{"type":"literal","value":"\\"},{"type":"literal","value":"/"}]},"defaultValue":"..."},{"id":76,"name":"appCacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":121,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L121"}],"signatures":[{"id":77,"name":"appCacheDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's cache files.\nResolves to "},{"kind":"code","text":"`${cacheDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appCacheDir } from '@tauri-apps/api/path';\nconst appCacheDirPath = await appCacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":70,"name":"appConfigDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":70,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L70"}],"signatures":[{"id":71,"name":"appConfigDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's config files.\nResolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appConfigDir } from '@tauri-apps/api/path';\nconst appConfigDirPath = await appConfigDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":72,"name":"appDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L87"}],"signatures":[{"id":73,"name":"appDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's data files.\nResolves to "},{"kind":"code","text":"`${dataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":74,"name":"appLocalDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":104,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L104"}],"signatures":[{"id":75,"name":"appLocalDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's local data files.\nResolves to "},{"kind":"code","text":"`${localDataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLocalDataDir } from '@tauri-apps/api/path';\nconst appLocalDataDirPath = await appLocalDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":78,"name":"appLogDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":533,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L533"}],"signatures":[{"id":79,"name":"appLogDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's log files.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`${homeDir}/Library/Logs/{bundleIdentifier}`"},{"kind":"text","text":"\n- **Windows:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLogDir } from '@tauri-apps/api/path';\nconst appLogDirPath = await appLogDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":80,"name":"audioDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":143,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L143"}],"signatures":[{"id":81,"name":"audioDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's audio directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_MUSIC_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Music`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Music}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { audioDir } from '@tauri-apps/api/path';\nconst audioDirPath = await audioDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":134,"name":"basename","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":647,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L647"}],"signatures":[{"id":135,"name":"basename","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the last portion of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { basename, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst base = await basename(resourcePath);\nassert(base === 'app.conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":136,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":137,"name":"ext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional file extension to be removed from the returned path."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":82,"name":"cacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":165,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L165"}],"signatures":[{"id":83,"name":"cacheDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's cache directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CACHE_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.cache`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Caches`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { cacheDir } from '@tauri-apps/api/path';\nconst cacheDirPath = await cacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":84,"name":"configDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":187,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L187"}],"signatures":[{"id":85,"name":"configDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's config directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CONFIG_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.config`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { configDir } from '@tauri-apps/api/path';\nconst configDirPath = await configDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":86,"name":"dataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":209,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L209"}],"signatures":[{"id":87,"name":"dataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dataDir } from '@tauri-apps/api/path';\nconst dataDirPath = await dataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":88,"name":"desktopDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":231,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L231"}],"signatures":[{"id":89,"name":"desktopDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's desktop directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DESKTOP_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Desktop`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Desktop}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { desktopDir } from '@tauri-apps/api/path';\nconst desktopPath = await desktopDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":128,"name":"dirname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":613,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L613"}],"signatures":[{"id":129,"name":"dirname","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the directory name of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dirname, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst dir = await dirname(appDataDirPath);\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":130,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":90,"name":"documentDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":253,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L253"}],"signatures":[{"id":91,"name":"documentDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's document directory."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { documentDir } from '@tauri-apps/api/path';\nconst documentDirPath = await documentDir();\n```"},{"kind":"text","text":"\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOCUMENTS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Documents`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Documents}`"},{"kind":"text","text":"."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":92,"name":"downloadDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":275,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L275"}],"signatures":[{"id":93,"name":"downloadDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's download directory.\n\n#### Platform-specific\n\n- **Linux**: Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOWNLOAD_DIR`"},{"kind":"text","text":".\n- **macOS**: Resolves to "},{"kind":"code","text":"`$HOME/Downloads`"},{"kind":"text","text":".\n- **Windows**: Resolves to "},{"kind":"code","text":"`{FOLDERID_Downloads}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { downloadDir } from '@tauri-apps/api/path';\nconst downloadDirPath = await downloadDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":94,"name":"executableDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":297,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L297"}],"signatures":[{"id":95,"name":"executableDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's executable directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_BIN_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$XDG_DATA_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/bin`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { executableDir } from '@tauri-apps/api/path';\nconst executableDirPath = await executableDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":131,"name":"extname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":629,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L629"}],"signatures":[{"id":132,"name":"extname","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the extension of the "},{"kind":"code","text":"`path`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { extname, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst ext = await extname(resourcePath);\nassert(ext === 'conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":133,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":96,"name":"fontDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":319,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L319"}],"signatures":[{"id":97,"name":"fontDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's font directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME/fonts`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share/fonts`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Fonts`"},{"kind":"text","text":".\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { fontDir } from '@tauri-apps/api/path';\nconst fontDirPath = await fontDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":98,"name":"homeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":341,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L341"}],"signatures":[{"id":99,"name":"homeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's home directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Profile}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { homeDir } from '@tauri-apps/api/path';\nconst homeDirPath = await homeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":138,"name":"isAbsolute","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":661,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L661"}],"signatures":[{"id":139,"name":"isAbsolute","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns whether the path is absolute or not."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isAbsolute } from '@tauri-apps/api/path';\nassert(await isAbsolute('/home/tauri'));\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":140,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":125,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":598,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L598"}],"signatures":[{"id":126,"name":"join","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Joins all given "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments together using the platform-specific separator as a delimiter, then normalizes the resulting path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { join, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await join(appDataDirPath, 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":127,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":100,"name":"localDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":363,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L363"}],"signatures":[{"id":101,"name":"localDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's local data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { localDataDir } from '@tauri-apps/api/path';\nconst localDataDirPath = await localDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":122,"name":"normalize","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":583,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L583"}],"signatures":[{"id":123,"name":"normalize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Normalizes the given "},{"kind":"code","text":"`path`"},{"kind":"text","text":", resolving "},{"kind":"code","text":"`'..'`"},{"kind":"text","text":" and "},{"kind":"code","text":"`'.'`"},{"kind":"text","text":" segments and resolve symbolic links."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { normalize, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await normalize(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":124,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":102,"name":"pictureDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":385,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L385"}],"signatures":[{"id":103,"name":"pictureDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's picture directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PICTURES_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Pictures`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Pictures}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { pictureDir } from '@tauri-apps/api/path';\nconst pictureDirPath = await pictureDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":104,"name":"publicDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":407,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L407"}],"signatures":[{"id":105,"name":"publicDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's public directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PUBLICSHARE_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Public`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Public}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { publicDir } from '@tauri-apps/api/path';\nconst publicDirPath = await publicDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":119,"name":"resolve","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":568,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L568"}],"signatures":[{"id":120,"name":"resolve","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resolves a sequence of "},{"kind":"code","text":"`paths`"},{"kind":"text","text":" or "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments into an absolute path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolve, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await resolve(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":121,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":108,"name":"resolveResource","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":444,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L444"}],"signatures":[{"id":109,"name":"resolveResource","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resolve the path to a resource file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('script.sh');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The full path to the resource."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":110,"name":"resourcePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The path to the resource.\nMust follow the same syntax as defined in "},{"kind":"code","text":"`tauri.conf.json > tauri > bundle > resources`"},{"kind":"text","text":", i.e. keeping subfolders and parent dir components ("},{"kind":"code","text":"`../`"},{"kind":"text","text":")."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":106,"name":"resourceDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":424,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L424"}],"signatures":[{"id":107,"name":"resourceDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the application's resource directory.\nTo resolve a resource path, see the [[resolveResource | "},{"kind":"code","text":"`resolveResource API`"},{"kind":"text","text":"]]."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resourceDir } from '@tauri-apps/api/path';\nconst resourceDirPath = await resourceDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":111,"name":"runtimeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":467,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L467"}],"signatures":[{"id":112,"name":"runtimeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's runtime directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_RUNTIME_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { runtimeDir } from '@tauri-apps/api/path';\nconst runtimeDirPath = await runtimeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":113,"name":"templateDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":489,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L489"}],"signatures":[{"id":114,"name":"templateDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's template directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_TEMPLATES_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Templates}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { templateDir } from '@tauri-apps/api/path';\nconst templateDirPath = await templateDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":115,"name":"videoDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":511,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L511"}],"signatures":[{"id":116,"name":"videoDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's video directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_VIDEOS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Movies`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Videos}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { videoDir } from '@tauri-apps/api/path';\nconst videoDirPath = await videoDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[46]},{"title":"Variables","children":[118,117]},{"title":"Functions","children":[76,70,72,74,78,80,134,82,84,86,88,128,90,92,94,131,96,98,138,125,100,122,102,104,119,108,106,111,113,115]}],"sources":[{"fileName":"path.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/path.ts#L26"}]},{"id":141,"name":"tauri","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Invoke your custom commands.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.tauri`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":150,"name":"Channel","kind":128,"kindString":"Class","flags":{},"children":[{"id":151,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"tauri.ts","line":66,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L66"}],"signatures":[{"id":152,"name":"new Channel","kind":16384,"kindString":"Constructor signature","flags":{},"typeParameter":[{"id":153,"name":"T","kind":131072,"kindString":"Type parameter","flags":{},"default":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","id":150,"typeArguments":[{"type":"reference","id":153,"name":"T"}],"name":"Channel"}}]},{"id":156,"name":"#onmessage","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"tauri.ts","line":62,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L62"}],"type":{"type":"reflection","declaration":{"id":157,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":62,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L62"}],"signatures":[{"id":158,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":159,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":153,"name":"T"}}],"type":{"type":"intrinsic","name":"void"}}]}},"defaultValue":"..."},{"id":155,"name":"__TAURI_CHANNEL_MARKER__","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isReadonly":true},"sources":[{"fileName":"tauri.ts","line":61,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L61"}],"type":{"type":"literal","value":true},"defaultValue":"true"},{"id":154,"name":"id","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"tauri.ts","line":59,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L59"}],"type":{"type":"intrinsic","name":"number"}},{"id":160,"name":"onmessage","kind":262144,"kindString":"Accessor","flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L72"},{"fileName":"tauri.ts","line":76,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L76"}],"getSignature":{"id":161,"name":"onmessage","kind":524288,"kindString":"Get signature","flags":{},"type":{"type":"reflection","declaration":{"id":162,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":76,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L76"}],"signatures":[{"id":163,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":164,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":153,"name":"T"}}],"type":{"type":"intrinsic","name":"void"}}]}}},"setSignature":{"id":165,"name":"onmessage","kind":1048576,"kindString":"Set signature","flags":{},"parameters":[{"id":166,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":167,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L72"}],"signatures":[{"id":168,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":169,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":153,"name":"T"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"intrinsic","name":"void"}}},{"id":170,"name":"toJSON","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"tauri.ts","line":80,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L80"}],"signatures":[{"id":171,"name":"toJSON","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"string"}}]}],"groups":[{"title":"Constructors","children":[151]},{"title":"Properties","children":[156,155,154]},{"title":"Accessors","children":[160]},{"title":"Methods","children":[170]}],"sources":[{"fileName":"tauri.ts","line":58,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L58"}],"typeParameters":[{"id":172,"name":"T","kind":131072,"kindString":"Type parameter","flags":{},"default":{"type":"intrinsic","name":"unknown"}}]},{"id":142,"name":"InvokeArgs","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":90,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L90"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":178,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":156,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L156"}],"signatures":[{"id":179,"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":180,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":181,"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":173,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":106,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L106"}],"signatures":[{"id":174,"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":175,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":176,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":177,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":142,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":175,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":143,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":144,"name":"transformCallback","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Transforms a callback function to a string identifier that can be passed to the backend.\nThe backend uses the identifier to "},{"kind":"code","text":"`eval()`"},{"kind":"text","text":" the callback."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A unique identifier associated with the callback function."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":145,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":146,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":147,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":148,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":149,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Classes","children":[150]},{"title":"Type Aliases","children":[142]},{"title":"Functions","children":[178,173,143]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/tauri.ts#L13"}]},{"id":182,"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":583,"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":584,"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/0da817062/tooling/api/src/window.ts#L226"}],"type":{"type":"literal","value":1}},{"id":585,"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/0da817062/tooling/api/src/window.ts#L232"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[584,585]}],"sources":[{"fileName":"window.ts","line":220,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L220"}]},{"id":528,"name":"CloseRequestedEvent","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":529,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":1971,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1971"}],"signatures":[{"id":530,"name":"new CloseRequestedEvent","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":531,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":641,"typeArguments":[{"type":"literal","value":null}],"name":"Event"}}],"type":{"type":"reference","id":528,"name":"CloseRequestedEvent"}}]},{"id":535,"name":"_preventDefault","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"window.ts","line":1969,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1969"}],"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"},{"id":532,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"window.ts","line":1964,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1964"}],"type":{"type":"reference","id":2,"name":"EventName"}},{"id":534,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"window.ts","line":1968,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1968"}],"type":{"type":"intrinsic","name":"number"}},{"id":533,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"window.ts","line":1966,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1966"}],"type":{"type":"intrinsic","name":"string"}},{"id":538,"name":"isPreventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1981,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1981"}],"signatures":[{"id":539,"name":"isPreventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"boolean"}}]},{"id":536,"name":"preventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1977,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1977"}],"signatures":[{"id":537,"name":"preventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[529]},{"title":"Properties","children":[535,532,534,533]},{"title":"Methods","children":[538,536]}],"sources":[{"fileName":"window.ts","line":1962,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1962"}]},{"id":564,"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":565,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L164"}],"signatures":[{"id":566,"name":"new LogicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":567,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":568,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":564,"name":"LogicalPosition"}}]},{"id":569,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L160"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":570,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L161"}],"type":{"type":"intrinsic","name":"number"}},{"id":571,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":162,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L162"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[565]},{"title":"Properties","children":[569,570,571]}],"sources":[{"fileName":"window.ts","line":159,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L159"}]},{"id":545,"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":546,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":118,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L118"}],"signatures":[{"id":547,"name":"new LogicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":548,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":549,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":545,"name":"LogicalSize"}}]},{"id":552,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L116"}],"type":{"type":"intrinsic","name":"number"}},{"id":550,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":114,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L114"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":551,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L115"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[546]},{"title":"Properties","children":[552,550,551]}],"sources":[{"fileName":"window.ts","line":113,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L113"}]},{"id":572,"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":573,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":180,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L180"}],"signatures":[{"id":574,"name":"new PhysicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":575,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":576,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":572,"name":"PhysicalPosition"}}]},{"id":577,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L176"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":578,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L177"}],"type":{"type":"intrinsic","name":"number"}},{"id":579,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":178,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L178"}],"type":{"type":"intrinsic","name":"number"}},{"id":580,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L195"}],"signatures":[{"id":581,"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":582,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":564,"name":"LogicalPosition"}}]}],"groups":[{"title":"Constructors","children":[573]},{"title":"Properties","children":[577,578,579]},{"title":"Methods","children":[580]}],"sources":[{"fileName":"window.ts","line":175,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L175"}]},{"id":553,"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":554,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":134,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L134"}],"signatures":[{"id":555,"name":"new PhysicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":556,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":557,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":553,"name":"PhysicalSize"}}]},{"id":560,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L132"}],"type":{"type":"intrinsic","name":"number"}},{"id":558,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L130"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":559,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L131"}],"type":{"type":"intrinsic","name":"number"}},{"id":561,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L149"}],"signatures":[{"id":562,"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":563,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":545,"name":"LogicalSize"}}]}],"groups":[{"title":"Constructors","children":[554]},{"title":"Properties","children":[560,558,559]},{"title":"Methods","children":[561]}],"sources":[{"fileName":"window.ts","line":129,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L129"}]},{"id":185,"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":189,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":2039,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2039"}],"signatures":[{"id":190,"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":191,"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":192,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":611,"name":"WindowOptions"},"defaultValue":"{}"}],"type":{"type":"reference","id":185,"name":"WebviewWindow"},"overwrites":{"type":"reference","name":"WindowManager.constructor"}}],"overwrites":{"type":"reference","name":"WindowManager.constructor"}},{"id":325,"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/0da817062/tooling/api/src/window.ts#L316"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","name":"WindowManager.label"}},{"id":326,"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/0da817062/tooling/api/src/window.ts#L318"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"reference","id":647,"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"EventCallback"}}],"name":"Record","qualifiedName":"Record","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listeners"}},{"id":219,"name":"center","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":780,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L780"}],"signatures":[{"id":220,"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":244,"name":"close","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1081,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1081"}],"signatures":[{"id":245,"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":337,"name":"emit","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":400,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L400"}],"signatures":[{"id":338,"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":339,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":340,"name":"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":242,"name":"hide","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1056,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1056"}],"signatures":[{"id":243,"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":195,"name":"innerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":470,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L470"}],"signatures":[{"id":196,"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":572,"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":199,"name":"innerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":521,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L521"}],"signatures":[{"id":200,"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":553,"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":209,"name":"isDecorated","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":647,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L647"}],"signatures":[{"id":210,"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":203,"name":"isFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":572,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L572"}],"signatures":[{"id":204,"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":207,"name":"isMaximized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":622,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L622"}],"signatures":[{"id":208,"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":205,"name":"isMinimized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":597,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L597"}],"signatures":[{"id":206,"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":211,"name":"isResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":672,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L672"}],"signatures":[{"id":212,"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":213,"name":"isVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":697,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L697"}],"signatures":[{"id":214,"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":327,"name":"listen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":345,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L345"}],"signatures":[{"id":328,"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":329,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":330,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":331,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":329,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":230,"name":"maximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":906,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L906"}],"signatures":[{"id":231,"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":236,"name":"minimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":981,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L981"}],"signatures":[{"id":237,"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":304,"name":"onCloseRequested","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1770,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1770"}],"signatures":[{"id":305,"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":306,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":307,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"window.ts","line":1771,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1771"}],"signatures":[{"id":308,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":309,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":528,"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":652,"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":319,"name":"onFileDropEvent","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1904,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1904"}],"signatures":[{"id":320,"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":321,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":602,"name":"FileDropEvent"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":310,"name":"onFocusChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1803,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1803"}],"signatures":[{"id":311,"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":312,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":316,"name":"onMenuClicked","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1873,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1873"}],"signatures":[{"id":317,"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":318,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":301,"name":"onMoved","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1738,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1738"}],"signatures":[{"id":302,"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":303,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":572,"name":"PhysicalPosition"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":298,"name":"onResized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1712,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1712"}],"signatures":[{"id":299,"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":300,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":553,"name":"PhysicalSize"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":313,"name":"onScaleChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1845,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1845"}],"signatures":[{"id":314,"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":315,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":599,"name":"ScaleFactorChanged"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":322,"name":"onThemeChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1954,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1954"}],"signatures":[{"id":323,"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":324,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":592,"name":"Theme"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":332,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":378,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L378"}],"signatures":[{"id":333,"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":334,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":335,"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":336,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":334,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":197,"name":"outerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":495,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L495"}],"signatures":[{"id":198,"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":572,"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":201,"name":"outerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":547,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L547"}],"signatures":[{"id":202,"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":553,"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":221,"name":"requestUserAttention","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":816,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L816"}],"signatures":[{"id":222,"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":223,"name":"requestType","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":583,"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":193,"name":"scaleFactor","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":445,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L445"}],"signatures":[{"id":194,"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":252,"name":"setAlwaysOnTop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1171,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1171"}],"signatures":[{"id":253,"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":254,"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":255,"name":"setContentProtected","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1199,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1199"}],"signatures":[{"id":256,"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":257,"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":281,"name":"setCursorGrab","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1519,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1519"}],"signatures":[{"id":282,"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":283,"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":287,"name":"setCursorIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1579,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1579"}],"signatures":[{"id":288,"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":289,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor icon."}]},"type":{"type":"reference","id":183,"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":290,"name":"setCursorPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1606,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1606"}],"signatures":[{"id":291,"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":292,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor position."}]},"type":{"type":"union","types":[{"type":"reference","id":572,"name":"PhysicalPosition"},{"type":"reference","id":564,"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":284,"name":"setCursorVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1552,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1552"}],"signatures":[{"id":285,"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":286,"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":246,"name":"setDecorations","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1107,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1107"}],"signatures":[{"id":247,"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":248,"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":273,"name":"setFocus","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1417,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1417"}],"signatures":[{"id":274,"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":270,"name":"setFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1391,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1391"}],"signatures":[{"id":271,"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":272,"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":275,"name":"setIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1450,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1450"}],"signatures":[{"id":276,"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":277,"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":293,"name":"setIgnoreCursorEvents","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1650,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1650"}],"signatures":[{"id":294,"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":295,"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":264,"name":"setMaxSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1306,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1306"}],"signatures":[{"id":265,"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":266,"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":553,"name":"PhysicalSize"},{"type":"reference","id":545,"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":261,"name":"setMinSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1264,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1264"}],"signatures":[{"id":262,"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":263,"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":553,"name":"PhysicalSize"},{"type":"reference","id":545,"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":267,"name":"setPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1348,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1348"}],"signatures":[{"id":268,"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":269,"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":572,"name":"PhysicalPosition"},{"type":"reference","id":564,"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":224,"name":"setResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":853,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L853"}],"signatures":[{"id":225,"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":226,"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":249,"name":"setShadow","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1144,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1144"}],"signatures":[{"id":250,"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":251,"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":258,"name":"setSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1226,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1226"}],"signatures":[{"id":259,"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":260,"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":553,"name":"PhysicalSize"},{"type":"reference","id":545,"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":278,"name":"setSkipTaskbar","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1484"}],"signatures":[{"id":279,"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":280,"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":227,"name":"setTitle","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":880,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L880"}],"signatures":[{"id":228,"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":229,"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":240,"name":"show","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1031,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1031"}],"signatures":[{"id":241,"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":296,"name":"startDragging","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1676,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1676"}],"signatures":[{"id":297,"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":217,"name":"theme","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":752,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L752"}],"signatures":[{"id":218,"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":592,"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":215,"name":"title","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":722,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L722"}],"signatures":[{"id":216,"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":234,"name":"toggleMaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":956,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L956"}],"signatures":[{"id":235,"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":232,"name":"unmaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":931,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L931"}],"signatures":[{"id":233,"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":238,"name":"unminimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1006,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L1006"}],"signatures":[{"id":239,"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":186,"name":"getByLabel","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"window.ts","line":2071,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2071"}],"signatures":[{"id":187,"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":188,"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":185,"name":"WebviewWindow"}]}}]}],"groups":[{"title":"Constructors","children":[189]},{"title":"Properties","children":[325,326]},{"title":"Methods","children":[219,244,337,242,195,199,209,203,207,205,211,213,327,230,236,304,319,310,316,301,298,313,322,332,197,201,221,193,252,255,281,287,290,284,246,273,270,275,293,264,261,267,224,249,258,278,227,240,296,217,215,234,232,238,186]}],"sources":[{"fileName":"window.ts","line":2019,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2019"}],"extendedTypes":[{"type":"reference","name":"WindowManager"}]},{"id":594,"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":595,"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/0da817062/tooling/api/src/window.ts#L81"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}},{"id":597,"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/0da817062/tooling/api/src/window.ts#L85"}],"type":{"type":"reference","id":572,"name":"PhysicalPosition"}},{"id":598,"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/0da817062/tooling/api/src/window.ts#L87"}],"type":{"type":"intrinsic","name":"number"}},{"id":596,"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/0da817062/tooling/api/src/window.ts#L83"}],"type":{"type":"reference","id":553,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[595,597,598,596]}],"sources":[{"fileName":"window.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L79"}]},{"id":599,"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":600,"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/0da817062/tooling/api/src/window.ts#L97"}],"type":{"type":"intrinsic","name":"number"}},{"id":601,"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/0da817062/tooling/api/src/window.ts#L99"}],"type":{"type":"reference","id":553,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[600,601]}],"sources":[{"fileName":"window.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L95"}]},{"id":611,"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":638,"name":"acceptFirstMouse","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether clicking an inactive window also clicks through to the webview on macOS."}]},"sources":[{"fileName":"window.ts","line":2195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2195"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":630,"name":"alwaysOnTop","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows or not."}]},"sources":[{"fileName":"window.ts","line":2153,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2153"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":613,"name":"center","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Show window in the center of the screen.."}]},"sources":[{"fileName":"window.ts","line":2115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2115"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":631,"name":"contentProtected","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Prevents the window contents from being captured by other apps."}]},"sources":[{"fileName":"window.ts","line":2155,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2155"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":629,"name":"decorations","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars or not."}]},"sources":[{"fileName":"window.ts","line":2151,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2151"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":634,"name":"fileDropEnabled","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the file drop is enabled or not on the webview. By default it is enabled.\n\nDisabling it is required to use drag and drop on the frontend on Windows."}]},"sources":[{"fileName":"window.ts","line":2177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2177"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":625,"name":"focus","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window will be initially focused or not."}]},"sources":[{"fileName":"window.ts","line":2139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2139"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":624,"name":"fullscreen","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is in fullscreen mode or not."}]},"sources":[{"fileName":"window.ts","line":2137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2137"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":617,"name":"height","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial height."}]},"sources":[{"fileName":"window.ts","line":2123,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2123"}],"type":{"type":"intrinsic","name":"number"}},{"id":637,"name":"hiddenTitle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`true`"},{"kind":"text","text":", sets the window title to be hidden on macOS."}]},"sources":[{"fileName":"window.ts","line":2191,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2191"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":621,"name":"maxHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum height. Only applies if "},{"kind":"code","text":"`maxWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2131"}],"type":{"type":"intrinsic","name":"number"}},{"id":620,"name":"maxWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum width. Only applies if "},{"kind":"code","text":"`maxHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2129"}],"type":{"type":"intrinsic","name":"number"}},{"id":627,"name":"maximized","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be maximized upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2147,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2147"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":619,"name":"minHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum height. Only applies if "},{"kind":"code","text":"`minWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2127,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2127"}],"type":{"type":"intrinsic","name":"number"}},{"id":618,"name":"minWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum width. Only applies if "},{"kind":"code","text":"`minHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2125,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2125"}],"type":{"type":"intrinsic","name":"number"}},{"id":622,"name":"resizable","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is resizable or not."}]},"sources":[{"fileName":"window.ts","line":2133,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2133"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":633,"name":"shadow","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window has shadow.\n\n#### Platform-specific\n\n- **Windows:**\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" has no effect on decorated window, shadows are always ON.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" will make ndecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0"}]}]},"sources":[{"fileName":"window.ts","line":2171,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2171"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":632,"name":"skipTaskbar","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window icon should be added to the taskbar."}]},"sources":[{"fileName":"window.ts","line":2157,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2157"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":639,"name":"tabbingIdentifier","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Defines the window [tabbing identifier](https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier) on macOS.\n\nWindows with the same tabbing identifier will be grouped together.\nIf the tabbing identifier is not set, automatic tabbing will be disabled."}]},"sources":[{"fileName":"window.ts","line":2202,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2202"}],"type":{"type":"intrinsic","name":"string"}},{"id":635,"name":"theme","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial window theme. Defaults to the system theme.\n\nOnly implemented on Windows and macOS 10.14+."}]},"sources":[{"fileName":"window.ts","line":2183,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2183"}],"type":{"type":"reference","id":592,"name":"Theme"}},{"id":623,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Window title."}]},"sources":[{"fileName":"window.ts","line":2135,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2135"}],"type":{"type":"intrinsic","name":"string"}},{"id":636,"name":"titleBarStyle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The style of the macOS title bar."}]},"sources":[{"fileName":"window.ts","line":2187,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2187"}],"type":{"type":"reference","id":593,"name":"TitleBarStyle"}},{"id":626,"name":"transparent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is transparent or not.\nNote that on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" this requires the "},{"kind":"code","text":"`macos-private-api`"},{"kind":"text","text":" feature flag, enabled under "},{"kind":"code","text":"`tauri.conf.json > tauri > macOSPrivateApi`"},{"kind":"text","text":".\nWARNING: Using private APIs on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" prevents your application from being accepted to the "},{"kind":"code","text":"`App Store`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"window.ts","line":2145,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2145"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":612,"name":"url","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Remote URL or local file path to open.\n\n- URL such as "},{"kind":"code","text":"`https://github.com/tauri-apps`"},{"kind":"text","text":" is opened directly on a Tauri window.\n- data: URL such as "},{"kind":"code","text":"`data:text/html,...`"},{"kind":"text","text":" is only supported with the "},{"kind":"code","text":"`window-data-url`"},{"kind":"text","text":" Cargo feature for the "},{"kind":"code","text":"`tauri`"},{"kind":"text","text":" dependency.\n- local file path or route such as "},{"kind":"code","text":"`/path/to/page.html`"},{"kind":"text","text":" or "},{"kind":"code","text":"`/users`"},{"kind":"text","text":" is appended to the application URL (the devServer URL on development, or "},{"kind":"code","text":"`tauri://localhost/`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://tauri.localhost/`"},{"kind":"text","text":" on production)."}]},"sources":[{"fileName":"window.ts","line":2113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2113"}],"type":{"type":"intrinsic","name":"string"}},{"id":640,"name":"userAgent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The user agent for the webview."}]},"sources":[{"fileName":"window.ts","line":2206,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2206"}],"type":{"type":"intrinsic","name":"string"}},{"id":628,"name":"visible","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be immediately visible upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2149"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":616,"name":"width","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial width."}]},"sources":[{"fileName":"window.ts","line":2121,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2121"}],"type":{"type":"intrinsic","name":"number"}},{"id":614,"name":"x","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial vertical position. Only applies if "},{"kind":"code","text":"`y`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2117,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2117"}],"type":{"type":"intrinsic","name":"number"}},{"id":615,"name":"y","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial horizontal position. Only applies if "},{"kind":"code","text":"`x`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2119"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[638,630,613,631,629,634,625,624,617,637,621,620,627,619,618,622,633,632,639,635,623,636,626,612,640,628,616,614,615]}],"sources":[{"fileName":"window.ts","line":2105,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2105"}]},{"id":183,"name":"CursorIcon","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":235,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/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":602,"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/0da817062/tooling/api/src/window.ts#L103"}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":603,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":605,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":21,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L104"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":604,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L104"}],"type":{"type":"literal","value":"hover"}}],"groups":[{"title":"Properties","children":[605,604]}],"sources":[{"fileName":"window.ts","line":104,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L104"}]}},{"type":"reflection","declaration":{"id":606,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":608,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L105"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":607,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L105"}],"type":{"type":"literal","value":"drop"}}],"groups":[{"title":"Properties","children":[608,607]}],"sources":[{"fileName":"window.ts","line":105,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L105"}]}},{"type":"reflection","declaration":{"id":609,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":610,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":106,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L106"}],"type":{"type":"literal","value":"cancel"}}],"groups":[{"title":"Properties","children":[610]}],"sources":[{"fileName":"window.ts","line":106,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L106"}]}}]}},{"id":592,"name":"Theme","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L71"}],"type":{"type":"union","types":[{"type":"literal","value":"light"},{"type":"literal","value":"dark"}]}},{"id":593,"name":"TitleBarStyle","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":72,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L72"}],"type":{"type":"union","types":[{"type":"literal","value":"visible"},{"type":"literal","value":"transparent"},{"type":"literal","value":"overlay"}]}},{"id":544,"name":"appWindow","kind":32,"kindString":"Variable","flags":{},"comment":{"summary":[{"kind":"text","text":"The WebviewWindow for the current window."}]},"sources":[{"fileName":"window.ts","line":2081,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2081"}],"type":{"type":"reference","id":185,"name":"WebviewWindow"}},{"id":590,"name":"availableMonitors","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2288,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2288"}],"signatures":[{"id":591,"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":594,"name":"Monitor"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":586,"name":"currentMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2239,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2239"}],"signatures":[{"id":587,"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":594,"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":542,"name":"getAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":293,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L293"}],"signatures":[{"id":543,"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":185,"name":"WebviewWindow"}}}]},{"id":540,"name":"getCurrent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":281,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L281"}],"signatures":[{"id":541,"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":185,"name":"WebviewWindow"}}]},{"id":588,"name":"primaryMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2264,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L2264"}],"signatures":[{"id":589,"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":594,"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":[583]},{"title":"Classes","children":[528,564,545,572,553,185]},{"title":"Interfaces","children":[594,599,611]},{"title":"Type Aliases","children":[183,602,592,593]},{"title":"Variables","children":[544]},{"title":"Functions","children":[590,586,542,540,588]}],"sources":[{"fileName":"window.ts","line":66,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/0da817062/tooling/api/src/window.ts#L66"}]}],"groups":[{"title":"Modules","children":[1,31,45,141,182]}]} \ No newline at end of file +{"id":0,"name":"@tauri-apps/api","kind":1,"flags":{},"originalName":"","children":[{"id":1,"name":"event","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"The event system allows you to emit events to the backend and listen to events from it.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.event`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":3,"name":"TauriEvent","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":16,"name":"MENU","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":33,"character":2}],"type":{"type":"literal","value":"tauri://menu"}},{"id":10,"name":"WINDOW_BLUR","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":27,"character":2}],"type":{"type":"literal","value":"tauri://blur"}},{"id":6,"name":"WINDOW_CLOSE_REQUESTED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":23,"character":2}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":7,"name":"WINDOW_CREATED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":24,"character":2}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":8,"name":"WINDOW_DESTROYED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":25,"character":2}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":13,"name":"WINDOW_FILE_DROP","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":30,"character":2}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":15,"name":"WINDOW_FILE_DROP_CANCELLED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":32,"character":2}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":14,"name":"WINDOW_FILE_DROP_HOVER","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":31,"character":2}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":9,"name":"WINDOW_FOCUS","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":26,"character":2}],"type":{"type":"literal","value":"tauri://focus"}},{"id":5,"name":"WINDOW_MOVED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":22,"character":2}],"type":{"type":"literal","value":"tauri://move"}},{"id":4,"name":"WINDOW_RESIZED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":21,"character":2}],"type":{"type":"literal","value":"tauri://resize"}},{"id":11,"name":"WINDOW_SCALE_FACTOR_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":28,"character":2}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":12,"name":"WINDOW_THEME_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":29,"character":2}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[16,10,6,7,8,13,15,14,9,5,4,11,12]}],"sources":[{"fileName":"event.ts","line":20,"character":12}]},{"id":641,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":642,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"helpers/event.ts","line":11,"character":2}],"type":{"type":"reference","id":2,"name":"EventName"}},{"id":644,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"helpers/event.ts","line":15,"character":2}],"type":{"type":"intrinsic","name":"number"}},{"id":645,"name":"payload","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"helpers/event.ts","line":17,"character":2}],"type":{"type":"reference","id":646,"name":"T"}},{"id":643,"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":13,"character":2}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[642,644,645,643]}],"sources":[{"fileName":"helpers/event.ts","line":9,"character":17}],"typeParameters":[{"id":646,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":647,"name":"EventCallback","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":20,"character":12}],"typeParameters":[{"id":651,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":648,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":20,"character":31}],"signatures":[{"id":649,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":650,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":641,"typeArguments":[{"type":"reference","id":651,"name":"T"}],"name":"Event"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":2,"name":"EventName","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"event.ts","line":15,"character":12}],"type":{"type":"union","types":[{"type":"template-literal","head":"","tail":[[{"type":"reference","id":3,"name":"TauriEvent"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","qualifiedName":"Record","package":"typescript"}]}]}},{"id":652,"name":"UnlistenFn","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":22,"character":12}],"type":{"type":"reflection","declaration":{"id":653,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":22,"character":25}],"signatures":[{"id":654,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":27,"name":"emit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":107,"character":15}],"signatures":[{"id":28,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { emit } from '@tauri-apps/api/event';\nawait emit('frontend-loaded', { loggedIn: true, token: 'authToken' });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":29,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":30,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":17,"name":"listen","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":57,"character":15}],"signatures":[{"id":18,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { listen } from '@tauri-apps/api/event';\nconst unlisten = await listen('error', (event) => {\n console.log(`Got error in window ${event.windowLabel}, payload: ${event.payload}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":19,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":20,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":21,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":19,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":22,"name":"once","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":88,"character":15}],"signatures":[{"id":23,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { once } from '@tauri-apps/api/event';\ninterface LoadedPayload {\n loggedIn: boolean,\n token: string\n}\nconst unlisten = await once('loaded', (event) => {\n console.log(`App is loaded, loggedIn: ${event.payload.loggedIn}, token: ${event.payload.token}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":24,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":25,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":26,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":24,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[3]},{"title":"Interfaces","children":[641]},{"title":"Type Aliases","children":[647,2,652]},{"title":"Functions","children":[27,17,22]}],"sources":[{"fileName":"event.ts","line":12,"character":0}]},{"id":31,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":43,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":171,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/mocks.ts#L171"}],"signatures":[{"id":44,"name":"clearMocks","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Clears mocked functions/data injected by the other functions in this module.\nWhen using a test runner that doesn't provide a fresh window object for each test, calling this function will reset tauri specific properties.\n\n# Example\n\n"},{"kind":"code","text":"```js\nimport { mockWindows, clearMocks } from \"@tauri-apps/api/mocks\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked windows\", () => {\n mockWindows(\"main\", \"second\", \"third\");\n\n expect(window).toHaveProperty(\"__TAURI_METADATA__\")\n})\n\ntest(\"no mocked windows\", () => {\n expect(window).not.toHaveProperty(\"__TAURI_METADATA__\")\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"intrinsic","name":"void"}}]},{"id":32,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":65,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/mocks.ts#L65"}],"signatures":[{"id":33,"name":"mockIPC","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Intercepts all IPC requests with the given mock handler.\n\nThis function can be used when testing tauri frontend applications or when running the frontend in a Node.js context during static site generation.\n\n# Examples\n\nTesting setup using vitest:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n switch (cmd) {\n case \"add\":\n return (args.a as number) + (args.b as number);\n default:\n break;\n }\n });\n\n expect(invoke('add', { a: 12, b: 15 })).resolves.toBe(27);\n})\n```"},{"kind":"text","text":"\n\nThe callback function can also return a Promise:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n if(cmd === \"get_data\") {\n return fetch(\"https://example.com/data.json\")\n .then((response) => response.json())\n }\n });\n\n expect(invoke('get_data')).resolves.toBe({ foo: 'bar' });\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":34,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":35,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":66,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/mocks.ts#L66"}],"signatures":[{"id":36,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":37,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":38,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":39,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":135,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/mocks.ts#L135"}],"signatures":[{"id":40,"name":"mockWindows","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Mocks one or many window labels.\nIn non-tauri context it is required to call this function *before* using the "},{"kind":"code","text":"`@tauri-apps/api/window`"},{"kind":"text","text":" module.\n\nThis function only mocks the *presence* of windows,\nwindow properties (e.g. width and height) can be mocked like regular IPC calls using the "},{"kind":"code","text":"`mockIPC`"},{"kind":"text","text":" function.\n\n# Examples\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\nimport { getCurrent } from \"@tauri-apps/api/window\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nconst win = getCurrent();\n\nwin.label // \"main\"\n```"},{"kind":"text","text":"\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nmockIPC((cmd, args) => {\n if (cmd === \"tauri\") {\n if (\n args?.__tauriModule === \"Window\" &&\n args?.message?.cmd === \"manage\" &&\n args?.message?.data?.cmd?.type === \"close\"\n ) {\n console.log('closing window!');\n }\n }\n});\n\nconst { getCurrent } = await import(\"@tauri-apps/api/window\");\n\nconst win = getCurrent();\nawait win.close(); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":41,"name":"current","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":42,"name":"additionalWindows","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"Label of additional windows the app has."}]},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Functions","children":[43,32,39]}],"sources":[{"fileName":"mocks.ts","line":5,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/mocks.ts#L5"}]},{"id":45,"name":"path","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"The path module provides utilities for working with file and directory paths.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.path`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":".\n\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.path`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.path) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"path\": {\n \"all\": true, // enable all Path APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":46,"name":"BaseDirectory","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":62,"name":"AppCache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L48"}],"type":{"type":"literal","value":16}},{"id":59,"name":"AppConfig","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":45,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L45"}],"type":{"type":"literal","value":13}},{"id":60,"name":"AppData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":46,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L46"}],"type":{"type":"literal","value":14}},{"id":61,"name":"AppLocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L47"}],"type":{"type":"literal","value":15}},{"id":63,"name":"AppLog","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L49"}],"type":{"type":"literal","value":17}},{"id":47,"name":"Audio","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L33"}],"type":{"type":"literal","value":1}},{"id":48,"name":"Cache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L34"}],"type":{"type":"literal","value":2}},{"id":49,"name":"Config","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L35"}],"type":{"type":"literal","value":3}},{"id":50,"name":"Data","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L36"}],"type":{"type":"literal","value":4}},{"id":64,"name":"Desktop","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L51"}],"type":{"type":"literal","value":18}},{"id":52,"name":"Document","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L38"}],"type":{"type":"literal","value":6}},{"id":53,"name":"Download","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L39"}],"type":{"type":"literal","value":7}},{"id":65,"name":"Executable","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L52"}],"type":{"type":"literal","value":19}},{"id":66,"name":"Font","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L53"}],"type":{"type":"literal","value":20}},{"id":67,"name":"Home","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L54"}],"type":{"type":"literal","value":21}},{"id":51,"name":"LocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L37"}],"type":{"type":"literal","value":5}},{"id":54,"name":"Picture","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L40"}],"type":{"type":"literal","value":8}},{"id":55,"name":"Public","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L41"}],"type":{"type":"literal","value":9}},{"id":57,"name":"Resource","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L43"}],"type":{"type":"literal","value":11}},{"id":68,"name":"Runtime","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L55"}],"type":{"type":"literal","value":22}},{"id":58,"name":"Temp","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":44,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L44"}],"type":{"type":"literal","value":12}},{"id":69,"name":"Template","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L56"}],"type":{"type":"literal","value":23}},{"id":56,"name":"Video","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L42"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[62,59,60,61,63,47,48,49,50,64,52,53,65,66,67,51,54,55,57,68,58,69,56]}],"sources":[{"fileName":"path.ts","line":32,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L32"}]},{"id":118,"name":"delimiter","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides the platform-specific path segment delimiter:\n- "},{"kind":"code","text":"`;`"},{"kind":"text","text":" on Windows\n- "},{"kind":"code","text":"`:`"},{"kind":"text","text":" on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":555,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L555"}],"type":{"type":"union","types":[{"type":"literal","value":";"},{"type":"literal","value":":"}]},"defaultValue":"..."},{"id":117,"name":"sep","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides the platform-specific path segment separator:\n- "},{"kind":"code","text":"`\\` on Windows\n- `"},{"kind":"text","text":"/` on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":546,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L546"}],"type":{"type":"union","types":[{"type":"literal","value":"\\"},{"type":"literal","value":"/"}]},"defaultValue":"..."},{"id":76,"name":"appCacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":121,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L121"}],"signatures":[{"id":77,"name":"appCacheDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's cache files.\nResolves to "},{"kind":"code","text":"`${cacheDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appCacheDir } from '@tauri-apps/api/path';\nconst appCacheDirPath = await appCacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":70,"name":"appConfigDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":70,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L70"}],"signatures":[{"id":71,"name":"appConfigDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's config files.\nResolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appConfigDir } from '@tauri-apps/api/path';\nconst appConfigDirPath = await appConfigDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":72,"name":"appDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L87"}],"signatures":[{"id":73,"name":"appDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's data files.\nResolves to "},{"kind":"code","text":"`${dataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":74,"name":"appLocalDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":104,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L104"}],"signatures":[{"id":75,"name":"appLocalDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's local data files.\nResolves to "},{"kind":"code","text":"`${localDataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLocalDataDir } from '@tauri-apps/api/path';\nconst appLocalDataDirPath = await appLocalDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":78,"name":"appLogDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":533,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L533"}],"signatures":[{"id":79,"name":"appLogDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's log files.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`${homeDir}/Library/Logs/{bundleIdentifier}`"},{"kind":"text","text":"\n- **Windows:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLogDir } from '@tauri-apps/api/path';\nconst appLogDirPath = await appLogDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":80,"name":"audioDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":143,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L143"}],"signatures":[{"id":81,"name":"audioDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's audio directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_MUSIC_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Music`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Music}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { audioDir } from '@tauri-apps/api/path';\nconst audioDirPath = await audioDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":134,"name":"basename","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":647,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L647"}],"signatures":[{"id":135,"name":"basename","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the last portion of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { basename, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst base = await basename(resourcePath);\nassert(base === 'app.conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":136,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":137,"name":"ext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional file extension to be removed from the returned path."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":82,"name":"cacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":165,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L165"}],"signatures":[{"id":83,"name":"cacheDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's cache directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CACHE_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.cache`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Caches`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { cacheDir } from '@tauri-apps/api/path';\nconst cacheDirPath = await cacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":84,"name":"configDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":187,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L187"}],"signatures":[{"id":85,"name":"configDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's config directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CONFIG_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.config`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { configDir } from '@tauri-apps/api/path';\nconst configDirPath = await configDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":86,"name":"dataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":209,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L209"}],"signatures":[{"id":87,"name":"dataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dataDir } from '@tauri-apps/api/path';\nconst dataDirPath = await dataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":88,"name":"desktopDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":231,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L231"}],"signatures":[{"id":89,"name":"desktopDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's desktop directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DESKTOP_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Desktop`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Desktop}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { desktopDir } from '@tauri-apps/api/path';\nconst desktopPath = await desktopDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":128,"name":"dirname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":613,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L613"}],"signatures":[{"id":129,"name":"dirname","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the directory name of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dirname, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst dir = await dirname(appDataDirPath);\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":130,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":90,"name":"documentDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":253,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L253"}],"signatures":[{"id":91,"name":"documentDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's document directory."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { documentDir } from '@tauri-apps/api/path';\nconst documentDirPath = await documentDir();\n```"},{"kind":"text","text":"\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOCUMENTS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Documents`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Documents}`"},{"kind":"text","text":"."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":92,"name":"downloadDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":275,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L275"}],"signatures":[{"id":93,"name":"downloadDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's download directory.\n\n#### Platform-specific\n\n- **Linux**: Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOWNLOAD_DIR`"},{"kind":"text","text":".\n- **macOS**: Resolves to "},{"kind":"code","text":"`$HOME/Downloads`"},{"kind":"text","text":".\n- **Windows**: Resolves to "},{"kind":"code","text":"`{FOLDERID_Downloads}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { downloadDir } from '@tauri-apps/api/path';\nconst downloadDirPath = await downloadDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":94,"name":"executableDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":297,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L297"}],"signatures":[{"id":95,"name":"executableDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's executable directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_BIN_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$XDG_DATA_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/bin`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { executableDir } from '@tauri-apps/api/path';\nconst executableDirPath = await executableDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":131,"name":"extname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":629,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L629"}],"signatures":[{"id":132,"name":"extname","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the extension of the "},{"kind":"code","text":"`path`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { extname, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst ext = await extname(resourcePath);\nassert(ext === 'conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":133,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":96,"name":"fontDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":319,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L319"}],"signatures":[{"id":97,"name":"fontDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's font directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME/fonts`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share/fonts`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Fonts`"},{"kind":"text","text":".\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { fontDir } from '@tauri-apps/api/path';\nconst fontDirPath = await fontDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":98,"name":"homeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":341,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L341"}],"signatures":[{"id":99,"name":"homeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's home directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Profile}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { homeDir } from '@tauri-apps/api/path';\nconst homeDirPath = await homeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":138,"name":"isAbsolute","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":661,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L661"}],"signatures":[{"id":139,"name":"isAbsolute","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns whether the path is absolute or not."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isAbsolute } from '@tauri-apps/api/path';\nassert(await isAbsolute('/home/tauri'));\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":140,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":125,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":598,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L598"}],"signatures":[{"id":126,"name":"join","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Joins all given "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments together using the platform-specific separator as a delimiter, then normalizes the resulting path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { join, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await join(appDataDirPath, 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":127,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":100,"name":"localDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":363,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L363"}],"signatures":[{"id":101,"name":"localDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's local data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { localDataDir } from '@tauri-apps/api/path';\nconst localDataDirPath = await localDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":122,"name":"normalize","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":583,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L583"}],"signatures":[{"id":123,"name":"normalize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Normalizes the given "},{"kind":"code","text":"`path`"},{"kind":"text","text":", resolving "},{"kind":"code","text":"`'..'`"},{"kind":"text","text":" and "},{"kind":"code","text":"`'.'`"},{"kind":"text","text":" segments and resolve symbolic links."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { normalize, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await normalize(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":124,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":102,"name":"pictureDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":385,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L385"}],"signatures":[{"id":103,"name":"pictureDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's picture directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PICTURES_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Pictures`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Pictures}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { pictureDir } from '@tauri-apps/api/path';\nconst pictureDirPath = await pictureDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":104,"name":"publicDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":407,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L407"}],"signatures":[{"id":105,"name":"publicDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's public directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PUBLICSHARE_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Public`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Public}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { publicDir } from '@tauri-apps/api/path';\nconst publicDirPath = await publicDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":119,"name":"resolve","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":568,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L568"}],"signatures":[{"id":120,"name":"resolve","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resolves a sequence of "},{"kind":"code","text":"`paths`"},{"kind":"text","text":" or "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments into an absolute path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolve, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await resolve(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":121,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":108,"name":"resolveResource","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":444,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L444"}],"signatures":[{"id":109,"name":"resolveResource","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resolve the path to a resource file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('script.sh');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The full path to the resource."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":110,"name":"resourcePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The path to the resource.\nMust follow the same syntax as defined in "},{"kind":"code","text":"`tauri.conf.json > tauri > bundle > resources`"},{"kind":"text","text":", i.e. keeping subfolders and parent dir components ("},{"kind":"code","text":"`../`"},{"kind":"text","text":")."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":106,"name":"resourceDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":424,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L424"}],"signatures":[{"id":107,"name":"resourceDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the application's resource directory.\nTo resolve a resource path, see the [[resolveResource | "},{"kind":"code","text":"`resolveResource API`"},{"kind":"text","text":"]]."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resourceDir } from '@tauri-apps/api/path';\nconst resourceDirPath = await resourceDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":111,"name":"runtimeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":467,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L467"}],"signatures":[{"id":112,"name":"runtimeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's runtime directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_RUNTIME_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { runtimeDir } from '@tauri-apps/api/path';\nconst runtimeDirPath = await runtimeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":113,"name":"templateDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":489,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L489"}],"signatures":[{"id":114,"name":"templateDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's template directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_TEMPLATES_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Templates}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { templateDir } from '@tauri-apps/api/path';\nconst templateDirPath = await templateDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":115,"name":"videoDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":511,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L511"}],"signatures":[{"id":116,"name":"videoDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's video directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_VIDEOS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Movies`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Videos}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { videoDir } from '@tauri-apps/api/path';\nconst videoDirPath = await videoDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[46]},{"title":"Variables","children":[118,117]},{"title":"Functions","children":[76,70,72,74,78,80,134,82,84,86,88,128,90,92,94,131,96,98,138,125,100,122,102,104,119,108,106,111,113,115]}],"sources":[{"fileName":"path.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/path.ts#L26"}]},{"id":141,"name":"tauri","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Invoke your custom commands.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.tauri`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":150,"name":"Channel","kind":128,"kindString":"Class","flags":{},"children":[{"id":151,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"tauri.ts","line":66,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L66"}],"signatures":[{"id":152,"name":"new Channel","kind":16384,"kindString":"Constructor signature","flags":{},"typeParameter":[{"id":153,"name":"T","kind":131072,"kindString":"Type parameter","flags":{},"default":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","id":150,"typeArguments":[{"type":"reference","id":153,"name":"T"}],"name":"Channel"}}]},{"id":156,"name":"#onmessage","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"tauri.ts","line":62,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L62"}],"type":{"type":"reflection","declaration":{"id":157,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":62,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L62"}],"signatures":[{"id":158,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":159,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":153,"name":"T"}}],"type":{"type":"intrinsic","name":"void"}}]}},"defaultValue":"..."},{"id":155,"name":"__TAURI_CHANNEL_MARKER__","kind":1024,"kindString":"Property","flags":{"isPrivate":true,"isReadonly":true},"sources":[{"fileName":"tauri.ts","line":61,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L61"}],"type":{"type":"literal","value":true},"defaultValue":"true"},{"id":154,"name":"id","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"tauri.ts","line":59,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L59"}],"type":{"type":"intrinsic","name":"number"}},{"id":160,"name":"onmessage","kind":262144,"kindString":"Accessor","flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L72"},{"fileName":"tauri.ts","line":76,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L76"}],"getSignature":{"id":161,"name":"onmessage","kind":524288,"kindString":"Get signature","flags":{},"type":{"type":"reflection","declaration":{"id":162,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":76,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L76"}],"signatures":[{"id":163,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":164,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":153,"name":"T"}}],"type":{"type":"intrinsic","name":"void"}}]}}},"setSignature":{"id":165,"name":"onmessage","kind":1048576,"kindString":"Set signature","flags":{},"parameters":[{"id":166,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":167,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":72,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L72"}],"signatures":[{"id":168,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":169,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":153,"name":"T"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"intrinsic","name":"void"}}},{"id":170,"name":"toJSON","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"tauri.ts","line":80,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L80"}],"signatures":[{"id":171,"name":"toJSON","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"string"}}]}],"groups":[{"title":"Constructors","children":[151]},{"title":"Properties","children":[156,155,154]},{"title":"Accessors","children":[160]},{"title":"Methods","children":[170]}],"sources":[{"fileName":"tauri.ts","line":58,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L58"}],"typeParameters":[{"id":172,"name":"T","kind":131072,"kindString":"Type parameter","flags":{},"default":{"type":"intrinsic","name":"unknown"}}]},{"id":142,"name":"InvokeArgs","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":90,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L90"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":178,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":156,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L156"}],"signatures":[{"id":179,"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":180,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":181,"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":173,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":106,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L106"}],"signatures":[{"id":174,"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":175,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":176,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":177,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":142,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":175,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":143,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":144,"name":"transformCallback","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Transforms a callback function to a string identifier that can be passed to the backend.\nThe backend uses the identifier to "},{"kind":"code","text":"`eval()`"},{"kind":"text","text":" the callback."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A unique identifier associated with the callback function."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":145,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":146,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":147,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":148,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":149,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Classes","children":[150]},{"title":"Type Aliases","children":[142]},{"title":"Functions","children":[178,173,143]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/tauri.ts#L13"}]},{"id":182,"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":583,"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":584,"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/56a45e899/tooling/api/src/window.ts#L226"}],"type":{"type":"literal","value":1}},{"id":585,"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/56a45e899/tooling/api/src/window.ts#L232"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[584,585]}],"sources":[{"fileName":"window.ts","line":220,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L220"}]},{"id":528,"name":"CloseRequestedEvent","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":529,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":1971,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1971"}],"signatures":[{"id":530,"name":"new CloseRequestedEvent","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":531,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":641,"typeArguments":[{"type":"literal","value":null}],"name":"Event"}}],"type":{"type":"reference","id":528,"name":"CloseRequestedEvent"}}]},{"id":535,"name":"_preventDefault","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"window.ts","line":1969,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1969"}],"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"},{"id":532,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"window.ts","line":1964,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1964"}],"type":{"type":"reference","id":2,"name":"EventName"}},{"id":534,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"window.ts","line":1968,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1968"}],"type":{"type":"intrinsic","name":"number"}},{"id":533,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"window.ts","line":1966,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1966"}],"type":{"type":"intrinsic","name":"string"}},{"id":538,"name":"isPreventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1981,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1981"}],"signatures":[{"id":539,"name":"isPreventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"boolean"}}]},{"id":536,"name":"preventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1977,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1977"}],"signatures":[{"id":537,"name":"preventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[529]},{"title":"Properties","children":[535,532,534,533]},{"title":"Methods","children":[538,536]}],"sources":[{"fileName":"window.ts","line":1962,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1962"}]},{"id":564,"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":565,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L164"}],"signatures":[{"id":566,"name":"new LogicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":567,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":568,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":564,"name":"LogicalPosition"}}]},{"id":569,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L160"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":570,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L161"}],"type":{"type":"intrinsic","name":"number"}},{"id":571,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":162,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L162"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[565]},{"title":"Properties","children":[569,570,571]}],"sources":[{"fileName":"window.ts","line":159,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L159"}]},{"id":545,"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":546,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":118,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L118"}],"signatures":[{"id":547,"name":"new LogicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":548,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":549,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":545,"name":"LogicalSize"}}]},{"id":552,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L116"}],"type":{"type":"intrinsic","name":"number"}},{"id":550,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":114,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L114"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":551,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L115"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[546]},{"title":"Properties","children":[552,550,551]}],"sources":[{"fileName":"window.ts","line":113,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L113"}]},{"id":572,"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":573,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":180,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L180"}],"signatures":[{"id":574,"name":"new PhysicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":575,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":576,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":572,"name":"PhysicalPosition"}}]},{"id":577,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L176"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":578,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L177"}],"type":{"type":"intrinsic","name":"number"}},{"id":579,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":178,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L178"}],"type":{"type":"intrinsic","name":"number"}},{"id":580,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L195"}],"signatures":[{"id":581,"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":582,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":564,"name":"LogicalPosition"}}]}],"groups":[{"title":"Constructors","children":[573]},{"title":"Properties","children":[577,578,579]},{"title":"Methods","children":[580]}],"sources":[{"fileName":"window.ts","line":175,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L175"}]},{"id":553,"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":554,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":134,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L134"}],"signatures":[{"id":555,"name":"new PhysicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":556,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":557,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":553,"name":"PhysicalSize"}}]},{"id":560,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L132"}],"type":{"type":"intrinsic","name":"number"}},{"id":558,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L130"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":559,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L131"}],"type":{"type":"intrinsic","name":"number"}},{"id":561,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L149"}],"signatures":[{"id":562,"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":563,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":545,"name":"LogicalSize"}}]}],"groups":[{"title":"Constructors","children":[554]},{"title":"Properties","children":[560,558,559]},{"title":"Methods","children":[561]}],"sources":[{"fileName":"window.ts","line":129,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L129"}]},{"id":185,"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":189,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":2039,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2039"}],"signatures":[{"id":190,"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":191,"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":192,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":611,"name":"WindowOptions"},"defaultValue":"{}"}],"type":{"type":"reference","id":185,"name":"WebviewWindow"},"overwrites":{"type":"reference","name":"WindowManager.constructor"}}],"overwrites":{"type":"reference","name":"WindowManager.constructor"}},{"id":325,"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/56a45e899/tooling/api/src/window.ts#L316"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","name":"WindowManager.label"}},{"id":326,"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/56a45e899/tooling/api/src/window.ts#L318"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"reference","id":647,"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"EventCallback"}}],"name":"Record","qualifiedName":"Record","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listeners"}},{"id":219,"name":"center","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":780,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L780"}],"signatures":[{"id":220,"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":244,"name":"close","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1081,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1081"}],"signatures":[{"id":245,"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":337,"name":"emit","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":400,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L400"}],"signatures":[{"id":338,"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":339,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":340,"name":"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":242,"name":"hide","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1056,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1056"}],"signatures":[{"id":243,"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":195,"name":"innerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":470,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L470"}],"signatures":[{"id":196,"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":572,"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":199,"name":"innerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":521,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L521"}],"signatures":[{"id":200,"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":553,"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":209,"name":"isDecorated","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":647,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L647"}],"signatures":[{"id":210,"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":203,"name":"isFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":572,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L572"}],"signatures":[{"id":204,"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":207,"name":"isMaximized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":622,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L622"}],"signatures":[{"id":208,"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":205,"name":"isMinimized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":597,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L597"}],"signatures":[{"id":206,"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":211,"name":"isResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":672,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L672"}],"signatures":[{"id":212,"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":213,"name":"isVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":697,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L697"}],"signatures":[{"id":214,"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":327,"name":"listen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":345,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L345"}],"signatures":[{"id":328,"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":329,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":330,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":331,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":329,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":230,"name":"maximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":906,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L906"}],"signatures":[{"id":231,"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":236,"name":"minimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":981,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L981"}],"signatures":[{"id":237,"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":304,"name":"onCloseRequested","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1770,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1770"}],"signatures":[{"id":305,"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":306,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":307,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"window.ts","line":1771,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1771"}],"signatures":[{"id":308,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":309,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":528,"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":652,"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":319,"name":"onFileDropEvent","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1904,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1904"}],"signatures":[{"id":320,"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":321,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":602,"name":"FileDropEvent"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":310,"name":"onFocusChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1803,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1803"}],"signatures":[{"id":311,"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":312,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":316,"name":"onMenuClicked","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1873,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1873"}],"signatures":[{"id":317,"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":318,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":301,"name":"onMoved","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1738,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1738"}],"signatures":[{"id":302,"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":303,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":572,"name":"PhysicalPosition"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":298,"name":"onResized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1712,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1712"}],"signatures":[{"id":299,"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":300,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":553,"name":"PhysicalSize"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":313,"name":"onScaleChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1845,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1845"}],"signatures":[{"id":314,"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":315,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":599,"name":"ScaleFactorChanged"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":322,"name":"onThemeChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1954,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1954"}],"signatures":[{"id":323,"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":324,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":592,"name":"Theme"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":332,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":378,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L378"}],"signatures":[{"id":333,"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":334,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":335,"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":336,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":647,"typeArguments":[{"type":"reference","id":334,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":652,"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":197,"name":"outerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":495,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L495"}],"signatures":[{"id":198,"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":572,"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":201,"name":"outerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":547,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L547"}],"signatures":[{"id":202,"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":553,"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":221,"name":"requestUserAttention","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":816,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L816"}],"signatures":[{"id":222,"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":223,"name":"requestType","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":583,"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":193,"name":"scaleFactor","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":445,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L445"}],"signatures":[{"id":194,"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":252,"name":"setAlwaysOnTop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1171,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1171"}],"signatures":[{"id":253,"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":254,"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":255,"name":"setContentProtected","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1199,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1199"}],"signatures":[{"id":256,"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":257,"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":281,"name":"setCursorGrab","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1519,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1519"}],"signatures":[{"id":282,"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":283,"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":287,"name":"setCursorIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1579,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1579"}],"signatures":[{"id":288,"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":289,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor icon."}]},"type":{"type":"reference","id":183,"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":290,"name":"setCursorPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1606,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1606"}],"signatures":[{"id":291,"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":292,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor position."}]},"type":{"type":"union","types":[{"type":"reference","id":572,"name":"PhysicalPosition"},{"type":"reference","id":564,"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":284,"name":"setCursorVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1552,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1552"}],"signatures":[{"id":285,"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":286,"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":246,"name":"setDecorations","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1107,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1107"}],"signatures":[{"id":247,"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":248,"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":273,"name":"setFocus","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1417,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1417"}],"signatures":[{"id":274,"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":270,"name":"setFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1391,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1391"}],"signatures":[{"id":271,"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":272,"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":275,"name":"setIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1450,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1450"}],"signatures":[{"id":276,"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":277,"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":293,"name":"setIgnoreCursorEvents","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1650,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1650"}],"signatures":[{"id":294,"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":295,"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":264,"name":"setMaxSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1306,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1306"}],"signatures":[{"id":265,"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":266,"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":553,"name":"PhysicalSize"},{"type":"reference","id":545,"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":261,"name":"setMinSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1264,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1264"}],"signatures":[{"id":262,"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":263,"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":553,"name":"PhysicalSize"},{"type":"reference","id":545,"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":267,"name":"setPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1348,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1348"}],"signatures":[{"id":268,"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":269,"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":572,"name":"PhysicalPosition"},{"type":"reference","id":564,"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":224,"name":"setResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":853,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L853"}],"signatures":[{"id":225,"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":226,"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":249,"name":"setShadow","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1144,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1144"}],"signatures":[{"id":250,"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":251,"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":258,"name":"setSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1226,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1226"}],"signatures":[{"id":259,"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":260,"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":553,"name":"PhysicalSize"},{"type":"reference","id":545,"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":278,"name":"setSkipTaskbar","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1484"}],"signatures":[{"id":279,"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":280,"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":227,"name":"setTitle","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":880,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L880"}],"signatures":[{"id":228,"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":229,"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":240,"name":"show","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1031,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1031"}],"signatures":[{"id":241,"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":296,"name":"startDragging","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1676,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1676"}],"signatures":[{"id":297,"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":217,"name":"theme","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":752,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L752"}],"signatures":[{"id":218,"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":592,"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":215,"name":"title","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":722,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L722"}],"signatures":[{"id":216,"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":234,"name":"toggleMaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":956,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L956"}],"signatures":[{"id":235,"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":232,"name":"unmaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":931,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L931"}],"signatures":[{"id":233,"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":238,"name":"unminimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1006,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L1006"}],"signatures":[{"id":239,"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":186,"name":"getByLabel","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"window.ts","line":2071,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2071"}],"signatures":[{"id":187,"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":188,"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":185,"name":"WebviewWindow"}]}}]}],"groups":[{"title":"Constructors","children":[189]},{"title":"Properties","children":[325,326]},{"title":"Methods","children":[219,244,337,242,195,199,209,203,207,205,211,213,327,230,236,304,319,310,316,301,298,313,322,332,197,201,221,193,252,255,281,287,290,284,246,273,270,275,293,264,261,267,224,249,258,278,227,240,296,217,215,234,232,238,186]}],"sources":[{"fileName":"window.ts","line":2019,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2019"}],"extendedTypes":[{"type":"reference","name":"WindowManager"}]},{"id":594,"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":595,"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/56a45e899/tooling/api/src/window.ts#L81"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}},{"id":597,"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/56a45e899/tooling/api/src/window.ts#L85"}],"type":{"type":"reference","id":572,"name":"PhysicalPosition"}},{"id":598,"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/56a45e899/tooling/api/src/window.ts#L87"}],"type":{"type":"intrinsic","name":"number"}},{"id":596,"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/56a45e899/tooling/api/src/window.ts#L83"}],"type":{"type":"reference","id":553,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[595,597,598,596]}],"sources":[{"fileName":"window.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L79"}]},{"id":599,"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":600,"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/56a45e899/tooling/api/src/window.ts#L97"}],"type":{"type":"intrinsic","name":"number"}},{"id":601,"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/56a45e899/tooling/api/src/window.ts#L99"}],"type":{"type":"reference","id":553,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[600,601]}],"sources":[{"fileName":"window.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L95"}]},{"id":611,"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":638,"name":"acceptFirstMouse","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether clicking an inactive window also clicks through to the webview on macOS."}]},"sources":[{"fileName":"window.ts","line":2195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2195"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":630,"name":"alwaysOnTop","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows or not."}]},"sources":[{"fileName":"window.ts","line":2153,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2153"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":613,"name":"center","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Show window in the center of the screen.."}]},"sources":[{"fileName":"window.ts","line":2115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2115"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":631,"name":"contentProtected","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Prevents the window contents from being captured by other apps."}]},"sources":[{"fileName":"window.ts","line":2155,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2155"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":629,"name":"decorations","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars or not."}]},"sources":[{"fileName":"window.ts","line":2151,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2151"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":634,"name":"fileDropEnabled","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the file drop is enabled or not on the webview. By default it is enabled.\n\nDisabling it is required to use drag and drop on the frontend on Windows."}]},"sources":[{"fileName":"window.ts","line":2177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2177"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":625,"name":"focus","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window will be initially focused or not."}]},"sources":[{"fileName":"window.ts","line":2139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2139"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":624,"name":"fullscreen","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is in fullscreen mode or not."}]},"sources":[{"fileName":"window.ts","line":2137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2137"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":617,"name":"height","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial height."}]},"sources":[{"fileName":"window.ts","line":2123,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2123"}],"type":{"type":"intrinsic","name":"number"}},{"id":637,"name":"hiddenTitle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`true`"},{"kind":"text","text":", sets the window title to be hidden on macOS."}]},"sources":[{"fileName":"window.ts","line":2191,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2191"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":621,"name":"maxHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum height. Only applies if "},{"kind":"code","text":"`maxWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2131"}],"type":{"type":"intrinsic","name":"number"}},{"id":620,"name":"maxWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum width. Only applies if "},{"kind":"code","text":"`maxHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2129"}],"type":{"type":"intrinsic","name":"number"}},{"id":627,"name":"maximized","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be maximized upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2147,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2147"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":619,"name":"minHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum height. Only applies if "},{"kind":"code","text":"`minWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2127,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2127"}],"type":{"type":"intrinsic","name":"number"}},{"id":618,"name":"minWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum width. Only applies if "},{"kind":"code","text":"`minHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2125,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2125"}],"type":{"type":"intrinsic","name":"number"}},{"id":622,"name":"resizable","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is resizable or not."}]},"sources":[{"fileName":"window.ts","line":2133,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2133"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":633,"name":"shadow","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window has shadow.\n\n#### Platform-specific\n\n- **Windows:**\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" has no effect on decorated window, shadows are always ON.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" will make ndecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0"}]}]},"sources":[{"fileName":"window.ts","line":2171,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2171"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":632,"name":"skipTaskbar","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window icon should be added to the taskbar."}]},"sources":[{"fileName":"window.ts","line":2157,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2157"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":639,"name":"tabbingIdentifier","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Defines the window [tabbing identifier](https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier) on macOS.\n\nWindows with the same tabbing identifier will be grouped together.\nIf the tabbing identifier is not set, automatic tabbing will be disabled."}]},"sources":[{"fileName":"window.ts","line":2202,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2202"}],"type":{"type":"intrinsic","name":"string"}},{"id":635,"name":"theme","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial window theme. Defaults to the system theme.\n\nOnly implemented on Windows and macOS 10.14+."}]},"sources":[{"fileName":"window.ts","line":2183,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2183"}],"type":{"type":"reference","id":592,"name":"Theme"}},{"id":623,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Window title."}]},"sources":[{"fileName":"window.ts","line":2135,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2135"}],"type":{"type":"intrinsic","name":"string"}},{"id":636,"name":"titleBarStyle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The style of the macOS title bar."}]},"sources":[{"fileName":"window.ts","line":2187,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2187"}],"type":{"type":"reference","id":593,"name":"TitleBarStyle"}},{"id":626,"name":"transparent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is transparent or not.\nNote that on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" this requires the "},{"kind":"code","text":"`macos-private-api`"},{"kind":"text","text":" feature flag, enabled under "},{"kind":"code","text":"`tauri.conf.json > tauri > macOSPrivateApi`"},{"kind":"text","text":".\nWARNING: Using private APIs on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" prevents your application from being accepted to the "},{"kind":"code","text":"`App Store`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"window.ts","line":2145,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2145"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":612,"name":"url","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Remote URL or local file path to open.\n\n- URL such as "},{"kind":"code","text":"`https://github.com/tauri-apps`"},{"kind":"text","text":" is opened directly on a Tauri window.\n- data: URL such as "},{"kind":"code","text":"`data:text/html,...`"},{"kind":"text","text":" is only supported with the "},{"kind":"code","text":"`window-data-url`"},{"kind":"text","text":" Cargo feature for the "},{"kind":"code","text":"`tauri`"},{"kind":"text","text":" dependency.\n- local file path or route such as "},{"kind":"code","text":"`/path/to/page.html`"},{"kind":"text","text":" or "},{"kind":"code","text":"`/users`"},{"kind":"text","text":" is appended to the application URL (the devServer URL on development, or "},{"kind":"code","text":"`tauri://localhost/`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://tauri.localhost/`"},{"kind":"text","text":" on production)."}]},"sources":[{"fileName":"window.ts","line":2113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2113"}],"type":{"type":"intrinsic","name":"string"}},{"id":640,"name":"userAgent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The user agent for the webview."}]},"sources":[{"fileName":"window.ts","line":2206,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2206"}],"type":{"type":"intrinsic","name":"string"}},{"id":628,"name":"visible","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be immediately visible upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2149"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":616,"name":"width","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial width."}]},"sources":[{"fileName":"window.ts","line":2121,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2121"}],"type":{"type":"intrinsic","name":"number"}},{"id":614,"name":"x","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial vertical position. Only applies if "},{"kind":"code","text":"`y`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2117,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2117"}],"type":{"type":"intrinsic","name":"number"}},{"id":615,"name":"y","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial horizontal position. Only applies if "},{"kind":"code","text":"`x`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2119"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[638,630,613,631,629,634,625,624,617,637,621,620,627,619,618,622,633,632,639,635,623,636,626,612,640,628,616,614,615]}],"sources":[{"fileName":"window.ts","line":2105,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2105"}]},{"id":183,"name":"CursorIcon","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":235,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/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":602,"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/56a45e899/tooling/api/src/window.ts#L103"}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":603,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":605,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":21,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L104"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":604,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L104"}],"type":{"type":"literal","value":"hover"}}],"groups":[{"title":"Properties","children":[605,604]}],"sources":[{"fileName":"window.ts","line":104,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L104"}]}},{"type":"reflection","declaration":{"id":606,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":608,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L105"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":607,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L105"}],"type":{"type":"literal","value":"drop"}}],"groups":[{"title":"Properties","children":[608,607]}],"sources":[{"fileName":"window.ts","line":105,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L105"}]}},{"type":"reflection","declaration":{"id":609,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":610,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":106,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L106"}],"type":{"type":"literal","value":"cancel"}}],"groups":[{"title":"Properties","children":[610]}],"sources":[{"fileName":"window.ts","line":106,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L106"}]}}]}},{"id":592,"name":"Theme","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L71"}],"type":{"type":"union","types":[{"type":"literal","value":"light"},{"type":"literal","value":"dark"}]}},{"id":593,"name":"TitleBarStyle","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":72,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L72"}],"type":{"type":"union","types":[{"type":"literal","value":"visible"},{"type":"literal","value":"transparent"},{"type":"literal","value":"overlay"}]}},{"id":544,"name":"appWindow","kind":32,"kindString":"Variable","flags":{},"comment":{"summary":[{"kind":"text","text":"The WebviewWindow for the current window."}]},"sources":[{"fileName":"window.ts","line":2081,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2081"}],"type":{"type":"reference","id":185,"name":"WebviewWindow"}},{"id":590,"name":"availableMonitors","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2288,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2288"}],"signatures":[{"id":591,"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":594,"name":"Monitor"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":586,"name":"currentMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2239,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2239"}],"signatures":[{"id":587,"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":594,"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":542,"name":"getAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":293,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L293"}],"signatures":[{"id":543,"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":185,"name":"WebviewWindow"}}}]},{"id":540,"name":"getCurrent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":281,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L281"}],"signatures":[{"id":541,"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":185,"name":"WebviewWindow"}}]},{"id":588,"name":"primaryMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2264,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L2264"}],"signatures":[{"id":589,"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":594,"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":[583]},{"title":"Classes","children":[528,564,545,572,553,185]},{"title":"Interfaces","children":[594,599,611]},{"title":"Type Aliases","children":[183,602,592,593]},{"title":"Variables","children":[544]},{"title":"Functions","children":[590,586,542,540,588]}],"sources":[{"fileName":"window.ts","line":66,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/56a45e899/tooling/api/src/window.ts#L66"}]}],"groups":[{"title":"Modules","children":[1,31,45,141,182]}]} \ No newline at end of file diff --git a/tooling/api/src/helpers/event.ts b/tooling/api/src/helpers/event.ts index c473ca7d2bd..0ab79d481b8 100644 --- a/tooling/api/src/helpers/event.ts +++ b/tooling/api/src/helpers/event.ts @@ -3,8 +3,7 @@ // SPDX-License-Identifier: MIT import { type WindowLabel } from '../window' -import { invokeTauriCommand } from './tauri' -import { transformCallback } from '../tauri' +import { invoke, transformCallback } from '../tauri' import { type EventName } from '../event' export interface Event { @@ -31,13 +30,9 @@ export type UnlistenFn = () => void * @returns */ async function _unlisten(event: string, eventId: number): Promise { - return invokeTauriCommand({ - __tauriModule: 'Event', - message: { - cmd: 'unlisten', - event, - eventId - } + await invoke('plugin:event|unlisten', { + event, + eventId }) } @@ -54,14 +49,10 @@ async function emit( windowLabel?: WindowLabel, payload?: unknown ): Promise { - await invokeTauriCommand({ - __tauriModule: 'Event', - message: { - cmd: 'emit', - event, - windowLabel, - payload - } + await invoke('plugin:event|emit', { + event, + windowLabel, + payload }) } @@ -77,14 +68,10 @@ async function listen( windowLabel: string | null, handler: EventCallback ): Promise { - return invokeTauriCommand({ - __tauriModule: 'Event', - message: { - cmd: 'listen', - event, - windowLabel, - handler: transformCallback(handler) - } + return invoke('plugin:event|listen', { + event, + windowLabel, + handler: transformCallback(handler) }).then((eventId) => { return async () => _unlisten(event, eventId) })