diff --git a/.changes/channel-api.md b/.changes/channel-api.md new file mode 100644 index 00000000000..852b907073e --- /dev/null +++ b/.changes/channel-api.md @@ -0,0 +1,6 @@ +--- +"api": patch +"tauri": patch +--- + +Add channel API for sending data across the IPC. diff --git a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Channel.kt b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Channel.kt new file mode 100644 index 00000000000..eb7afa51a3b --- /dev/null +++ b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Channel.kt @@ -0,0 +1,11 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +package app.tauri.plugin + +class Channel(val id: Long, private val handler: (data: JSObject) -> Unit) { + fun send(data: JSObject) { + handler(data) + } +} diff --git a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Invoke.kt b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Invoke.kt index 1d237bd2e9b..4bfb5bd908e 100644 --- a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Invoke.kt +++ b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Invoke.kt @@ -6,19 +6,23 @@ package app.tauri.plugin import app.tauri.Logger +const val CHANNEL_PREFIX = "__CHANNEL__:" + class Invoke( val id: Long, val command: String, - private val sendResponse: (success: PluginResult?, error: PluginResult?) -> Unit, + val callback: Long, + val error: Long, + private val sendResponse: (callback: Long, data: PluginResult?) -> Unit, val data: JSObject) { fun resolve(data: JSObject?) { val result = PluginResult(data) - sendResponse(result, null) + sendResponse(callback, result) } fun resolve() { - sendResponse(null, null) + sendResponse(callback, null) } fun reject(msg: String?, code: String?, ex: Exception?, data: JSObject?) { @@ -35,7 +39,7 @@ class Invoke( } catch (jsonEx: Exception) { Logger.error(Logger.tags("Plugin"), jsonEx.message!!, jsonEx) } - sendResponse(null, errorResult) + sendResponse(error, errorResult) } fun reject(msg: String?, ex: Exception?, data: JSObject?) { @@ -197,4 +201,10 @@ class Invoke( fun hasOption(name: String): Boolean { return data.has(name) } + + fun getChannel(name: String): Channel? { + val channelDef = getString(name, "") + val callback = channelDef.substring(CHANNEL_PREFIX.length).toLongOrNull() ?: return null + return Channel(callback) { res -> sendResponse(callback, PluginResult(res)) } + } } diff --git a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Plugin.kt b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Plugin.kt index 13785ed398b..d100af06278 100644 --- a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Plugin.kt +++ b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/Plugin.kt @@ -15,8 +15,8 @@ import app.tauri.Logger import app.tauri.PermissionHelper import app.tauri.PermissionState import app.tauri.annotation.ActivityCallback -import app.tauri.annotation.PermissionCallback import app.tauri.annotation.Command +import app.tauri.annotation.PermissionCallback import app.tauri.annotation.TauriPlugin import org.json.JSONException import java.util.* @@ -126,7 +126,7 @@ abstract class Plugin(private val activity: Activity) { // If call was made without any custom permissions, request all from plugin annotation val aliasSet: MutableSet = HashSet() - if (providedPermsList == null || providedPermsList.isEmpty()) { + if (providedPermsList.isNullOrEmpty()) { for (perm in annotation.permissions) { // If a permission is defined with no permission strings, separate it for auto-granting. // Otherwise, the alias is added to the list to be requested. @@ -153,7 +153,7 @@ abstract class Plugin(private val activity: Activity) { permAliases = aliasSet.toTypedArray() } } - if (permAliases != null && permAliases.isNotEmpty()) { + if (!permAliases.isNullOrEmpty()) { // request permissions using provided aliases or all defined on the plugin requestPermissionForAliases(permAliases, invoke, "checkPermissions") } else if (autoGrantPerms.isNotEmpty()) { diff --git a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/PluginManager.kt b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/PluginManager.kt index 9f6ba12c6fb..7dbab66429f 100644 --- a/core/tauri/mobile/android/src/main/java/app/tauri/plugin/PluginManager.kt +++ b/core/tauri/mobile/android/src/main/java/app/tauri/plugin/PluginManager.kt @@ -87,11 +87,7 @@ class PluginManager(val activity: AppCompatActivity) { @JniMethod fun postIpcMessage(webView: WebView, pluginId: String, command: String, data: JSObject, callback: Long, error: Long) { - val invoke = Invoke(callback, command, { successResult, errorResult -> - val (fn, result) = if (errorResult == null) Pair(callback, successResult) else Pair( - error, - errorResult - ) + val invoke = Invoke(callback, command, callback, error, { fn, result -> webView.evaluateJavascript("window['_$fn']($result)", null) }, data) @@ -100,8 +96,17 @@ class PluginManager(val activity: AppCompatActivity) { @JniMethod fun runCommand(id: Int, pluginId: String, command: String, data: JSObject) { - val invoke = Invoke(id.toLong(), command, { successResult, errorResult -> - handlePluginResponse(id, successResult?.toString(), errorResult?.toString()) + val successId = 0L + val errorId = 1L + val invoke = Invoke(id.toLong(), command, successId, errorId, { fn, result -> + var success: PluginResult? = null + var error: PluginResult? = null + if (fn == successId) { + success = result + } else { + error = result + } + handlePluginResponse(id, success?.toString(), error?.toString()) }, data) dispatchPluginMessage(invoke, pluginId) diff --git a/core/tauri/mobile/ios-api/Sources/Tauri/Channel.swift b/core/tauri/mobile/ios-api/Sources/Tauri/Channel.swift new file mode 100644 index 00000000000..371f632baba --- /dev/null +++ b/core/tauri/mobile/ios-api/Sources/Tauri/Channel.swift @@ -0,0 +1,17 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +public class Channel { + var callback: UInt64 + var handler: (JsonValue) -> Void + + public init(callback: UInt64, handler: @escaping (JsonValue) -> Void) { + self.callback = callback + self.handler = handler + } + + public func send(_ data: JsonObject) { + handler(.dictionary(data)) + } +} diff --git a/core/tauri/mobile/ios-api/Sources/Tauri/Invoke.swift b/core/tauri/mobile/ios-api/Sources/Tauri/Invoke.swift index b6b864bf9b6..7d395352061 100644 --- a/core/tauri/mobile/ios-api/Sources/Tauri/Invoke.swift +++ b/core/tauri/mobile/ios-api/Sources/Tauri/Invoke.swift @@ -5,6 +5,8 @@ import Foundation import UIKit +let CHANNEL_PREFIX = "__CHANNEL__:" + @objc public class Invoke: NSObject, JSValueContainer, BridgedJSValueContainer { public var dictionaryRepresentation: NSDictionary { return data as NSDictionary @@ -15,17 +17,21 @@ import UIKit }() public var command: String + var callback: UInt64 + var error: UInt64 public var data: JSObject - var sendResponse: (JsonValue?, JsonValue?) -> Void + var sendResponse: (UInt64, JsonValue?) -> Void - public init(command: String, sendResponse: @escaping (JsonValue?, JsonValue?) -> Void, data: JSObject?) { + public init(command: String, callback: UInt64, error: UInt64, sendResponse: @escaping (UInt64, JsonValue?) -> Void, data: JSObject?) { self.command = command + self.callback = callback + self.error = error self.data = data ?? [:] self.sendResponse = sendResponse } public func resolve() { - sendResponse(nil, nil) + sendResponse(callback, nil) } public func resolve(_ data: JsonObject) { @@ -33,7 +39,7 @@ import UIKit } public func resolve(_ data: JsonValue) { - sendResponse(data, nil) + sendResponse(callback, data) } public func reject(_ message: String, _ code: String? = nil, _ error: Error? = nil, _ data: JsonValue? = nil) { @@ -46,7 +52,7 @@ import UIKit } } } - sendResponse(nil, .dictionary(payload as! JsonObject)) + sendResponse(self.error, .dictionary(payload as! JsonObject)) } public func unimplemented() { @@ -54,7 +60,7 @@ import UIKit } public func unimplemented(_ message: String) { - sendResponse(nil, .dictionary(["message": message])) + sendResponse(error, .dictionary(["message": message])) } public func unavailable() { @@ -62,6 +68,21 @@ import UIKit } public func unavailable(_ message: String) { - sendResponse(nil, .dictionary(["message": message])) + sendResponse(error, .dictionary(["message": message])) } + + public func getChannel(_ key: String) -> Channel? { + let channelDef = getString(key, "") + if channelDef.starts(with: CHANNEL_PREFIX) { + let index = channelDef.index(channelDef.startIndex, offsetBy: CHANNEL_PREFIX.count) + guard let callback = UInt64(channelDef[index...]) else { + return nil + } + return Channel(callback: callback, handler: { (res: JsonValue) -> Void in + self.sendResponse(callback, res) + }) + } else { + return nil + } + } } diff --git a/core/tauri/mobile/ios-api/Sources/Tauri/Tauri.swift b/core/tauri/mobile/ios-api/Sources/Tauri/Tauri.swift index 330a3974105..b5f4ec6531e 100644 --- a/core/tauri/mobile/ios-api/Sources/Tauri/Tauri.swift +++ b/core/tauri/mobile/ios-api/Sources/Tauri/Tauri.swift @@ -109,9 +109,8 @@ func onWebviewCreated(webview: WKWebView, viewController: UIViewController) { } @_cdecl("post_ipc_message") -func postIpcMessage(webview: WKWebView, name: SRString, command: SRString, data: NSDictionary, callback: UInt, error: UInt) { - let invoke = Invoke(command: command.toString(), sendResponse: { (successResult: JsonValue?, errorResult: JsonValue?) -> Void in - let (fn, payload) = errorResult == nil ? (callback, successResult) : (error, errorResult) +func postIpcMessage(webview: WKWebView, name: SRString, command: SRString, data: NSDictionary, callback: UInt64, error: UInt64) { + let invoke = Invoke(command: command.toString(), callback: callback, error: error, sendResponse: { (fn: UInt64, payload: JsonValue?) -> Void in var payloadJson: String do { try payloadJson = payload == nil ? "null" : payload!.jsonRepresentation() ?? "`Failed to serialize payload`" @@ -131,8 +130,10 @@ func runCommand( data: NSDictionary, callback: @escaping @convention(c) (Int, Bool, UnsafePointer?) -> Void ) { - let invoke = Invoke(command: command.toString(), sendResponse: { (successResult: JsonValue?, errorResult: JsonValue?) -> Void in - let (success, payload) = errorResult == nil ? (true, successResult) : (false, errorResult) + let callbackId: UInt64 = 0 + let errorId: UInt64 = 1 + let invoke = Invoke(command: command.toString(), callback: callbackId, error: errorId, sendResponse: { (fn: UInt64, payload: JsonValue?) -> Void in + let success = fn == callbackId var payloadJson: String = "" do { try payloadJson = payload == nil ? "null" : payload!.jsonRepresentation() ?? "`Failed to serialize payload`" diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 060ce6b7645..d70f1131358 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 M=Object.defineProperty;var U=Object.getOwnPropertyDescriptor;var V=Object.getOwnPropertyNames;var H=Object.prototype.hasOwnProperty;var p=(n,e)=>{for(var t in e)M(n,t,{get:e[t],enumerable:!0})},$=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of V(e))!H.call(n,s)&&s!==t&&M(n,s,{get:()=>e[s],enumerable:!(o=U(e,s))||o.enumerable});return n};var G=n=>$(M({},"__esModule",{value:!0}),n);var Ie={};p(Ie,{event:()=>D,invoke:()=>Se,path:()=>A,tauri:()=>E,window:()=>x});var D={};p(D,{TauriEvent:()=>C,emit:()=>J,listen:()=>Z,once:()=>Y});var E={};p(E,{convertFileSrc:()=>q,invoke:()=>r,transformCallback:()=>y});function j(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function y(n,e=!1){let t=j(),o=`_${t}`;return Object.defineProperty(window,o,{value:s=>(e&&Reflect.deleteProperty(window,o),n?.(s)),writable:!1,configurable:!0}),t}async function r(n,e={}){return new Promise((t,o)=>{let s=y(W=>{t(W),Reflect.deleteProperty(window,`_${c}`)},!0),c=y(W=>{o(W),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:n,callback:s,error:c,...e})})}function q(n,e="asset"){let t=encodeURIComponent(n);return navigator.userAgent.includes("Windows")?`https://${e}.localhost/${t}`:`${e}://localhost/${t}`}async function i(n){return r("tauri",n)}async function S(n,e){return i({__tauriModule:"Event",message:{cmd:"unlisten",event:n,eventId:e}})}async function h(n,e,t){await i({__tauriModule:"Event",message:{cmd:"emit",event:n,windowLabel:e,payload:t}})}async function g(n,e,t){return i({__tauriModule:"Event",message:{cmd:"listen",event:n,windowLabel:e,handler:y(t)}}).then(o=>async()=>S(n,o))}async function b(n,e,t){return g(n,e,o=>{t(o),S(n,o.id).catch(()=>{})})}var C=(l=>(l.WINDOW_RESIZED="tauri://resize",l.WINDOW_MOVED="tauri://move",l.WINDOW_CLOSE_REQUESTED="tauri://close-requested",l.WINDOW_CREATED="tauri://window-created",l.WINDOW_DESTROYED="tauri://destroyed",l.WINDOW_FOCUS="tauri://focus",l.WINDOW_BLUR="tauri://blur",l.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",l.WINDOW_THEME_CHANGED="tauri://theme-changed",l.WINDOW_FILE_DROP="tauri://file-drop",l.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",l.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",l.MENU="tauri://menu",l))(C||{});async function Z(n,e){return g(n,null,e)}async function Y(n,e){return b(n,null,e)}async function J(n,e){return h(n,void 0,e)}var A={};p(A,{BaseDirectory:()=>I,appCacheDir:()=>ee,appConfigDir:()=>K,appDataDir:()=>X,appLocalDataDir:()=>B,appLogDir:()=>we,audioDir:()=>te,basename:()=>De,cacheDir:()=>ne,configDir:()=>ie,dataDir:()=>ae,delimiter:()=>ve,desktopDir:()=>re,dirname:()=>Ee,documentDir:()=>oe,downloadDir:()=>se,executableDir:()=>le,extname:()=>Ce,fontDir:()=>ce,homeDir:()=>ue,isAbsolute:()=>Te,join:()=>Me,localDataDir:()=>de,normalize:()=>We,pictureDir:()=>me,publicDir:()=>pe,resolve:()=>fe,resolveResource:()=>ge,resourceDir:()=>ye,runtimeDir:()=>he,sep:()=>Pe,templateDir:()=>be,videoDir:()=>_e});function T(){return navigator.appVersion.includes("Win")}var I=(a=>(a[a.Audio=1]="Audio",a[a.Cache=2]="Cache",a[a.Config=3]="Config",a[a.Data=4]="Data",a[a.LocalData=5]="LocalData",a[a.Document=6]="Document",a[a.Download=7]="Download",a[a.Picture=8]="Picture",a[a.Public=9]="Public",a[a.Video=10]="Video",a[a.Resource=11]="Resource",a[a.Temp=12]="Temp",a[a.AppConfig=13]="AppConfig",a[a.AppData=14]="AppData",a[a.AppLocalData=15]="AppLocalData",a[a.AppCache=16]="AppCache",a[a.AppLog=17]="AppLog",a[a.Desktop=18]="Desktop",a[a.Executable=19]="Executable",a[a.Font=20]="Font",a[a.Home=21]="Home",a[a.Runtime=22]="Runtime",a[a.Template=23]="Template",a))(I||{});async function K(){return r("plugin:path|resolve_directory",{directory:13})}async function X(){return r("plugin:path|resolve_directory",{directory:14})}async function B(){return r("plugin:path|resolve_directory",{directory:15})}async function ee(){return r("plugin:path|resolve_directory",{directory:16})}async function te(){return r("plugin:path|resolve_directory",{directory:1})}async function ne(){return r("plugin:path|resolve_directory",{directory:2})}async function ie(){return r("plugin:path|resolve_directory",{directory:3})}async function ae(){return r("plugin:path|resolve_directory",{directory:4})}async function re(){return r("plugin:path|resolve_directory",{directory:18})}async function oe(){return r("plugin:path|resolve_directory",{directory:6})}async function se(){return r("plugin:path|resolve_directory",{directory:7})}async function le(){return r("plugin:path|resolve_directory",{directory:19})}async function ce(){return r("plugin:path|resolve_directory",{directory:20})}async function ue(){return r("plugin:path|resolve_directory",{directory:21})}async function de(){return r("plugin:path|resolve_directory",{directory:5})}async function me(){return r("plugin:path|resolve_directory",{directory:8})}async function pe(){return r("plugin:path|resolve_directory",{directory:9})}async function ye(){return r("plugin:path|resolve_directory",{directory:11})}async function ge(n){return r("plugin:path|resolve_directory",{directory:11,path:n})}async function he(){return r("plugin:path|resolve_directory",{directory:22})}async function be(){return r("plugin:path|resolve_directory",{directory:23})}async function _e(){return r("plugin:path|resolve_directory",{directory:10})}async function we(){return r("plugin:path|resolve_directory",{directory:17})}var Pe=T()?"\\":"/",ve=T()?";":":";async function fe(...n){return r("plugin:path|resolve",{paths:n})}async function We(n){return r("plugin:path|normalize",{path:n})}async function Me(...n){return r("plugin:path|join",{paths:n})}async function Ee(n){return r("plugin:path|dirname",{path:n})}async function Ce(n){return r("plugin:path|extname",{path:n})}async function De(n,e){return r("plugin:path|basename",{path:n,ext:e})}async function Te(n){return r("plugin:path|isAbsolute",{path:n})}var x={};p(x,{CloseRequestedEvent:()=>f,LogicalPosition:()=>w,LogicalSize:()=>_,PhysicalPosition:()=>m,PhysicalSize:()=>d,UserAttentionType:()=>k,WebviewWindow:()=>u,WebviewWindowHandle:()=>P,WindowManager:()=>v,appWindow:()=>z,availableMonitors:()=>xe,currentMonitor:()=>ze,getAll:()=>F,getCurrent:()=>Ae,primaryMonitor:()=>Re});var _=class{constructor(e,t){this.type="Logical";this.width=e,this.height=t}},d=class{constructor(e,t){this.type="Physical";this.width=e,this.height=t}toLogical(e){return new _(this.width/e,this.height/e)}},w=class{constructor(e,t){this.type="Logical";this.x=e,this.y=t}},m=class{constructor(e,t){this.type="Physical";this.x=e,this.y=t}toLogical(e){return new w(this.x/e,this.y/e)}},k=(t=>(t[t.Critical=1]="Critical",t[t.Informational=2]="Informational",t))(k||{});function Ae(){return new u(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function F(){return window.__TAURI_METADATA__.__windows.map(n=>new u(n.label,{skip:!0}))}var L=["tauri://created","tauri://error"],P=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(t),1)}):g(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let o=this.listeners[e];o.splice(o.indexOf(t),1)}):b(e,this.label,t)}async emit(e,t){if(L.includes(e)){for(let o of this.listeners[e]||[])o({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return h(e,this.label,t)}_handleTauriEvent(e,t){return L.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},v=class extends P{async scaleFactor(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new m(e,t))}async outerPosition(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new m(e,t))}async innerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new d(e,t))}async outerSize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new d(e,t))}async isFullscreen(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",t=>{t.payload=N(t.payload),e(t)})}async onMoved(e){return this.listen("tauri://move",t=>{t.payload=O(t.payload),e(t)})}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let o=new f(t);Promise.resolve(e(o)).then(()=>{if(!o.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",s=>{e({...s,payload:!0})}),o=await this.listen("tauri://blur",s=>{e({...s,payload:!1})});return()=>{t(),o()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",c=>{e({...c,payload:{type:"drop",paths:c.payload}})}),o=await this.listen("tauri://file-drop-hover",c=>{e({...c,payload:{type:"hover",paths:c.payload}})}),s=await this.listen("tauri://file-drop-cancelled",c=>{e({...c,payload:{type:"cancel"}})});return()=>{t(),o(),s()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},f=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},u=class extends v{constructor(e,t={}){super(e),t?.skip||i({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async o=>this.emit("tauri://error",o))}static getByLabel(e){return F().some(t=>t.label===e)?new u(e,{skip:!0}):null}},z;"__TAURI_METADATA__"in window?z=new u(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. -Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),z=new u("main",{skip:!0}));function R(n){return n===null?null:{name:n.name,scaleFactor:n.scaleFactor,position:O(n.position),size:N(n.size)}}function O(n){return new m(n.x,n.y)}function N(n){return new d(n.width,n.height)}async function ze(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(R)}async function Re(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(R)}async function xe(){return i({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(n=>n.map(R))}var Se=r;return G(Ie);})(); +"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);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/scripts/stringify-ipc-message-fn.js b/core/tauri/scripts/stringify-ipc-message-fn.js index f601b551416..5330a135881 100644 --- a/core/tauri/scripts/stringify-ipc-message-fn.js +++ b/core/tauri/scripts/stringify-ipc-message-fn.js @@ -8,6 +8,8 @@ let o = {}; val.forEach((v, k) => o[k] = v); return o; + } else if (val instanceof Object && '__TAURI_CHANNEL_MARKER__' in val && typeof val.id === 'number') { + return `__CHANNEL__:${val.id}` } else { return val; } diff --git a/core/tauri/src/api/ipc.rs b/core/tauri/src/api/ipc.rs index 95a511601d2..542157c47ba 100644 --- a/core/tauri/src/api/ipc.rs +++ b/core/tauri/src/api/ipc.rs @@ -10,6 +10,61 @@ use serde::{Deserialize, Serialize}; use serde_json::value::RawValue; pub use serialize_to_javascript::Options as SerializeOptions; use serialize_to_javascript::Serialized; +use tauri_macros::default_runtime; + +use crate::{ + command::{CommandArg, CommandItem}, + InvokeError, Runtime, Window, +}; + +const CHANNEL_PREFIX: &str = "__CHANNEL__:"; + +/// An IPC channel. +#[default_runtime(crate::Wry, wry)] +pub struct Channel { + id: CallbackFn, + window: Window, +} + +impl Serialize for Channel { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + serializer.serialize_str(&format!("{CHANNEL_PREFIX}{}", self.id.0)) + } +} + +impl Channel { + /// Sends the given data through the channel. + pub fn send(&self, data: &S) -> crate::Result<()> { + let js = format_callback(self.id, data)?; + self.window.eval(&js) + } +} + +impl<'de, R: Runtime> CommandArg<'de, R> for Channel { + /// Grabs the [`Window`] from the [`CommandItem`] and returns the associated [`Channel`]. + fn from_command(command: CommandItem<'de, R>) -> Result { + let name = command.name; + let arg = command.key; + let window = command.message.window(); + let value: String = + Deserialize::deserialize(command).map_err(|e| crate::Error::InvalidArgs(name, arg, e))?; + if let Some(callback_id) = value + .split_once(CHANNEL_PREFIX) + .and_then(|(_prefix, id)| id.parse().ok()) + { + return Ok(Channel { + id: CallbackFn(callback_id), + window, + }); + } + Err(InvokeError::from_anyhow(anyhow::anyhow!( + "invalid channel value `{value}`, expected a string in the `{CHANNEL_PREFIX}ID` format" + ))) + } +} /// The `Callback` type is the return value of the `transformCallback` JavaScript function. #[derive(Debug, Clone, Copy, Eq, PartialEq, Serialize, Deserialize)] diff --git a/examples/api/dist/assets/index.css b/examples/api/dist/assets/index.css index 82482576691..54d922d053c 100644 --- a/examples/api/dist/assets/index.css +++ b/examples/api/dist/assets/index.css @@ -1 +1 @@ -*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x:var(--un-empty,/*!*/ /*!*/);--un-pan-y:var(--un-empty,/*!*/ /*!*/);--un-pinch-zoom:var(--un-empty,/*!*/ /*!*/);--un-scroll-snap-strictness:proximity;--un-ordinal:var(--un-empty,/*!*/ /*!*/);--un-slashed-zero:var(--un-empty,/*!*/ /*!*/);--un-numeric-figure:var(--un-empty,/*!*/ /*!*/);--un-numeric-spacing:var(--un-empty,/*!*/ /*!*/);--un-numeric-fraction:var(--un-empty,/*!*/ /*!*/);--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset:var(--un-empty,/*!*/ /*!*/);--un-shadow:0 0 #0000;--un-ring-inset:var(--un-empty,/*!*/ /*!*/);--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur:var(--un-empty,/*!*/ /*!*/);--un-brightness:var(--un-empty,/*!*/ /*!*/);--un-contrast:var(--un-empty,/*!*/ /*!*/);--un-drop-shadow:var(--un-empty,/*!*/ /*!*/);--un-grayscale:var(--un-empty,/*!*/ /*!*/);--un-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-invert:var(--un-empty,/*!*/ /*!*/);--un-saturate:var(--un-empty,/*!*/ /*!*/);--un-sepia:var(--un-empty,/*!*/ /*!*/);--un-backdrop-blur:var(--un-empty,/*!*/ /*!*/);--un-backdrop-brightness:var(--un-empty,/*!*/ /*!*/);--un-backdrop-contrast:var(--un-empty,/*!*/ /*!*/);--un-backdrop-grayscale:var(--un-empty,/*!*/ /*!*/);--un-backdrop-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-invert:var(--un-empty,/*!*/ /*!*/);--un-backdrop-opacity:var(--un-empty,/*!*/ /*!*/);--un-backdrop-saturate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-sepia:var(--un-empty,/*!*/ /*!*/);}@font-face { font-family: 'Fira Code'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firacode/v21/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sFVc.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtQIQ.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bS2SlFPv1weGeLZDtondv3mQ.ttf) format('truetype');}@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/rubik/v26/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.i-codicon-chrome-maximize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3 3v10h10V3H3zm9 9H4V4h8v8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-minimize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14 8v1H3V8h11z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-restore{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M3 5v9h9V5H3zm8 8H4V6h7v7z'/%3E%3Cpath fill-rule='evenodd' d='M5 5h1V4h7v7h-1v1h2V3H5v2z' clip-rule='evenodd'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-clear-all{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m10 12.6l.7.7l1.6-1.6l1.6 1.6l.8-.7L13 11l1.7-1.6l-.8-.8l-1.6 1.7l-1.6-1.7l-.7.8l1.6 1.6l-1.6 1.6zM1 4h14V3H1v1zm0 3h14V6H1v1zm8 2.5V9H1v1h8v-.5zM9 13v-1H1v1h8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m8 8.707l3.646 3.647l.708-.707L8.707 8l3.647-3.646l-.707-.708L8 7.293L4.354 3.646l-.707.708L7.293 8l-3.646 3.646l.707.708L8 8.707z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-cloud-download{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M11.957 6h.05a2.99 2.99 0 0 1 2.116.879a3.003 3.003 0 0 1 0 4.242a2.99 2.99 0 0 1-2.117.879v-1a2.002 2.002 0 0 0 0-4h-.914l-.123-.857a2.49 2.49 0 0 0-2.126-2.122A2.478 2.478 0 0 0 6.231 5.5l-.333.762l-.809-.189A2.49 2.49 0 0 0 4.523 6c-.662 0-1.297.263-1.764.732A2.503 2.503 0 0 0 4.523 11h.498v1h-.498a3.486 3.486 0 0 1-2.628-1.16a3.502 3.502 0 0 1 1.958-5.78a3.462 3.462 0 0 1 1.468.04a3.486 3.486 0 0 1 3.657-2.06A3.479 3.479 0 0 1 11.957 6zm-5.25 5.121l1.314 1.314V7h.994v5.4l1.278-1.279l.707.707l-2.146 2.147h-.708L6 11.829l.707-.708z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-hubot{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M8.48 4h4l.5.5v2.03h.52l.5.5V8l-.5.5h-.52v3l-.5.5H9.36l-2.5 2.76L6 14.4V12H3.5l-.5-.64V8.5h-.5L2 8v-.97l.5-.5H3V4.36L3.53 4h4V2.86A1 1 0 0 1 7 2a1 1 0 0 1 2 0a1 1 0 0 1-.52.83V4zM12 8V5H4v5.86l2.5.14H7v2.19l1.8-2.04l.35-.15H12V8zm-2.12.51a2.71 2.71 0 0 1-1.37.74v-.01a2.71 2.71 0 0 1-2.42-.74l-.7.71c.34.34.745.608 1.19.79c.45.188.932.286 1.42.29a3.7 3.7 0 0 0 2.58-1.07l-.7-.71zM6.49 6.5h-1v1h1v-1zm3 0h1v1h-1v-1z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-link-external{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z'/%3E%3Cpath d='M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-menu{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-radio-tower{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.998 5.58a5.55 5.55 0 0 1 1.62-3.88l-.71-.7a6.45 6.45 0 0 0 0 9.16l.71-.7a5.55 5.55 0 0 1-1.62-3.88zm1.06 0a4.42 4.42 0 0 0 1.32 3.17l.71-.71a3.27 3.27 0 0 1-.76-1.12a3.45 3.45 0 0 1 0-2.67a3.22 3.22 0 0 1 .76-1.13l-.71-.71a4.46 4.46 0 0 0-1.32 3.17zm7.65 3.21l-.71-.71c.33-.32.59-.704.76-1.13a3.449 3.449 0 0 0 0-2.67a3.22 3.22 0 0 0-.76-1.13l.71-.7a4.468 4.468 0 0 1 0 6.34zM13.068 1l-.71.71a5.43 5.43 0 0 1 0 7.74l.71.71a6.45 6.45 0 0 0 0-9.16zM9.993 5.43a1.5 1.5 0 0 1-.245.98a2 2 0 0 1-.27.23l3.44 7.73l-.92.4l-.77-1.73h-5.54l-.77 1.73l-.92-.4l3.44-7.73a1.52 1.52 0 0 1-.33-1.63a1.55 1.55 0 0 1 .56-.68a1.5 1.5 0 0 1 2.325 1.1zm-1.595-.34a.52.52 0 0 0-.25.14a.52.52 0 0 0-.11.22a.48.48 0 0 0 0 .29c.04.09.102.17.18.23a.54.54 0 0 0 .28.08a.51.51 0 0 0 .5-.5a.54.54 0 0 0-.08-.28a.58.58 0 0 0-.23-.18a.48.48 0 0 0-.29 0zm.23 2.05h-.27l-.87 1.94h2l-.86-1.94zm2.2 4.94l-.89-2h-2.88l-.89 2h4.66z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-terminal{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3 1.5L1.5 3v18L3 22.5h18l1.5-1.5V3L21 1.5H3zM3 21V3h18v18H3zm5.656-4.01l1.038 1.061l5.26-5.243v-.912l-5.26-5.26l-1.035 1.06l4.59 4.702l-4.593 4.592z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-window{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14.5 2h-13l-.5.5v11l.5.5h13l.5-.5v-11l-.5-.5zM14 13H2V6h12v7zm0-8H2V3h12v2z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-broadcast{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 88a40 40 0 1 0 40 40a40 40 0 0 0-40-40Zm0 64a24 24 0 1 1 24-24a24.1 24.1 0 0 1-24 24Zm-59-48.9a64.5 64.5 0 0 0 0 49.8a65.4 65.4 0 0 0 13.7 20.4a7.9 7.9 0 0 1 0 11.3a8 8 0 0 1-5.6 2.3a8.3 8.3 0 0 1-5.7-2.3a80 80 0 0 1-17.1-25.5a79.9 79.9 0 0 1 0-62.2a80 80 0 0 1 17.1-25.5a8 8 0 0 1 11.3 0a7.9 7.9 0 0 1 0 11.3A65.4 65.4 0 0 0 69 103.1Zm132.7 56a80 80 0 0 1-17.1 25.5a8.3 8.3 0 0 1-5.7 2.3a8 8 0 0 1-5.6-2.3a7.9 7.9 0 0 1 0-11.3a65.4 65.4 0 0 0 13.7-20.4a64.5 64.5 0 0 0 0-49.8a65.4 65.4 0 0 0-13.7-20.4a7.9 7.9 0 0 1 0-11.3a8 8 0 0 1 11.3 0a80 80 0 0 1 17.1 25.5a79.9 79.9 0 0 1 0 62.2ZM54.5 201.5a8.1 8.1 0 0 1 0 11.4a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a121.8 121.8 0 0 1-25.7-38.2a120.7 120.7 0 0 1 0-93.4a121.8 121.8 0 0 1 25.7-38.2a8.1 8.1 0 0 1 11.4 11.4A103.5 103.5 0 0 0 24 128a103.5 103.5 0 0 0 30.5 73.5ZM248 128a120.2 120.2 0 0 1-9.4 46.7a121.8 121.8 0 0 1-25.7 38.2a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4A103.5 103.5 0 0 0 232 128a103.5 103.5 0 0 0-30.5-73.5a8.1 8.1 0 1 1 11.4-11.4a121.8 121.8 0 0 1 25.7 38.2A120.2 120.2 0 0 1 248 128Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-hand-waving{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.2 104l-20-34.7a28.1 28.1 0 0 0-47.3-1.9l-17.3-30a28.1 28.1 0 0 0-38.3-10.3a29.4 29.4 0 0 0-9.9 9.6a27.9 27.9 0 0 0-11.5-6.2a27.2 27.2 0 0 0-21.2 2.8a27.9 27.9 0 0 0-10.3 38.2l3.4 5.8A28.5 28.5 0 0 0 36 81a28.1 28.1 0 0 0-10.2 38.2l42 72.8a88 88 0 1 0 152.4-88Zm-6.7 62.6a71.2 71.2 0 0 1-33.5 43.7A72.1 72.1 0 0 1 81.6 184l-42-72.8a12 12 0 0 1 20.8-12l22 38.1l.6.9v.2l.5.5l.2.2l.7.6h.1l.7.5h.3l.6.3h.2l.9.3h.1l.8.2h2.2l.9-.2h.3l.6-.2h.3l.9-.4a8.1 8.1 0 0 0 2.9-11l-22-38.1l-16-27.7a12 12 0 0 1-1.2-9.1a11.8 11.8 0 0 1 5.6-7.3a12 12 0 0 1 9.1-1.2a12.5 12.5 0 0 1 7.3 5.6l8 14h.1l26 45a7 7 0 0 0 1.5 1.9a8 8 0 0 0 12.3-9.9l-26-45a12 12 0 1 1 20.8-12l30 51.9l6.3 11a48.1 48.1 0 0 0-10.9 61a8 8 0 0 0 13.8-8a32 32 0 0 1 11.7-43.7l.7-.4l.5-.4h.1l.6-.6l.5-.5l.4-.5l.3-.6h.1l.2-.5v-.2a1.9 1.9 0 0 0 .2-.7h.1c0-.2.1-.4.1-.6s0-.2.1-.2v-2.1a6.4 6.4 0 0 0-.2-.7a1.9 1.9 0 0 0-.2-.7v-.2c0-.2-.1-.3-.2-.5l-.3-.7l-10-17.4a12 12 0 0 1 13.5-17.5a11.8 11.8 0 0 1 7.2 5.5l20 34.7a70.9 70.9 0 0 1 7.2 53.8Zm-125.8 78a8.2 8.2 0 0 1-6.6 3.4a8.6 8.6 0 0 1-4.6-1.4A117.9 117.9 0 0 1 41.1 208a8 8 0 1 1 13.8-8a102.6 102.6 0 0 0 30.8 33.4a8.1 8.1 0 0 1 2 11.2ZM168 31a8 8 0 0 1 8-8a60.2 60.2 0 0 1 52 30a7.9 7.9 0 0 1-3 10.9a7.1 7.1 0 0 1-4 1.1a8 8 0 0 1-6.9-4A44 44 0 0 0 176 39a8 8 0 0 1-8-8Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M224.3 150.3a8.1 8.1 0 0 0-7.8-5.7l-2.2.4A84 84 0 0 1 111 41.6a5.7 5.7 0 0 0 .3-1.8a7.9 7.9 0 0 0-10.3-8.1a100 100 0 1 0 123.3 123.2a7.2 7.2 0 0 0 0-4.6ZM128 212A84 84 0 0 1 92.8 51.7a99.9 99.9 0 0 0 111.5 111.5A84.4 84.4 0 0 1 128 212Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 60a68 68 0 1 0 68 68a68.1 68.1 0 0 0-68-68Zm0 120a52 52 0 1 1 52-52a52 52 0 0 1-52 52Zm-8-144V16a8 8 0 0 1 16 0v20a8 8 0 0 1-16 0ZM43.1 54.5a8.1 8.1 0 1 1 11.4-11.4l14.1 14.2a8 8 0 0 1 0 11.3a8.1 8.1 0 0 1-11.3 0ZM36 136H16a8 8 0 0 1 0-16h20a8 8 0 0 1 0 16Zm32.6 51.4a8 8 0 0 1 0 11.3l-14.1 14.2a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4l14.2-14.1a8 8 0 0 1 11.3 0ZM136 220v20a8 8 0 0 1-16 0v-20a8 8 0 0 1 16 0Zm76.9-18.5a8.1 8.1 0 0 1 0 11.4a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3l-14.1-14.2a8 8 0 0 1 11.3-11.3ZM248 128a8 8 0 0 1-8 8h-20a8 8 0 0 1 0-16h20a8 8 0 0 1 8 8Zm-60.6-59.4a8 8 0 0 1 0-11.3l14.1-14.2a8.1 8.1 0 0 1 11.4 11.4l-14.2 14.1a8.1 8.1 0 0 1-11.3 0Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.note{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);padding:0.5rem;text-decoration:none;}.note-red{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);background-color:rgba(185,28,28,0.1);padding:0.5rem;text-decoration:none;}.nv{position:relative;display:flex;align-items:center;border-radius:0.25rem;padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.nv_selected{position:relative;display:flex;align-items:center;border-left-width:4px;border-left-style:solid;border-radius:0.25rem;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));color:rgba(53,120,229,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.input{height:2.5rem;display:flex;align-items:center;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(233,236,239,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.btn{user-select:none;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));padding:0.5rem;font-weight:400;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));color:rgba(255,255,255,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.nv_selected:hover,.nv:hover{border-left-width:4px;border-left-style:solid;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.dark .note{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);}.dark .note-red{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);background-color:rgba(185,28,28,0.1);}.btn:hover{--un-bg-opacity:1;background-color:rgba(45,102,195,var(--un-bg-opacity));}.dark .btn{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));font-weight:600;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .btn:hover{--un-bg-opacity:1;background-color:rgba(57,202,232,var(--un-bg-opacity));}.dark .input{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.dark .note-red::after,.note-red::after{--un-bg-opacity:1;background-color:rgba(185,28,28,var(--un-bg-opacity));}.btn:active{--un-bg-opacity:1;background-color:rgba(37,84,160,var(--un-bg-opacity));}.dark .btn:active{--un-bg-opacity:1;background-color:rgba(25,181,213,var(--un-bg-opacity));}.dark .nv_selected,.dark .nv_selected:hover,.dark .nv:hover{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));} ::-webkit-scrollbar-thumb { background-color: #3578E5; } .dark ::-webkit-scrollbar-thumb { background-color: #67d6ed; } code { font-size: 0.75rem; font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; border-radius: 0.25rem; background-color: #d6d8da; } .code-block { font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size: 0.875rem; } .dark code { background-color: #282a2e; } .visible{visibility:visible;}.absolute{position:absolute;}.left-2{left:0.5rem;}.top-2{top:0.5rem;}.z-2000{z-index:2000;}.grid{display:grid;}.grid-rows-\[2fr_auto\]{grid-template-rows:2fr auto;}.grid-rows-\[2px_2rem_1fr\]{grid-template-rows:2px 2rem 1fr;}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr;}.my-2{margin-top:0.5rem;margin-bottom:0.5rem;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*,.children\:h10>*{height:2.5rem;}.children\:h-100\%>*,.h-100\%{height:100%;}.children\:w-12>*{width:3rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.children\:inline-flex>*{display:inline-flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.children\:grow>*,.grow{flex-grow:1;}.flex-row{flex-direction:row;}.flex-col{flex-direction:column;}.flex-wrap{flex-wrap:wrap;}@keyframes fade-in{from{opacity:0}to{opacity:1}}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.animate-fade-in{animation:fade-in 1s linear 1;}.animate-spin{animation:spin 1s linear infinite;}.animate-duration-300ms{animation-duration:300ms;}.cursor-ns-resize{cursor:ns-resize;}.cursor-pointer{cursor:pointer;}.select-none{user-select:none;}.children\:items-center>*,.items-center{align-items:center;}.self-center{align-self:center;}.children\:justify-center>*,.justify-center{justify-content:center;}.justify-between{justify-content:space-between;}.gap-1{grid-gap:0.25rem;gap:0.25rem;}.gap-2{grid-gap:0.5rem;gap:0.5rem;}.overflow-hidden{overflow:hidden;}.overflow-y-auto{overflow-y:auto;}.rd-1{border-radius:0.25rem;}.rd-8{border-radius:2rem;}.bg-accent{--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));}.bg-black\/20{background-color:rgba(0,0,0,0.2);}.bg-darkPrimaryLighter{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5{background-color:rgba(255,255,255,0.05);}.dark .dark\:bg-darkAccent{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));}.dark .dark\:bg-darkPrimary{--un-bg-opacity:1;background-color:rgba(27,27,29,var(--un-bg-opacity));}.dark .dark\:hover\:bg-darkHoverOverlay:hover{--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.hover\:bg-hoverOverlay:hover{--un-bg-opacity:.05;background-color:rgba(0,0,0,var(--un-bg-opacity));}.active\:bg-accentDark:active{--un-bg-opacity:1;background-color:rgba(48,108,206,var(--un-bg-opacity));}.active\:bg-hoverOverlay\/25:active{background-color:rgba(0,0,0,0.25);}.active\:bg-hoverOverlayDarker:active{--un-bg-opacity:.1;background-color:rgba(0,0,0,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkAccentDark:active{--un-bg-opacity:1;background-color:rgba(73,206,233,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkHoverOverlay\/25:active{background-color:hsla(0,0%,100%,0.25);}.dark .dark\:active\:bg-darkHoverOverlayDarker:active{--un-bg-opacity:.1;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.p-1{padding:0.25rem;}.p-7{padding:1.75rem;}.px{padding-left:1rem;padding-right:1rem;}.px-2{padding-left:0.5rem;padding-right:0.5rem;}.px-5{padding-left:1.25rem;padding-right:1.25rem;}.children-pb-2>*{padding-bottom:0.5rem;}.children-pt8>*{padding-top:2rem;}.pl-2{padding-left:0.5rem;}.all\:font-mono *{font-family:"Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}.all\:text-xs *{font-size:0.75rem;line-height:1rem;}.text-sm{font-size:0.875rem;line-height:1.25rem;}.font-700{font-weight:700;}.font-semibold{font-weight:600;}.dark .dark\:text-darkAccent{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));}.dark .dark\:text-darkAccentText,.text-primaryText{--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .dark\:text-darkPrimaryText,.text-darkPrimaryText{--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.text-accent{--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.text-accentText{--un-text-opacity:1;color:rgba(255,255,255,var(--un-text-opacity));}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\:pl-10{padding-left:2.5rem;}.lt-sm\:shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}}*:not(h1,h2,h3,h4,h5,h6){margin:0;padding:0}*{box-sizing:border-box;font-family:Rubik,sans-serif}::-webkit-scrollbar{width:.25rem;height:3px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.25rem}code{padding:.05rem .25rem}code.code-block{padding:.5rem}#sidebar{width:18.75rem}@media screen and (max-width: 640px){#sidebar{--translate-x: -18.75rem;transform:translate(var(--translate-x))}}.spinner.svelte-4xesec{height:1.2rem;width:1.2rem;border-radius:50rem;color:currentColor;border:2px dashed currentColor} +*,::before,::after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x:var(--un-empty,/*!*/ /*!*/);--un-pan-y:var(--un-empty,/*!*/ /*!*/);--un-pinch-zoom:var(--un-empty,/*!*/ /*!*/);--un-scroll-snap-strictness:proximity;--un-ordinal:var(--un-empty,/*!*/ /*!*/);--un-slashed-zero:var(--un-empty,/*!*/ /*!*/);--un-numeric-figure:var(--un-empty,/*!*/ /*!*/);--un-numeric-spacing:var(--un-empty,/*!*/ /*!*/);--un-numeric-fraction:var(--un-empty,/*!*/ /*!*/);--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset:var(--un-empty,/*!*/ /*!*/);--un-shadow:0 0 #0000;--un-ring-inset:var(--un-empty,/*!*/ /*!*/);--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,0.5);--un-blur:var(--un-empty,/*!*/ /*!*/);--un-brightness:var(--un-empty,/*!*/ /*!*/);--un-contrast:var(--un-empty,/*!*/ /*!*/);--un-drop-shadow:var(--un-empty,/*!*/ /*!*/);--un-grayscale:var(--un-empty,/*!*/ /*!*/);--un-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-invert:var(--un-empty,/*!*/ /*!*/);--un-saturate:var(--un-empty,/*!*/ /*!*/);--un-sepia:var(--un-empty,/*!*/ /*!*/);--un-backdrop-blur:var(--un-empty,/*!*/ /*!*/);--un-backdrop-brightness:var(--un-empty,/*!*/ /*!*/);--un-backdrop-contrast:var(--un-empty,/*!*/ /*!*/);--un-backdrop-grayscale:var(--un-empty,/*!*/ /*!*/);--un-backdrop-hue-rotate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-invert:var(--un-empty,/*!*/ /*!*/);--un-backdrop-opacity:var(--un-empty,/*!*/ /*!*/);--un-backdrop-saturate:var(--un-empty,/*!*/ /*!*/);--un-backdrop-sepia:var(--un-empty,/*!*/ /*!*/);}@font-face { font-family: 'Fira Code'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firacode/v21/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sFVc.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtQIQ.ttf) format('truetype');}@font-face { font-family: 'Fira Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url(https://fonts.gstatic.com/s/firamono/v14/N0bS2SlFPv1weGeLZDtondv3mQ.ttf) format('truetype');}@font-face { font-family: 'Rubik'; font-style: normal; font-weight: 400; font-display: swap; src: url(https://fonts.gstatic.com/s/rubik/v26/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.i-codicon-chrome-maximize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M3 3v10h10V3H3zm9 9H4V4h8v8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-minimize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14 8v1H3V8h11z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-chrome-restore{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M3 5v9h9V5H3zm8 8H4V6h7v7z'/%3E%3Cpath fill-rule='evenodd' d='M5 5h1V4h7v7h-1v1h2V3H5v2z' clip-rule='evenodd'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-clear-all{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m10 12.6l.7.7l1.6-1.6l1.6 1.6l.8-.7L13 11l1.7-1.6l-.8-.8l-1.6 1.7l-1.6-1.7l-.7.8l1.6 1.6l-1.6 1.6zM1 4h14V3H1v1zm0 3h14V6H1v1zm8 2.5V9H1v1h8v-.5zM9 13v-1H1v1h8z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='m8 8.707l3.646 3.647l.708-.707L8.707 8l3.647-3.646l-.707-.708L8 7.293L4.354 3.646l-.707.708L7.293 8l-3.646 3.646l.707.708L8 8.707z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-link-external{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M1.5 1H6v1H2v12h12v-4h1v4.5l-.5.5h-13l-.5-.5v-13l.5-.5z'/%3E%3Cpath d='M15 1.5V8h-1V2.707L7.243 9.465l-.707-.708L13.293 2H8V1h6.5l.5.5z'/%3E%3C/g%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-menu{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 5H0V4h16v1zm0 8H0v-1h16v1zm0-4.008H0V8h16v.992z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-radio-tower{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M2.998 5.58a5.55 5.55 0 0 1 1.62-3.88l-.71-.7a6.45 6.45 0 0 0 0 9.16l.71-.7a5.55 5.55 0 0 1-1.62-3.88zm1.06 0a4.42 4.42 0 0 0 1.32 3.17l.71-.71a3.27 3.27 0 0 1-.76-1.12a3.45 3.45 0 0 1 0-2.67a3.22 3.22 0 0 1 .76-1.13l-.71-.71a4.46 4.46 0 0 0-1.32 3.17zm7.65 3.21l-.71-.71c.33-.32.59-.704.76-1.13a3.449 3.449 0 0 0 0-2.67a3.22 3.22 0 0 0-.76-1.13l.71-.7a4.468 4.468 0 0 1 0 6.34zM13.068 1l-.71.71a5.43 5.43 0 0 1 0 7.74l.71.71a6.45 6.45 0 0 0 0-9.16zM9.993 5.43a1.5 1.5 0 0 1-.245.98a2 2 0 0 1-.27.23l3.44 7.73l-.92.4l-.77-1.73h-5.54l-.77 1.73l-.92-.4l3.44-7.73a1.52 1.52 0 0 1-.33-1.63a1.55 1.55 0 0 1 .56-.68a1.5 1.5 0 0 1 2.325 1.1zm-1.595-.34a.52.52 0 0 0-.25.14a.52.52 0 0 0-.11.22a.48.48 0 0 0 0 .29c.04.09.102.17.18.23a.54.54 0 0 0 .28.08a.51.51 0 0 0 .5-.5a.54.54 0 0 0-.08-.28a.58.58 0 0 0-.23-.18a.48.48 0 0 0-.29 0zm.23 2.05h-.27l-.87 1.94h2l-.86-1.94zm2.2 4.94l-.89-2h-2.88l-.89 2h4.66z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-terminal{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' fill-rule='evenodd' d='M3 1.5L1.5 3v18L3 22.5h18l1.5-1.5V3L21 1.5H3zM3 21V3h18v18H3zm5.656-4.01l1.038 1.061l5.26-5.243v-.912l-5.26-5.26l-1.035 1.06l4.59 4.702l-4.593 4.592z' clip-rule='evenodd'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-codicon-window{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 16 16' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M14.5 2h-13l-.5.5v11l.5.5h13l.5-.5v-11l-.5-.5zM14 13H2V6h12v7zm0-8H2V3h12v2z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-broadcast{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 88a40 40 0 1 0 40 40a40 40 0 0 0-40-40Zm0 64a24 24 0 1 1 24-24a24.1 24.1 0 0 1-24 24Zm-59-48.9a64.5 64.5 0 0 0 0 49.8a65.4 65.4 0 0 0 13.7 20.4a7.9 7.9 0 0 1 0 11.3a8 8 0 0 1-5.6 2.3a8.3 8.3 0 0 1-5.7-2.3a80 80 0 0 1-17.1-25.5a79.9 79.9 0 0 1 0-62.2a80 80 0 0 1 17.1-25.5a8 8 0 0 1 11.3 0a7.9 7.9 0 0 1 0 11.3A65.4 65.4 0 0 0 69 103.1Zm132.7 56a80 80 0 0 1-17.1 25.5a8.3 8.3 0 0 1-5.7 2.3a8 8 0 0 1-5.6-2.3a7.9 7.9 0 0 1 0-11.3a65.4 65.4 0 0 0 13.7-20.4a64.5 64.5 0 0 0 0-49.8a65.4 65.4 0 0 0-13.7-20.4a7.9 7.9 0 0 1 0-11.3a8 8 0 0 1 11.3 0a80 80 0 0 1 17.1 25.5a79.9 79.9 0 0 1 0 62.2ZM54.5 201.5a8.1 8.1 0 0 1 0 11.4a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a121.8 121.8 0 0 1-25.7-38.2a120.7 120.7 0 0 1 0-93.4a121.8 121.8 0 0 1 25.7-38.2a8.1 8.1 0 0 1 11.4 11.4A103.5 103.5 0 0 0 24 128a103.5 103.5 0 0 0 30.5 73.5ZM248 128a120.2 120.2 0 0 1-9.4 46.7a121.8 121.8 0 0 1-25.7 38.2a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4A103.5 103.5 0 0 0 232 128a103.5 103.5 0 0 0-30.5-73.5a8.1 8.1 0 1 1 11.4-11.4a121.8 121.8 0 0 1 25.7 38.2A120.2 120.2 0 0 1 248 128Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-hand-waving{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.2 104l-20-34.7a28.1 28.1 0 0 0-47.3-1.9l-17.3-30a28.1 28.1 0 0 0-38.3-10.3a29.4 29.4 0 0 0-9.9 9.6a27.9 27.9 0 0 0-11.5-6.2a27.2 27.2 0 0 0-21.2 2.8a27.9 27.9 0 0 0-10.3 38.2l3.4 5.8A28.5 28.5 0 0 0 36 81a28.1 28.1 0 0 0-10.2 38.2l42 72.8a88 88 0 1 0 152.4-88Zm-6.7 62.6a71.2 71.2 0 0 1-33.5 43.7A72.1 72.1 0 0 1 81.6 184l-42-72.8a12 12 0 0 1 20.8-12l22 38.1l.6.9v.2l.5.5l.2.2l.7.6h.1l.7.5h.3l.6.3h.2l.9.3h.1l.8.2h2.2l.9-.2h.3l.6-.2h.3l.9-.4a8.1 8.1 0 0 0 2.9-11l-22-38.1l-16-27.7a12 12 0 0 1-1.2-9.1a11.8 11.8 0 0 1 5.6-7.3a12 12 0 0 1 9.1-1.2a12.5 12.5 0 0 1 7.3 5.6l8 14h.1l26 45a7 7 0 0 0 1.5 1.9a8 8 0 0 0 12.3-9.9l-26-45a12 12 0 1 1 20.8-12l30 51.9l6.3 11a48.1 48.1 0 0 0-10.9 61a8 8 0 0 0 13.8-8a32 32 0 0 1 11.7-43.7l.7-.4l.5-.4h.1l.6-.6l.5-.5l.4-.5l.3-.6h.1l.2-.5v-.2a1.9 1.9 0 0 0 .2-.7h.1c0-.2.1-.4.1-.6s0-.2.1-.2v-2.1a6.4 6.4 0 0 0-.2-.7a1.9 1.9 0 0 0-.2-.7v-.2c0-.2-.1-.3-.2-.5l-.3-.7l-10-17.4a12 12 0 0 1 13.5-17.5a11.8 11.8 0 0 1 7.2 5.5l20 34.7a70.9 70.9 0 0 1 7.2 53.8Zm-125.8 78a8.2 8.2 0 0 1-6.6 3.4a8.6 8.6 0 0 1-4.6-1.4A117.9 117.9 0 0 1 41.1 208a8 8 0 1 1 13.8-8a102.6 102.6 0 0 0 30.8 33.4a8.1 8.1 0 0 1 2 11.2ZM168 31a8 8 0 0 1 8-8a60.2 60.2 0 0 1 52 30a7.9 7.9 0 0 1-3 10.9a7.1 7.1 0 0 1-4 1.1a8 8 0 0 1-6.9-4A44 44 0 0 0 176 39a8 8 0 0 1-8-8Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M224.3 150.3a8.1 8.1 0 0 0-7.8-5.7l-2.2.4A84 84 0 0 1 111 41.6a5.7 5.7 0 0 0 .3-1.8a7.9 7.9 0 0 0-10.3-8.1a100 100 0 1 0 123.3 123.2a7.2 7.2 0 0 0 0-4.6ZM128 212A84 84 0 0 1 92.8 51.7a99.9 99.9 0 0 0 111.5 111.5A84.4 84.4 0 0 1 128 212Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.i-ph-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg preserveAspectRatio='xMidYMid meet' viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M128 60a68 68 0 1 0 68 68a68.1 68.1 0 0 0-68-68Zm0 120a52 52 0 1 1 52-52a52 52 0 0 1-52 52Zm-8-144V16a8 8 0 0 1 16 0v20a8 8 0 0 1-16 0ZM43.1 54.5a8.1 8.1 0 1 1 11.4-11.4l14.1 14.2a8 8 0 0 1 0 11.3a8.1 8.1 0 0 1-11.3 0ZM36 136H16a8 8 0 0 1 0-16h20a8 8 0 0 1 0 16Zm32.6 51.4a8 8 0 0 1 0 11.3l-14.1 14.2a8.3 8.3 0 0 1-5.7 2.3a8.5 8.5 0 0 1-5.7-2.3a8.1 8.1 0 0 1 0-11.4l14.2-14.1a8 8 0 0 1 11.3 0ZM136 220v20a8 8 0 0 1-16 0v-20a8 8 0 0 1 16 0Zm76.9-18.5a8.1 8.1 0 0 1 0 11.4a8.5 8.5 0 0 1-5.7 2.3a8.3 8.3 0 0 1-5.7-2.3l-14.1-14.2a8 8 0 0 1 11.3-11.3ZM248 128a8 8 0 0 1-8 8h-20a8 8 0 0 1 0-16h20a8 8 0 0 1 8 8Zm-60.6-59.4a8 8 0 0 1 0-11.3l14.1-14.2a8.1 8.1 0 0 1 11.4 11.4l-14.2 14.1a8.1 8.1 0 0 1-11.3 0Z'/%3E%3C/svg%3E");mask:var(--un-icon) no-repeat;mask-size:100% 100%;-webkit-mask:var(--un-icon) no-repeat;-webkit-mask-size:100% 100%;background-color:currentColor;width:1em;height:1em;}.note{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);padding:0.5rem;text-decoration:none;}.note-red{position:relative;display:inline-flex;align-items:center;border-left-width:4px;border-left-style:solid;--un-border-opacity:1;border-color:rgba(53,120,229,var(--un-border-opacity));border-radius:0.25rem;background-color:rgba(53,120,229,0.1);background-color:rgba(185,28,28,0.1);padding:0.5rem;text-decoration:none;}.nv{position:relative;display:flex;align-items:center;border-radius:0.25rem;padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.nv_selected{position:relative;display:flex;align-items:center;border-left-width:4px;border-left-style:solid;border-radius:0.25rem;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(194,197,202,var(--un-text-opacity));color:rgba(53,120,229,var(--un-text-opacity));text-decoration:none;transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:125ms;}.input{height:2.5rem;display:flex;align-items:center;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(233,236,239,var(--un-bg-opacity));padding:0.5rem;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.btn{user-select:none;border-radius:0.25rem;border-style:none;--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));padding:0.5rem;font-weight:400;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));color:rgba(255,255,255,var(--un-text-opacity));--un-shadow:var(--un-shadow-inset) 0 4px 6px -1px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 2px 4px -2px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);outline:2px solid transparent;outline-offset:2px;}.nv_selected:hover,.nv:hover{border-left-width:4px;border-left-style:solid;--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.dark .note{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);}.dark .note-red{--un-border-opacity:1;border-color:rgba(103,214,237,var(--un-border-opacity));background-color:rgba(103,214,237,0.1);background-color:rgba(185,28,28,0.1);}.btn:hover{--un-bg-opacity:1;background-color:rgba(45,102,195,var(--un-bg-opacity));}.dark .btn{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));font-weight:600;--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.dark .btn:hover{--un-bg-opacity:1;background-color:rgba(57,202,232,var(--un-bg-opacity));}.dark .input{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.dark .note-red::after,.note-red::after{--un-bg-opacity:1;background-color:rgba(185,28,28,var(--un-bg-opacity));}.btn:active{--un-bg-opacity:1;background-color:rgba(37,84,160,var(--un-bg-opacity));}.dark .btn:active{--un-bg-opacity:1;background-color:rgba(25,181,213,var(--un-bg-opacity));}.dark .nv_selected,.dark .nv_selected:hover,.dark .nv:hover{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));} ::-webkit-scrollbar-thumb { background-color: #3578E5; } .dark ::-webkit-scrollbar-thumb { background-color: #67d6ed; } code { font-size: 0.75rem; font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; border-radius: 0.25rem; background-color: #d6d8da; } .code-block { font-family: "Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; font-size: 0.875rem; } .dark code { background-color: #282a2e; } .visible{visibility:visible;}.absolute{position:absolute;}.left-2{left:0.5rem;}.top-2{top:0.5rem;}.z-2000{z-index:2000;}.grid{display:grid;}.grid-rows-\[2fr_auto\]{grid-template-rows:2fr auto;}.grid-rows-\[2px_2rem_1fr\]{grid-template-rows:2px 2rem 1fr;}.grid-rows-\[auto_1fr\]{grid-template-rows:auto 1fr;}.my-2{margin-top:0.5rem;margin-bottom:0.5rem;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*{height:2.5rem;}.children\:h-100\%>*,.h-100\%{height:100%;}.children\:w-12>*{width:3rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.children\:inline-flex>*{display:inline-flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.children\:grow>*,.grow{flex-grow:1;}.flex-row{flex-direction:row;}.flex-col{flex-direction:column;}.flex-wrap{flex-wrap:wrap;}@keyframes fade-in{from{opacity:0}to{opacity:1}}.animate-fade-in{animation:fade-in 1s linear 1;}.animate-duration-300ms{animation-duration:300ms;}.cursor-ns-resize{cursor:ns-resize;}.cursor-pointer{cursor:pointer;}.select-none{user-select:none;}.children\:items-center>*,.items-center{align-items:center;}.self-center{align-self:center;}.children\:justify-center>*,.justify-center{justify-content:center;}.justify-between{justify-content:space-between;}.gap-1{grid-gap:0.25rem;gap:0.25rem;}.gap-2{grid-gap:0.5rem;gap:0.5rem;}.overflow-hidden{overflow:hidden;}.overflow-y-auto{overflow-y:auto;}.rd-1{border-radius:0.25rem;}.rd-8{border-radius:2rem;}.bg-accent{--un-bg-opacity:1;background-color:rgba(53,120,229,var(--un-bg-opacity));}.bg-black\/20{background-color:rgba(0,0,0,0.2);}.bg-darkPrimaryLighter{--un-bg-opacity:1;background-color:rgba(36,37,38,var(--un-bg-opacity));}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5{background-color:rgba(255,255,255,0.05);}.dark .dark\:bg-darkAccent{--un-bg-opacity:1;background-color:rgba(103,214,237,var(--un-bg-opacity));}.dark .dark\:bg-darkPrimary{--un-bg-opacity:1;background-color:rgba(27,27,29,var(--un-bg-opacity));}.dark .dark\:hover\:bg-darkHoverOverlay:hover{--un-bg-opacity:.05;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.hover\:bg-hoverOverlay:hover{--un-bg-opacity:.05;background-color:rgba(0,0,0,var(--un-bg-opacity));}.active\:bg-accentDark:active{--un-bg-opacity:1;background-color:rgba(48,108,206,var(--un-bg-opacity));}.active\:bg-hoverOverlay\/25:active{background-color:rgba(0,0,0,0.25);}.active\:bg-hoverOverlayDarker:active{--un-bg-opacity:.1;background-color:rgba(0,0,0,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkAccentDark:active{--un-bg-opacity:1;background-color:rgba(73,206,233,var(--un-bg-opacity));}.dark .dark\:active\:bg-darkHoverOverlay\/25:active{background-color:hsla(0,0%,100%,0.25);}.dark .dark\:active\:bg-darkHoverOverlayDarker:active{--un-bg-opacity:.1;background-color:hsla(0,0%,100%,var(--un-bg-opacity));}.p-1{padding:0.25rem;}.p-7{padding:1.75rem;}.px{padding-left:1rem;padding-right:1rem;}.px-2{padding-left:0.5rem;padding-right:0.5rem;}.px-5{padding-left:1.25rem;padding-right:1.25rem;}.children-pb-2>*{padding-bottom:0.5rem;}.children-pt8>*{padding-top:2rem;}.pl-2{padding-left:0.5rem;}.all\:font-mono *{font-family:"Fira Code","Fira Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;}.all\:text-xs *{font-size:0.75rem;line-height:1rem;}.text-sm{font-size:0.875rem;line-height:1.25rem;}.font-700{font-weight:700;}.font-semibold{font-weight:600;}.dark .dark\:text-darkAccent{--un-text-opacity:1;color:rgba(103,214,237,var(--un-text-opacity));}.dark .dark\:text-darkPrimaryText,.text-darkPrimaryText{--un-text-opacity:1;color:rgba(227,227,227,var(--un-text-opacity));}.text-accent{--un-text-opacity:1;color:rgba(53,120,229,var(--un-text-opacity));}.text-primaryText{--un-text-opacity:1;color:rgba(28,30,33,var(--un-text-opacity));}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\:pl-10{padding-left:2.5rem;}.lt-sm\:shadow{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:shadow-lg{--un-shadow:var(--un-shadow-inset) 0 10px 15px -3px var(--un-shadow-color, rgba(0,0,0,0.1)),var(--un-shadow-inset) 0 4px 6px -4px var(--un-shadow-color, rgba(0,0,0,0.1));box-shadow:var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow);}.lt-sm\:transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}}*:not(h1,h2,h3,h4,h5,h6){margin:0;padding:0}*{box-sizing:border-box;font-family:Rubik,sans-serif}::-webkit-scrollbar{width:.25rem;height:3px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{border-radius:.25rem}code{padding:.05rem .25rem}code.code-block{padding:.5rem}#sidebar{width:18.75rem}@media screen and (max-width: 640px){#sidebar{--translate-x: -18.75rem;transform:translate(var(--translate-x))}} diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index 61cf5dc4d1c..d37596e51db 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,39 +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"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const c of r.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerpolicy&&(r.referrerPolicy=s.referrerpolicy),s.crossorigin==="use-credentials"?r.credentials="include":s.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();function U(){}function Ul(e){return e()}function gl(){return Object.create(null)}function we(e){e.forEach(Ul)}function os(e){return typeof e=="function"}function Ie(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let Ln;function rs(e,t){return Ln||(Ln=document.createElement("a")),Ln.href=t,e===Ln.href}function us(e){return Object.keys(e).length===0}function cs(e,...t){if(e==null)return U;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function ds(e,t,n){e.$$.on_destroy.push(cs(t,n))}function l(e,t){e.appendChild(t)}function b(e,t,n){e.insertBefore(t,n||null)}function _(e){e.parentNode.removeChild(e)}function Dn(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function ps(e){return function(t){return t.preventDefault(),e.call(this,t)}}function o(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function Q(e){return e===""?null:+e}function ms(e){return Array.from(e.childNodes)}function $(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}function G(e,t){e.value=t==null?"":t}function In(e,t){for(let n=0;n{Pn.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function kl(e){e&&e.c()}function mi(e,t,n,i){const{fragment:s,on_mount:r,on_destroy:c,after_update:f}=e.$$;s&&s.m(t,n),i||Ot(()=>{const h=r.map(Ul).filter(os);c?c.push(...h):we(h),e.$$.on_mount=[]}),f.forEach(Ot)}function hi(e,t){const n=e.$$;n.fragment!==null&&(we(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ws(e,t){e.$$.dirty[0]===-1&&(Et.push(e),bs(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const p=M.length?M[0]:C;return m.ctx&&s(m.ctx[g],m.ctx[g]=p)&&(!m.skip_bound&&m.bound[g]&&m.bound[g](p),y&&ws(e,g)),C}):[],m.update(),y=!0,we(m.before_update),m.fragment=i?i(m.ctx):!1,t.target){if(t.hydrate){const g=ms(t.target);m.fragment&&m.fragment.l(g),g.forEach(_)}else m.fragment&&m.fragment.c();t.intro&&pi(e.$$.fragment),mi(e,t.target,t.anchor,t.customElement),ql()}St(h)}class Je{$destroy(){hi(this,1),this.$destroy=U}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}$set(t){this.$$set&&!us(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const wt=[];function ks(e,t=U){let n;const i=new Set;function s(f){if(Ie(e,f)&&(e=f,n)){const h=!wt.length;for(const m of i)m[1](),wt.push(m,e);if(h){for(let m=0;m{i.delete(m),i.size===0&&(n(),n=null)}}return{set:s,update:r,subscribe:c}}var Ms=Object.defineProperty,ot=(e,t)=>{for(var n in t)Ms(e,n,{get:t[n],enumerable:!0})},zs={};ot(zs,{convertFileSrc:()=>Cs,invoke:()=>Dt,transformCallback:()=>Rn});function Ws(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function Rn(e,t=!1){let n=Ws(),i=`_${n}`;return Object.defineProperty(window,i,{value:s=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(s)),writable:!1,configurable:!0}),n}async function Dt(e,t={}){return new Promise((n,i)=>{let s=Rn(c=>{n(c),Reflect.deleteProperty(window,`_${r}`)},!0),r=Rn(c=>{i(c),Reflect.deleteProperty(window,`_${s}`)},!0);window.__TAURI_IPC__({cmd:e,callback:s,error:r,...t})})}function Cs(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function z(e){return Dt("tauri",e)}var Ts={};ot(Ts,{TauriEvent:()=>Gl,emit:()=>Un,listen:()=>It,once:()=>Xl});async function Fl(e,t){return z({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function jl(e,t,n){await z({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function bi(e,t,n){return z({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:Rn(n)}}).then(i=>async()=>Fl(e,i))}async function Vl(e,t,n){return bi(e,t,i=>{n(i),Fl(e,i.id).catch(()=>{})})}var Gl=(e=>(e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_FILE_DROP="tauri://file-drop",e.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",e.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",e.MENU="tauri://menu",e.CHECK_UPDATE="tauri://update",e.UPDATE_AVAILABLE="tauri://update-available",e.INSTALL_UPDATE="tauri://update-install",e.STATUS_UPDATE="tauri://update-status",e.DOWNLOAD_PROGRESS="tauri://update-download-progress",e))(Gl||{});async function It(e,t){return bi(e,null,t)}async function Xl(e,t){return Vl(e,null,t)}async function Un(e,t){return jl(e,void 0,t)}var As={};ot(As,{CloseRequestedEvent:()=>Kl,LogicalPosition:()=>Yl,LogicalSize:()=>Hn,PhysicalPosition:()=>Be,PhysicalSize:()=>lt,UserAttentionType:()=>gi,WebviewWindow:()=>at,WebviewWindowHandle:()=>$l,WindowManager:()=>Jl,appWindow:()=>st,availableMonitors:()=>Ss,currentMonitor:()=>Ls,getAll:()=>Bl,getCurrent:()=>On,primaryMonitor:()=>Es});var Hn=class{constructor(e,t){this.type="Logical",this.width=e,this.height=t}},lt=class{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new Hn(this.width/e,this.height/e)}},Yl=class{constructor(e,t){this.type="Logical",this.x=e,this.y=t}},Be=class{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new Yl(this.x/e,this.y/e)}},gi=(e=>(e[e.Critical=1]="Critical",e[e.Informational=2]="Informational",e))(gi||{});function On(){return new at(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})}function Bl(){return window.__TAURI_METADATA__.__windows.map(e=>new at(e.label,{skip:!0}))}var Ml=["tauri://created","tauri://error"],$l=class{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):bi(e,this.label,t)}async once(e,t){return this._handleTauriEvent(e,t)?Promise.resolve(()=>{let n=this.listeners[e];n.splice(n.indexOf(t),1)}):Vl(e,this.label,t)}async emit(e,t){if(Ml.includes(e)){for(let n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:t});return Promise.resolve()}return jl(e,this.label,t)}_handleTauriEvent(e,t){return Ml.includes(e)?(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0):!1}},Jl=class extends $l{async scaleFactor(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"scaleFactor"}}}})}async innerPosition(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerPosition"}}}}).then(({x:e,y:t})=>new Be(e,t))}async outerPosition(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerPosition"}}}}).then(({x:e,y:t})=>new Be(e,t))}async innerSize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"innerSize"}}}}).then(({width:e,height:t})=>new lt(e,t))}async outerSize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"outerSize"}}}}).then(({width:e,height:t})=>new lt(e,t))}async isFullscreen(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isFullscreen"}}}})}async isMinimized(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMinimized"}}}})}async isMaximized(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isMaximized"}}}})}async isDecorated(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isDecorated"}}}})}async isResizable(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isResizable"}}}})}async isVisible(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"isVisible"}}}})}async title(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"title"}}}})}async theme(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"theme"}}}})}async center(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"center"}}}})}async requestUserAttention(e){let t=null;return e&&(e===1?t={type:"Critical"}:t={type:"Informational"}),z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"requestUserAttention",payload:t}}}})}async setResizable(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setResizable",payload:e}}}})}async setTitle(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setTitle",payload:e}}}})}async maximize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"maximize"}}}})}async unmaximize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unmaximize"}}}})}async toggleMaximize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"toggleMaximize"}}}})}async minimize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"minimize"}}}})}async unminimize(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"unminimize"}}}})}async show(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"show"}}}})}async hide(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"hide"}}}})}async close(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"close"}}}})}async setDecorations(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setDecorations",payload:e}}}})}async setShadow(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setShadow",payload:e}}}})}async setAlwaysOnTop(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setAlwaysOnTop",payload:e}}}})}async setContentProtected(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setContentProtected",payload:e}}}})}async setSize(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSize",payload:{type:e.type,data:{width:e.width,height:e.height}}}}}})}async setMinSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMinSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setMaxSize(e){if(e&&e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setMaxSize",payload:e?{type:e.type,data:{width:e.width,height:e.height}}:null}}}})}async setPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setFullscreen(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFullscreen",payload:e}}}})}async setFocus(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setFocus"}}}})}async setIcon(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIcon",payload:{icon:typeof e=="string"?e:Array.from(e)}}}}})}async setSkipTaskbar(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setSkipTaskbar",payload:e}}}})}async setCursorGrab(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorGrab",payload:e}}}})}async setCursorVisible(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorVisible",payload:e}}}})}async setCursorIcon(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorIcon",payload:e}}}})}async setCursorPosition(e){if(!e||e.type!=="Logical"&&e.type!=="Physical")throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setCursorPosition",payload:{type:e.type,data:{x:e.x,y:e.y}}}}}})}async setIgnoreCursorEvents(e){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"setIgnoreCursorEvents",payload:e}}}})}async startDragging(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{label:this.label,cmd:{type:"startDragging"}}}})}async onResized(e){return this.listen("tauri://resize",e)}async onMoved(e){return this.listen("tauri://move",e)}async onCloseRequested(e){return this.listen("tauri://close-requested",t=>{let n=new Kl(t);Promise.resolve(e(n)).then(()=>{if(!n.isPreventDefault())return this.close()})})}async onFocusChanged(e){let t=await this.listen("tauri://focus",i=>{e({...i,payload:!0})}),n=await this.listen("tauri://blur",i=>{e({...i,payload:!1})});return()=>{t(),n()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let t=await this.listen("tauri://file-drop",s=>{e({...s,payload:{type:"drop",paths:s.payload}})}),n=await this.listen("tauri://file-drop-hover",s=>{e({...s,payload:{type:"hover",paths:s.payload}})}),i=await this.listen("tauri://file-drop-cancelled",s=>{e({...s,payload:{type:"cancel"}})});return()=>{t(),n(),i()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},Kl=class{constructor(e){this._preventDefault=!1,this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},at=class extends Jl{constructor(e,t={}){super(e),t!=null&&t.skip||z({__tauriModule:"Window",message:{cmd:"createWebview",data:{options:{label:e,...t}}}}).then(async()=>this.emit("tauri://created")).catch(async n=>this.emit("tauri://error",n))}static getByLabel(e){return Bl().some(t=>t.label===e)?new at(e,{skip:!0}):null}},st;"__TAURI_METADATA__"in window?st=new at(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn(`Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label. -Note that this is not an issue if running this frontend on a browser instead of a Tauri window.`),st=new at("main",{skip:!0}));function yi(e){return e===null?null:{name:e.name,scaleFactor:e.scaleFactor,position:new Be(e.position.x,e.position.y),size:new lt(e.size.width,e.size.height)}}async function Ls(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"currentMonitor"}}}}).then(yi)}async function Es(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"primaryMonitor"}}}}).then(yi)}async function Ss(){return z({__tauriModule:"Window",message:{cmd:"manage",data:{cmd:{type:"availableMonitors"}}}}).then(e=>e.map(yi))}function Ps(){return navigator.appVersion.includes("Win")}var Os={};ot(Os,{EOL:()=>Ds,arch:()=>Hs,platform:()=>Ql,tempdir:()=>Us,type:()=>Rs,version:()=>Is});var Ds=Ps()?`\r -`:` -`;async function Ql(){return z({__tauriModule:"Os",message:{cmd:"platform"}})}async function Is(){return z({__tauriModule:"Os",message:{cmd:"version"}})}async function Rs(){return z({__tauriModule:"Os",message:{cmd:"osType"}})}async function Hs(){return z({__tauriModule:"Os",message:{cmd:"arch"}})}async function Us(){return z({__tauriModule:"Os",message:{cmd:"tempdir"}})}var Ns={};ot(Ns,{getName:()=>es,getTauriVersion:()=>ts,getVersion:()=>Zl,hide:()=>is,show:()=>ns});async function Zl(){return z({__tauriModule:"App",message:{cmd:"getAppVersion"}})}async function es(){return z({__tauriModule:"App",message:{cmd:"getAppName"}})}async function ts(){return z({__tauriModule:"App",message:{cmd:"getTauriVersion"}})}async function ns(){return z({__tauriModule:"App",message:{cmd:"show"}})}async function is(){return z({__tauriModule:"App",message:{cmd:"hide"}})}var xs={};ot(xs,{exit:()=>ls,relaunch:()=>vi});async function ls(e=0){return z({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})}async function vi(){return z({__tauriModule:"Process",message:{cmd:"relaunch"}})}function qs(e){let t,n,i,s,r,c,f,h,m,y,g,C,M,p,T,O,X,H,D,S,P,J,N,j,x,ne;return{c(){t=a("p"),t.innerHTML=`This is a demo of Tauri's API capabilities using the @tauri-apps/api package. It's used as the main validation app, serving as the test bed of our +(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 development process. In the future, this app will be used on Tauri's integration - tests.`,n=d(),i=a("br"),s=d(),r=a("br"),c=d(),f=a("pre"),h=k("App name: "),m=a("code"),y=k(e[2]),g=k(` -App version: `),C=a("code"),M=k(e[0]),p=k(` -Tauri version: `),T=a("code"),O=k(e[1]),X=k(` -`),H=d(),D=a("br"),S=d(),P=a("div"),J=a("button"),J.textContent="Close application",N=d(),j=a("button"),j.textContent="Relaunch application",o(J,"class","btn"),o(j,"class","btn"),o(P,"class","flex flex-wrap gap-1 shadow-")},m(L,I){b(L,t,I),b(L,n,I),b(L,i,I),b(L,s,I),b(L,r,I),b(L,c,I),b(L,f,I),l(f,h),l(f,m),l(m,y),l(f,g),l(f,C),l(C,M),l(f,p),l(f,T),l(T,O),l(f,X),b(L,H,I),b(L,D,I),b(L,S,I),b(L,P,I),l(P,J),l(P,N),l(P,j),x||(ne=[A(J,"click",e[3]),A(j,"click",e[4])],x=!0)},p(L,[I]){I&4&&$(y,L[2]),I&1&&$(M,L[0]),I&2&&$(O,L[1])},i:U,o:U,d(L){L&&_(t),L&&_(n),L&&_(i),L&&_(s),L&&_(r),L&&_(c),L&&_(f),L&&_(H),L&&_(D),L&&_(S),L&&_(P),x=!1,we(ne)}}}function Fs(e,t,n){let i="0.0.0",s="0.0.0",r="Unknown";es().then(h=>{n(2,r=h)}),Zl().then(h=>{n(0,i=h)}),ts().then(h=>{n(1,s=h)});async function c(){await ls()}async function f(){await vi()}return[i,s,r,c,f]}class js extends Je{constructor(t){super(),$e(this,t,Fs,qs,Ie,{})}}function Vs(e){let t,n,i,s,r,c,f,h,m,y,g,C,M;return{c(){t=a("p"),t.innerHTML=`This binary can be run from the terminal and takes the following arguments: + 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:
  --config <PATH>
   --theme <light|dark|system>
   --verbose
- Additionally, it has a update --background subcommand.`,n=d(),i=a("br"),s=d(),r=a("div"),r.textContent="Note that the arguments are only parsed, not implemented.",c=d(),f=a("br"),h=d(),m=a("br"),y=d(),g=a("button"),g.textContent="Get matches",o(r,"class","note"),o(g,"class","btn"),o(g,"id","cli-matches")},m(p,T){b(p,t,T),b(p,n,T),b(p,i,T),b(p,s,T),b(p,r,T),b(p,c,T),b(p,f,T),b(p,h,T),b(p,m,T),b(p,y,T),b(p,g,T),C||(M=A(g,"click",e[0]),C=!0)},p:U,i:U,o:U,d(p){p&&_(t),p&&_(n),p&&_(i),p&&_(s),p&&_(r),p&&_(c),p&&_(f),p&&_(h),p&&_(m),p&&_(y),p&&_(g),C=!1,M()}}}function Gs(e,t,n){let{onMessage:i}=t;function s(){Dt("plugin:cli|cli_matches").then(i).catch(i)}return e.$$set=r=>{"onMessage"in r&&n(1,i=r.onMessage)},[s,i]}class Xs extends Je{constructor(t){super(),$e(this,t,Gs,Vs,Ie,{onMessage:1})}}function Ys(e){let t,n,i,s,r,c,f,h;return{c(){t=a("div"),n=a("button"),n.textContent="Call Log API",i=d(),s=a("button"),s.textContent="Call Request (async) API",r=d(),c=a("button"),c.textContent="Send event to Rust",o(n,"class","btn"),o(n,"id","log"),o(s,"class","btn"),o(s,"id","request"),o(c,"class","btn"),o(c,"id","event")},m(m,y){b(m,t,y),l(t,n),l(t,i),l(t,s),l(t,r),l(t,c),f||(h=[A(n,"click",e[0]),A(s,"click",e[1]),A(c,"click",e[2])],f=!0)},p:U,i:U,o:U,d(m){m&&_(t),f=!1,we(h)}}}function Bs(e,t,n){let{onMessage:i}=t,s;nt(async()=>{s=await It("rust-event",i)}),_i(()=>{s&&s()});function r(){Dt("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function c(){Dt("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function f(){Un("js-event","this is the payload string")}return e.$$set=h=>{"onMessage"in h&&n(3,i=h.onMessage)},[r,c,f,i]}class $s extends Je{constructor(t){super(),$e(this,t,Bs,Ys,Ie,{onMessage:3})}}function zl(e,t,n){const i=e.slice();return i[65]=t[n],i}function Wl(e,t,n){const i=e.slice();return i[68]=t[n],i}function Cl(e){let t,n,i,s,r,c,f=Object.keys(e[1]),h=[];for(let m=0;me[37].call(i))},m(m,y){b(m,t,y),b(m,n,y),b(m,i,y),l(i,s);for(let g=0;ge[56].call(De)),o(Ge,"class","input"),o(Ge,"type","number"),o(Xe,"class","input"),o(Xe,"type","number"),o(Oe,"class","flex gap-2"),o(Ye,"class","input grow"),o(Ye,"id","title"),o(Lt,"class","btn"),o(Lt,"type","submit"),o(tt,"class","flex gap-1"),o(At,"class","flex flex-col gap-1")},m(u,w){b(u,t,w),b(u,n,w),b(u,i,w),l(i,s),l(i,r),l(i,c),l(i,f),l(i,h),l(i,m),l(i,y),b(u,g,w),b(u,C,w),b(u,M,w),b(u,p,w),l(p,T),l(T,O),l(T,X),X.checked=e[3],l(p,H),l(p,D),l(D,S),l(D,P),P.checked=e[2],l(p,J),l(p,N),l(N,j),l(N,x),x.checked=e[4],l(p,ne),l(p,L),l(L,I),l(L,ae),ae.checked=e[5],l(p,ue),l(p,te),l(te,v),l(te,R),R.checked=e[6],l(p,q),l(p,ie),l(ie,Te),l(ie,le),le.checked=e[7],b(u,he,w),b(u,Re,w),b(u,be,w),b(u,se,w),l(se,ce),l(ce,ge),l(ge,He),l(ge,de),G(de,e[14]),l(ce,Z),l(ce,Ae),l(Ae,Le),l(Ae,K),G(K,e[15]),l(se,ee),l(se,re),l(re,Y),l(Y,ke),l(Y,fe),G(fe,e[8]),l(re,Me),l(re,B),l(B,W),l(B,F),G(F,e[9]),l(se,E),l(se,pe),l(pe,rt),l(rt,Rt),l(rt,We),G(We,e[10]),l(pe,Ht),l(pe,ut),l(ut,Ut),l(ut,Ce),G(Ce,e[11]),l(se,V),l(se,Ee),l(Ee,Ke),l(Ke,kt),l(Ke,ye),G(ye,e[12]),l(Ee,Mt),l(Ee,Qe),l(Qe,zt),l(Qe,ve),G(ve,e[13]),b(u,ct,w),b(u,dt,w),b(u,ft,w),b(u,_e,w),l(_e,Se),l(Se,ze),l(ze,Ze),l(ze,Wt),l(ze,et),l(et,Ct),l(et,Nn),l(ze,ki),l(ze,Nt),l(Nt,Mi),l(Nt,xn),l(Se,zi),l(Se,Ue),l(Ue,qt),l(Ue,Wi),l(Ue,Ft),l(Ft,Ci),l(Ft,qn),l(Ue,Ti),l(Ue,Vt),l(Vt,Ai),l(Vt,Fn),l(_e,Li),l(_e,mt),l(mt,Ne),l(Ne,Xt),l(Ne,Ei),l(Ne,Yt),l(Yt,Si),l(Yt,jn),l(Ne,Pi),l(Ne,$t),l($t,Oi),l($t,Vn),l(mt,Di),l(mt,xe),l(xe,Kt),l(xe,Ii),l(xe,Qt),l(Qt,Ri),l(Qt,Gn),l(xe,Hi),l(xe,en),l(en,Ui),l(en,Xn),l(_e,Ni),l(_e,ht),l(ht,qe),l(qe,nn),l(qe,xi),l(qe,ln),l(ln,qi),l(ln,Yn),l(qe,Fi),l(qe,an),l(an,ji),l(an,Bn),l(ht,Vi),l(ht,Fe),l(Fe,rn),l(Fe,Gi),l(Fe,un),l(un,Xi),l(un,$n),l(Fe,Yi),l(Fe,dn),l(dn,Bi),l(dn,Jn),l(_e,$i),l(_e,_t),l(_t,je),l(je,pn),l(je,Ji),l(je,mn),l(mn,Ki),l(mn,Kn),l(je,Qi),l(je,_n),l(_n,Zi),l(_n,Qn),l(_t,el),l(_t,Ve),l(Ve,gn),l(Ve,tl),l(Ve,yn),l(yn,nl),l(yn,Zn),l(Ve,il),l(Ve,wn),l(wn,ll),l(wn,ei),b(u,ti,w),b(u,ni,w),b(u,ii,w),b(u,Tt,w),b(u,li,w),b(u,Pe,w),l(Pe,Mn),l(Mn,bt),bt.checked=e[16],l(Mn,sl),l(Pe,al),l(Pe,zn),l(zn,gt),gt.checked=e[17],l(zn,ol),l(Pe,rl),l(Pe,Wn),l(Wn,yt),yt.checked=e[21],l(Wn,ul),b(u,si,w),b(u,Oe,w),l(Oe,Cn),l(Cn,cl),l(Cn,De);for(let oe=0;oe=1,y,g,C,M=m&&Cl(e),p=e[1][e[0]]&&Al(e);return{c(){t=a("div"),n=a("div"),i=a("input"),s=d(),r=a("button"),r.textContent="New window",c=d(),f=a("br"),h=d(),M&&M.c(),y=d(),p&&p.c(),o(i,"class","input grow"),o(i,"type","text"),o(i,"placeholder","New Window label.."),o(r,"class","btn"),o(n,"class","flex gap-1"),o(t,"class","flex flex-col children:grow gap-2")},m(T,O){b(T,t,O),l(t,n),l(n,i),G(i,e[22]),l(n,s),l(n,r),l(t,c),l(t,f),l(t,h),M&&M.m(t,null),l(t,y),p&&p.m(t,null),g||(C=[A(i,"input",e[36]),A(r,"click",e[33])],g=!0)},p(T,O){O[0]&4194304&&i.value!==T[22]&&G(i,T[22]),O[0]&2&&(m=Object.keys(T[1]).length>=1),m?M?M.p(T,O):(M=Cl(T),M.c(),M.m(t,y)):M&&(M.d(1),M=null),T[1][T[0]]?p?p.p(T,O):(p=Al(T),p.c(),p.m(t,null)):p&&(p.d(1),p=null)},i:U,o:U,d(T){T&&_(t),M&&M.d(),p&&p.d(),g=!1,we(C)}}}function Ks(e,t,n){let i=st.label;const s={[st.label]:st},r=["default","crosshair","hand","arrow","move","text","wait","help","progress","notAllowed","contextMenu","cell","verticalText","alias","copy","noDrop","grab","grabbing","allScroll","zoomIn","zoomOut","eResize","nResize","neResize","nwResize","sResize","seResize","swResize","wResize","ewResize","nsResize","neswResize","nwseResize","colResize","rowResize"];let{onMessage:c}=t,f,h=!0,m=!1,y=!0,g=!1,C=!0,M=!1,p=null,T=null,O=null,X=null,H=null,D=null,S=null,P=null,J=1,N=new Be(S,P),j=new Be(S,P),x=new lt(p,T),ne=new lt(p,T),L,I,ae=!1,ue=!0,te=null,v=null,R="default",q=!1,ie="Awesome Tauri Example!";function Te(){s[i].setTitle(ie)}function le(){s[i].hide(),setTimeout(s[i].show,2e3)}function he(){s[i].minimize(),setTimeout(s[i].unminimize,2e3)}function Re(){if(!f)return;const V=new at(f);n(1,s[f]=V,s),V.once("tauri://error",function(){c("Error creating new webview")})}function be(){s[i].innerSize().then(V=>{n(26,x=V),n(8,p=x.width),n(9,T=x.height)}),s[i].outerSize().then(V=>{n(27,ne=V)})}function se(){s[i].innerPosition().then(V=>{n(24,N=V)}),s[i].outerPosition().then(V=>{n(25,j=V),n(14,S=j.x),n(15,P=j.y)})}async function ce(V){!V||(L&&L(),I&&I(),I=await V.listen("tauri://move",se),L=await V.listen("tauri://resize",be))}async function ge(){await s[i].minimize(),await s[i].requestUserAttention(gi.Critical),await new Promise(V=>setTimeout(V,3e3)),await s[i].requestUserAttention(null)}function He(){f=this.value,n(22,f)}function de(){i=yl(this),n(0,i),n(1,s)}const Z=()=>s[i].center();function Ae(){m=this.checked,n(3,m)}function Le(){h=this.checked,n(2,h)}function K(){y=this.checked,n(4,y)}function ee(){g=this.checked,n(5,g)}function re(){C=this.checked,n(6,C)}function Y(){M=this.checked,n(7,M)}function ke(){S=Q(this.value),n(14,S)}function fe(){P=Q(this.value),n(15,P)}function Me(){p=Q(this.value),n(8,p)}function B(){T=Q(this.value),n(9,T)}function W(){O=Q(this.value),n(10,O)}function F(){X=Q(this.value),n(11,X)}function E(){H=Q(this.value),n(12,H)}function pe(){D=Q(this.value),n(13,D)}function rt(){ae=this.checked,n(16,ae)}function Rt(){ue=this.checked,n(17,ue)}function We(){q=this.checked,n(21,q)}function Ht(){R=yl(this),n(20,R),n(29,r)}function ut(){te=Q(this.value),n(18,te)}function Ut(){v=Q(this.value),n(19,v)}function Ce(){ie=this.value,n(28,ie)}return e.$$set=V=>{"onMessage"in V&&n(35,c=V.onMessage)},e.$$.update=()=>{var V,Ee,Ke,kt,ye,Mt,Qe,zt,ve,ct,dt,ft,_e,Se,ze,Ze,Wt,et,Ct;e.$$.dirty[0]&3&&(s[i],se(),be()),e.$$.dirty[0]&7&&((V=s[i])==null||V.setResizable(h)),e.$$.dirty[0]&11&&(m?(Ee=s[i])==null||Ee.maximize():(Ke=s[i])==null||Ke.unmaximize()),e.$$.dirty[0]&19&&((kt=s[i])==null||kt.setDecorations(y)),e.$$.dirty[0]&35&&((ye=s[i])==null||ye.setAlwaysOnTop(g)),e.$$.dirty[0]&67&&((Mt=s[i])==null||Mt.setContentProtected(C)),e.$$.dirty[0]&131&&((Qe=s[i])==null||Qe.setFullscreen(M)),e.$$.dirty[0]&771&&p&&T&&((zt=s[i])==null||zt.setSize(new lt(p,T))),e.$$.dirty[0]&3075&&(O&&X?(ve=s[i])==null||ve.setMinSize(new Hn(O,X)):(ct=s[i])==null||ct.setMinSize(null)),e.$$.dirty[0]&12291&&(H>800&&D>400?(dt=s[i])==null||dt.setMaxSize(new Hn(H,D)):(ft=s[i])==null||ft.setMaxSize(null)),e.$$.dirty[0]&49155&&S!==null&&P!==null&&((_e=s[i])==null||_e.setPosition(new Be(S,P))),e.$$.dirty[0]&3&&((Se=s[i])==null||Se.scaleFactor().then(pt=>n(23,J=pt))),e.$$.dirty[0]&3&&ce(s[i]),e.$$.dirty[0]&65539&&((ze=s[i])==null||ze.setCursorGrab(ae)),e.$$.dirty[0]&131075&&((Ze=s[i])==null||Ze.setCursorVisible(ue)),e.$$.dirty[0]&1048579&&((Wt=s[i])==null||Wt.setCursorIcon(R)),e.$$.dirty[0]&786435&&te!==null&&v!==null&&((et=s[i])==null||et.setCursorPosition(new Be(te,v))),e.$$.dirty[0]&2097155&&((Ct=s[i])==null||Ct.setIgnoreCursorEvents(q))},[i,s,h,m,y,g,C,M,p,T,O,X,H,D,S,P,ae,ue,te,v,R,q,f,J,N,j,x,ne,ie,r,Te,le,he,Re,ge,c,He,de,Z,Ae,Le,K,ee,re,Y,ke,fe,Me,B,W,F,E,pe,rt,Rt,We,Ht,ut,Ut,Ce]}class Qs extends Je{constructor(t){super(),$e(this,t,Ks,Js,Ie,{onMessage:35},null,[-1,-1,-1])}}var Zs={};ot(Zs,{checkUpdate:()=>as,installUpdate:()=>ss,onUpdaterEvent:()=>wi});async function wi(e){return It("tauri://update-status",t=>{e(t==null?void 0:t.payload)})}async function ss(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function s(r){if(r.error){t(),i(r.error);return}r.status==="DONE"&&(t(),n())}wi(s).then(r=>{e=r}).catch(r=>{throw t(),r}),Un("tauri://update-install").catch(r=>{throw t(),r})})}async function as(){let e;function t(){e&&e(),e=void 0}return new Promise((n,i)=>{function s(c){t(),n({manifest:c,shouldUpdate:!0})}function r(c){if(c.error){t(),i(c.error);return}c.status==="UPTODATE"&&(t(),n({shouldUpdate:!1}))}Xl("tauri://update-available",c=>{s(c==null?void 0:c.payload)}).catch(c=>{throw t(),c}),wi(r).then(c=>{e=c}).catch(c=>{throw t(),c}),Un("tauri://update").catch(c=>{throw t(),c})})}function ea(e){let t;return{c(){t=a("button"),t.innerHTML='
',o(t,"class","btn text-accentText dark:text-darkAccentText flex items-center justify-center")},m(n,i){b(n,t,i)},p:U,d(n){n&&_(t)}}}function ta(e){let t,n,i;return{c(){t=a("button"),t.textContent="Install update",o(t,"class","btn")},m(s,r){b(s,t,r),n||(i=A(t,"click",e[4]),n=!0)},p:U,d(s){s&&_(t),n=!1,i()}}}function na(e){let t,n,i;return{c(){t=a("button"),t.textContent="Check update",o(t,"class","btn")},m(s,r){b(s,t,r),n||(i=A(t,"click",e[3]),n=!0)},p:U,d(s){s&&_(t),n=!1,i()}}}function ia(e){let t;function n(r,c){return!r[0]&&!r[2]?na:!r[1]&&r[2]?ta:ea}let i=n(e),s=i(e);return{c(){t=a("div"),s.c(),o(t,"class","flex children:grow children:h10")},m(r,c){b(r,t,c),s.m(t,null)},p(r,[c]){i===(i=n(r))&&s?s.p(r,c):(s.d(1),s=i(r),s&&(s.c(),s.m(t,null)))},i:U,o:U,d(r){r&&_(t),s.d()}}}function la(e,t,n){let{onMessage:i}=t,s;nt(async()=>{s=await It("tauri://update-status",i)}),_i(()=>{s&&s()});let r,c,f;async function h(){n(0,r=!0);try{const{shouldUpdate:y,manifest:g}=await as();i(`Should update: ${y}`),i(g),n(2,f=y)}catch(y){i(y)}finally{n(0,r=!1)}}async function m(){n(1,c=!0);try{await ss(),i("Installation complete, restart required."),await vi()}catch(y){i(y)}finally{n(1,c=!1)}}return e.$$set=y=>{"onMessage"in y&&n(5,i=y.onMessage)},[r,c,f,h,m,i]}class sa extends Je{constructor(t){super(),$e(this,t,la,ia,Ie,{onMessage:5})}}function aa(e){let t;return{c(){t=a("div"),t.innerHTML=`
Not available for Linux
- `,o(t,"class","flex flex-col gap-2")},m(n,i){b(n,t,i)},p:U,i:U,o:U,d(n){n&&_(t)}}}function oa(e,t,n){let{onMessage:i}=t;const s=window.constraints={audio:!0,video:!0};function r(f){const h=document.querySelector("video"),m=f.getVideoTracks();i("Got stream with constraints:",s),i(`Using video device: ${m[0].label}`),window.stream=f,h.srcObject=f}function c(f){if(f.name==="ConstraintNotSatisfiedError"){const h=s.video;i(`The resolution ${h.width.exact}x${h.height.exact} px is not supported by your device.`)}else f.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${f.name}`,f)}return nt(async()=>{try{const f=await navigator.mediaDevices.getUserMedia(s);r(f)}catch(f){c(f)}}),_i(()=>{window.stream.getTracks().forEach(function(f){f.stop()})}),e.$$set=f=>{"onMessage"in f&&n(0,i=f.onMessage)},[i]}class ra extends Je{constructor(t){super(),$e(this,t,oa,aa,Ie,{onMessage:0})}}function ua(e){let t,n,i,s,r,c;return{c(){t=a("div"),n=a("button"),n.textContent="Show",i=d(),s=a("button"),s.textContent="Hide",o(n,"class","btn"),o(n,"id","show"),o(n,"title","Hides and shows the app after 2 seconds"),o(s,"class","btn"),o(s,"id","hide")},m(f,h){b(f,t,h),l(t,n),l(t,i),l(t,s),r||(c=[A(n,"click",e[0]),A(s,"click",e[1])],r=!0)},p:U,i:U,o:U,d(f){f&&_(t),r=!1,we(c)}}}function ca(e,t,n){let{onMessage:i}=t;function s(){r().then(()=>{setTimeout(()=>{ns().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function r(){return is().then(()=>i("Hide app")).catch(i)}return e.$$set=c=>{"onMessage"in c&&n(2,i=c.onMessage)},[s,r,i]}class da extends Je{constructor(t){super(),$e(this,t,ca,ua,Ie,{onMessage:2})}}function El(e,t,n){const i=e.slice();return i[29]=t[n],i}function Sl(e,t,n){const i=e.slice();return i[32]=t[n],i}function Pl(e){let t,n,i,s,r,c,f,h,m,y,g,C,M;function p(S,P){return S[3]?pa:fa}let T=p(e),O=T(e);function X(S,P){return S[2]?ha:ma}let H=X(e),D=H(e);return{c(){t=a("div"),n=a("span"),n.textContent="Tauri API Validation",i=d(),s=a("span"),r=a("span"),O.c(),f=d(),h=a("span"),h.innerHTML='
',m=d(),y=a("span"),D.c(),o(n,"class","lt-sm:pl-10 text-darkPrimaryText"),o(r,"title",c=e[3]?"Switch to Light mode":"Switch to Dark mode"),o(r,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(h,"title","Minimize"),o(h,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(y,"title",g=e[2]?"Restore":"Maximize"),o(y,"class","hover:bg-hoverOverlay active:bg-hoverOverlayDarker dark:hover:bg-darkHoverOverlay dark:active:bg-darkHoverOverlayDarker"),o(s,"class","h-100% children:h-100% children:w-12 children:inline-flex children:items-center children:justify-center"),o(t,"class","w-screen select-none h-8 pl-2 flex justify-between items-center absolute text-primaryText dark:text-darkPrimaryText"),o(t,"data-tauri-drag-region","")},m(S,P){b(S,t,P),l(t,n),l(t,i),l(t,s),l(s,r),O.m(r,null),l(s,f),l(s,h),l(s,m),l(s,y),D.m(y,null),C||(M=[A(r,"click",e[11]),A(h,"click",e[9]),A(y,"click",e[10])],C=!0)},p(S,P){T!==(T=p(S))&&(O.d(1),O=T(S),O&&(O.c(),O.m(r,null))),P[0]&8&&c!==(c=S[3]?"Switch to Light mode":"Switch to Dark mode")&&o(r,"title",c),H!==(H=X(S))&&(D.d(1),D=H(S),D&&(D.c(),D.m(y,null))),P[0]&4&&g!==(g=S[2]?"Restore":"Maximize")&&o(y,"title",g)},d(S){S&&_(t),O.d(),D.d(),C=!1,we(M)}}}function fa(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-moon")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function pa(e){let t;return{c(){t=a("div"),o(t,"class","i-ph-sun")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function ma(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-maximize")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function ha(e){let t;return{c(){t=a("div"),o(t,"class","i-codicon-chrome-restore")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function _a(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function ba(e){let t;return{c(){t=a("span"),o(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){b(n,t,i)},d(n){n&&_(t)}}}function Ol(e){let t,n,i,s,r,c,f,h,m;function y(M,p){return M[3]?ya:ga}let g=y(e),C=g(e);return{c(){t=a("a"),C.c(),n=d(),i=a("br"),s=d(),r=a("div"),c=d(),f=a("br"),o(t,"href","##"),o(t,"class","nv justify-between h-8"),o(r,"class","bg-white/5 h-2px")},m(M,p){b(M,t,p),C.m(t,null),b(M,n,p),b(M,i,p),b(M,s,p),b(M,r,p),b(M,c,p),b(M,f,p),h||(m=A(t,"click",e[11]),h=!0)},p(M,p){g!==(g=y(M))&&(C.d(1),C=g(M),C&&(C.c(),C.m(t,null)))},d(M){M&&_(t),C.d(),M&&_(n),M&&_(i),M&&_(s),M&&_(r),M&&_(c),M&&_(f),h=!1,m()}}}function ga(e){let t,n;return{c(){t=k(`Switch to Dark mode - `),n=a("div"),o(n,"class","i-ph-moon")},m(i,s){b(i,t,s),b(i,n,s)},d(i){i&&_(t),i&&_(n)}}}function ya(e){let t,n;return{c(){t=k(`Switch to Light mode - `),n=a("div"),o(n,"class","i-ph-sun")},m(i,s){b(i,t,s),b(i,n,s)},d(i){i&&_(t),i&&_(n)}}}function va(e){let t,n,i,s,r=e[32].label+"",c,f,h,m;function y(){return e[18](e[32])}return{c(){t=a("a"),n=a("div"),i=d(),s=a("p"),c=k(r),o(n,"class",e[32].icon+" mr-2"),o(t,"href","##"),o(t,"class",f="nv "+(e[1]===e[32]?"nv_selected":""))},m(g,C){b(g,t,C),l(t,n),l(t,i),l(t,s),l(s,c),h||(m=A(t,"click",y),h=!0)},p(g,C){e=g,C[0]&2&&f!==(f="nv "+(e[1]===e[32]?"nv_selected":""))&&o(t,"class",f)},d(g){g&&_(t),h=!1,m()}}}function Dl(e){let t,n=e[32]&&va(e);return{c(){n&&n.c(),t=Nl()},m(i,s){n&&n.m(i,s),b(i,t,s)},p(i,s){i[32]&&n.p(i,s)},d(i){n&&n.d(i),i&&_(t)}}}function Il(e){let t,n=e[29].html+"",i;return{c(){t=new hs(!1),i=Nl(),t.a=i},m(s,r){t.m(n,s,r),b(s,i,r)},p(s,r){r[0]&64&&n!==(n=s[29].html+"")&&t.p(n)},d(s){s&&_(i),s&&t.d()}}}function wa(e){let t,n,i,s,r,c,f,h,m,y,g,C,M,p,T,O,X,H,D,S,P,J,N,j,x,ne,L=e[1].label+"",I,ae,ue,te,v,R,q,ie,Te,le,he,Re,be,se,ce,ge,He,de,Z=e[5]&&Pl(e);function Ae(W,F){return W[0]?ba:_a}let Le=Ae(e),K=Le(e),ee=!e[5]&&Ol(e),re=e[7],Y=[];for(let W=0;W`,g=d(),C=a("a"),C.innerHTML=`GitHub - `,M=d(),p=a("a"),p.innerHTML=`Source - `,T=d(),O=a("br"),X=d(),H=a("div"),D=d(),S=a("br"),P=d(),J=a("div");for(let W=0;W',se=d(),ce=a("div");for(let W=0;W{hi(E,1)}),vs()}ke?(v=new ke(fe(W)),kl(v.$$.fragment),pi(v.$$.fragment,1),mi(v,te,null)):v=null}if(F[0]&64){Me=W[6];let E;for(E=0;E{T(`File drop: ${JSON.stringify(v.payload)}`)});const s=navigator.userAgent.toLowerCase(),r=s.includes("android")||s.includes("iphone"),c=[{label:"Welcome",component:js,icon:"i-ph-hand-waving"},{label:"Communication",component:$s,icon:"i-codicon-radio-tower"},!r&&{label:"CLI",component:Xs,icon:"i-codicon-terminal"},!r&&{label:"App",component:da,icon:"i-codicon-hubot"},!r&&{label:"Window",component:Qs,icon:"i-codicon-window"},!r&&{label:"Updater",component:sa,icon:"i-codicon-cloud-download"},{label:"WebRTC",component:ra,icon:"i-ph-broadcast"}];let f=c[0];function h(v){n(1,f=v)}let m;nt(async()=>{const v=On();n(2,m=await v.isMaximized()),It("tauri://resize",async()=>{n(2,m=await v.isMaximized())})});function y(){On().minimize()}async function g(){const v=On();await v.isMaximized()?v.unmaximize():v.maximize()}let C;nt(()=>{n(3,C=localStorage&&localStorage.getItem("theme")=="dark"),Hl(C)});function M(){n(3,C=!C),Hl(C)}let p=ks([]);ds(e,p,v=>n(6,i=v));function T(v){p.update(R=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof v=="string"?v:JSON.stringify(v,null,1))+"
"},...R])}function O(v){p.update(R=>[{html:`
[${new Date().toLocaleTimeString()}]: `+v+"
"},...R])}function X(){p.update(()=>[])}let H,D,S;function P(v){S=v.clientY;const R=window.getComputedStyle(H);D=parseInt(R.height,10);const q=Te=>{const le=Te.clientY-S,he=D-le;n(4,H.style.height=`${he{document.removeEventListener("mouseup",ie),document.removeEventListener("mousemove",q)};document.addEventListener("mouseup",ie),document.addEventListener("mousemove",q)}let J;nt(async()=>{n(5,J=await Ql()==="win32")});let N=!1,j,x,ne=!1,L=0,I=0;const ae=(v,R,q)=>Math.min(Math.max(R,v),q);nt(()=>{n(17,j=document.querySelector("#sidebar")),x=document.querySelector("#sidebarToggle"),document.addEventListener("click",v=>{x.contains(v.target)?n(0,N=!N):N&&!j.contains(v.target)&&n(0,N=!1)}),document.addEventListener("touchstart",v=>{if(x.contains(v.target))return;const R=v.touches[0].clientX;(0{if(ne){const R=v.touches[0].clientX;I=R;const q=(R-L)/10;j.style.setProperty("--translate-x",`-${ae(0,N?0-q:18.75-q,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(ne){const v=(I-L)/10;n(0,N=N?v>-(18.75/2):v>18.75/2)}ne=!1})});const ue=v=>{h(v),n(0,N=!1)};function te(v){di[v?"unshift":"push"](()=>{H=v,n(4,H)})}return e.$$.update=()=>{if(e.$$.dirty[0]&1){const v=document.querySelector("#sidebar");v&&ka(v,N)}},[N,f,m,C,H,J,i,c,h,y,g,M,p,T,O,X,P,j,ue,te]}class za extends Je{constructor(t){super(),$e(this,t,Ma,wa,Ie,{},null,[-1,-1])}}new za({target:document.querySelector("#app")}); + 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;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;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")}); diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte index 2a0d8c24adf..9ef9655e2e4 100644 --- a/examples/api/src/App.svelte +++ b/examples/api/src/App.svelte @@ -6,9 +6,7 @@ import Cli from './views/Cli.svelte' import Communication from './views/Communication.svelte' import Window from './views/Window.svelte' - import Updater from './views/Updater.svelte' import WebRTC from './views/WebRTC.svelte' - import App from './views/App.svelte' import { onMount } from 'svelte' import { listen } from '@tauri-apps/api/event' @@ -36,21 +34,11 @@ component: Cli, icon: 'i-codicon-terminal' }, - !isMobile && { - label: 'App', - component: App, - icon: 'i-codicon-hubot' - }, !isMobile && { label: 'Window', component: Window, icon: 'i-codicon-window' }, - !isMobile && { - label: 'Updater', - component: Updater, - icon: 'i-codicon-cloud-download' - }, { label: 'WebRTC', component: WebRTC, diff --git a/examples/api/src/views/Updater.svelte b/examples/api/src/views/Updater.svelte deleted file mode 100644 index 3b219cfe056..00000000000 --- a/examples/api/src/views/Updater.svelte +++ /dev/null @@ -1,76 +0,0 @@ - - -
- {#if !isChecking && !newUpdate} - - {:else if !isInstalling && newUpdate} - - {:else} - - {/if} -
- - diff --git a/examples/api/src/views/Welcome.svelte b/examples/api/src/views/Welcome.svelte index 67eb5df1ef4..b9ba6555521 100644 --- a/examples/api/src/views/Welcome.svelte +++ b/examples/api/src/views/Welcome.svelte @@ -1,29 +1,3 @@ - -

This is a demo of Tauri's API capabilities using the @tauri-apps/api

-

- - -
diff --git a/tooling/api/docs/js-api.json b/tooling/api/docs/js-api.json index baa77f8e568..41560461d72 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/607086414/tooling/api/src/event.ts#L33"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":10,"name":"WINDOW_BLUR","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":27,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L27"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":6,"name":"WINDOW_CLOSE_REQUESTED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":23,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L23"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":7,"name":"WINDOW_CREATED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L24"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":8,"name":"WINDOW_DESTROYED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L25"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":13,"name":"WINDOW_FILE_DROP","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":30,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L30"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":15,"name":"WINDOW_FILE_DROP_CANCELLED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L32"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":14,"name":"WINDOW_FILE_DROP_HOVER","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":31,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L31"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":9,"name":"WINDOW_FOCUS","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":26,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L26"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":5,"name":"WINDOW_MOVED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L22"}],"type":{"type":"literal","value":"tauri://move"}},{"id":4,"name":"WINDOW_RESIZED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":21,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L21"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":11,"name":"WINDOW_SCALE_FACTOR_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":28,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L28"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":12,"name":"WINDOW_THEME_CHANGED","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"event.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L29"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[16,10,6,7,8,13,15,14,9,5,4,11,12]}],"sources":[{"fileName":"event.ts","line":20,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L20"}]},{"id":618,"name":"Event","kind":256,"kindString":"Interface","flags":{},"children":[{"id":619,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"helpers/event.ts","line":12,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L12"}],"type":{"type":"reference","id":2,"name":"EventName"}},{"id":621,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"helpers/event.ts","line":16,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L16"}],"type":{"type":"intrinsic","name":"number"}},{"id":622,"name":"payload","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"helpers/event.ts","line":18,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L18"}],"type":{"type":"reference","id":623,"name":"T"}},{"id":620,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"helpers/event.ts","line":14,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L14"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[619,621,622,620]}],"sources":[{"fileName":"helpers/event.ts","line":10,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L10"}],"typeParameters":[{"id":623,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}]},{"id":624,"name":"EventCallback","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L21"}],"typeParameters":[{"id":628,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"type":{"type":"reflection","declaration":{"id":625,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":21,"character":31,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L21"}],"signatures":[{"id":626,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":627,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":618,"typeArguments":[{"type":"reference","id":628,"name":"T"}],"name":"Event"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":2,"name":"EventName","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"event.ts","line":15,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L15"}],"type":{"type":"union","types":[{"type":"template-literal","head":"","tail":[[{"type":"reference","id":3,"name":"TauriEvent"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","qualifiedName":"Record","package":"typescript"}]}]}},{"id":629,"name":"UnlistenFn","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"helpers/event.ts","line":23,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L23"}],"type":{"type":"reflection","declaration":{"id":630,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"helpers/event.ts","line":23,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/helpers/event.ts#L23"}],"signatures":[{"id":631,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":27,"name":"emit","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":107,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L107"}],"signatures":[{"id":28,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { emit } from '@tauri-apps/api/event';\nawait emit('frontend-loaded', { loggedIn: true, token: 'authToken' });\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":29,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":30,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":17,"name":"listen","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":57,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L57"}],"signatures":[{"id":18,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { listen } from '@tauri-apps/api/event';\nconst unlisten = await listen('error', (event) => {\n console.log(`Got error in window ${event.windowLabel}, payload: ${event.payload}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":19,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":20,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":21,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":19,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":22,"name":"once","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"event.ts","line":88,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L88"}],"signatures":[{"id":23,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event from the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { once } from '@tauri-apps/api/event';\ninterface LoadedPayload {\n loggedIn: boolean,\n token: string\n}\nconst unlisten = await once('loaded', (event) => {\n console.log(`App is loaded, loggedIn: ${event.payload.loggedIn}, token: ${event.payload.token}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":24,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":25,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":26,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":24,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[3]},{"title":"Interfaces","children":[618]},{"title":"Type Aliases","children":[624,2,629]},{"title":"Functions","children":[27,17,22]}],"sources":[{"fileName":"event.ts","line":12,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/event.ts#L12"}]},{"id":31,"name":"mocks","kind":2,"kindString":"Module","flags":{},"children":[{"id":43,"name":"clearMocks","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":171,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/mocks.ts#L171"}],"signatures":[{"id":44,"name":"clearMocks","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Clears mocked functions/data injected by the other functions in this module.\nWhen using a test runner that doesn't provide a fresh window object for each test, calling this function will reset tauri specific properties.\n\n# Example\n\n"},{"kind":"code","text":"```js\nimport { mockWindows, clearMocks } from \"@tauri-apps/api/mocks\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked windows\", () => {\n mockWindows(\"main\", \"second\", \"third\");\n\n expect(window).toHaveProperty(\"__TAURI_METADATA__\")\n})\n\ntest(\"no mocked windows\", () => {\n expect(window).not.toHaveProperty(\"__TAURI_METADATA__\")\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"intrinsic","name":"void"}}]},{"id":32,"name":"mockIPC","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":65,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/mocks.ts#L65"}],"signatures":[{"id":33,"name":"mockIPC","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Intercepts all IPC requests with the given mock handler.\n\nThis function can be used when testing tauri frontend applications or when running the frontend in a Node.js context during static site generation.\n\n# Examples\n\nTesting setup using vitest:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n switch (cmd) {\n case \"add\":\n return (args.a as number) + (args.b as number);\n default:\n break;\n }\n });\n\n expect(invoke('add', { a: 12, b: 15 })).resolves.toBe(27);\n})\n```"},{"kind":"text","text":"\n\nThe callback function can also return a Promise:\n"},{"kind":"code","text":"```js\nimport { mockIPC, clearMocks } from \"@tauri-apps/api/mocks\"\nimport { invoke } from \"@tauri-apps/api/tauri\"\n\nafterEach(() => {\n clearMocks()\n})\n\ntest(\"mocked command\", () => {\n mockIPC((cmd, args) => {\n if(cmd === \"get_data\") {\n return fetch(\"https://example.com/data.json\")\n .then((response) => response.json())\n }\n });\n\n expect(invoke('get_data')).resolves.toBe({ foo: 'bar' });\n})\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":34,"name":"cb","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":35,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"mocks.ts","line":66,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/mocks.ts#L66"}],"signatures":[{"id":36,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":37,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":38,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":39,"name":"mockWindows","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"mocks.ts","line":135,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/mocks.ts#L135"}],"signatures":[{"id":40,"name":"mockWindows","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Mocks one or many window labels.\nIn non-tauri context it is required to call this function *before* using the "},{"kind":"code","text":"`@tauri-apps/api/window`"},{"kind":"text","text":" module.\n\nThis function only mocks the *presence* of windows,\nwindow properties (e.g. width and height) can be mocked like regular IPC calls using the "},{"kind":"code","text":"`mockIPC`"},{"kind":"text","text":" function.\n\n# Examples\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\nimport { getCurrent } from \"@tauri-apps/api/window\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nconst win = getCurrent();\n\nwin.label // \"main\"\n```"},{"kind":"text","text":"\n\n"},{"kind":"code","text":"```js\nimport { mockWindows } from \"@tauri-apps/api/mocks\";\n\nmockWindows(\"main\", \"second\", \"third\");\n\nmockIPC((cmd, args) => {\n if (cmd === \"tauri\") {\n if (\n args?.__tauriModule === \"Window\" &&\n args?.message?.cmd === \"manage\" &&\n args?.message?.data?.cmd?.type === \"close\"\n ) {\n console.log('closing window!');\n }\n }\n});\n\nconst { getCurrent } = await import(\"@tauri-apps/api/window\");\n\nconst win = getCurrent();\nawait win.close(); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":41,"name":"current","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":42,"name":"additionalWindows","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"comment":{"summary":[{"kind":"text","text":"Label of additional windows the app has."}]},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Functions","children":[43,32,39]}],"sources":[{"fileName":"mocks.ts","line":5,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/mocks.ts#L5"}]},{"id":45,"name":"path","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"The path module provides utilities for working with file and directory paths.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.path`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":".\n\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.path`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.path) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"path\": {\n \"all\": true, // enable all Path APIs\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":46,"name":"BaseDirectory","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":62,"name":"AppCache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L48"}],"type":{"type":"literal","value":16}},{"id":59,"name":"AppConfig","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":45,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L45"}],"type":{"type":"literal","value":13}},{"id":60,"name":"AppData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":46,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L46"}],"type":{"type":"literal","value":14}},{"id":61,"name":"AppLocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L47"}],"type":{"type":"literal","value":15}},{"id":63,"name":"AppLog","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L49"}],"type":{"type":"literal","value":17}},{"id":47,"name":"Audio","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L33"}],"type":{"type":"literal","value":1}},{"id":48,"name":"Cache","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L34"}],"type":{"type":"literal","value":2}},{"id":49,"name":"Config","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L35"}],"type":{"type":"literal","value":3}},{"id":50,"name":"Data","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L36"}],"type":{"type":"literal","value":4}},{"id":64,"name":"Desktop","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L51"}],"type":{"type":"literal","value":18}},{"id":52,"name":"Document","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L38"}],"type":{"type":"literal","value":6}},{"id":53,"name":"Download","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L39"}],"type":{"type":"literal","value":7}},{"id":65,"name":"Executable","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L52"}],"type":{"type":"literal","value":19}},{"id":66,"name":"Font","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L53"}],"type":{"type":"literal","value":20}},{"id":67,"name":"Home","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L54"}],"type":{"type":"literal","value":21}},{"id":51,"name":"LocalData","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L37"}],"type":{"type":"literal","value":5}},{"id":54,"name":"Picture","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L40"}],"type":{"type":"literal","value":8}},{"id":55,"name":"Public","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L41"}],"type":{"type":"literal","value":9}},{"id":57,"name":"Resource","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L43"}],"type":{"type":"literal","value":11}},{"id":68,"name":"Runtime","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L55"}],"type":{"type":"literal","value":22}},{"id":58,"name":"Temp","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":44,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L44"}],"type":{"type":"literal","value":12}},{"id":69,"name":"Template","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L56"}],"type":{"type":"literal","value":23}},{"id":56,"name":"Video","kind":16,"kindString":"Enumeration Member","flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L42"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[62,59,60,61,63,47,48,49,50,64,52,53,65,66,67,51,54,55,57,68,58,69,56]}],"sources":[{"fileName":"path.ts","line":32,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L32"}]},{"id":118,"name":"delimiter","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides the platform-specific path segment delimiter:\n- "},{"kind":"code","text":"`;`"},{"kind":"text","text":" on Windows\n- "},{"kind":"code","text":"`:`"},{"kind":"text","text":" on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":555,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L555"}],"type":{"type":"union","types":[{"type":"literal","value":";"},{"type":"literal","value":":"}]},"defaultValue":"..."},{"id":117,"name":"sep","kind":32,"kindString":"Variable","flags":{"isConst":true},"comment":{"summary":[{"kind":"text","text":"Provides the platform-specific path segment separator:\n- "},{"kind":"code","text":"`\\` on Windows\n- `"},{"kind":"text","text":"/` on POSIX"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"path.ts","line":546,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L546"}],"type":{"type":"union","types":[{"type":"literal","value":"\\"},{"type":"literal","value":"/"}]},"defaultValue":"..."},{"id":76,"name":"appCacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":121,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L121"}],"signatures":[{"id":77,"name":"appCacheDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's cache files.\nResolves to "},{"kind":"code","text":"`${cacheDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appCacheDir } from '@tauri-apps/api/path';\nconst appCacheDirPath = await appCacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":70,"name":"appConfigDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":70,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L70"}],"signatures":[{"id":71,"name":"appConfigDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's config files.\nResolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appConfigDir } from '@tauri-apps/api/path';\nconst appConfigDirPath = await appConfigDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":72,"name":"appDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":87,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L87"}],"signatures":[{"id":73,"name":"appDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's data files.\nResolves to "},{"kind":"code","text":"`${dataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":74,"name":"appLocalDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":104,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L104"}],"signatures":[{"id":75,"name":"appLocalDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's local data files.\nResolves to "},{"kind":"code","text":"`${localDataDir}/${bundleIdentifier}`"},{"kind":"text","text":", where "},{"kind":"code","text":"`bundleIdentifier`"},{"kind":"text","text":" is the value ["},{"kind":"code","text":"`tauri.bundle.identifier`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#bundleconfig.identifier) is configured in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLocalDataDir } from '@tauri-apps/api/path';\nconst appLocalDataDirPath = await appLocalDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":78,"name":"appLogDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":533,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L533"}],"signatures":[{"id":79,"name":"appLogDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the suggested directory for your app's log files.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`${homeDir}/Library/Logs/{bundleIdentifier}`"},{"kind":"text","text":"\n- **Windows:** Resolves to "},{"kind":"code","text":"`${configDir}/${bundleIdentifier}/logs`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appLogDir } from '@tauri-apps/api/path';\nconst appLogDirPath = await appLogDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":80,"name":"audioDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":143,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L143"}],"signatures":[{"id":81,"name":"audioDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's audio directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_MUSIC_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Music`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Music}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { audioDir } from '@tauri-apps/api/path';\nconst audioDirPath = await audioDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":134,"name":"basename","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":647,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L647"}],"signatures":[{"id":135,"name":"basename","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the last portion of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { basename, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst base = await basename(resourcePath);\nassert(base === 'app.conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":136,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":137,"name":"ext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"An optional file extension to be removed from the returned path."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":82,"name":"cacheDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":165,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L165"}],"signatures":[{"id":83,"name":"cacheDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's cache directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CACHE_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.cache`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Caches`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { cacheDir } from '@tauri-apps/api/path';\nconst cacheDirPath = await cacheDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":84,"name":"configDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":187,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L187"}],"signatures":[{"id":85,"name":"configDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's config directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_CONFIG_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.config`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { configDir } from '@tauri-apps/api/path';\nconst configDirPath = await configDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":86,"name":"dataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":209,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L209"}],"signatures":[{"id":87,"name":"dataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_RoamingAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dataDir } from '@tauri-apps/api/path';\nconst dataDirPath = await dataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":88,"name":"desktopDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":231,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L231"}],"signatures":[{"id":89,"name":"desktopDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's desktop directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DESKTOP_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Desktop`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Desktop}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { desktopDir } from '@tauri-apps/api/path';\nconst desktopPath = await desktopDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":128,"name":"dirname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":613,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L613"}],"signatures":[{"id":129,"name":"dirname","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the directory name of a "},{"kind":"code","text":"`path`"},{"kind":"text","text":". Trailing directory separators are ignored."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { dirname, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst dir = await dirname(appDataDirPath);\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":130,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":90,"name":"documentDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":253,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L253"}],"signatures":[{"id":91,"name":"documentDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's document directory."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { documentDir } from '@tauri-apps/api/path';\nconst documentDirPath = await documentDir();\n```"},{"kind":"text","text":"\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOCUMENTS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Documents`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Documents}`"},{"kind":"text","text":"."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":92,"name":"downloadDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":275,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L275"}],"signatures":[{"id":93,"name":"downloadDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's download directory.\n\n#### Platform-specific\n\n- **Linux**: Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_DOWNLOAD_DIR`"},{"kind":"text","text":".\n- **macOS**: Resolves to "},{"kind":"code","text":"`$HOME/Downloads`"},{"kind":"text","text":".\n- **Windows**: Resolves to "},{"kind":"code","text":"`{FOLDERID_Downloads}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { downloadDir } from '@tauri-apps/api/path';\nconst downloadDirPath = await downloadDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":94,"name":"executableDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":297,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L297"}],"signatures":[{"id":95,"name":"executableDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's executable directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_BIN_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$XDG_DATA_HOME/../bin`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/bin`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { executableDir } from '@tauri-apps/api/path';\nconst executableDirPath = await executableDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":131,"name":"extname","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":629,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L629"}],"signatures":[{"id":132,"name":"extname","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the extension of the "},{"kind":"code","text":"`path`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { extname, resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('app.conf');\nconst ext = await extname(resourcePath);\nassert(ext === 'conf');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":133,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":96,"name":"fontDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":319,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L319"}],"signatures":[{"id":97,"name":"fontDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's font directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME/fonts`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share/fonts`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Fonts`"},{"kind":"text","text":".\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { fontDir } from '@tauri-apps/api/path';\nconst fontDirPath = await fontDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":98,"name":"homeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":341,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L341"}],"signatures":[{"id":99,"name":"homeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's home directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Profile}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { homeDir } from '@tauri-apps/api/path';\nconst homeDirPath = await homeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":138,"name":"isAbsolute","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":661,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L661"}],"signatures":[{"id":139,"name":"isAbsolute","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns whether the path is absolute or not."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { isAbsolute } from '@tauri-apps/api/path';\nassert(await isAbsolute('/home/tauri'));\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":140,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":125,"name":"join","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":598,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L598"}],"signatures":[{"id":126,"name":"join","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Joins all given "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments together using the platform-specific separator as a delimiter, then normalizes the resulting path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { join, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await join(appDataDirPath, 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":127,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":100,"name":"localDataDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":363,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L363"}],"signatures":[{"id":101,"name":"localDataDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's local data directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_DATA_HOME`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$HOME/.local/share`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Library/Application Support`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_LocalAppData}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { localDataDir } from '@tauri-apps/api/path';\nconst localDataDirPath = await localDataDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":122,"name":"normalize","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":583,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L583"}],"signatures":[{"id":123,"name":"normalize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Normalizes the given "},{"kind":"code","text":"`path`"},{"kind":"text","text":", resolving "},{"kind":"code","text":"`'..'`"},{"kind":"text","text":" and "},{"kind":"code","text":"`'.'`"},{"kind":"text","text":" segments and resolve symbolic links."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { normalize, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await normalize(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":124,"name":"path","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":102,"name":"pictureDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":385,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L385"}],"signatures":[{"id":103,"name":"pictureDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's picture directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PICTURES_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Pictures`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Pictures}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { pictureDir } from '@tauri-apps/api/path';\nconst pictureDirPath = await pictureDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":104,"name":"publicDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":407,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L407"}],"signatures":[{"id":105,"name":"publicDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's public directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_PUBLICSHARE_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Public`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Public}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { publicDir } from '@tauri-apps/api/path';\nconst publicDirPath = await publicDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":119,"name":"resolve","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":568,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L568"}],"signatures":[{"id":120,"name":"resolve","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resolves a sequence of "},{"kind":"code","text":"`paths`"},{"kind":"text","text":" or "},{"kind":"code","text":"`path`"},{"kind":"text","text":" segments into an absolute path."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolve, appDataDir } from '@tauri-apps/api/path';\nconst appDataDirPath = await appDataDir();\nconst path = await resolve(appDataDirPath, '..', 'users', 'tauri', 'avatar.png');\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":121,"name":"paths","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":108,"name":"resolveResource","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":444,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L444"}],"signatures":[{"id":109,"name":"resolveResource","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resolve the path to a resource file."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resolveResource } from '@tauri-apps/api/path';\nconst resourcePath = await resolveResource('script.sh');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The full path to the resource."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":110,"name":"resourcePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The path to the resource.\nMust follow the same syntax as defined in "},{"kind":"code","text":"`tauri.conf.json > tauri > bundle > resources`"},{"kind":"text","text":", i.e. keeping subfolders and parent dir components ("},{"kind":"code","text":"`../`"},{"kind":"text","text":")."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":106,"name":"resourceDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":424,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L424"}],"signatures":[{"id":107,"name":"resourceDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the application's resource directory.\nTo resolve a resource path, see the [[resolveResource | "},{"kind":"code","text":"`resolveResource API`"},{"kind":"text","text":"]]."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { resourceDir } from '@tauri-apps/api/path';\nconst resourceDirPath = await resourceDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":111,"name":"runtimeDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":467,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L467"}],"signatures":[{"id":112,"name":"runtimeDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's runtime directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to "},{"kind":"code","text":"`$XDG_RUNTIME_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Not supported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { runtimeDir } from '@tauri-apps/api/path';\nconst runtimeDirPath = await runtimeDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":113,"name":"templateDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":489,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L489"}],"signatures":[{"id":114,"name":"templateDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's template directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_TEMPLATES_DIR`"},{"kind":"text","text":".\n- **macOS:** Not supported.\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Templates}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { templateDir } from '@tauri-apps/api/path';\nconst templateDirPath = await templateDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":115,"name":"videoDir","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"path.ts","line":511,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L511"}],"signatures":[{"id":116,"name":"videoDir","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the path to the user's video directory.\n\n#### Platform-specific\n\n- **Linux:** Resolves to ["},{"kind":"code","text":"`xdg-user-dirs`"},{"kind":"text","text":"](https://www.freedesktop.org/wiki/Software/xdg-user-dirs/)' "},{"kind":"code","text":"`XDG_VIDEOS_DIR`"},{"kind":"text","text":".\n- **macOS:** Resolves to "},{"kind":"code","text":"`$HOME/Movies`"},{"kind":"text","text":".\n- **Windows:** Resolves to "},{"kind":"code","text":"`{FOLDERID_Videos}`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { videoDir } from '@tauri-apps/api/path';\nconst videoDirPath = await videoDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[46]},{"title":"Variables","children":[118,117]},{"title":"Functions","children":[76,70,72,74,78,80,134,82,84,86,88,128,90,92,94,131,96,98,138,125,100,122,102,104,119,108,106,111,113,115]}],"sources":[{"fileName":"path.ts","line":26,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/path.ts#L26"}]},{"id":141,"name":"tauri","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Invoke your custom commands.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.tauri`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":142,"name":"InvokeArgs","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":63,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/tauri.ts#L63"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","qualifiedName":"Record","package":"typescript"}},{"id":155,"name":"convertFileSrc","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":129,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/tauri.ts#L129"}],"signatures":[{"id":156,"name":"convertFileSrc","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Convert a device file path to an URL that can be loaded by the webview.\nNote that "},{"kind":"code","text":"`asset:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://asset.localhost`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.security.csp`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#securityconfig.csp) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":".\nExample CSP value: "},{"kind":"code","text":"`\"csp\": \"default-src 'self'; img-src 'self' asset: https://asset.localhost\"`"},{"kind":"text","text":" to use the asset protocol on image sources.\n\nAdditionally, "},{"kind":"code","text":"`asset`"},{"kind":"text","text":" must be added to ["},{"kind":"code","text":"`tauri.allowlist.protocol`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.protocol)\nin "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" and its access scope must be defined on the "},{"kind":"code","text":"`assetScope`"},{"kind":"text","text":" array on the same "},{"kind":"code","text":"`protocol`"},{"kind":"text","text":" object."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appDataDir, join } from '@tauri-apps/api/path';\nimport { convertFileSrc } from '@tauri-apps/api/tauri';\nconst appDataDirPath = await appDataDir();\nconst filePath = await join(appDataDirPath, 'assets/video.mp4');\nconst assetUrl = convertFileSrc(filePath);\n\nconst video = document.getElementById('my-video');\nconst source = document.createElement('source');\nsource.type = 'video/mp4';\nsource.src = assetUrl;\nvideo.appendChild(source);\nvideo.load();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"the URL that can be used as source on the webview."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":157,"name":"filePath","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":158,"name":"protocol","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The protocol to use. Defaults to "},{"kind":"code","text":"`asset`"},{"kind":"text","text":". You only need to set this when using a custom protocol."}]},"type":{"type":"intrinsic","name":"string"},"defaultValue":"'asset'"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":150,"name":"invoke","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":79,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/tauri.ts#L79"}],"signatures":[{"id":151,"name":"invoke","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sends a message to the backend."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { invoke } from '@tauri-apps/api/tauri';\nawait invoke('login', { user: 'tauri', password: 'poiwe3h4r5ip3yrhtew9ty' });\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving or rejecting to the backend response."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"typeParameter":[{"id":152,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":153,"name":"cmd","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":154,"name":"args","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","id":142,"name":"InvokeArgs"},"defaultValue":"{}"}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":152,"name":"T"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":143,"name":"transformCallback","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"tauri.ts","line":36,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/tauri.ts#L36"}],"signatures":[{"id":144,"name":"transformCallback","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Transforms a callback function to a string identifier that can be passed to the backend.\nThe backend uses the identifier to "},{"kind":"code","text":"`eval()`"},{"kind":"text","text":" the callback."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"A unique identifier associated with the callback function."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"parameters":[{"id":145,"name":"callback","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":146,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"tauri.ts","line":37,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/tauri.ts#L37"}],"signatures":[{"id":147,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":148,"name":"response","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":149,"name":"once","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Type Aliases","children":[142]},{"title":"Functions","children":[155,150,143]}],"sources":[{"fileName":"tauri.ts","line":13,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/tauri.ts#L13"}]},{"id":159,"name":"window","kind":2,"kindString":"Module","flags":{},"comment":{"summary":[{"kind":"text","text":"Provides APIs to create windows, communicate with other windows and manipulate the current window.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.window`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":".\n\nThe APIs must be added to ["},{"kind":"code","text":"`tauri.allowlist.window`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#allowlistconfig.window) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```json\n{\n \"tauri\": {\n \"allowlist\": {\n \"window\": {\n \"all\": true, // enable all window APIs\n \"create\": true, // enable window creation\n \"center\": true,\n \"requestUserAttention\": true,\n \"setResizable\": true,\n \"setTitle\": true,\n \"maximize\": true,\n \"unmaximize\": true,\n \"minimize\": true,\n \"unminimize\": true,\n \"show\": true,\n \"hide\": true,\n \"close\": true,\n \"setDecorations\": true,\n \"setShadow\": true,\n \"setAlwaysOnTop\": true,\n \"setContentProtected\": true,\n \"setSize\": true,\n \"setMinSize\": true,\n \"setMaxSize\": true,\n \"setPosition\": true,\n \"setFullscreen\": true,\n \"setFocus\": true,\n \"setIcon\": true,\n \"setSkipTaskbar\": true,\n \"setCursorGrab\": true,\n \"setCursorVisible\": true,\n \"setCursorIcon\": true,\n \"setCursorPosition\": true,\n \"setIgnoreCursorEvents\": true,\n \"startDragging\": true,\n \"print\": true\n }\n }\n }\n}\n```"},{"kind":"text","text":"\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security.\n\n## Window events\n\nEvents can be listened to using "},{"kind":"code","text":"`appWindow.listen`"},{"kind":"text","text":":\n"},{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nappWindow.listen(\"my-window-event\", ({ event, payload }) => { });\n```"}]},"children":[{"id":560,"name":"UserAttentionType","kind":8,"kindString":"Enumeration","flags":{},"comment":{"summary":[{"kind":"text","text":"Attention type to request on a window."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":561,"name":"Critical","kind":16,"kindString":"Enumeration Member","flags":{},"comment":{"summary":[{"kind":"text","text":"#### Platform-specific\n- **macOS:** Bounces the dock icon until the application is in focus.\n- **Windows:** Flashes both the window and the taskbar button until the application is in focus."}]},"sources":[{"fileName":"window.ts","line":226,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L226"}],"type":{"type":"literal","value":1}},{"id":562,"name":"Informational","kind":16,"kindString":"Enumeration Member","flags":{},"comment":{"summary":[{"kind":"text","text":"#### Platform-specific\n- **macOS:** Bounces the dock icon once.\n- **Windows:** Flashes the taskbar button until the application is in focus."}]},"sources":[{"fileName":"window.ts","line":232,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L232"}],"type":{"type":"literal","value":2}}],"groups":[{"title":"Enumeration Members","children":[561,562]}],"sources":[{"fileName":"window.ts","line":220,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L220"}]},{"id":505,"name":"CloseRequestedEvent","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":506,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":1971,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1971"}],"signatures":[{"id":507,"name":"new CloseRequestedEvent","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":508,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":618,"typeArguments":[{"type":"literal","value":null}],"name":"Event"}}],"type":{"type":"reference","id":505,"name":"CloseRequestedEvent"}}]},{"id":512,"name":"_preventDefault","kind":1024,"kindString":"Property","flags":{"isPrivate":true},"sources":[{"fileName":"window.ts","line":1969,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1969"}],"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"},{"id":509,"name":"event","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"window.ts","line":1964,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1964"}],"type":{"type":"reference","id":2,"name":"EventName"}},{"id":511,"name":"id","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"window.ts","line":1968,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1968"}],"type":{"type":"intrinsic","name":"number"}},{"id":510,"name":"windowLabel","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"window.ts","line":1966,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1966"}],"type":{"type":"intrinsic","name":"string"}},{"id":515,"name":"isPreventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1981,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1981"}],"signatures":[{"id":516,"name":"isPreventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"boolean"}}]},{"id":513,"name":"preventDefault","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1977,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1977"}],"signatures":[{"id":514,"name":"preventDefault","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"intrinsic","name":"void"}}]}],"groups":[{"title":"Constructors","children":[506]},{"title":"Properties","children":[512,509,511,510]},{"title":"Methods","children":[515,513]}],"sources":[{"fileName":"window.ts","line":1962,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1962"}]},{"id":541,"name":"LogicalPosition","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A position represented in logical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":542,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":164,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L164"}],"signatures":[{"id":543,"name":"new LogicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":544,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":545,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":541,"name":"LogicalPosition"}}]},{"id":546,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":160,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L160"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":547,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L161"}],"type":{"type":"intrinsic","name":"number"}},{"id":548,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":162,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L162"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[542]},{"title":"Properties","children":[546,547,548]}],"sources":[{"fileName":"window.ts","line":159,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L159"}]},{"id":522,"name":"LogicalSize","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A size represented in logical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":523,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":118,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L118"}],"signatures":[{"id":524,"name":"new LogicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":525,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":526,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":522,"name":"LogicalSize"}}]},{"id":529,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L116"}],"type":{"type":"intrinsic","name":"number"}},{"id":527,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":114,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L114"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Logical'"},{"id":528,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L115"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Constructors","children":[523]},{"title":"Properties","children":[529,527,528]}],"sources":[{"fileName":"window.ts","line":113,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L113"}]},{"id":549,"name":"PhysicalPosition","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A position represented in physical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":550,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":180,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L180"}],"signatures":[{"id":551,"name":"new PhysicalPosition","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":552,"name":"x","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":553,"name":"y","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":549,"name":"PhysicalPosition"}}]},{"id":554,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":176,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L176"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":555,"name":"x","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L177"}],"type":{"type":"intrinsic","name":"number"}},{"id":556,"name":"y","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":178,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L178"}],"type":{"type":"intrinsic","name":"number"}},{"id":557,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L195"}],"signatures":[{"id":558,"name":"toLogical","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Converts the physical position to a logical one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\nconst position = await appWindow.innerPosition();\nconst logical = position.toLogical(factor);\n```"}]}]},"parameters":[{"id":559,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":541,"name":"LogicalPosition"}}]}],"groups":[{"title":"Constructors","children":[550]},{"title":"Properties","children":[554,555,556]},{"title":"Methods","children":[557]}],"sources":[{"fileName":"window.ts","line":175,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L175"}]},{"id":530,"name":"PhysicalSize","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"A size represented in physical pixels."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":531,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":134,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L134"}],"signatures":[{"id":532,"name":"new PhysicalSize","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":533,"name":"width","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":534,"name":"height","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":530,"name":"PhysicalSize"}}]},{"id":537,"name":"height","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":132,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L132"}],"type":{"type":"intrinsic","name":"number"}},{"id":535,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":130,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L130"}],"type":{"type":"intrinsic","name":"string"},"defaultValue":"'Physical'"},{"id":536,"name":"width","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L131"}],"type":{"type":"intrinsic","name":"number"}},{"id":538,"name":"toLogical","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L149"}],"signatures":[{"id":539,"name":"toLogical","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Converts the physical size to a logical one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\nconst size = await appWindow.innerSize();\nconst logical = size.toLogical(factor);\n```"}]}]},"parameters":[{"id":540,"name":"scaleFactor","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","id":522,"name":"LogicalSize"}}]}],"groups":[{"title":"Constructors","children":[531]},{"title":"Properties","children":[537,535,536]},{"title":"Methods","children":[538]}],"sources":[{"fileName":"window.ts","line":129,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L129"}]},{"id":162,"name":"WebviewWindow","kind":128,"kindString":"Class","flags":{},"comment":{"summary":[{"kind":"text","text":"Create new webview windows and get a handle to existing ones.\n\nWindows are identified by a *label* a unique identifier that can be used to reference it later.\nIt may only contain alphanumeric characters "},{"kind":"code","text":"`a-zA-Z`"},{"kind":"text","text":" plus the following special characters "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\n// loading embedded asset:\nconst webview = new WebviewWindow('theUniqueLabel', {\n url: 'path/to/page.html'\n});\n// alternatively, load a remote URL:\nconst webview = new WebviewWindow('theUniqueLabel', {\n url: 'https://github.com/tauri-apps/tauri'\n});\n\nwebview.once('tauri://created', function () {\n // webview window successfully created\n});\nwebview.once('tauri://error', function (e) {\n // an error happened creating the webview window\n});\n\n// emit an event to the backend\nawait webview.emit(\"some event\", \"data\");\n// listen to an event from the backend\nconst unlisten = await webview.listen(\"event name\", e => {});\nunlisten();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":166,"name":"constructor","kind":512,"kindString":"Constructor","flags":{},"sources":[{"fileName":"window.ts","line":2039,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2039"}],"signatures":[{"id":167,"name":"new WebviewWindow","kind":16384,"kindString":"Constructor signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new WebviewWindow."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { WebviewWindow } from '@tauri-apps/api/window';\nconst webview = new WebviewWindow('my-label', {\n url: 'https://github.com/tauri-apps/tauri'\n});\nwebview.once('tauri://created', function () {\n // webview window successfully created\n});\nwebview.once('tauri://error', function (e) {\n // an error happened creating the webview window\n});\n```"},{"kind":"text","text":"\n\n*"}]},{"tag":"@returns","content":[{"kind":"text","text":"The WebviewWindow instance to communicate with the webview."}]}]},"parameters":[{"id":168,"name":"label","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The unique webview window label. Must be alphanumeric: "},{"kind":"code","text":"`a-zA-Z-/:_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":169,"name":"options","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":588,"name":"WindowOptions"},"defaultValue":"{}"}],"type":{"type":"reference","id":162,"name":"WebviewWindow"},"overwrites":{"type":"reference","name":"WindowManager.constructor"}}],"overwrites":{"type":"reference","name":"WindowManager.constructor"}},{"id":302,"name":"label","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The window label. It is a unique identifier for the window, can be used to reference it later."}]},"sources":[{"fileName":"window.ts","line":316,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L316"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","name":"WindowManager.label"}},{"id":303,"name":"listeners","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Local event listeners."}]},"sources":[{"fileName":"window.ts","line":318,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L318"}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"},{"type":"array","elementType":{"type":"reference","id":624,"typeArguments":[{"type":"intrinsic","name":"any"}],"name":"EventCallback"}}],"name":"Record","qualifiedName":"Record","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listeners"}},{"id":196,"name":"center","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":780,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L780"}],"signatures":[{"id":197,"name":"center","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Centers the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.center();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.center"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.center"}},{"id":221,"name":"close","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1081,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1081"}],"signatures":[{"id":222,"name":"close","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Closes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.close();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.close"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.close"}},{"id":314,"name":"emit","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":400,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L400"}],"signatures":[{"id":315,"name":"emit","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend, tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.emit('window-loaded', { loggedIn: true, token: 'authToken' });\n```"}]}]},"parameters":[{"id":316,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":317,"name":"payload","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Event payload."}]},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.emit"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.emit"}},{"id":219,"name":"hide","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1056,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1056"}],"signatures":[{"id":220,"name":"hide","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window visibility to false."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.hide();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.hide"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.hide"}},{"id":172,"name":"innerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":470,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L470"}],"signatures":[{"id":173,"name":"innerPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The position of the top-left hand corner of the window's client area relative to the top-left hand corner of the desktop."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst position = await appWindow.innerPosition();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's inner position."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":549,"name":"PhysicalPosition"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.innerPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.innerPosition"}},{"id":176,"name":"innerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":521,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L521"}],"signatures":[{"id":177,"name":"innerSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The physical size of the window's client area.\nThe client area is the content of the window, excluding the title bar and borders."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst size = await appWindow.innerSize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's inner size."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":530,"name":"PhysicalSize"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.innerSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.innerSize"}},{"id":186,"name":"isDecorated","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":647,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L647"}],"signatures":[{"id":187,"name":"isDecorated","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current decorated state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst decorated = await appWindow.isDecorated();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is decorated or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isDecorated"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isDecorated"}},{"id":180,"name":"isFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":572,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L572"}],"signatures":[{"id":181,"name":"isFullscreen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current fullscreen state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst fullscreen = await appWindow.isFullscreen();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is in fullscreen mode or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isFullscreen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isFullscreen"}},{"id":184,"name":"isMaximized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":622,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L622"}],"signatures":[{"id":185,"name":"isMaximized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current maximized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst maximized = await appWindow.isMaximized();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is maximized or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isMaximized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isMaximized"}},{"id":182,"name":"isMinimized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":597,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L597"}],"signatures":[{"id":183,"name":"isMinimized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current minimized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst minimized = await appWindow.isMinimized();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.3.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isMinimized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isMinimized"}},{"id":188,"name":"isResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":672,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L672"}],"signatures":[{"id":189,"name":"isResizable","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current resizable state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst resizable = await appWindow.isResizable();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is resizable or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isResizable"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isResizable"}},{"id":190,"name":"isVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":697,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L697"}],"signatures":[{"id":191,"name":"isVisible","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current visible state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst visible = await appWindow.isVisible();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"Whether the window is visible or not."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.isVisible"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.isVisible"}},{"id":304,"name":"listen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":345,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L345"}],"signatures":[{"id":305,"name":"listen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event emitted by the backend that is tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst unlisten = await appWindow.listen('state-changed', (event) => {\n console.log(`Got error: ${payload}`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]}]},"typeParameter":[{"id":306,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":307,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"reference","id":2,"name":"EventName"}},{"id":308,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":306,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.listen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.listen"}},{"id":207,"name":"maximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":906,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L906"}],"signatures":[{"id":208,"name":"maximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Maximizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.maximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.maximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.maximize"}},{"id":213,"name":"minimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":981,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L981"}],"signatures":[{"id":214,"name":"minimize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Minimizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.minimize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.minimize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.minimize"}},{"id":281,"name":"onCloseRequested","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1770,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1770"}],"signatures":[{"id":282,"name":"onCloseRequested","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window close requested. Emitted when the user requests to closes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nimport { confirm } from '@tauri-apps/api/dialog';\nconst unlisten = await appWindow.onCloseRequested(async (event) => {\n const confirmed = await confirm('Are you sure?');\n if (!confirmed) {\n // user did not confirm closing the window; let's prevent it\n event.preventDefault();\n }\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":283,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":284,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"sources":[{"fileName":"window.ts","line":1771,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1771"}],"signatures":[{"id":285,"name":"__type","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":286,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":505,"name":"CloseRequestedEvent"}}],"type":{"type":"union","types":[{"type":"intrinsic","name":"void"},{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}]}}]}}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onCloseRequested"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onCloseRequested"}},{"id":296,"name":"onFileDropEvent","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1904,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1904"}],"signatures":[{"id":297,"name":"onFileDropEvent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to a file drop event.\nThe listener is triggered when the user hovers the selected files on the window,\ndrops the files or cancels the operation."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onFileDropEvent((event) => {\n if (event.payload.type === 'hover') {\n console.log('User hovering', event.payload.paths);\n } else if (event.payload.type === 'drop') {\n console.log('User dropped', event.payload.paths);\n } else {\n console.log('File drop cancelled');\n }\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":298,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":579,"name":"FileDropEvent"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onFileDropEvent"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onFileDropEvent"}},{"id":287,"name":"onFocusChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1803,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1803"}],"signatures":[{"id":288,"name":"onFocusChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window focus change."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onFocusChanged(({ payload: focused }) => {\n console.log('Focus changed, window is focused? ' + focused);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":289,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onFocusChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onFocusChanged"}},{"id":293,"name":"onMenuClicked","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1873,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1873"}],"signatures":[{"id":294,"name":"onMenuClicked","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to the window menu item click. The payload is the item id."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onMenuClicked(({ payload: menuId }) => {\n console.log('Menu clicked: ' + menuId);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":295,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onMenuClicked"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onMenuClicked"}},{"id":278,"name":"onMoved","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1738,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1738"}],"signatures":[{"id":279,"name":"onMoved","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window move."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onMoved(({ payload: position }) => {\n console.log('Window moved', position);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":280,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":549,"name":"PhysicalPosition"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onMoved"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onMoved"}},{"id":275,"name":"onResized","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1712,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1712"}],"signatures":[{"id":276,"name":"onResized","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window resize."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onResized(({ payload: size }) => {\n console.log('Window resized', size);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":277,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":530,"name":"PhysicalSize"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onResized"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onResized"}},{"id":290,"name":"onScaleChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1845,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1845"}],"signatures":[{"id":291,"name":"onScaleChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to window scale change. Emitted when the window's scale factor has changed.\nThe following user actions can cause DPI changes:\n- Changing the display's resolution.\n- Changing the display's scale factor (e.g. in Control Panel on Windows).\n- Moving the window to a display with a different scale factor."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onScaleChanged(({ payload }) => {\n console.log('Scale changed', payload.scaleFactor, payload.size);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":292,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":576,"name":"ScaleFactorChanged"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onScaleChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onScaleChanged"}},{"id":299,"name":"onThemeChanged","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1954,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1954"}],"signatures":[{"id":300,"name":"onThemeChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to the system theme change."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from \"@tauri-apps/api/window\";\nconst unlisten = await appWindow.onThemeChanged(({ payload: theme }) => {\n console.log('New theme: ' + theme);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"parameters":[{"id":301,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":569,"name":"Theme"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.onThemeChanged"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.onThemeChanged"}},{"id":309,"name":"once","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":378,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L378"}],"signatures":[{"id":310,"name":"once","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event emitted by the backend that is tied to the webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst unlisten = await appWindow.once('initialized', (event) => {\n console.log(`Window initialized!`);\n});\n\n// you need to call unlisten if your handler goes out of scope e.g. the component is unmounted\nunlisten();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise resolving to a function to unlisten to the event.\nNote that removing the listener is required if your listener goes out of scope e.g. the component is unmounted."}]}]},"typeParameter":[{"id":311,"name":"T","kind":131072,"kindString":"Type parameter","flags":{}}],"parameters":[{"id":312,"name":"event","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event name. Must include only alphanumeric characters, "},{"kind":"code","text":"`-`"},{"kind":"text","text":", "},{"kind":"code","text":"`/`"},{"kind":"text","text":", "},{"kind":"code","text":"`:`"},{"kind":"text","text":" and "},{"kind":"code","text":"`_`"},{"kind":"text","text":"."}]},"type":{"type":"intrinsic","name":"string"}},{"id":313,"name":"handler","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","id":624,"typeArguments":[{"type":"reference","id":311,"name":"T"}],"name":"EventCallback"}}],"type":{"type":"reference","typeArguments":[{"type":"reference","id":629,"name":"UnlistenFn"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.once"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.once"}},{"id":174,"name":"outerPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":495,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L495"}],"signatures":[{"id":175,"name":"outerPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The position of the top-left hand corner of the window relative to the top-left hand corner of the desktop."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst position = await appWindow.outerPosition();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's outer position."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":549,"name":"PhysicalPosition"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.outerPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.outerPosition"}},{"id":178,"name":"outerSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":547,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L547"}],"signatures":[{"id":179,"name":"outerSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The physical size of the entire window.\nThese dimensions include the title bar and borders. If you don't want that (and you usually don't), use inner_size instead."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst size = await appWindow.outerSize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's outer size."}]}]},"type":{"type":"reference","typeArguments":[{"type":"reference","id":530,"name":"PhysicalSize"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.outerSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.outerSize"}},{"id":198,"name":"requestUserAttention","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":816,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L816"}],"signatures":[{"id":199,"name":"requestUserAttention","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Requests user attention to the window, this has no effect if the application\nis already focused. How requesting for user attention manifests is platform dependent,\nsee "},{"kind":"code","text":"`UserAttentionType`"},{"kind":"text","text":" for details.\n\nProviding "},{"kind":"code","text":"`null`"},{"kind":"text","text":" will unset the request for user attention. Unsetting the request for\nuser attention might not be done automatically by the WM when the window receives input.\n\n#### Platform-specific\n\n- **macOS:** "},{"kind":"code","text":"`null`"},{"kind":"text","text":" has no effect.\n- **Linux:** Urgency levels have the same effect."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.requestUserAttention();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":200,"name":"requestType","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":560,"name":"UserAttentionType"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.requestUserAttention"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.requestUserAttention"}},{"id":170,"name":"scaleFactor","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":445,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L445"}],"signatures":[{"id":171,"name":"scaleFactor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"The scale factor that can be used to map physical pixels to logical pixels."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst factor = await appWindow.scaleFactor();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window's monitor scale factor."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.scaleFactor"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.scaleFactor"}},{"id":229,"name":"setAlwaysOnTop","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1171,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1171"}],"signatures":[{"id":230,"name":"setAlwaysOnTop","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setAlwaysOnTop(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":231,"name":"alwaysOnTop","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows or not."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setAlwaysOnTop"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setAlwaysOnTop"}},{"id":232,"name":"setContentProtected","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1199,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1199"}],"signatures":[{"id":233,"name":"setContentProtected","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Prevents the window contents from being captured by other apps."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setContentProtected(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"1.2.0"}]}]},"parameters":[{"id":234,"name":"protected_","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setContentProtected"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setContentProtected"}},{"id":258,"name":"setCursorGrab","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1519,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1519"}],"signatures":[{"id":259,"name":"setCursorGrab","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Grabs the cursor, preventing it from leaving the window.\n\nThere's no guarantee that the cursor will be hidden. You should\nhide it by yourself if you want so.\n\n#### Platform-specific\n\n- **Linux:** Unsupported.\n- **macOS:** This locks the cursor in a fixed location, which looks visually awkward."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorGrab(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":260,"name":"grab","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"code","text":"`true`"},{"kind":"text","text":" to grab the cursor icon, "},{"kind":"code","text":"`false`"},{"kind":"text","text":" to release it."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorGrab"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorGrab"}},{"id":264,"name":"setCursorIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1579,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1579"}],"signatures":[{"id":265,"name":"setCursorIcon","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Modifies the cursor icon of the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorIcon('help');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":266,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor icon."}]},"type":{"type":"reference","id":160,"name":"CursorIcon"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorIcon"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorIcon"}},{"id":267,"name":"setCursorPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1606,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1606"}],"signatures":[{"id":268,"name":"setCursorPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Changes the position of the cursor in window coordinates."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalPosition } from '@tauri-apps/api/window';\nawait appWindow.setCursorPosition(new LogicalPosition(600, 300));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":269,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new cursor position."}]},"type":{"type":"union","types":[{"type":"reference","id":549,"name":"PhysicalPosition"},{"type":"reference","id":541,"name":"LogicalPosition"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorPosition"}},{"id":261,"name":"setCursorVisible","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1552,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1552"}],"signatures":[{"id":262,"name":"setCursorVisible","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Modifies the cursor's visibility.\n\n#### Platform-specific\n\n- **Windows:** The cursor is only hidden within the confines of the window.\n- **macOS:** The cursor is hidden as long as the window has input focus, even if the cursor is\n outside of the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setCursorVisible(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":263,"name":"visible","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`false`"},{"kind":"text","text":", this will hide the cursor. If "},{"kind":"code","text":"`true`"},{"kind":"text","text":", this will show the cursor."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorVisible"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setCursorVisible"}},{"id":223,"name":"setDecorations","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1107,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1107"}],"signatures":[{"id":224,"name":"setDecorations","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setDecorations(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":225,"name":"decorations","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setDecorations"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setDecorations"}},{"id":250,"name":"setFocus","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1417,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1417"}],"signatures":[{"id":251,"name":"setFocus","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Bring the window to front and focus."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setFocus();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setFocus"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setFocus"}},{"id":247,"name":"setFullscreen","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1391,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1391"}],"signatures":[{"id":248,"name":"setFullscreen","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window fullscreen state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setFullscreen(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":249,"name":"fullscreen","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window should go to fullscreen or not."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setFullscreen"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setFullscreen"}},{"id":252,"name":"setIcon","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1450,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1450"}],"signatures":[{"id":253,"name":"setIcon","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window icon."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setIcon('/tauri/awesome.png');\n```"},{"kind":"text","text":"\n\nNote that you need the "},{"kind":"code","text":"`icon-ico`"},{"kind":"text","text":" or "},{"kind":"code","text":"`icon-png`"},{"kind":"text","text":" Cargo features to use this API.\nTo enable it, change your Cargo.toml file:\n"},{"kind":"code","text":"```toml\n[dependencies]\ntauri = { version = \"...\", features = [\"...\", \"icon-png\"] }\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":254,"name":"icon","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"Icon bytes or path to the icon file."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","name":"Uint8Array","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array","qualifiedName":"Uint8Array","package":"typescript"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setIcon"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setIcon"}},{"id":270,"name":"setIgnoreCursorEvents","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1650,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1650"}],"signatures":[{"id":271,"name":"setIgnoreCursorEvents","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Changes the cursor events behavior."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setIgnoreCursorEvents(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":272,"name":"ignore","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"code","text":"`true`"},{"kind":"text","text":" to ignore the cursor events; "},{"kind":"code","text":"`false`"},{"kind":"text","text":" to process them as usual."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setIgnoreCursorEvents"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setIgnoreCursorEvents"}},{"id":241,"name":"setMaxSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1306,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1306"}],"signatures":[{"id":242,"name":"setMaxSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window maximum inner size. If the "},{"kind":"code","text":"`size`"},{"kind":"text","text":" argument is undefined, the constraint is unset."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalSize } from '@tauri-apps/api/window';\nawait appWindow.setMaxSize(new LogicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":243,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size, or "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to unset the constraint."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"literal","value":null},{"type":"reference","id":530,"name":"PhysicalSize"},{"type":"reference","id":522,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setMaxSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setMaxSize"}},{"id":238,"name":"setMinSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1264,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1264"}],"signatures":[{"id":239,"name":"setMinSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window minimum inner size. If the "},{"kind":"code","text":"`size`"},{"kind":"text","text":" argument is not provided, the constraint is unset."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, PhysicalSize } from '@tauri-apps/api/window';\nawait appWindow.setMinSize(new PhysicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":240,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size, or "},{"kind":"code","text":"`null`"},{"kind":"text","text":" to unset the constraint."}]},"type":{"type":"union","types":[{"type":"intrinsic","name":"undefined"},{"type":"literal","value":null},{"type":"reference","id":530,"name":"PhysicalSize"},{"type":"reference","id":522,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setMinSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setMinSize"}},{"id":244,"name":"setPosition","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1348,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1348"}],"signatures":[{"id":245,"name":"setPosition","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window outer position."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalPosition } from '@tauri-apps/api/window';\nawait appWindow.setPosition(new LogicalPosition(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":246,"name":"position","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new position, in logical or physical pixels."}]},"type":{"type":"union","types":[{"type":"reference","id":549,"name":"PhysicalPosition"},{"type":"reference","id":541,"name":"LogicalPosition"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setPosition"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setPosition"}},{"id":201,"name":"setResizable","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":853,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L853"}],"signatures":[{"id":202,"name":"setResizable","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Updates the window resizable flag."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setResizable(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":203,"name":"resizable","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setResizable"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setResizable"}},{"id":226,"name":"setShadow","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1144,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1144"}],"signatures":[{"id":227,"name":"setShadow","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether or not the window should have shadow.\n\n#### Platform-specific\n\n- **Windows:**\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" has no effect on decorated window, shadows are always ON.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" will make ndecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setShadow(false);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0"}]}]},"parameters":[{"id":228,"name":"enable","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setShadow"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setShadow"}},{"id":235,"name":"setSize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1226,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1226"}],"signatures":[{"id":236,"name":"setSize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Resizes the window with a new inner size."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow, LogicalSize } from '@tauri-apps/api/window';\nawait appWindow.setSize(new LogicalSize(600, 500));\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":237,"name":"size","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The logical or physical inner size."}]},"type":{"type":"union","types":[{"type":"reference","id":530,"name":"PhysicalSize"},{"type":"reference","id":522,"name":"LogicalSize"}]}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setSize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setSize"}},{"id":255,"name":"setSkipTaskbar","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1484,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1484"}],"signatures":[{"id":256,"name":"setSkipTaskbar","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Whether the window icon should be hidden from the taskbar or not.\n\n#### Platform-specific\n\n- **macOS:** Unsupported."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setSkipTaskbar(true);\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":257,"name":"skip","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"true to hide window icon, false to show it."}]},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setSkipTaskbar"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setSkipTaskbar"}},{"id":204,"name":"setTitle","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":880,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L880"}],"signatures":[{"id":205,"name":"setTitle","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window title."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.setTitle('Tauri');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"parameters":[{"id":206,"name":"title","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The new title"}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.setTitle"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.setTitle"}},{"id":217,"name":"show","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1031,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1031"}],"signatures":[{"id":218,"name":"show","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window visibility to true."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.show();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.show"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.show"}},{"id":273,"name":"startDragging","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1676,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1676"}],"signatures":[{"id":274,"name":"startDragging","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Starts dragging the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.startDragging();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.startDragging"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.startDragging"}},{"id":194,"name":"theme","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":752,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L752"}],"signatures":[{"id":195,"name":"theme","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current theme.\n\n#### Platform-specific\n\n- **macOS:** Theme was introduced on macOS 10.14. Returns "},{"kind":"code","text":"`light`"},{"kind":"text","text":" on macOS 10.13 and below."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst theme = await appWindow.theme();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The window theme."}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":569,"name":"Theme"}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.theme"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.theme"}},{"id":192,"name":"title","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":722,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L722"}],"signatures":[{"id":193,"name":"title","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the window's current title."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nconst title = await appWindow.title();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.3.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.title"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.title"}},{"id":211,"name":"toggleMaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":956,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L956"}],"signatures":[{"id":212,"name":"toggleMaximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Toggles the window maximized state."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.toggleMaximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.toggleMaximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.toggleMaximize"}},{"id":209,"name":"unmaximize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":931,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L931"}],"signatures":[{"id":210,"name":"unmaximize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unmaximizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.unmaximize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.unmaximize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.unmaximize"}},{"id":215,"name":"unminimize","kind":2048,"kindString":"Method","flags":{},"sources":[{"fileName":"window.ts","line":1006,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L1006"}],"signatures":[{"id":216,"name":"unminimize","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Unminimizes the window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { appWindow } from '@tauri-apps/api/window';\nawait appWindow.unminimize();\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"A promise indicating the success or failure of the operation."}]}]},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"},"inheritedFrom":{"type":"reference","name":"WindowManager.unminimize"}}],"inheritedFrom":{"type":"reference","name":"WindowManager.unminimize"}},{"id":163,"name":"getByLabel","kind":2048,"kindString":"Method","flags":{"isStatic":true},"sources":[{"fileName":"window.ts","line":2071,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2071"}],"signatures":[{"id":164,"name":"getByLabel","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets the WebviewWindow for the webview associated with the given label."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { WebviewWindow } from '@tauri-apps/api/window';\nconst mainWindow = WebviewWindow.getByLabel('main');\n```"}]},{"tag":"@returns","content":[{"kind":"text","text":"The WebviewWindow instance to communicate with the webview or null if the webview doesn't exist."}]}]},"parameters":[{"id":165,"name":"label","kind":32768,"kindString":"Parameter","flags":{},"comment":{"summary":[{"kind":"text","text":"The webview window label."}]},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","id":162,"name":"WebviewWindow"}]}}]}],"groups":[{"title":"Constructors","children":[166]},{"title":"Properties","children":[302,303]},{"title":"Methods","children":[196,221,314,219,172,176,186,180,184,182,188,190,304,207,213,281,296,287,293,278,275,290,299,309,174,178,198,170,229,232,258,264,267,261,223,250,247,252,270,241,238,244,201,226,235,255,204,217,273,194,192,211,209,215,163]}],"sources":[{"fileName":"window.ts","line":2019,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2019"}],"extendedTypes":[{"type":"reference","name":"WindowManager"}]},{"id":571,"name":"Monitor","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Allows you to retrieve information about a given monitor."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":572,"name":"name","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"Human-readable name of the monitor"}]},"sources":[{"fileName":"window.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L81"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}},{"id":574,"name":"position","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"the Top-left corner position of the monitor relative to the larger full screen area."}]},"sources":[{"fileName":"window.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L85"}],"type":{"type":"reference","id":549,"name":"PhysicalPosition"}},{"id":575,"name":"scaleFactor","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The scale factor that can be used to map physical pixels to logical pixels."}]},"sources":[{"fileName":"window.ts","line":87,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L87"}],"type":{"type":"intrinsic","name":"number"}},{"id":573,"name":"size","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The monitor's resolution."}]},"sources":[{"fileName":"window.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L83"}],"type":{"type":"reference","id":530,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[572,574,575,573]}],"sources":[{"fileName":"window.ts","line":79,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L79"}]},{"id":576,"name":"ScaleFactorChanged","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"The payload for the "},{"kind":"code","text":"`scaleChange`"},{"kind":"text","text":" event."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.2"}]}]},"children":[{"id":577,"name":"scaleFactor","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The new window scale factor."}]},"sources":[{"fileName":"window.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L97"}],"type":{"type":"intrinsic","name":"number"}},{"id":578,"name":"size","kind":1024,"kindString":"Property","flags":{},"comment":{"summary":[{"kind":"text","text":"The new window size"}]},"sources":[{"fileName":"window.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L99"}],"type":{"type":"reference","id":530,"name":"PhysicalSize"}}],"groups":[{"title":"Properties","children":[577,578]}],"sources":[{"fileName":"window.ts","line":95,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L95"}]},{"id":588,"name":"WindowOptions","kind":256,"kindString":"Interface","flags":{},"comment":{"summary":[{"kind":"text","text":"Configuration for the window to create."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"children":[{"id":615,"name":"acceptFirstMouse","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether clicking an inactive window also clicks through to the webview on macOS."}]},"sources":[{"fileName":"window.ts","line":2195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2195"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":607,"name":"alwaysOnTop","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should always be on top of other windows or not."}]},"sources":[{"fileName":"window.ts","line":2153,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2153"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":590,"name":"center","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Show window in the center of the screen.."}]},"sources":[{"fileName":"window.ts","line":2115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2115"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":608,"name":"contentProtected","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Prevents the window contents from being captured by other apps."}]},"sources":[{"fileName":"window.ts","line":2155,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2155"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":606,"name":"decorations","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should have borders and bars or not."}]},"sources":[{"fileName":"window.ts","line":2151,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2151"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":611,"name":"fileDropEnabled","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the file drop is enabled or not on the webview. By default it is enabled.\n\nDisabling it is required to use drag and drop on the frontend on Windows."}]},"sources":[{"fileName":"window.ts","line":2177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2177"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":602,"name":"focus","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window will be initially focused or not."}]},"sources":[{"fileName":"window.ts","line":2139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2139"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":601,"name":"fullscreen","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is in fullscreen mode or not."}]},"sources":[{"fileName":"window.ts","line":2137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2137"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":594,"name":"height","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial height."}]},"sources":[{"fileName":"window.ts","line":2123,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2123"}],"type":{"type":"intrinsic","name":"number"}},{"id":614,"name":"hiddenTitle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"If "},{"kind":"code","text":"`true`"},{"kind":"text","text":", sets the window title to be hidden on macOS."}]},"sources":[{"fileName":"window.ts","line":2191,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2191"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":598,"name":"maxHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum height. Only applies if "},{"kind":"code","text":"`maxWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2131"}],"type":{"type":"intrinsic","name":"number"}},{"id":597,"name":"maxWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The maximum width. Only applies if "},{"kind":"code","text":"`maxHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2129"}],"type":{"type":"intrinsic","name":"number"}},{"id":604,"name":"maximized","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be maximized upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2147,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2147"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":596,"name":"minHeight","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum height. Only applies if "},{"kind":"code","text":"`minWidth`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2127,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2127"}],"type":{"type":"intrinsic","name":"number"}},{"id":595,"name":"minWidth","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The minimum width. Only applies if "},{"kind":"code","text":"`minHeight`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2125,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2125"}],"type":{"type":"intrinsic","name":"number"}},{"id":599,"name":"resizable","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is resizable or not."}]},"sources":[{"fileName":"window.ts","line":2133,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2133"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":610,"name":"shadow","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window has shadow.\n\n#### Platform-specific\n\n- **Windows:**\n - "},{"kind":"code","text":"`false`"},{"kind":"text","text":" has no effect on decorated window, shadows are always ON.\n - "},{"kind":"code","text":"`true`"},{"kind":"text","text":" will make ndecorated window have a 1px white border,\nand on Windows 11, it will have a rounded corners.\n- **Linux:** Unsupported."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0"}]}]},"sources":[{"fileName":"window.ts","line":2171,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2171"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":609,"name":"skipTaskbar","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether or not the window icon should be added to the taskbar."}]},"sources":[{"fileName":"window.ts","line":2157,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2157"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":616,"name":"tabbingIdentifier","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Defines the window [tabbing identifier](https://developer.apple.com/documentation/appkit/nswindow/1644704-tabbingidentifier) on macOS.\n\nWindows with the same tabbing identifier will be grouped together.\nIf the tabbing identifier is not set, automatic tabbing will be disabled."}]},"sources":[{"fileName":"window.ts","line":2202,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2202"}],"type":{"type":"intrinsic","name":"string"}},{"id":612,"name":"theme","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial window theme. Defaults to the system theme.\n\nOnly implemented on Windows and macOS 10.14+."}]},"sources":[{"fileName":"window.ts","line":2183,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2183"}],"type":{"type":"reference","id":569,"name":"Theme"}},{"id":600,"name":"title","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Window title."}]},"sources":[{"fileName":"window.ts","line":2135,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2135"}],"type":{"type":"intrinsic","name":"string"}},{"id":613,"name":"titleBarStyle","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The style of the macOS title bar."}]},"sources":[{"fileName":"window.ts","line":2187,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2187"}],"type":{"type":"reference","id":570,"name":"TitleBarStyle"}},{"id":603,"name":"transparent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window is transparent or not.\nNote that on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" this requires the "},{"kind":"code","text":"`macos-private-api`"},{"kind":"text","text":" feature flag, enabled under "},{"kind":"code","text":"`tauri.conf.json > tauri > macOSPrivateApi`"},{"kind":"text","text":".\nWARNING: Using private APIs on "},{"kind":"code","text":"`macOS`"},{"kind":"text","text":" prevents your application from being accepted to the "},{"kind":"code","text":"`App Store`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"window.ts","line":2145,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2145"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":589,"name":"url","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Remote URL or local file path to open.\n\n- URL such as "},{"kind":"code","text":"`https://github.com/tauri-apps`"},{"kind":"text","text":" is opened directly on a Tauri window.\n- data: URL such as "},{"kind":"code","text":"`data:text/html,...`"},{"kind":"text","text":" is only supported with the "},{"kind":"code","text":"`window-data-url`"},{"kind":"text","text":" Cargo feature for the "},{"kind":"code","text":"`tauri`"},{"kind":"text","text":" dependency.\n- local file path or route such as "},{"kind":"code","text":"`/path/to/page.html`"},{"kind":"text","text":" or "},{"kind":"code","text":"`/users`"},{"kind":"text","text":" is appended to the application URL (the devServer URL on development, or "},{"kind":"code","text":"`tauri://localhost/`"},{"kind":"text","text":" and "},{"kind":"code","text":"`https://tauri.localhost/`"},{"kind":"text","text":" on production)."}]},"sources":[{"fileName":"window.ts","line":2113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2113"}],"type":{"type":"intrinsic","name":"string"}},{"id":617,"name":"userAgent","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The user agent for the webview."}]},"sources":[{"fileName":"window.ts","line":2206,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2206"}],"type":{"type":"intrinsic","name":"string"}},{"id":605,"name":"visible","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the window should be immediately visible upon creation or not."}]},"sources":[{"fileName":"window.ts","line":2149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2149"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":593,"name":"width","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial width."}]},"sources":[{"fileName":"window.ts","line":2121,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2121"}],"type":{"type":"intrinsic","name":"number"}},{"id":591,"name":"x","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial vertical position. Only applies if "},{"kind":"code","text":"`y`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2117,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2117"}],"type":{"type":"intrinsic","name":"number"}},{"id":592,"name":"y","kind":1024,"kindString":"Property","flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The initial horizontal position. Only applies if "},{"kind":"code","text":"`x`"},{"kind":"text","text":" is also set."}]},"sources":[{"fileName":"window.ts","line":2119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2119"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[615,607,590,608,606,611,602,601,594,614,598,597,604,596,595,599,610,609,616,612,600,613,603,589,617,605,593,591,592]}],"sources":[{"fileName":"window.ts","line":2105,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2105"}]},{"id":160,"name":"CursorIcon","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":235,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L235"}],"type":{"type":"union","types":[{"type":"literal","value":"default"},{"type":"literal","value":"crosshair"},{"type":"literal","value":"hand"},{"type":"literal","value":"arrow"},{"type":"literal","value":"move"},{"type":"literal","value":"text"},{"type":"literal","value":"wait"},{"type":"literal","value":"help"},{"type":"literal","value":"progress"},{"type":"literal","value":"notAllowed"},{"type":"literal","value":"contextMenu"},{"type":"literal","value":"cell"},{"type":"literal","value":"verticalText"},{"type":"literal","value":"alias"},{"type":"literal","value":"copy"},{"type":"literal","value":"noDrop"},{"type":"literal","value":"grab"},{"type":"literal","value":"grabbing"},{"type":"literal","value":"allScroll"},{"type":"literal","value":"zoomIn"},{"type":"literal","value":"zoomOut"},{"type":"literal","value":"eResize"},{"type":"literal","value":"nResize"},{"type":"literal","value":"neResize"},{"type":"literal","value":"nwResize"},{"type":"literal","value":"sResize"},{"type":"literal","value":"seResize"},{"type":"literal","value":"swResize"},{"type":"literal","value":"wResize"},{"type":"literal","value":"ewResize"},{"type":"literal","value":"nsResize"},{"type":"literal","value":"neswResize"},{"type":"literal","value":"nwseResize"},{"type":"literal","value":"colResize"},{"type":"literal","value":"rowResize"}]}},{"id":579,"name":"FileDropEvent","kind":4194304,"kindString":"Type alias","flags":{},"comment":{"summary":[{"kind":"text","text":"The file drop event types."}]},"sources":[{"fileName":"window.ts","line":103,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L103"}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":580,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":582,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":21,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L104"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":581,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":104,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L104"}],"type":{"type":"literal","value":"hover"}}],"groups":[{"title":"Properties","children":[582,581]}],"sources":[{"fileName":"window.ts","line":104,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L104"}]}},{"type":"reflection","declaration":{"id":583,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":585,"name":"paths","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L105"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":584,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":105,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L105"}],"type":{"type":"literal","value":"drop"}}],"groups":[{"title":"Properties","children":[585,584]}],"sources":[{"fileName":"window.ts","line":105,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L105"}]}},{"type":"reflection","declaration":{"id":586,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"children":[{"id":587,"name":"type","kind":1024,"kindString":"Property","flags":{},"sources":[{"fileName":"window.ts","line":106,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L106"}],"type":{"type":"literal","value":"cancel"}}],"groups":[{"title":"Properties","children":[587]}],"sources":[{"fileName":"window.ts","line":106,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L106"}]}}]}},{"id":569,"name":"Theme","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L71"}],"type":{"type":"union","types":[{"type":"literal","value":"light"},{"type":"literal","value":"dark"}]}},{"id":570,"name":"TitleBarStyle","kind":4194304,"kindString":"Type alias","flags":{},"sources":[{"fileName":"window.ts","line":72,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L72"}],"type":{"type":"union","types":[{"type":"literal","value":"visible"},{"type":"literal","value":"transparent"},{"type":"literal","value":"overlay"}]}},{"id":521,"name":"appWindow","kind":32,"kindString":"Variable","flags":{},"comment":{"summary":[{"kind":"text","text":"The WebviewWindow for the current window."}]},"sources":[{"fileName":"window.ts","line":2081,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2081"}],"type":{"type":"reference","id":162,"name":"WebviewWindow"}},{"id":567,"name":"availableMonitors","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2288,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2288"}],"signatures":[{"id":568,"name":"availableMonitors","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the list of all the monitors available on the system."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { availableMonitors } from '@tauri-apps/api/window';\nconst monitors = availableMonitors();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"array","elementType":{"type":"reference","id":571,"name":"Monitor"}}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":563,"name":"currentMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2239,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2239"}],"signatures":[{"id":564,"name":"currentMonitor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the monitor on which the window currently resides.\nReturns "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if current monitor can't be detected."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { currentMonitor } from '@tauri-apps/api/window';\nconst monitor = currentMonitor();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"reference","id":571,"name":"Monitor"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]},{"id":519,"name":"getAll","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":293,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L293"}],"signatures":[{"id":520,"name":"getAll","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Gets a list of instances of "},{"kind":"code","text":"`WebviewWindow`"},{"kind":"text","text":" for all available webview windows."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"array","elementType":{"type":"reference","id":162,"name":"WebviewWindow"}}}]},{"id":517,"name":"getCurrent","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":281,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L281"}],"signatures":[{"id":518,"name":"getCurrent","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Get an instance of "},{"kind":"code","text":"`WebviewWindow`"},{"kind":"text","text":" for the current webview window."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","id":162,"name":"WebviewWindow"}}]},{"id":565,"name":"primaryMonitor","kind":64,"kindString":"Function","flags":{},"sources":[{"fileName":"window.ts","line":2264,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L2264"}],"signatures":[{"id":566,"name":"primaryMonitor","kind":4096,"kindString":"Call signature","flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the primary monitor of the system.\nReturns "},{"kind":"code","text":"`null`"},{"kind":"text","text":" if it can't identify any monitor as a primary one."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { primaryMonitor } from '@tauri-apps/api/window';\nconst monitor = primaryMonitor();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"type":{"type":"reference","typeArguments":[{"type":"union","types":[{"type":"reference","id":571,"name":"Monitor"},{"type":"literal","value":null}]}],"name":"Promise","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise","qualifiedName":"Promise","package":"typescript"}}]}],"groups":[{"title":"Enumerations","children":[560]},{"title":"Classes","children":[505,541,522,549,530,162]},{"title":"Interfaces","children":[571,576,588]},{"title":"Type Aliases","children":[160,579,569,570]},{"title":"Variables","children":[521]},{"title":"Functions","children":[567,563,519,517,565]}],"sources":[{"fileName":"window.ts","line":66,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/607086414/tooling/api/src/window.ts#L66"}]}],"groups":[{"title":"Modules","children":[1,31,45,141,159]}]} \ No newline at end of file +{"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 diff --git a/tooling/api/src/tauri.ts b/tooling/api/src/tauri.ts index 40c27aa55a1..d8af9e0151b 100644 --- a/tooling/api/src/tauri.ts +++ b/tooling/api/src/tauri.ts @@ -55,6 +55,33 @@ function transformCallback( return identifier } +class Channel { + id: number + // @ts-expect-error field used by the IPC serializer + private readonly __TAURI_CHANNEL_MARKER__ = true + #onmessage: (response: T) => void = () => { + // no-op + } + + constructor() { + this.id = transformCallback((response: T) => { + this.#onmessage(response) + }) + } + + set onmessage(handler: (response: T) => void) { + this.#onmessage = handler + } + + get onmessage(): (response: T) => void { + return this.#onmessage + } + + toJSON(): string { + return `__CHANNEL__:${this.id}` + } +} + /** * Command arguments. * @@ -135,4 +162,4 @@ function convertFileSrc(filePath: string, protocol = 'asset'): string { export type { InvokeArgs } -export { transformCallback, invoke, convertFileSrc } +export { transformCallback, Channel, invoke, convertFileSrc }